diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..a1c7c5444 --- /dev/null +++ b/.gitignore @@ -0,0 +1,332 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ +**/Properties/launchSettings.json + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush +.cr/ + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# SmartContracts +!**/SmartContracts/src/bin diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 000000000..4b37b0e16 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,46 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team using the online form in the contacts page of the superalgos.org website. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..c67e8d115 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,45 @@ +# Contributing + +We are thrilled you are interested in contributing to this repository. Your help may be essential to the project's success and we want you in! + +Superalgos is a collective project, currently at a very early stage. Although this repository is not open source software yet, we do welcome contributions from the community. + +Contributions are deemed _voluntary work_. There might be incentives in place for certain kinds of contributions. Contact us for more information in this regard. + +In any case, contributors agree to provide an express grant of patent rights for their contributions. Submitting Pull Requests to this repository represents an express agreement with the terms of our Balanced Contributor Intellectual Property Agreement. This agreement is a direct implementation of GitHub's [Balanced Employee Intellectual Property Agreement 1.0.1](https://github.com/github/balanced-employee-ip-agreement/blob/master/Balanced_Employee_IP_Agreement.md). + +# Balanced Contributor Intellectual Property Agreement 1.0.1 + +This BALANCED CONTRIBUTOR INTELLECTUAL PROPERTY AGREEMENT is between person or team submitting Pull Requests to this repository and Superalgos.org ("Project"). + +**What is this?** This is the Project's Intellectual Property Agreement ("Agreement"). If you've worked in the technology space before, there's a good chance that you've run across one or more of these in the past. This document is the official, entire and exclusive agreement on what intellectual property ("IP") is yours, and what belongs to the Project. + +**Why is this?** The Project needs to be clear on what IP it owns and has rights to. Its customers, contributors, and investors depend on the Project having the legal rights to the products and services it is providing so that the Project can continue operating and doing business. + +The Project also believes that it's important to be clear on what it doesn't own. The Project doesn't want you looking over your shoulder every time you work on something personal or worrying that the Project will someday seize your open source non-lethal mousetrap simulation software. In other words, the Project isn't interested in appropriating your personal projects. + +**Read this.** Please read this document and be sure you understand it before you submit any Pull Requests. Due to legal risk and corporate obligations, the Project cannot, by and large, negotiate its terms. If you feel you have a particular circumstance that keeps you from signing, please let the Project's legal department ("Legal") know. And, of course, you're always free and encouraged to get your own legal counsel to explain anything you're not clear on. + +Cool? Then, by submitting your first Pull Request, and as a condition of your contribution, you agree to the following: + +1. **What the Project owns.** The Project owns any IP ("Project IP") that you create, or help create _as its contributor_, but only if it meets one or more of these additional conditions: The IP was (i) related to an existing or prospective Project product or service at the time you developed, invented, or created it, (ii) developed for use by the Project, or (iii) developed or promoted with existing Project IP or with the Project's endorsement. You hereby grant and assign, and will grant and assign, to the Project all rights and interests in all Project IP. + + "Project IP" includes concepts, designs, developments, discoveries, ideas, improvements, inventions, trade secrets, trademarks, and works of authorship. + +2. **What the Project doesn't own.** If you create IP that doesn't fit into one of the categories listed above, the Project doesn't own it. In other words, the Project doesn't own concepts, designs, developments, discoveries, ideas, improvements, inventions, trade secrets, trademarks, or works of authorship that you develop, invent, or create that do not meet any of the conditions in Section 1. + +3. **Contribution of your IP to Project projects.** If you include your own IP – such as IP you created prior to working for the Project – into a Project product or service, it's still yours, of course, but you grant the Project a non-exclusive, irrevocable, fully paid-up, royalty-free, perpetual, sublicensable, transferable, worldwide license to use it without restriction in any way or implementation, in modified form, or as is, by itself, or incorporated into another product or service ("License"). If you include your name in any project over which the Project would have rights under this Agreement, such as in a copyright notice or a comment in code or documentation, then the License covers the rights associated with that use of your name as well. + +4. **Your contributions to non-Project projects.** The Project recognizes that you may be engaged in work that requires you to submit IP to entities other than the Project, such as open source projects used by the Project. Please make sure that Legal is aware of what you're working on so that Legal can help with any licensing issues. If any project asks you to sign a contribution agreement, you should check with Legal before doing so. These agreements may be legally binding on the Project and so should be run through Legal first. + +5. **Voluntary Works** All Project IP that you are involved with or create as part of your work for the Project is voluntary work which does not require compensation. There might be incentives in place for certain kinds of contributions. Feel free to contact the Project to learn more. + +6. **No conflicts.** You agree that you don't have any outstanding agreements or obligations that conflict with those in this Agreement, and that you won't enter into conflicting agreements in the future. + +7. **IP protection.** The Project might someday need to show the work that went into the development of IP that it uses or has used, or to make government filings to establish that it owns the IP or has rights over it. To help in those situations, you agree not to destroy any records you maintain relating to the development of any Project IP or IP under License (together, "All IP"), and, if the Project asks, to provide those records to the Project. You agree to help the Project secure and defend its rights in All IP. For your help the Project will compensate you at a reasonable rate. If the Project is unable to secure your help, you authorize the Project to act on your behalf (as your agent and attorney-in-fact) in securing all rights related to All IP. + +8. **Confidentiality.** As an contributor or contractor of the Project, you will have access to sensitive confidential information that is important to the Project's business. You are responsible for keeping this information confidential, including after you end your work for the Project. + + "Confidential Information" includes non-public technical details about our products or services, financial information, business strategies and forecasts, customer data, or any other information, data or know-how that is valuable to the Project because it is not publicly known. + + The Project's Confidential Information is sensitive and we expect that you'll treat it as such. You agree to only use the Project's Confidential Information for the purpose of performing your contribution and for the benefit of the Project. You will do your best to keep Confidential Information secret. If you are not sure if something is Confidential Information, you should assume that it is, until you can confirm otherwise. \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000..2fe09f449 --- /dev/null +++ b/LICENSE @@ -0,0 +1,39 @@ +COPYRIGHT NOTICE + +© Copyright 2018 Superalgos.org + + +LICENSE NOTICE + +Superalgos is a collaborative project currently at a very early stage. Because certain aspects of +the project are still not clearly defined, we have chosen to --temporarily-- grant a restrictive +license for the use of this repository, until those aspects are clarified and a proper open source +license can be granted. + +Superalgos.org is publishing the code of this software for several reasons. However, it shall not be considered free software yet. Superalgos is a collaborative project in the crypto space and this +software is still proprietary software. + +The reasons for opening up the code of this software at this stage are the following: + + * We believe that transparency is paramount to achieving our goals, so we want everyone to + be able to understand what this software does and how. Opening up the code of this software + allows anyone to take a close look. + + * We welcome contributions from the community. Contributions are regarded as voluntary work. + There may be incentives in place for certain kinds of contributions. Contact us to learn more. + Contributors agree to provide an express grant of patent rights for their contributions. + + +LICENSE WORDING + +Superalgos.org grants a limited license for the following uses: + +1. CODE REVIEW AND AUDITS. You are granted permission to clone this repository to analyze, + review or audit the code. + +2. COLLABORATING WITH Superalgos.org. You are granted permission to fork this repository + with the sole purpose of correcting bugs and developing functionality in agreement with + Superalgos.org. By contributing to this repository you explicitely agree to the terms + detailed in CONTRIBUTING.MD. + +PLEASE SEE CONTRIBUTING.MD FOR MORE DETAILS ON THE IMPLICATIONS SURROUNDING YOUR CONTRIBUTIONS TO THIS REPOSITORY. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 000000000..f173dfdc9 --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +# ALGOToken +Responsible for the issuing of ALGO tokens + +Plese see the documentation at https://smartcontracts.superalgos.org/ . diff --git a/labs/AdvancedAlgos.AlgoToken.sln b/labs/AdvancedAlgos.AlgoToken.sln new file mode 100644 index 000000000..4ea6266e7 --- /dev/null +++ b/labs/AdvancedAlgos.AlgoToken.sln @@ -0,0 +1,75 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28010.2048 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AdvancedAlgos.AlgoToken.AlgoErc20Token", "algo-erc20-token\src\AdvancedAlgos.AlgoToken.AlgoErc20Token\AdvancedAlgos.AlgoToken.AlgoErc20Token.csproj", "{96BC465D-507E-43BC-A71E-1B4F7799AB19}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AdvancedAlgos.AlgoToken.AlgoErc20Token.IntegrationTests", "algo-erc20-token\test\AdvancedAlgos.AlgoToken.AlgoErc20Token.IntegrationTests\AdvancedAlgos.AlgoToken.AlgoErc20Token.IntegrationTests.csproj", "{B569A2AD-A0E7-4623-AB3A-9BB49938CBE6}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "algo-erc20-token", "algo-erc20-token", "{921A277C-0B10-4186-A814-786F903B4E2C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "algo-token-distribution", "algo-token-distribution", "{4EDC9FAE-176A-4995-B977-F6D2B735F616}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "framework", "framework", "{9A083680-1F9C-4A8C-8FB2-A623DD333AEE}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AdvancedAlgos.AlgoToken.AlgoTokenDistribution", "algo-token-distribution\src\AdvancedAlgos.AlgoToken.AlgoTokenDistribution\AdvancedAlgos.AlgoToken.AlgoTokenDistribution.csproj", "{6D1C63E9-A2F1-4084-B8E4-499B41341023}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AdvancedAlgos.AlgoToken.AlgoTokenDistribution.IntegrationTests", "algo-token-distribution\test\AdvancedAlgos.AlgoToken.AlgoTokenDistribution.IntegrationTests\AdvancedAlgos.AlgoToken.AlgoTokenDistribution.IntegrationTests.csproj", "{CF2E35E6-EFC5-445F-AB17-BEC7E3039C41}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AdvancedAlgos.AlgoToken.Framework.Ethereum.IntegrationTest", "framework\src\AdvancedAlgos.AlgoToken.Framework.Ethereum.IntegrationTest\AdvancedAlgos.AlgoToken.Framework.Ethereum.IntegrationTest.csproj", "{127474F7-81E8-4153-AEE0-A2049D75F77D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AdvancedAlgos.AlgoToken.Framework.Ethereum", "framework\src\AdvancedAlgos.AlgoToken.Framework.Ethereum\AdvancedAlgos.AlgoToken.Framework.Ethereum.csproj", "{B05DC461-E82E-430B-A66D-9C0C9C9F9C9E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AdvancedAlgos.AlgoToken.AlgoTokenPlayground", "algo-token-playground\src\AdvancedAlgos.AlgoToken.AlgoTokenPlayground\AdvancedAlgos.AlgoToken.AlgoTokenPlayground.csproj", "{42569CB0-DA27-4BAE-A657-3617D1644AD5}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {96BC465D-507E-43BC-A71E-1B4F7799AB19}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {96BC465D-507E-43BC-A71E-1B4F7799AB19}.Debug|Any CPU.Build.0 = Debug|Any CPU + {96BC465D-507E-43BC-A71E-1B4F7799AB19}.Release|Any CPU.ActiveCfg = Release|Any CPU + {96BC465D-507E-43BC-A71E-1B4F7799AB19}.Release|Any CPU.Build.0 = Release|Any CPU + {B569A2AD-A0E7-4623-AB3A-9BB49938CBE6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B569A2AD-A0E7-4623-AB3A-9BB49938CBE6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B569A2AD-A0E7-4623-AB3A-9BB49938CBE6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B569A2AD-A0E7-4623-AB3A-9BB49938CBE6}.Release|Any CPU.Build.0 = Release|Any CPU + {6D1C63E9-A2F1-4084-B8E4-499B41341023}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6D1C63E9-A2F1-4084-B8E4-499B41341023}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6D1C63E9-A2F1-4084-B8E4-499B41341023}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6D1C63E9-A2F1-4084-B8E4-499B41341023}.Release|Any CPU.Build.0 = Release|Any CPU + {CF2E35E6-EFC5-445F-AB17-BEC7E3039C41}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CF2E35E6-EFC5-445F-AB17-BEC7E3039C41}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CF2E35E6-EFC5-445F-AB17-BEC7E3039C41}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CF2E35E6-EFC5-445F-AB17-BEC7E3039C41}.Release|Any CPU.Build.0 = Release|Any CPU + {127474F7-81E8-4153-AEE0-A2049D75F77D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {127474F7-81E8-4153-AEE0-A2049D75F77D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {127474F7-81E8-4153-AEE0-A2049D75F77D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {127474F7-81E8-4153-AEE0-A2049D75F77D}.Release|Any CPU.Build.0 = Release|Any CPU + {B05DC461-E82E-430B-A66D-9C0C9C9F9C9E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B05DC461-E82E-430B-A66D-9C0C9C9F9C9E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B05DC461-E82E-430B-A66D-9C0C9C9F9C9E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B05DC461-E82E-430B-A66D-9C0C9C9F9C9E}.Release|Any CPU.Build.0 = Release|Any CPU + {42569CB0-DA27-4BAE-A657-3617D1644AD5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {42569CB0-DA27-4BAE-A657-3617D1644AD5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {42569CB0-DA27-4BAE-A657-3617D1644AD5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {42569CB0-DA27-4BAE-A657-3617D1644AD5}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {96BC465D-507E-43BC-A71E-1B4F7799AB19} = {921A277C-0B10-4186-A814-786F903B4E2C} + {B569A2AD-A0E7-4623-AB3A-9BB49938CBE6} = {921A277C-0B10-4186-A814-786F903B4E2C} + {6D1C63E9-A2F1-4084-B8E4-499B41341023} = {4EDC9FAE-176A-4995-B977-F6D2B735F616} + {CF2E35E6-EFC5-445F-AB17-BEC7E3039C41} = {4EDC9FAE-176A-4995-B977-F6D2B735F616} + {127474F7-81E8-4153-AEE0-A2049D75F77D} = {9A083680-1F9C-4A8C-8FB2-A623DD333AEE} + {B05DC461-E82E-430B-A66D-9C0C9C9F9C9E} = {9A083680-1F9C-4A8C-8FB2-A623DD333AEE} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {79FFEB06-291F-417C-9AC3-2AA0D31CC7D4} + EndGlobalSection +EndGlobal diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/AdvancedAlgos.AlgoToken.AlgoErc20Token.csproj b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/AdvancedAlgos.AlgoToken.AlgoErc20Token.csproj new file mode 100644 index 000000000..aee19e22d --- /dev/null +++ b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/AdvancedAlgos.AlgoToken.AlgoErc20Token.csproj @@ -0,0 +1,25 @@ + + + + netcoreapp2.1 + true + latest + + + + + + + + + + + + + + + + + + + diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/AlgoIntegralConverterExtensions.cs b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/AlgoIntegralConverterExtensions.cs new file mode 100644 index 000000000..94458234c --- /dev/null +++ b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/AlgoIntegralConverterExtensions.cs @@ -0,0 +1,35 @@ +#pragma warning disable EPS02 // Non-readonly struct used as in-parameter + +using System; +using System.Collections.Generic; +using System.Numerics; +using System.Text; + +namespace AdvancedAlgos.AlgoToken.AlgoErc20Token +{ + public static class AlgoIntegralConverterExtensions + { + public const byte TOKEN_DECIMALS = 18; + public const long MEGA_FACTOR = 1000000; + + public static readonly BigInteger TokenFactor = BigInteger.Pow(10, TOKEN_DECIMALS); + + public static BigInteger Algo(this in byte value) => value * TokenFactor; + public static BigInteger Algo(this in sbyte value) => value * TokenFactor; + public static BigInteger Algo(this in short value) => value * TokenFactor; + public static BigInteger Algo(this in ushort value) => value * TokenFactor; + public static BigInteger Algo(this in int value) => value * TokenFactor; + public static BigInteger Algo(this in uint value) => value * TokenFactor; + public static BigInteger Algo(this in long value) => value * TokenFactor; + public static BigInteger Algo(this in ulong value) => value * TokenFactor; + + public static BigInteger MAlgo(this in byte value) => value * TokenFactor * MEGA_FACTOR; + public static BigInteger MAlgo(this in sbyte value) => value * TokenFactor * MEGA_FACTOR; + public static BigInteger MAlgo(this in short value) => value * TokenFactor * MEGA_FACTOR; + public static BigInteger MAlgo(this in ushort value) => value * TokenFactor * MEGA_FACTOR; + public static BigInteger MAlgo(this in int value) => value * TokenFactor * MEGA_FACTOR; + public static BigInteger MAlgo(this in uint value) => value * TokenFactor * MEGA_FACTOR; + public static BigInteger MAlgo(this in long value) => value * TokenFactor * MEGA_FACTOR; + public static BigInteger MAlgo(this in ulong value) => value * TokenFactor * MEGA_FACTOR; + } +} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/AlgoTokenV1.cs b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/AlgoTokenV1.cs new file mode 100644 index 000000000..d61d8fc78 --- /dev/null +++ b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/AlgoTokenV1.cs @@ -0,0 +1,20 @@ +using System; +using System.Numerics; +using System.Threading.Tasks; +using AdvancedAlgos.AlgoToken.Framework.Ethereum; +using Nethereum.Contracts; +using Nethereum.RPC.Eth.DTOs; +using Nethereum.Web3; + +namespace AdvancedAlgos.AlgoToken.AlgoErc20Token +{ + public class AlgoTokenV1 : Erc20Token + { + public AlgoTokenV1(Web3 web3, IGasPriceProvider gasPriceProvider) : base(web3, gasPriceProvider) { } + public AlgoTokenV1(string contractAddress, Web3 web3, IGasPriceProvider gasPriceProvider) : base(contractAddress, web3, gasPriceProvider) { } + + protected override string AbiResourceName => $"SmartContracts.src.bin.{nameof(AlgoTokenV1)}.abi"; + protected override string BinResourceName => $"SmartContracts.src.bin.{nameof(AlgoTokenV1)}.bin"; + protected override BigInteger DeploymentGasUnits => 1200000; + } +} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/Erc20Token.cs b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/Erc20Token.cs new file mode 100644 index 000000000..9b4bf2dc4 --- /dev/null +++ b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/Erc20Token.cs @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; +using System.Numerics; +using System.Text; +using System.Threading.Tasks; +using AdvancedAlgos.AlgoToken.Framework.Ethereum; +using Nethereum.Contracts; +using Nethereum.RPC.Eth.DTOs; +using Nethereum.Web3; + +namespace AdvancedAlgos.AlgoToken.AlgoErc20Token +{ + public abstract class Erc20Token : SmartContract + where TContract : SmartContract + { + private Function _transfer; + private Function _balanceOf; + private Function _pause; + private Function _unpause; + + public Erc20Token(Web3 web3, IGasPriceProvider gasPriceProvider) : base(web3, gasPriceProvider) { } + public Erc20Token(string contractAddress, Web3 web3, IGasPriceProvider gasPriceProvider) : base(contractAddress, web3, gasPriceProvider) { } + + public Task DeployAsync() + => base.DeployAsync(); + + protected override void Initialize(Contract contractDescriptor) + { + _transfer = contractDescriptor.GetFunction("transfer"); + _balanceOf = contractDescriptor.GetFunction("balanceOf"); + _pause = contractDescriptor.GetFunction("pause"); + _unpause = contractDescriptor.GetFunction("unpause"); + } + + public Task TransferAsync(string to, BigInteger value) => + InvokeAsync(_transfer, 900000, to, value); + + public Task BalanceOfAsync(string owner) => + _balanceOf.CallAsync(owner); + + public Task PauseAsync() => + InvokeAsync(_pause, 900000); + + public Task UnpauseAsync() => + InvokeAsync(_unpause, 900000); + } +} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/.vscode/settings.json b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/.vscode/settings.json new file mode 100644 index 000000000..9dea7e6ca --- /dev/null +++ b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/.vscode/settings.json @@ -0,0 +1,9 @@ +{ + "solidity.soliumRules": { + "indentation": "off", + "operator-whitespace": "off", + "error-reason": "off", + "linebreak-style": "off" + }, + "solidity.packageDefaultDependenciesContractsDirectory": "" +} \ No newline at end of file diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/AlgoTokenV1.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/AlgoTokenV1.sol new file mode 100644 index 000000000..c670b8d33 --- /dev/null +++ b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/AlgoTokenV1.sol @@ -0,0 +1,17 @@ +pragma solidity 0.5.4; + +import "openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol"; +import "openzeppelin-solidity/contracts/token/ERC20/ERC20Pausable.sol"; + +contract AlgoTokenV1 is ERC20, ERC20Detailed, ERC20Pausable { + + uint256 public constant INITIAL_SUPPLY = 1000000000 * (10 ** uint256(18)); + + constructor() + ERC20Pausable() + ERC20Detailed("Algos", "ALGO", 18) + public + { + _mint(msg.sender, INITIAL_SUPPLY); + } +} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/bin/AlgoMiner-sol-output.json b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/bin/AlgoMiner-sol-output.json new file mode 100644 index 000000000..b86d5efa9 --- /dev/null +++ b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/bin/AlgoMiner-sol-output.json @@ -0,0 +1,13793 @@ +{ + "contracts": { + "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/AlgoCoreTeamRole.sol": { + "AlgoCoreTeamRole": { + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "addCoreTeam", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "isCoreTeam", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renounceCoreTeam", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + } + ], + "devdoc": { + "methods": {} + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "gasEstimates": null, + "methodIdentifiers": { + "addCoreTeam(address)": "2e6b6849", + "isCoreTeam(address)": "608d3d3d", + "renounceCoreTeam()": "d43acc79" + } + }, + "metadata": "", + "userdoc": { + "methods": {} + } + } + }, + "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/AlgoMiner.sol": { + "AlgoMiner": { + "abi": [ + { + "constant": false, + "inputs": [], + "name": "pauseMining", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "isAlgoMiner", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "pure", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "startMining", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "newMinerAddress", + "type": "address" + } + ], + "name": "migrateMiner", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "addSupervisor", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "addCoreTeam", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "stopAndRemoveOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "resumeMining", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "isCoreTeam", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getCategory", + "outputs": [ + { + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "isSupervisor", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "mine", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "deactivateMiner", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "newOwnerAddress", + "type": "address" + } + ], + "name": "resetMiner", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "activateMiner", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renounceSupervisor", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "DAYS_PER_YEAR", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renounceCoreTeam", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "stopMining", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "name": "minerType", + "type": "uint16" + }, + { + "name": "category", + "type": "uint8" + }, + { + "name": "ownerAddress", + "type": "address" + }, + { + "name": "tokenAddress", + "type": "address" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + } + ], + "devdoc": { + "methods": {} + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "608060405234801561001057600080fd5b50604051608080610ea08339810160409081528151602083015191830151606090930151909290610049336401000000006100c3810204565b61005b336401000000006100de810204565b6002805461ffff191661ffff959095169490941762ff000019166201000060ff949094169390930292909217630100000060b860020a0319166301000000600160a060020a03928316021790925560038054600160a060020a03191691909216179055610184565b6100db600082640100000000610c476100f682021704565b50565b6100db600182640100000000610c476100f682021704565b600160a060020a038116151561010b57600080fd5b61011e828264010000000061014d810204565b1561012857600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b6000600160a060020a038216151561016457600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b610d0d806101936000396000f3006080604052600436106101065763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663162f986d811461010b5780631777fb4b1461012257806321b79d981461014b578063231d4e2a1461016057806329d10b6e146101815780632e6b6849146101a2578063363aa6c7146101c3578063427534a4146101d8578063608d3d3d146101ed57806380258e471461020e57806381a244591461023957806399f4b2511461025a5780639e614ca01461026f578063ada436e914610284578063b2a32cd5146102a5578063be952494146102ba578063c6846ef8146102cf578063d43acc79146102f6578063da4086791461030b575b600080fd5b34801561011757600080fd5b50610120610320565b005b34801561012e57600080fd5b50610137610386565b604080519115158252519081900360200190f35b34801561015757600080fd5b5061012061038b565b34801561016c57600080fd5b50610120600160a060020a036004351661042f565b34801561018d57600080fd5b50610120600160a060020a036004351661051b565b3480156101ae57600080fd5b50610120600160a060020a0360043516610538565b3480156101cf57600080fd5b50610120610555565b3480156101e457600080fd5b506101206105fd565b3480156101f957600080fd5b50610137600160a060020a0360043516610660565b34801561021a57600080fd5b50610223610678565b6040805160ff9092168252519081900360200190f35b34801561024557600080fd5b50610137600160a060020a0360043516610687565b34801561026657600080fd5b5061012061069a565b34801561027b57600080fd5b5061012061086c565b34801561029057600080fd5b50610120600160a060020a03600435166108c6565b3480156102b157600080fd5b5061012061095b565b3480156102c657600080fd5b50610120610a6d565b3480156102db57600080fd5b506102e4610a78565b60408051918252519081900360200190f35b34801561030257600080fd5b50610120610a7e565b34801561031757600080fd5b50610120610a87565b61032933610687565b151561033457600080fd5b60016003805460a060020a900460ff169081111561034e57fe5b1461035857600080fd5b600380546002919074ff0000000000000000000000000000000000000000191660a060020a835b0217905550565b600190565b60025463010000009004600160a060020a031633146103a957600080fd5b60016003805460a060020a900460ff16908111156103c357fe5b146103cd57600080fd5b6003547501000000000000000000000000000000000000000000900460ff16156103f657600080fd5b6003805475ff00000000000000000000000000000000000000000019167501000000000000000000000000000000000000000000179055565b61043833610660565b151561044357600080fd5b60006003805460a060020a900460ff169081111561045d57fe5b1461046757600080fd5b600354604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051610518928492600160a060020a03909116916370a08231916024808201926020929091908290030181600087803b1580156104d357600080fd5b505af11580156104e7573d6000803e3d6000fd5b505050506040513d60208110156104fd57600080fd5b5051600354600160a060020a0316919063ffffffff610b1416565b50565b61052433610687565b151561052f57600080fd5b61051881610bcc565b61054133610660565b151561054c57600080fd5b61051881610bdd565b61055e33610687565b151561056957600080fd5b600380805460a060020a900460ff169081111561058257fe5b141561058d57600080fd5b6003805474ff00000000000000000000000000000000000000001916740300000000000000000000000000000000000000001775ff000000000000000000000000000000000000000000191690556002805476ffffffffffffffffffffffffffffffffffffffff00000019169055565b61060633610687565b151561061157600080fd5b60026003805460a060020a900460ff169081111561062b57fe5b1461063557600080fd5b600380546001919074ff0000000000000000000000000000000000000000191660a060020a8361037f565b6000610672818363ffffffff610bee16565b92915050565b60025462010000900460ff1690565b600061067260018363ffffffff610bee16565b60006106a533610660565b15156106b057600080fd5b60016003805460a060020a900460ff16908111156106ca57fe5b146106d457600080fd5b6003547501000000000000000000000000000000000000000000900460ff1615156106fe57600080fd5b60035460b860020a900461ffff161515610774576003805478ffff00000000000000000000000000000000000000000000001976ff0000000000000000000000000000000000000000000019909116760100000000000000000000000000000000000000000000171660b860020a17905561083c565b60038054600161ffff60b860020a8084048216929092018116820278ffff00000000000000000000000000000000000000000000001990931692909217928390559091041661016e141561083c576003805478ffff000000000000000000000000000000000000000000000019600160ff760100000000000000000000000000000000000000000000808504821692909201160276ff0000000000000000000000000000000000000000000019909216919091171660b860020a179055600454600290046004555b5060045460025460035461016d9092049161051891600160a060020a039182169163010000009091041683610b14565b61087533610660565b151561088057600080fd5b60006003805460a060020a900460ff169081111561089a57fe5b14156108a557600080fd5b6003805475ffff000000000000000000000000000000000000000019169055565b6108cf33610687565b15156108da57600080fd5b600380805460a060020a900460ff16908111156108f357fe5b146108fd57600080fd5b6003805474ff0000000000000000000000000000000000000000191660a060020a17905560028054600160a060020a039290921663010000000276ffffffffffffffffffffffffffffffffffffffff00000019909216919091179055565b600061096633610660565b151561097157600080fd5b60006003805460a060020a900460ff169081111561098b57fe5b1461099557600080fd5b6004541515610a4657600354604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a03909216916370a08231916024808201926020929091908290030181600087803b158015610a0457600080fd5b505af1158015610a18573d6000803e3d6000fd5b505050506040513d6020811015610a2e57600080fd5b50519050801515610a3e57600080fd5b600281046004555b506003805474ff0000000000000000000000000000000000000000191660a060020a179055565b610a7633610c25565b565b61016d81565b610a7633610c36565b60025463010000009004600160a060020a03163314610aa557600080fd5b60016003805460a060020a900460ff1690811115610abf57fe5b14610ac957600080fd5b6003547501000000000000000000000000000000000000000000900460ff161515610af357600080fd5b6003805475ff00000000000000000000000000000000000000000019169055565b82600160a060020a031663a9059cbb83836040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b158015610b9057600080fd5b505af1158015610ba4573d6000803e3d6000fd5b505050506040513d6020811015610bba57600080fd5b50511515610bc757600080fd5b505050565b61051860018263ffffffff610c4716565b61051860008263ffffffff610c4716565b6000600160a060020a0382161515610c0557600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b61051860018263ffffffff610c9516565b61051860008263ffffffff610c9516565b600160a060020a0381161515610c5c57600080fd5b610c668282610bee565b15610c7057600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b600160a060020a0381161515610caa57600080fd5b610cb48282610bee565b1515610cbf57600080fd5b600160a060020a0316600090815260209190915260409020805460ff191690555600a165627a7a723058207b121e87532d8c1f7a6b96bd6424aeda0c92676f8aeca5bd4496952ce22529cc0029", + "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH1 0x80 DUP1 PUSH2 0xEA0 DUP4 CODECOPY DUP2 ADD PUSH1 0x40 SWAP1 DUP2 MSTORE DUP2 MLOAD PUSH1 0x20 DUP4 ADD MLOAD SWAP2 DUP4 ADD MLOAD PUSH1 0x60 SWAP1 SWAP4 ADD MLOAD SWAP1 SWAP3 SWAP1 PUSH2 0x49 CALLER PUSH5 0x100000000 PUSH2 0xC3 DUP2 MUL DIV JUMP JUMPDEST PUSH2 0x5B CALLER PUSH5 0x100000000 PUSH2 0xDE DUP2 MUL DIV JUMP JUMPDEST PUSH1 0x2 DUP1 SLOAD PUSH2 0xFFFF NOT AND PUSH2 0xFFFF SWAP6 SWAP1 SWAP6 AND SWAP5 SWAP1 SWAP5 OR PUSH3 0xFF0000 NOT AND PUSH3 0x10000 PUSH1 0xFF SWAP5 SWAP1 SWAP5 AND SWAP4 SWAP1 SWAP4 MUL SWAP3 SWAP1 SWAP3 OR PUSH4 0x1000000 PUSH1 0xB8 PUSH1 0x2 EXP SUB NOT AND PUSH4 0x1000000 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB SWAP3 DUP4 AND MUL OR SWAP1 SWAP3 SSTORE PUSH1 0x3 DUP1 SLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB NOT AND SWAP2 SWAP1 SWAP3 AND OR SWAP1 SSTORE PUSH2 0x184 JUMP JUMPDEST PUSH2 0xDB PUSH1 0x0 DUP3 PUSH5 0x100000000 PUSH2 0xC47 PUSH2 0xF6 DUP3 MUL OR DIV JUMP JUMPDEST POP JUMP JUMPDEST PUSH2 0xDB PUSH1 0x1 DUP3 PUSH5 0x100000000 PUSH2 0xC47 PUSH2 0xF6 DUP3 MUL OR DIV JUMP JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP2 AND ISZERO ISZERO PUSH2 0x10B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x11E DUP3 DUP3 PUSH5 0x100000000 PUSH2 0x14D DUP2 MUL DIV JUMP JUMPDEST ISZERO PUSH2 0x128 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP1 SLOAD PUSH1 0xFF NOT AND PUSH1 0x1 OR SWAP1 SSTORE JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP3 AND ISZERO ISZERO PUSH2 0x164 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND SWAP1 JUMP JUMPDEST PUSH2 0xD0D DUP1 PUSH2 0x193 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN STOP PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0x106 JUMPI PUSH4 0xFFFFFFFF PUSH29 0x100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 CALLDATALOAD DIV AND PUSH4 0x162F986D DUP2 EQ PUSH2 0x10B JUMPI DUP1 PUSH4 0x1777FB4B EQ PUSH2 0x122 JUMPI DUP1 PUSH4 0x21B79D98 EQ PUSH2 0x14B JUMPI DUP1 PUSH4 0x231D4E2A EQ PUSH2 0x160 JUMPI DUP1 PUSH4 0x29D10B6E EQ PUSH2 0x181 JUMPI DUP1 PUSH4 0x2E6B6849 EQ PUSH2 0x1A2 JUMPI DUP1 PUSH4 0x363AA6C7 EQ PUSH2 0x1C3 JUMPI DUP1 PUSH4 0x427534A4 EQ PUSH2 0x1D8 JUMPI DUP1 PUSH4 0x608D3D3D EQ PUSH2 0x1ED JUMPI DUP1 PUSH4 0x80258E47 EQ PUSH2 0x20E JUMPI DUP1 PUSH4 0x81A24459 EQ PUSH2 0x239 JUMPI DUP1 PUSH4 0x99F4B251 EQ PUSH2 0x25A JUMPI DUP1 PUSH4 0x9E614CA0 EQ PUSH2 0x26F JUMPI DUP1 PUSH4 0xADA436E9 EQ PUSH2 0x284 JUMPI DUP1 PUSH4 0xB2A32CD5 EQ PUSH2 0x2A5 JUMPI DUP1 PUSH4 0xBE952494 EQ PUSH2 0x2BA JUMPI DUP1 PUSH4 0xC6846EF8 EQ PUSH2 0x2CF JUMPI DUP1 PUSH4 0xD43ACC79 EQ PUSH2 0x2F6 JUMPI DUP1 PUSH4 0xDA408679 EQ PUSH2 0x30B JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x117 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x120 PUSH2 0x320 JUMP JUMPDEST STOP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x12E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x137 PUSH2 0x386 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 ISZERO ISZERO DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x157 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x120 PUSH2 0x38B JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x16C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x120 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB PUSH1 0x4 CALLDATALOAD AND PUSH2 0x42F JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x18D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x120 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB PUSH1 0x4 CALLDATALOAD AND PUSH2 0x51B JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x1AE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x120 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB PUSH1 0x4 CALLDATALOAD AND PUSH2 0x538 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x1CF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x120 PUSH2 0x555 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x1E4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x120 PUSH2 0x5FD JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x1F9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x137 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB PUSH1 0x4 CALLDATALOAD AND PUSH2 0x660 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x21A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x223 PUSH2 0x678 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0xFF SWAP1 SWAP3 AND DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x245 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x137 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB PUSH1 0x4 CALLDATALOAD AND PUSH2 0x687 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x266 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x120 PUSH2 0x69A JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x27B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x120 PUSH2 0x86C JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x290 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x120 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB PUSH1 0x4 CALLDATALOAD AND PUSH2 0x8C6 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x2B1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x120 PUSH2 0x95B JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x2C6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x120 PUSH2 0xA6D JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x2DB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x2E4 PUSH2 0xA78 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x302 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x120 PUSH2 0xA7E JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x317 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x120 PUSH2 0xA87 JUMP JUMPDEST PUSH2 0x329 CALLER PUSH2 0x687 JUMP JUMPDEST ISZERO ISZERO PUSH2 0x334 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x3 DUP1 SLOAD PUSH1 0xA0 PUSH1 0x2 EXP SWAP1 DIV PUSH1 0xFF AND SWAP1 DUP2 GT ISZERO PUSH2 0x34E JUMPI INVALID JUMPDEST EQ PUSH2 0x358 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x3 DUP1 SLOAD PUSH1 0x2 SWAP2 SWAP1 PUSH21 0xFF0000000000000000000000000000000000000000 NOT AND PUSH1 0xA0 PUSH1 0x2 EXP DUP4 JUMPDEST MUL OR SWAP1 SSTORE POP JUMP JUMPDEST PUSH1 0x1 SWAP1 JUMP JUMPDEST PUSH1 0x2 SLOAD PUSH4 0x1000000 SWAP1 DIV PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND CALLER EQ PUSH2 0x3A9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x3 DUP1 SLOAD PUSH1 0xA0 PUSH1 0x2 EXP SWAP1 DIV PUSH1 0xFF AND SWAP1 DUP2 GT ISZERO PUSH2 0x3C3 JUMPI INVALID JUMPDEST EQ PUSH2 0x3CD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x3 SLOAD PUSH22 0x1000000000000000000000000000000000000000000 SWAP1 DIV PUSH1 0xFF AND ISZERO PUSH2 0x3F6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x3 DUP1 SLOAD PUSH22 0xFF000000000000000000000000000000000000000000 NOT AND PUSH22 0x1000000000000000000000000000000000000000000 OR SWAP1 SSTORE JUMP JUMPDEST PUSH2 0x438 CALLER PUSH2 0x660 JUMP JUMPDEST ISZERO ISZERO PUSH2 0x443 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x3 DUP1 SLOAD PUSH1 0xA0 PUSH1 0x2 EXP SWAP1 DIV PUSH1 0xFF AND SWAP1 DUP2 GT ISZERO PUSH2 0x45D JUMPI INVALID JUMPDEST EQ PUSH2 0x467 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x3 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH32 0x70A0823100000000000000000000000000000000000000000000000000000000 DUP2 MSTORE ADDRESS PUSH1 0x4 DUP3 ADD MSTORE SWAP1 MLOAD PUSH2 0x518 SWAP3 DUP5 SWAP3 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB SWAP1 SWAP2 AND SWAP2 PUSH4 0x70A08231 SWAP2 PUSH1 0x24 DUP1 DUP3 ADD SWAP3 PUSH1 0x20 SWAP3 SWAP1 SWAP2 SWAP1 DUP3 SWAP1 SUB ADD DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x4D3 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x4E7 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x4FD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP MLOAD PUSH1 0x3 SLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND SWAP2 SWAP1 PUSH4 0xFFFFFFFF PUSH2 0xB14 AND JUMP JUMPDEST POP JUMP JUMPDEST PUSH2 0x524 CALLER PUSH2 0x687 JUMP JUMPDEST ISZERO ISZERO PUSH2 0x52F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x518 DUP2 PUSH2 0xBCC JUMP JUMPDEST PUSH2 0x541 CALLER PUSH2 0x660 JUMP JUMPDEST ISZERO ISZERO PUSH2 0x54C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x518 DUP2 PUSH2 0xBDD JUMP JUMPDEST PUSH2 0x55E CALLER PUSH2 0x687 JUMP JUMPDEST ISZERO ISZERO PUSH2 0x569 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x3 DUP1 DUP1 SLOAD PUSH1 0xA0 PUSH1 0x2 EXP SWAP1 DIV PUSH1 0xFF AND SWAP1 DUP2 GT ISZERO PUSH2 0x582 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x58D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x3 DUP1 SLOAD PUSH21 0xFF0000000000000000000000000000000000000000 NOT AND PUSH21 0x30000000000000000000000000000000000000000 OR PUSH22 0xFF000000000000000000000000000000000000000000 NOT AND SWAP1 SSTORE PUSH1 0x2 DUP1 SLOAD PUSH23 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000 NOT AND SWAP1 SSTORE JUMP JUMPDEST PUSH2 0x606 CALLER PUSH2 0x687 JUMP JUMPDEST ISZERO ISZERO PUSH2 0x611 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x2 PUSH1 0x3 DUP1 SLOAD PUSH1 0xA0 PUSH1 0x2 EXP SWAP1 DIV PUSH1 0xFF AND SWAP1 DUP2 GT ISZERO PUSH2 0x62B JUMPI INVALID JUMPDEST EQ PUSH2 0x635 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x3 DUP1 SLOAD PUSH1 0x1 SWAP2 SWAP1 PUSH21 0xFF0000000000000000000000000000000000000000 NOT AND PUSH1 0xA0 PUSH1 0x2 EXP DUP4 PUSH2 0x37F JUMP JUMPDEST PUSH1 0x0 PUSH2 0x672 DUP2 DUP4 PUSH4 0xFFFFFFFF PUSH2 0xBEE AND JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x2 SLOAD PUSH3 0x10000 SWAP1 DIV PUSH1 0xFF AND SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x672 PUSH1 0x1 DUP4 PUSH4 0xFFFFFFFF PUSH2 0xBEE AND JUMP JUMPDEST PUSH1 0x0 PUSH2 0x6A5 CALLER PUSH2 0x660 JUMP JUMPDEST ISZERO ISZERO PUSH2 0x6B0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x3 DUP1 SLOAD PUSH1 0xA0 PUSH1 0x2 EXP SWAP1 DIV PUSH1 0xFF AND SWAP1 DUP2 GT ISZERO PUSH2 0x6CA JUMPI INVALID JUMPDEST EQ PUSH2 0x6D4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x3 SLOAD PUSH22 0x1000000000000000000000000000000000000000000 SWAP1 DIV PUSH1 0xFF AND ISZERO ISZERO PUSH2 0x6FE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x3 SLOAD PUSH1 0xB8 PUSH1 0x2 EXP SWAP1 DIV PUSH2 0xFFFF AND ISZERO ISZERO PUSH2 0x774 JUMPI PUSH1 0x3 DUP1 SLOAD PUSH25 0xFFFF0000000000000000000000000000000000000000000000 NOT PUSH23 0xFF00000000000000000000000000000000000000000000 NOT SWAP1 SWAP2 AND PUSH23 0x100000000000000000000000000000000000000000000 OR AND PUSH1 0xB8 PUSH1 0x2 EXP OR SWAP1 SSTORE PUSH2 0x83C JUMP JUMPDEST PUSH1 0x3 DUP1 SLOAD PUSH1 0x1 PUSH2 0xFFFF PUSH1 0xB8 PUSH1 0x2 EXP DUP1 DUP5 DIV DUP3 AND SWAP3 SWAP1 SWAP3 ADD DUP2 AND DUP3 MUL PUSH25 0xFFFF0000000000000000000000000000000000000000000000 NOT SWAP1 SWAP4 AND SWAP3 SWAP1 SWAP3 OR SWAP3 DUP4 SWAP1 SSTORE SWAP1 SWAP2 DIV AND PUSH2 0x16E EQ ISZERO PUSH2 0x83C JUMPI PUSH1 0x3 DUP1 SLOAD PUSH25 0xFFFF0000000000000000000000000000000000000000000000 NOT PUSH1 0x1 PUSH1 0xFF PUSH23 0x100000000000000000000000000000000000000000000 DUP1 DUP6 DIV DUP3 AND SWAP3 SWAP1 SWAP3 ADD AND MUL PUSH23 0xFF00000000000000000000000000000000000000000000 NOT SWAP1 SWAP3 AND SWAP2 SWAP1 SWAP2 OR AND PUSH1 0xB8 PUSH1 0x2 EXP OR SWAP1 SSTORE PUSH1 0x4 SLOAD PUSH1 0x2 SWAP1 DIV PUSH1 0x4 SSTORE JUMPDEST POP PUSH1 0x4 SLOAD PUSH1 0x2 SLOAD PUSH1 0x3 SLOAD PUSH2 0x16D SWAP1 SWAP3 DIV SWAP2 PUSH2 0x518 SWAP2 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB SWAP2 DUP3 AND SWAP2 PUSH4 0x1000000 SWAP1 SWAP2 DIV AND DUP4 PUSH2 0xB14 JUMP JUMPDEST PUSH2 0x875 CALLER PUSH2 0x660 JUMP JUMPDEST ISZERO ISZERO PUSH2 0x880 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x3 DUP1 SLOAD PUSH1 0xA0 PUSH1 0x2 EXP SWAP1 DIV PUSH1 0xFF AND SWAP1 DUP2 GT ISZERO PUSH2 0x89A JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x8A5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x3 DUP1 SLOAD PUSH22 0xFFFF0000000000000000000000000000000000000000 NOT AND SWAP1 SSTORE JUMP JUMPDEST PUSH2 0x8CF CALLER PUSH2 0x687 JUMP JUMPDEST ISZERO ISZERO PUSH2 0x8DA JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x3 DUP1 DUP1 SLOAD PUSH1 0xA0 PUSH1 0x2 EXP SWAP1 DIV PUSH1 0xFF AND SWAP1 DUP2 GT ISZERO PUSH2 0x8F3 JUMPI INVALID JUMPDEST EQ PUSH2 0x8FD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x3 DUP1 SLOAD PUSH21 0xFF0000000000000000000000000000000000000000 NOT AND PUSH1 0xA0 PUSH1 0x2 EXP OR SWAP1 SSTORE PUSH1 0x2 DUP1 SLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB SWAP3 SWAP1 SWAP3 AND PUSH4 0x1000000 MUL PUSH23 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000 NOT SWAP1 SWAP3 AND SWAP2 SWAP1 SWAP2 OR SWAP1 SSTORE JUMP JUMPDEST PUSH1 0x0 PUSH2 0x966 CALLER PUSH2 0x660 JUMP JUMPDEST ISZERO ISZERO PUSH2 0x971 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x3 DUP1 SLOAD PUSH1 0xA0 PUSH1 0x2 EXP SWAP1 DIV PUSH1 0xFF AND SWAP1 DUP2 GT ISZERO PUSH2 0x98B JUMPI INVALID JUMPDEST EQ PUSH2 0x995 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x4 SLOAD ISZERO ISZERO PUSH2 0xA46 JUMPI PUSH1 0x3 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH32 0x70A0823100000000000000000000000000000000000000000000000000000000 DUP2 MSTORE ADDRESS PUSH1 0x4 DUP3 ADD MSTORE SWAP1 MLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB SWAP1 SWAP3 AND SWAP2 PUSH4 0x70A08231 SWAP2 PUSH1 0x24 DUP1 DUP3 ADD SWAP3 PUSH1 0x20 SWAP3 SWAP1 SWAP2 SWAP1 DUP3 SWAP1 SUB ADD DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0xA04 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0xA18 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x20 DUP2 LT ISZERO PUSH2 0xA2E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP MLOAD SWAP1 POP DUP1 ISZERO ISZERO PUSH2 0xA3E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x2 DUP2 DIV PUSH1 0x4 SSTORE JUMPDEST POP PUSH1 0x3 DUP1 SLOAD PUSH21 0xFF0000000000000000000000000000000000000000 NOT AND PUSH1 0xA0 PUSH1 0x2 EXP OR SWAP1 SSTORE JUMP JUMPDEST PUSH2 0xA76 CALLER PUSH2 0xC25 JUMP JUMPDEST JUMP JUMPDEST PUSH2 0x16D DUP2 JUMP JUMPDEST PUSH2 0xA76 CALLER PUSH2 0xC36 JUMP JUMPDEST PUSH1 0x2 SLOAD PUSH4 0x1000000 SWAP1 DIV PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND CALLER EQ PUSH2 0xAA5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x3 DUP1 SLOAD PUSH1 0xA0 PUSH1 0x2 EXP SWAP1 DIV PUSH1 0xFF AND SWAP1 DUP2 GT ISZERO PUSH2 0xABF JUMPI INVALID JUMPDEST EQ PUSH2 0xAC9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x3 SLOAD PUSH22 0x1000000000000000000000000000000000000000000 SWAP1 DIV PUSH1 0xFF AND ISZERO ISZERO PUSH2 0xAF3 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x3 DUP1 SLOAD PUSH22 0xFF000000000000000000000000000000000000000000 NOT AND SWAP1 SSTORE JUMP JUMPDEST DUP3 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH4 0xA9059CBB DUP4 DUP4 PUSH1 0x40 MLOAD DUP4 PUSH4 0xFFFFFFFF AND PUSH29 0x100000000000000000000000000000000000000000000000000000000 MUL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP4 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP3 POP POP POP PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0xB90 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0xBA4 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x20 DUP2 LT ISZERO PUSH2 0xBBA JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP MLOAD ISZERO ISZERO PUSH2 0xBC7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP POP POP JUMP JUMPDEST PUSH2 0x518 PUSH1 0x1 DUP3 PUSH4 0xFFFFFFFF PUSH2 0xC47 AND JUMP JUMPDEST PUSH2 0x518 PUSH1 0x0 DUP3 PUSH4 0xFFFFFFFF PUSH2 0xC47 AND JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP3 AND ISZERO ISZERO PUSH2 0xC05 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND SWAP1 JUMP JUMPDEST PUSH2 0x518 PUSH1 0x1 DUP3 PUSH4 0xFFFFFFFF PUSH2 0xC95 AND JUMP JUMPDEST PUSH2 0x518 PUSH1 0x0 DUP3 PUSH4 0xFFFFFFFF PUSH2 0xC95 AND JUMP JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP2 AND ISZERO ISZERO PUSH2 0xC5C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xC66 DUP3 DUP3 PUSH2 0xBEE JUMP JUMPDEST ISZERO PUSH2 0xC70 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP1 SLOAD PUSH1 0xFF NOT AND PUSH1 0x1 OR SWAP1 SSTORE JUMP JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP2 AND ISZERO ISZERO PUSH2 0xCAA JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xCB4 DUP3 DUP3 PUSH2 0xBEE JUMP JUMPDEST ISZERO ISZERO PUSH2 0xCBF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP1 SLOAD PUSH1 0xFF NOT AND SWAP1 SSTORE JUMP STOP LOG1 PUSH6 0x627A7A723058 KECCAK256 PUSH28 0x121E87532D8C1F7A6B96BD6424AEDA0C92676F8AECA5BD4496952CE2 0x25 0x29 0xcc STOP 0x29 ", + "sourceMap": "490:3617:1:-;;;1055:310;8:9:-1;5:2;;;30:1;27;20:12;5:2;1055:310:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;350:24:0;363:10;350:12;;;;:24;:::i;:::-;348:26:2;363:10;348:14;;;;:26;:::i;:::-;1232:10:1;:22;;-1:-1:-1;;1232:22:1;;;;;;;;;;-1:-1:-1;;1265:20:1;;;;;;;;;;;;;;;-1:-1:-1;;;;;;1296:21:1;;-1:-1:-1;;;;;1296:21:1;;;;;;;;:6;1328:29;;-1:-1:-1;;;;;;1328:29:1;;;;;;;;490:3617;;806:96:0;865:29;:16;886:7;865:20;;;;;;:29;:::i;:::-;806:96;:::o;818:94:2:-;879:25;:12;896:7;879:16;;;;;;:25;:::i;244:167:4:-;-1:-1:-1;;;;;316:21:4;;;;308:30;;;;;;353:18;357:4;363:7;353:3;;;;:18;:::i;:::-;352:19;344:28;;;;;;-1:-1:-1;;;;;379:20:4;:11;:20;;;;;;;;;;;:27;;-1:-1:-1;;379:27:4;402:4;379:27;;;244:167::o;725:166::-;809:4;-1:-1:-1;;;;;831:21:4;;;;823:30;;;;;;-1:-1:-1;;;;;;866:20:4;:11;:20;;;;;;;;;;;;;;;725:166::o;490:3617:1:-;;;;;;;" + }, + "gasEstimates": { + "creation": { + "codeDepositCost": "668200", + "executionCost": "infinite", + "totalCost": "infinite" + }, + "external": { + "DAYS_PER_YEAR()": "536", + "activateMiner()": "infinite", + "addCoreTeam(address)": "infinite", + "addSupervisor(address)": "infinite", + "deactivateMiner()": "infinite", + "getCategory()": "608", + "isAlgoMiner()": "212", + "isCoreTeam(address)": "infinite", + "isSupervisor(address)": "infinite", + "migrateMiner(address)": "infinite", + "mine()": "infinite", + "pauseMining()": "infinite", + "renounceCoreTeam()": "infinite", + "renounceSupervisor()": "infinite", + "resetMiner(address)": "infinite", + "resumeMining()": "infinite", + "startMining()": "21275", + "stopAndRemoveOwnership()": "infinite", + "stopMining()": "21624" + } + }, + "methodIdentifiers": { + "DAYS_PER_YEAR()": "c6846ef8", + "activateMiner()": "b2a32cd5", + "addCoreTeam(address)": "2e6b6849", + "addSupervisor(address)": "29d10b6e", + "deactivateMiner()": "9e614ca0", + "getCategory()": "80258e47", + "isAlgoMiner()": "1777fb4b", + "isCoreTeam(address)": "608d3d3d", + "isSupervisor(address)": "81a24459", + "migrateMiner(address)": "231d4e2a", + "mine()": "99f4b251", + "pauseMining()": "162f986d", + "renounceCoreTeam()": "d43acc79", + "renounceSupervisor()": "be952494", + "resetMiner(address)": "ada436e9", + "resumeMining()": "427534a4", + "startMining()": "21b79d98", + "stopAndRemoveOwnership()": "363aa6c7", + "stopMining()": "da408679" + } + }, + "metadata": "{\"compiler\":{\"version\":\"0.4.24+commit.e67f0147\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":false,\"inputs\":[],\"name\":\"pauseMining\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isAlgoMiner\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"startMining\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newMinerAddress\",\"type\":\"address\"}],\"name\":\"migrateMiner\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"addSupervisor\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"addCoreTeam\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"stopAndRemoveOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"resumeMining\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"isCoreTeam\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getCategory\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"isSupervisor\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"mine\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"deactivateMiner\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newOwnerAddress\",\"type\":\"address\"}],\"name\":\"resetMiner\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"activateMiner\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceSupervisor\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"DAYS_PER_YEAR\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceCoreTeam\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"stopMining\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"minerType\",\"type\":\"uint16\"},{\"name\":\"category\",\"type\":\"uint8\"},{\"name\":\"ownerAddress\",\"type\":\"address\"},{\"name\":\"tokenAddress\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/AlgoMiner.sol\":\"AlgoMiner\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/AlgoCoreTeamRole.sol\":{\"keccak256\":\"0x98513c8bd78301543260967ae791ebb2a652f73fef585417f72a3097f4e1ae21\",\"urls\":[\"bzzr://a9cfa1df913c0a9ad0937d821ead954e31f7da6a462933bcfa20abe2b44ec984\"]},\"d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/AlgoMiner.sol\":{\"keccak256\":\"0xbcbc30316cb27f341b793f19490a9d68bab1a270dbd9c67681a1bf410a6944b5\",\"urls\":[\"bzzr://3e80f70b75884a37ba48ec93966687fb024e9c012eb297e98191245728cf882c\"]},\"d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/AlgoSupervisorRole.sol\":{\"keccak256\":\"0x626852f0a9f4d4f9380980d0e1149ddbd366f191fd0ccccdd05bddad48b6edb9\",\"urls\":[\"bzzr://b3e1ed4ffdbe656126a72382de3f2ecacb7005937172513a47019dbaaace7e5a\"]},\"d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/IAlgoMiner.sol\":{\"keccak256\":\"0xb457e39e512b5475c3e70193ab0a751f6626a50417954247f0cf47c7ca15eff7\",\"urls\":[\"bzzr://3b585a4055121fee393f2b691538036c87f56556f43f0b6e851a88de7b8275e6\"]},\"d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol\":{\"keccak256\":\"0xa6e47d62e68903c8fff23500d80e7cc8085b9127995803478d9982cd8a6d49e4\",\"urls\":[\"bzzr://7c87eb3c145fe7592c97baa287501faff7e81c1965333c9b042ffb6b387e94a1\"]},\"d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0xdd18f05c74536a06166c90a17ec3c6932853764f292bed314ceb23e730ff83af\",\"urls\":[\"bzzr://1d8a608339978ac18782f7051816cf23b4072d8814979e3ef74788cc6025cca0\"]},\"d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xc8a7f15fa44eb10057f8bcb58418d3aed6f5267d211d18f93f3d4e0293e3da44\",\"urls\":[\"bzzr://8825e2508348b01a091ff47b8525e583b6e5604f6679684f805d67a9a6a2a7e9\"]},\"d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol\":{\"keccak256\":\"0x0a172a0ef8681d4a7d8034d003670a9b1968d914b0bfa64e13ddca289a85d24a\",\"urls\":[\"bzzr://733b6203c967b44d6de90b5c6b144e58a380a3f29befb2dc70e765dae2f1ca18\"]}},\"version\":1}", + "userdoc": { + "methods": {} + } + } + }, + "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/AlgoSupervisorRole.sol": { + "AlgoSupervisorRole": { + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "addSupervisor", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "isSupervisor", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renounceSupervisor", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + } + ], + "devdoc": { + "methods": {} + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "gasEstimates": null, + "methodIdentifiers": { + "addSupervisor(address)": "29d10b6e", + "isSupervisor(address)": "81a24459", + "renounceSupervisor()": "be952494" + } + }, + "metadata": "", + "userdoc": { + "methods": {} + } + } + }, + "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/IAlgoMiner.sol": { + "IAlgoMiner": { + "abi": [ + { + "constant": true, + "inputs": [], + "name": "isAlgoMiner", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "pure", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getCategory", + "outputs": [ + { + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + } + ], + "devdoc": { + "methods": {} + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "gasEstimates": null, + "methodIdentifiers": { + "getCategory()": "80258e47", + "isAlgoMiner()": "1777fb4b" + } + }, + "metadata": "", + "userdoc": { + "methods": {} + } + } + }, + "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol": { + "Roles": { + "abi": [], + "devdoc": { + "methods": {}, + "title": "Roles" + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a72305820bfa74e3170abc2ace25475dc7dfb71c6416c34449905f1f30a00ec4431d9206c0029", + "opcodes": "PUSH1 0x4C PUSH1 0x2C PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x0 DUP2 EQ PUSH1 0x1C JUMPI PUSH1 0x1E JUMP JUMPDEST INVALID JUMPDEST POP ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN STOP PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT STOP LOG1 PUSH6 0x627A7A723058 KECCAK256 0xbf 0xa7 0x4e BALANCE PUSH17 0xABC2ACE25475DC7DFB71C6416C34449905 CALL RETURN EXP STOP 0xec DIFFICULTY BALANCE 0xd9 KECCAK256 PUSH13 0x290000000000000000000000 ", + "sourceMap": "109:784:4:-;;132:2:-1;166:7;155:9;146:7;137:37;252:7;246:14;243:1;238:23;232:4;229:33;270:1;265:20;;;;222:63;;265:20;274:9;222:63;;298:9;295:1;288:20;328:4;319:7;311:22;352:7;343;336:24" + }, + "gasEstimates": { + "creation": { + "codeDepositCost": "15200", + "executionCost": "116", + "totalCost": "15316" + }, + "internal": { + "add(struct Roles.Role storage pointer,address)": "infinite", + "has(struct Roles.Role storage pointer,address)": "infinite", + "remove(struct Roles.Role storage pointer,address)": "infinite" + } + }, + "methodIdentifiers": {} + }, + "metadata": "{\"compiler\":{\"version\":\"0.4.24+commit.e67f0147\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"methods\":{},\"title\":\"Roles\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol\":\"Roles\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol\":{\"keccak256\":\"0xa6e47d62e68903c8fff23500d80e7cc8085b9127995803478d9982cd8a6d49e4\",\"urls\":[\"bzzr://7c87eb3c145fe7592c97baa287501faff7e81c1965333c9b042ffb6b387e94a1\"]}},\"version\":1}", + "userdoc": { + "methods": {} + } + } + }, + "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol": { + "SafeMath": { + "abi": [], + "devdoc": { + "methods": {}, + "title": "SafeMath" + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a723058204094b52d7c5ef1d5aa4907b2604c65a23d27d58f9b4359f5187db6598b2799300029", + "opcodes": "PUSH1 0x4C PUSH1 0x2C PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x0 DUP2 EQ PUSH1 0x1C JUMPI PUSH1 0x1E JUMP JUMPDEST INVALID JUMPDEST POP ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN STOP PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT STOP LOG1 PUSH6 0x627A7A723058 KECCAK256 BLOCKHASH SWAP5 0xb5 0x2d PUSH29 0x5EF1D5AA4907B2604C65A23D27D58F9B4359F5187DB6598B2799300029 ", + "sourceMap": "117:1531:5:-;;132:2:-1;166:7;155:9;146:7;137:37;252:7;246:14;243:1;238:23;232:4;229:33;270:1;265:20;;;;222:63;;265:20;274:9;222:63;;298:9;295:1;288:20;328:4;319:7;311:22;352:7;343;336:24" + }, + "gasEstimates": { + "creation": { + "codeDepositCost": "15200", + "executionCost": "116", + "totalCost": "15316" + }, + "internal": { + "add(uint256,uint256)": "infinite", + "div(uint256,uint256)": "infinite", + "mod(uint256,uint256)": "infinite", + "mul(uint256,uint256)": "infinite", + "sub(uint256,uint256)": "infinite" + } + }, + "methodIdentifiers": {} + }, + "metadata": "{\"compiler\":{\"version\":\"0.4.24+commit.e67f0147\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"methods\":{},\"title\":\"SafeMath\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol\":\"SafeMath\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0xdd18f05c74536a06166c90a17ec3c6932853764f292bed314ceb23e730ff83af\",\"urls\":[\"bzzr://1d8a608339978ac18782f7051816cf23b4072d8814979e3ef74788cc6025cca0\"]}},\"version\":1}", + "userdoc": { + "methods": {} + } + } + }, + "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol": { + "IERC20": { + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "spender", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "from", + "type": "address" + }, + { + "name": "to", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "who", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "to", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "owner", + "type": "address" + }, + { + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "from", + "type": "address" + }, + { + "indexed": true, + "name": "to", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + } + ], + "devdoc": { + "methods": {}, + "title": "ERC20 interface" + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "gasEstimates": null, + "methodIdentifiers": { + "allowance(address,address)": "dd62ed3e", + "approve(address,uint256)": "095ea7b3", + "balanceOf(address)": "70a08231", + "totalSupply()": "18160ddd", + "transfer(address,uint256)": "a9059cbb", + "transferFrom(address,address,uint256)": "23b872dd" + } + }, + "metadata": "", + "userdoc": { + "methods": {} + } + } + }, + "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol": { + "SafeERC20": { + "abi": [], + "devdoc": { + "methods": {}, + "title": "SafeERC20" + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a723058207a38fb4cb6c1c093de86b1ba91e5add211165e6c76b8cc0d294ecbd35bbbeb2c0029", + "opcodes": "PUSH1 0x4C PUSH1 0x2C PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x0 DUP2 EQ PUSH1 0x1C JUMPI PUSH1 0x1E JUMP JUMPDEST INVALID JUMPDEST POP ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN STOP PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT STOP LOG1 PUSH6 0x627A7A723058 KECCAK256 PUSH27 0x38FB4CB6C1C093DE86B1BA91E5ADD211165E6C76B8CC0D294ECBD3 JUMPDEST 0xbb 0xeb 0x2c STOP 0x29 ", + "sourceMap": "353:1296:7:-;;132:2:-1;166:7;155:9;146:7;137:37;252:7;246:14;243:1;238:23;232:4;229:33;270:1;265:20;;;;222:63;;265:20;274:9;222:63;;298:9;295:1;288:20;328:4;319:7;311:22;352:7;343;336:24" + }, + "gasEstimates": { + "creation": { + "codeDepositCost": "15200", + "executionCost": "116", + "totalCost": "15316" + }, + "internal": { + "safeApprove(contract IERC20,address,uint256)": "infinite", + "safeDecreaseAllowance(contract IERC20,address,uint256)": "infinite", + "safeIncreaseAllowance(contract IERC20,address,uint256)": "infinite", + "safeTransfer(contract IERC20,address,uint256)": "infinite", + "safeTransferFrom(contract IERC20,address,address,uint256)": "infinite" + } + }, + "methodIdentifiers": {} + }, + "metadata": "{\"compiler\":{\"version\":\"0.4.24+commit.e67f0147\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"methods\":{},\"title\":\"SafeERC20\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol\":\"SafeERC20\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0xdd18f05c74536a06166c90a17ec3c6932853764f292bed314ceb23e730ff83af\",\"urls\":[\"bzzr://1d8a608339978ac18782f7051816cf23b4072d8814979e3ef74788cc6025cca0\"]},\"d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xc8a7f15fa44eb10057f8bcb58418d3aed6f5267d211d18f93f3d4e0293e3da44\",\"urls\":[\"bzzr://8825e2508348b01a091ff47b8525e583b6e5604f6679684f805d67a9a6a2a7e9\"]},\"d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol\":{\"keccak256\":\"0x0a172a0ef8681d4a7d8034d003670a9b1968d914b0bfa64e13ddca289a85d24a\",\"urls\":[\"bzzr://733b6203c967b44d6de90b5c6b144e58a380a3f29befb2dc70e765dae2f1ca18\"]}},\"version\":1}", + "userdoc": { + "methods": {} + } + } + } + }, + "sources": { + "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/AlgoCoreTeamRole.sol": { + "ast": { + "absolutePath": "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/AlgoCoreTeamRole.sol", + "exportedSymbols": { + "AlgoCoreTeamRole": [ + 86 + ] + }, + "id": 87, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "^", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:24:0" + }, + { + "absolutePath": "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol", + "file": "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol", + "id": 2, + "nodeType": "ImportDirective", + "scope": 87, + "sourceUnit": 677, + "src": "28:171:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 86, + "linearizedBaseContracts": [ + 86 + ], + "name": "AlgoCoreTeamRole", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 5, + "libraryName": { + "contractScope": null, + "id": 3, + "name": "Roles", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 676, + "src": "242:5:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Roles_$676", + "typeString": "library Roles" + } + }, + "nodeType": "UsingForDirective", + "src": "236:27:0", + "typeName": { + "contractScope": null, + "id": 4, + "name": "Roles.Role", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 589, + "src": "252:10:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$589_storage_ptr", + "typeString": "struct Roles.Role" + } + } + }, + { + "constant": false, + "id": 7, + "name": "_coreTeamMembers", + "nodeType": "VariableDeclaration", + "scope": 86, + "src": "271:35:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$589_storage", + "typeString": "struct Roles.Role" + }, + "typeName": { + "contractScope": null, + "id": 6, + "name": "Roles.Role", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 589, + "src": "271:10:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$589_storage_ptr", + "typeString": "struct Roles.Role" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 15, + "nodeType": "Block", + "src": "339:43:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1032, + "src": "363:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 12, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "363:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 10, + "name": "_addCoreTeam", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 73, + "src": "350:12:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 13, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "350:24:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14, + "nodeType": "ExpressionStatement", + "src": "350:24:0" + } + ] + }, + "documentation": null, + "id": 16, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 8, + "nodeType": "ParameterList", + "parameters": [], + "src": "327:2:0" + }, + "payable": false, + "returnParameters": { + "id": 9, + "nodeType": "ParameterList", + "parameters": [], + "src": "339:0:0" + }, + "scope": 86, + "src": "315:67:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 26, + "nodeType": "Block", + "src": "414:62:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 20, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1032, + "src": "444:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 21, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "444:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 19, + "name": "isCoreTeam", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 40, + "src": "433:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 22, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "433:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 18, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1035, + 1036 + ], + "referencedDeclaration": 1035, + "src": "425:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 23, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "425:31:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 24, + "nodeType": "ExpressionStatement", + "src": "425:31:0" + }, + { + "id": 25, + "nodeType": "PlaceholderStatement", + "src": "467:1:0" + } + ] + }, + "documentation": null, + "id": 27, + "name": "onlyCoreTeam", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 17, + "nodeType": "ParameterList", + "parameters": [], + "src": "411:2:0" + }, + "src": "390:86:0", + "visibility": "internal" + }, + { + "body": { + "id": 39, + "nodeType": "Block", + "src": "548:55:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 36, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 29, + "src": "587:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 34, + "name": "_coreTeamMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7, + "src": "566:16:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$589_storage", + "typeString": "struct Roles.Role storage ref" + } + }, + "id": 35, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "has", + "nodeType": "MemberAccess", + "referencedDeclaration": 675, + "src": "566:20:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Role_$589_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Role_$589_storage_ptr_$", + "typeString": "function (struct Roles.Role storage pointer,address) view returns (bool)" + } + }, + "id": 37, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "566:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 33, + "id": 38, + "nodeType": "Return", + "src": "559:36:0" + } + ] + }, + "documentation": null, + "id": 40, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "isCoreTeam", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 30, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 29, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 40, + "src": "504:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 28, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "504:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "503:17:0" + }, + "payable": false, + "returnParameters": { + "id": 33, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 32, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 40, + "src": "542:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 31, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "542:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "541:6:0" + }, + "scope": 86, + "src": "484:119:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 51, + "nodeType": "Block", + "src": "669:40:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 48, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 42, + "src": "693:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 47, + "name": "_addCoreTeam", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 73, + "src": "680:12:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 49, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "680:21:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 50, + "nodeType": "ExpressionStatement", + "src": "680:21:0" + } + ] + }, + "documentation": null, + "id": 52, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 45, + "modifierName": { + "argumentTypes": null, + "id": 44, + "name": "onlyCoreTeam", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27, + "src": "656:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "656:12:0" + } + ], + "name": "addCoreTeam", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 43, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 42, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 52, + "src": "632:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 41, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "632:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "631:17:0" + }, + "payable": false, + "returnParameters": { + "id": 46, + "nodeType": "ParameterList", + "parameters": [], + "src": "669:0:0" + }, + "scope": 86, + "src": "611:98:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 60, + "nodeType": "Block", + "src": "752:46:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 56, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1032, + "src": "779:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 57, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "779:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 55, + "name": "_removeCoreTeam", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 85, + "src": "763:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 58, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "763:27:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 59, + "nodeType": "ExpressionStatement", + "src": "763:27:0" + } + ] + }, + "documentation": null, + "id": 61, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "renounceCoreTeam", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 53, + "nodeType": "ParameterList", + "parameters": [], + "src": "742:2:0" + }, + "payable": false, + "returnParameters": { + "id": 54, + "nodeType": "ParameterList", + "parameters": [], + "src": "752:0:0" + }, + "scope": 86, + "src": "717:81:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 72, + "nodeType": "Block", + "src": "854:48:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 69, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 63, + "src": "886:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 66, + "name": "_coreTeamMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7, + "src": "865:16:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$589_storage", + "typeString": "struct Roles.Role storage ref" + } + }, + "id": 68, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 621, + "src": "865:20:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Role_$589_storage_ptr_$_t_address_$returns$__$bound_to$_t_struct$_Role_$589_storage_ptr_$", + "typeString": "function (struct Roles.Role storage pointer,address)" + } + }, + "id": 70, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "865:29:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 71, + "nodeType": "ExpressionStatement", + "src": "865:29:0" + } + ] + }, + "documentation": null, + "id": 73, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "_addCoreTeam", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 64, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 63, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 73, + "src": "828:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 62, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "828:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "827:17:0" + }, + "payable": false, + "returnParameters": { + "id": 65, + "nodeType": "ParameterList", + "parameters": [], + "src": "854:0:0" + }, + "scope": 86, + "src": "806:96:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 84, + "nodeType": "Block", + "src": "961:51:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 81, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 75, + "src": "996:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 78, + "name": "_coreTeamMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7, + "src": "972:16:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$589_storage", + "typeString": "struct Roles.Role storage ref" + } + }, + "id": 80, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "remove", + "nodeType": "MemberAccess", + "referencedDeclaration": 652, + "src": "972:23:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Role_$589_storage_ptr_$_t_address_$returns$__$bound_to$_t_struct$_Role_$589_storage_ptr_$", + "typeString": "function (struct Roles.Role storage pointer,address)" + } + }, + "id": 82, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "972:32:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 83, + "nodeType": "ExpressionStatement", + "src": "972:32:0" + } + ] + }, + "documentation": null, + "id": 85, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "_removeCoreTeam", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 76, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 75, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 85, + "src": "935:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 74, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "935:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "934:17:0" + }, + "payable": false, + "returnParameters": { + "id": 77, + "nodeType": "ParameterList", + "parameters": [], + "src": "961:0:0" + }, + "scope": 86, + "src": "910:102:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 87, + "src": "203:812:0" + } + ], + "src": "0:1017:0" + }, + "id": 0 + }, + "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/AlgoMiner.sol": { + "ast": { + "absolutePath": "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/AlgoMiner.sol", + "exportedSymbols": { + "AlgoMiner": [ + 482 + ] + }, + "id": 483, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 88, + "literals": [ + "solidity", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:23:1" + }, + { + "absolutePath": "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "file": "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "id": 89, + "nodeType": "ImportDirective", + "scope": 483, + "sourceUnit": 874, + "src": "27:177:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol", + "file": "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol", + "id": 90, + "nodeType": "ImportDirective", + "scope": 483, + "sourceUnit": 1018, + "src": "206:180:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/IAlgoMiner.sol", + "file": "./IAlgoMiner.sol", + "id": 91, + "nodeType": "ImportDirective", + "scope": 483, + "sourceUnit": 583, + "src": "390:26:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/AlgoCoreTeamRole.sol", + "file": "./AlgoCoreTeamRole.sol", + "id": 92, + "nodeType": "ImportDirective", + "scope": 483, + "sourceUnit": 87, + "src": "418:32:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/AlgoSupervisorRole.sol", + "file": "./AlgoSupervisorRole.sol", + "id": 93, + "nodeType": "ImportDirective", + "scope": 483, + "sourceUnit": 570, + "src": "452:34:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 94, + "name": "AlgoCoreTeamRole", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 86, + "src": "512:16:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_AlgoCoreTeamRole_$86", + "typeString": "contract AlgoCoreTeamRole" + } + }, + "id": 95, + "nodeType": "InheritanceSpecifier", + "src": "512:16:1" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 96, + "name": "AlgoSupervisorRole", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 569, + "src": "530:18:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_AlgoSupervisorRole_$569", + "typeString": "contract AlgoSupervisorRole" + } + }, + "id": 97, + "nodeType": "InheritanceSpecifier", + "src": "530:18:1" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 98, + "name": "IAlgoMiner", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 582, + "src": "550:10:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IAlgoMiner_$582", + "typeString": "contract IAlgoMiner" + } + }, + "id": 99, + "nodeType": "InheritanceSpecifier", + "src": "550:10:1" + } + ], + "contractDependencies": [ + 86, + 569, + 582 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 482, + "linearizedBaseContracts": [ + 482, + 582, + 569, + 86 + ], + "name": "AlgoMiner", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 102, + "libraryName": { + "contractScope": null, + "id": 100, + "name": "SafeERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1017, + "src": "574:9:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeERC20_$1017", + "typeString": "library SafeERC20" + } + }, + "nodeType": "UsingForDirective", + "src": "568:27:1", + "typeName": { + "contractScope": null, + "id": 101, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 873, + "src": "588:6:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$873", + "typeString": "contract IERC20" + } + } + }, + { + "constant": true, + "id": 105, + "name": "DAYS_PER_YEAR", + "nodeType": "VariableDeclaration", + "scope": 482, + "src": "603:43:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 103, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "603:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "333635", + "id": 104, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "643:3:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_365_by_1", + "typeString": "int_const 365" + }, + "value": "365" + }, + "visibility": "public" + }, + { + "canonicalName": "AlgoMiner.MinerState", + "id": 110, + "members": [ + { + "id": 106, + "name": "Deactivated", + "nodeType": "EnumValue", + "src": "682:11:1" + }, + { + "id": 107, + "name": "Activated", + "nodeType": "EnumValue", + "src": "704:9:1" + }, + { + "id": 108, + "name": "Suspended", + "nodeType": "EnumValue", + "src": "724:9:1" + }, + { + "id": 109, + "name": "Stopped", + "nodeType": "EnumValue", + "src": "744:7:1" + } + ], + "name": "MinerState", + "nodeType": "EnumDefinition", + "src": "655:103:1" + }, + { + "constant": false, + "id": 112, + "name": "_minerType", + "nodeType": "VariableDeclaration", + "scope": 482, + "src": "766:25:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 111, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "766:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 114, + "name": "_category", + "nodeType": "VariableDeclaration", + "scope": 482, + "src": "798:23:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 113, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "798:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 116, + "name": "_miner", + "nodeType": "VariableDeclaration", + "scope": 482, + "src": "828:22:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 115, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "828:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 118, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 482, + "src": "857:21:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$873", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 117, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 873, + "src": "857:6:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$873", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 120, + "name": "_state", + "nodeType": "VariableDeclaration", + "scope": 482, + "src": "887:25:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$110", + "typeString": "enum AlgoMiner.MinerState" + }, + "typeName": { + "contractScope": null, + "id": 119, + "name": "MinerState", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 110, + "src": "887:10:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$110", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 122, + "name": "_mining", + "nodeType": "VariableDeclaration", + "scope": 482, + "src": "919:20:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 121, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "919:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 124, + "name": "_currentYear", + "nodeType": "VariableDeclaration", + "scope": 482, + "src": "946:26:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 123, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "946:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 126, + "name": "_currentDay", + "nodeType": "VariableDeclaration", + "scope": 482, + "src": "979:26:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 125, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "979:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 128, + "name": "_currentYearSupply", + "nodeType": "VariableDeclaration", + "scope": 482, + "src": "1012:34:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 127, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1012:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 161, + "nodeType": "Block", + "src": "1219:146:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 145, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 143, + "name": "_minerType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 112, + "src": "1232:10:1", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 144, + "name": "minerType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 130, + "src": "1245:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "src": "1232:22:1", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "id": 146, + "nodeType": "ExpressionStatement", + "src": "1232:22:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 149, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 147, + "name": "_category", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 114, + "src": "1265:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 148, + "name": "category", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 132, + "src": "1277:8:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "1265:20:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 150, + "nodeType": "ExpressionStatement", + "src": "1265:20:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 153, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 151, + "name": "_miner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 116, + "src": "1296:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 152, + "name": "ownerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 134, + "src": "1305:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1296:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 154, + "nodeType": "ExpressionStatement", + "src": "1296:21:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 155, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 118, + "src": "1328:6:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$873", + "typeString": "contract IERC20" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 157, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 136, + "src": "1344:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 156, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 873, + "src": "1337:6:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$873_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 158, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1337:20:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$873", + "typeString": "contract IERC20" + } + }, + "src": "1328:29:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$873", + "typeString": "contract IERC20" + } + }, + "id": 160, + "nodeType": "ExpressionStatement", + "src": "1328:29:1" + } + ] + }, + "documentation": null, + "id": 162, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 139, + "modifierName": { + "argumentTypes": null, + "id": 138, + "name": "AlgoCoreTeamRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 86, + "src": "1154:16:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AlgoCoreTeamRole_$86_$", + "typeString": "type(contract AlgoCoreTeamRole)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1154:18:1" + }, + { + "arguments": [], + "id": 141, + "modifierName": { + "argumentTypes": null, + "id": 140, + "name": "AlgoSupervisorRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 569, + "src": "1182:18:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AlgoSupervisorRole_$569_$", + "typeString": "type(contract AlgoSupervisorRole)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1182:20:1" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 137, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 130, + "name": "minerType", + "nodeType": "VariableDeclaration", + "scope": 162, + "src": "1067:16:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 129, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "1067:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 132, + "name": "category", + "nodeType": "VariableDeclaration", + "scope": 162, + "src": "1085:14:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 131, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1085:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 134, + "name": "ownerAddress", + "nodeType": "VariableDeclaration", + "scope": 162, + "src": "1101:20:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 133, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1101:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 136, + "name": "tokenAddress", + "nodeType": "VariableDeclaration", + "scope": 162, + "src": "1123:20:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 135, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1123:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1066:78:1" + }, + "payable": false, + "returnParameters": { + "id": 142, + "nodeType": "ParameterList", + "parameters": [], + "src": "1219:0:1" + }, + "scope": 482, + "src": "1055:310:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 172, + "nodeType": "Block", + "src": "1394:60:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 168, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 165, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1032, + "src": "1413:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 166, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1413:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 167, + "name": "_miner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 116, + "src": "1427:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1413:20:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 164, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1035, + 1036 + ], + "referencedDeclaration": 1035, + "src": "1405:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 169, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1405:29:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 170, + "nodeType": "ExpressionStatement", + "src": "1405:29:1" + }, + { + "id": 171, + "nodeType": "PlaceholderStatement", + "src": "1445:1:1" + } + ] + }, + "documentation": null, + "id": 173, + "name": "onlyMiner", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 163, + "nodeType": "ParameterList", + "parameters": [], + "src": "1391:2:1" + }, + "src": "1373:81:1", + "visibility": "internal" + }, + { + "body": { + "id": 216, + "nodeType": "Block", + "src": "1511:326:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_enum$_MinerState_$110", + "typeString": "enum AlgoMiner.MinerState" + }, + "id": 182, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 179, + "name": "_state", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 120, + "src": "1530:6:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$110", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 180, + "name": "MinerState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 110, + "src": "1540:10:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_MinerState_$110_$", + "typeString": "type(enum AlgoMiner.MinerState)" + } + }, + "id": 181, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Deactivated", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1540:22:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$110", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "src": "1530:32:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 178, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1035, + 1036 + ], + "referencedDeclaration": 1035, + "src": "1522:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 183, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1522:41:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 184, + "nodeType": "ExpressionStatement", + "src": "1522:41:1" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 187, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 185, + "name": "_currentYearSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 128, + "src": "1579:18:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 186, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1601:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1579:23:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 210, + "nodeType": "IfStatement", + "src": "1576:212:1", + "trueBody": { + "id": 209, + "nodeType": "Block", + "src": "1604:184:1", + "statements": [ + { + "assignments": [ + 189 + ], + "declarations": [ + { + "constant": false, + "id": 189, + "name": "currentBalance", + "nodeType": "VariableDeclaration", + "scope": 217, + "src": "1619:22:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 188, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1619:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 196, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 193, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1059, + "src": "1669:4:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_AlgoMiner_$482", + "typeString": "contract AlgoMiner" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_AlgoMiner_$482", + "typeString": "contract AlgoMiner" + } + ], + "id": 192, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1661:7:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 194, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1661:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 190, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 118, + "src": "1644:6:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$873", + "typeString": "contract IERC20" + } + }, + "id": 191, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 818, + "src": "1644:16:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1644:31:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1619:56:1" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 200, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 198, + "name": "currentBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 189, + "src": "1700:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 199, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1718:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1700:19:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 197, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1035, + 1036 + ], + "referencedDeclaration": 1035, + "src": "1692:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 201, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1692:28:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 202, + "nodeType": "ExpressionStatement", + "src": "1692:28:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 203, + "name": "_currentYearSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 128, + "src": "1737:18:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 206, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 204, + "name": "currentBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 189, + "src": "1758:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 205, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1775:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "1758:18:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1737:39:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 208, + "nodeType": "ExpressionStatement", + "src": "1737:39:1" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "id": 214, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 211, + "name": "_state", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 120, + "src": "1800:6:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$110", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 212, + "name": "MinerState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 110, + "src": "1809:10:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_MinerState_$110_$", + "typeString": "type(enum AlgoMiner.MinerState)" + } + }, + "id": 213, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Activated", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1809:20:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$110", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "src": "1800:29:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$110", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "id": 215, + "nodeType": "ExpressionStatement", + "src": "1800:29:1" + } + ] + }, + "documentation": null, + "id": 217, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 176, + "modifierName": { + "argumentTypes": null, + "id": 175, + "name": "onlyCoreTeam", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27, + "src": "1498:12:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1498:12:1" + } + ], + "name": "activateMiner", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 174, + "nodeType": "ParameterList", + "parameters": [], + "src": "1488:2:1" + }, + "payable": false, + "returnParameters": { + "id": 177, + "nodeType": "ParameterList", + "parameters": [], + "src": "1511:0:1" + }, + "scope": 482, + "src": "1466:371:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 238, + "nodeType": "Block", + "src": "1892:138:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_enum$_MinerState_$110", + "typeString": "enum AlgoMiner.MinerState" + }, + "id": 226, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 223, + "name": "_state", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 120, + "src": "1911:6:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$110", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 224, + "name": "MinerState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 110, + "src": "1921:10:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_MinerState_$110_$", + "typeString": "type(enum AlgoMiner.MinerState)" + } + }, + "id": 225, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Deactivated", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1921:22:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$110", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "src": "1911:32:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 222, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1035, + 1036 + ], + "referencedDeclaration": 1035, + "src": "1903:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 227, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1903:41:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 228, + "nodeType": "ExpressionStatement", + "src": "1903:41:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 232, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 229, + "name": "_state", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 120, + "src": "1965:6:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$110", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 230, + "name": "MinerState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 110, + "src": "1974:10:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_MinerState_$110_$", + "typeString": "type(enum AlgoMiner.MinerState)" + } + }, + "id": 231, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Deactivated", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1974:22:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$110", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "src": "1965:31:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$110", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "id": 233, + "nodeType": "ExpressionStatement", + "src": "1965:31:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 236, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 234, + "name": "_mining", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 122, + "src": "2007:7:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 235, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2017:5:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "2007:15:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 237, + "nodeType": "ExpressionStatement", + "src": "2007:15:1" + } + ] + }, + "documentation": null, + "id": 239, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 220, + "modifierName": { + "argumentTypes": null, + "id": 219, + "name": "onlyCoreTeam", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27, + "src": "1879:12:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1879:12:1" + } + ], + "name": "deactivateMiner", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 218, + "nodeType": "ParameterList", + "parameters": [], + "src": "1869:2:1" + }, + "payable": false, + "returnParameters": { + "id": 221, + "nodeType": "ParameterList", + "parameters": [], + "src": "1892:0:1" + }, + "scope": 482, + "src": "1845:185:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 265, + "nodeType": "Block", + "src": "2105:142:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_enum$_MinerState_$110", + "typeString": "enum AlgoMiner.MinerState" + }, + "id": 250, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 247, + "name": "_state", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 120, + "src": "2124:6:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$110", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 248, + "name": "MinerState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 110, + "src": "2134:10:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_MinerState_$110_$", + "typeString": "type(enum AlgoMiner.MinerState)" + } + }, + "id": 249, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Deactivated", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2134:22:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$110", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "src": "2124:32:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 246, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1035, + 1036 + ], + "referencedDeclaration": 1035, + "src": "2116:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 251, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2116:41:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 252, + "nodeType": "ExpressionStatement", + "src": "2116:41:1" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 256, + "name": "newMinerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 241, + "src": "2190:15:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 260, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1059, + "src": "2232:4:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_AlgoMiner_$482", + "typeString": "contract AlgoMiner" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_AlgoMiner_$482", + "typeString": "contract AlgoMiner" + } + ], + "id": 259, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2224:7:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 261, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2224:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 257, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 118, + "src": "2207:6:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$873", + "typeString": "contract IERC20" + } + }, + "id": 258, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 818, + "src": "2207:16:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 262, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2207:31:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 253, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 118, + "src": "2170:6:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$873", + "typeString": "contract IERC20" + } + }, + "id": 255, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeTransfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 898, + "src": "2170:19:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$873_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$873_$", + "typeString": "function (contract IERC20,address,uint256)" + } + }, + "id": 263, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2170:69:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 264, + "nodeType": "ExpressionStatement", + "src": "2170:69:1" + } + ] + }, + "documentation": null, + "id": 266, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 244, + "modifierName": { + "argumentTypes": null, + "id": 243, + "name": "onlyCoreTeam", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27, + "src": "2092:12:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2092:12:1" + } + ], + "name": "migrateMiner", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 242, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 241, + "name": "newMinerAddress", + "nodeType": "VariableDeclaration", + "scope": 266, + "src": "2060:23:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 240, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2060:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2059:25:1" + }, + "payable": false, + "returnParameters": { + "id": 245, + "nodeType": "ParameterList", + "parameters": [], + "src": "2105:0:1" + }, + "scope": 482, + "src": "2038:209:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 283, + "nodeType": "Block", + "src": "2300:108:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_enum$_MinerState_$110", + "typeString": "enum AlgoMiner.MinerState" + }, + "id": 275, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 272, + "name": "_state", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 120, + "src": "2319:6:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$110", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 273, + "name": "MinerState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 110, + "src": "2329:10:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_MinerState_$110_$", + "typeString": "type(enum AlgoMiner.MinerState)" + } + }, + "id": 274, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Activated", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2329:20:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$110", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "src": "2319:30:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 271, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1035, + 1036 + ], + "referencedDeclaration": 1035, + "src": "2311:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2311:39:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 277, + "nodeType": "ExpressionStatement", + "src": "2311:39:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 281, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 278, + "name": "_state", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 120, + "src": "2371:6:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$110", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 279, + "name": "MinerState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 110, + "src": "2380:10:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_MinerState_$110_$", + "typeString": "type(enum AlgoMiner.MinerState)" + } + }, + "id": 280, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Suspended", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2380:20:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$110", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "src": "2371:29:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$110", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "id": 282, + "nodeType": "ExpressionStatement", + "src": "2371:29:1" + } + ] + }, + "documentation": null, + "id": 284, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 269, + "modifierName": { + "argumentTypes": null, + "id": 268, + "name": "onlySupervisor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 510, + "src": "2285:14:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2285:14:1" + } + ], + "name": "pauseMining", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 267, + "nodeType": "ParameterList", + "parameters": [], + "src": "2275:2:1" + }, + "payable": false, + "returnParameters": { + "id": 270, + "nodeType": "ParameterList", + "parameters": [], + "src": "2300:0:1" + }, + "scope": 482, + "src": "2255:153:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 301, + "nodeType": "Block", + "src": "2462:100:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_enum$_MinerState_$110", + "typeString": "enum AlgoMiner.MinerState" + }, + "id": 293, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 290, + "name": "_state", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 120, + "src": "2481:6:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$110", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 291, + "name": "MinerState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 110, + "src": "2491:10:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_MinerState_$110_$", + "typeString": "type(enum AlgoMiner.MinerState)" + } + }, + "id": 292, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Suspended", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2491:20:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$110", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "src": "2481:30:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 289, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1035, + 1036 + ], + "referencedDeclaration": 1035, + "src": "2473:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 294, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2473:39:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 295, + "nodeType": "ExpressionStatement", + "src": "2473:39:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 299, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 296, + "name": "_state", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 120, + "src": "2525:6:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$110", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 297, + "name": "MinerState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 110, + "src": "2534:10:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_MinerState_$110_$", + "typeString": "type(enum AlgoMiner.MinerState)" + } + }, + "id": 298, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Activated", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2534:20:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$110", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "src": "2525:29:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$110", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "id": 300, + "nodeType": "ExpressionStatement", + "src": "2525:29:1" + } + ] + }, + "documentation": null, + "id": 302, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 287, + "modifierName": { + "argumentTypes": null, + "id": 286, + "name": "onlySupervisor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 510, + "src": "2447:14:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2447:14:1" + } + ], + "name": "resumeMining", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 285, + "nodeType": "ParameterList", + "parameters": [], + "src": "2437:2:1" + }, + "payable": false, + "returnParameters": { + "id": 288, + "nodeType": "ParameterList", + "parameters": [], + "src": "2462:0:1" + }, + "scope": 482, + "src": "2416:146:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 329, + "nodeType": "Block", + "src": "2626:160:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_enum$_MinerState_$110", + "typeString": "enum AlgoMiner.MinerState" + }, + "id": 311, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 308, + "name": "_state", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 120, + "src": "2645:6:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$110", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 309, + "name": "MinerState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 110, + "src": "2655:10:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_MinerState_$110_$", + "typeString": "type(enum AlgoMiner.MinerState)" + } + }, + "id": 310, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Stopped", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2655:18:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$110", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "src": "2645:28:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 307, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1035, + 1036 + ], + "referencedDeclaration": 1035, + "src": "2637:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 312, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2637:37:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 313, + "nodeType": "ExpressionStatement", + "src": "2637:37:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 317, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 314, + "name": "_state", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 120, + "src": "2695:6:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$110", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 315, + "name": "MinerState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 110, + "src": "2704:10:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_MinerState_$110_$", + "typeString": "type(enum AlgoMiner.MinerState)" + } + }, + "id": 316, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Stopped", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2704:18:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$110", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "src": "2695:27:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$110", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "id": 318, + "nodeType": "ExpressionStatement", + "src": "2695:27:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 321, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 319, + "name": "_mining", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 122, + "src": "2733:7:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 320, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2743:5:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "2733:15:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 322, + "nodeType": "ExpressionStatement", + "src": "2733:15:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 323, + "name": "_miner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 116, + "src": "2759:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 325, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2776:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 324, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2768:7:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 326, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2768:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2759:19:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 328, + "nodeType": "ExpressionStatement", + "src": "2759:19:1" + } + ] + }, + "documentation": null, + "id": 330, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 305, + "modifierName": { + "argumentTypes": null, + "id": 304, + "name": "onlySupervisor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 510, + "src": "2611:14:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2611:14:1" + } + ], + "name": "stopAndRemoveOwnership", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 303, + "nodeType": "ParameterList", + "parameters": [], + "src": "2601:2:1" + }, + "payable": false, + "returnParameters": { + "id": 306, + "nodeType": "ParameterList", + "parameters": [], + "src": "2626:0:1" + }, + "scope": 482, + "src": "2570:216:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 353, + "nodeType": "Block", + "src": "2861:133:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_enum$_MinerState_$110", + "typeString": "enum AlgoMiner.MinerState" + }, + "id": 341, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 338, + "name": "_state", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 120, + "src": "2880:6:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$110", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 339, + "name": "MinerState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 110, + "src": "2890:10:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_MinerState_$110_$", + "typeString": "type(enum AlgoMiner.MinerState)" + } + }, + "id": 340, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Stopped", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2890:18:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$110", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "src": "2880:28:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 337, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1035, + 1036 + ], + "referencedDeclaration": 1035, + "src": "2872:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2872:37:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 343, + "nodeType": "ExpressionStatement", + "src": "2872:37:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 347, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 344, + "name": "_state", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 120, + "src": "2922:6:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$110", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 345, + "name": "MinerState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 110, + "src": "2931:10:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_MinerState_$110_$", + "typeString": "type(enum AlgoMiner.MinerState)" + } + }, + "id": 346, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Activated", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2931:20:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$110", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "src": "2922:29:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$110", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "id": 348, + "nodeType": "ExpressionStatement", + "src": "2922:29:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 351, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 349, + "name": "_miner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 116, + "src": "2962:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 350, + "name": "newOwnerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 332, + "src": "2971:15:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2962:24:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 352, + "nodeType": "ExpressionStatement", + "src": "2962:24:1" + } + ] + }, + "documentation": null, + "id": 354, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 335, + "modifierName": { + "argumentTypes": null, + "id": 334, + "name": "onlySupervisor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 510, + "src": "2846:14:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2846:14:1" + } + ], + "name": "resetMiner", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 333, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 332, + "name": "newOwnerAddress", + "nodeType": "VariableDeclaration", + "scope": 354, + "src": "2814:23:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 331, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2814:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2813:25:1" + }, + "payable": false, + "returnParameters": { + "id": 336, + "nodeType": "ParameterList", + "parameters": [], + "src": "2861:0:1" + }, + "scope": 482, + "src": "2794:200:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 375, + "nodeType": "Block", + "src": "3042:121:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_enum$_MinerState_$110", + "typeString": "enum AlgoMiner.MinerState" + }, + "id": 363, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 360, + "name": "_state", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 120, + "src": "3061:6:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$110", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 361, + "name": "MinerState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 110, + "src": "3071:10:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_MinerState_$110_$", + "typeString": "type(enum AlgoMiner.MinerState)" + } + }, + "id": 362, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Activated", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3071:20:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$110", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "src": "3061:30:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 359, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1035, + 1036 + ], + "referencedDeclaration": 1035, + "src": "3053:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 364, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3053:39:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 365, + "nodeType": "ExpressionStatement", + "src": "3053:39:1" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 368, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "3111:8:1", + "subExpression": { + "argumentTypes": null, + "id": 367, + "name": "_mining", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 122, + "src": "3112:7:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 366, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1035, + 1036 + ], + "referencedDeclaration": 1035, + "src": "3103:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 369, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3103:17:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 370, + "nodeType": "ExpressionStatement", + "src": "3103:17:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 373, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 371, + "name": "_mining", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 122, + "src": "3141:7:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 372, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3151:4:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "3141:14:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 374, + "nodeType": "ExpressionStatement", + "src": "3141:14:1" + } + ] + }, + "documentation": null, + "id": 376, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 357, + "modifierName": { + "argumentTypes": null, + "id": 356, + "name": "onlyMiner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 173, + "src": "3032:9:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3032:9:1" + } + ], + "name": "startMining", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 355, + "nodeType": "ParameterList", + "parameters": [], + "src": "3022:2:1" + }, + "payable": false, + "returnParameters": { + "id": 358, + "nodeType": "ParameterList", + "parameters": [], + "src": "3042:0:1" + }, + "scope": 482, + "src": "3002:161:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 396, + "nodeType": "Block", + "src": "3210:121:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_enum$_MinerState_$110", + "typeString": "enum AlgoMiner.MinerState" + }, + "id": 385, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 382, + "name": "_state", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 120, + "src": "3229:6:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$110", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 383, + "name": "MinerState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 110, + "src": "3239:10:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_MinerState_$110_$", + "typeString": "type(enum AlgoMiner.MinerState)" + } + }, + "id": 384, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Activated", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3239:20:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$110", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "src": "3229:30:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 381, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1035, + 1036 + ], + "referencedDeclaration": 1035, + "src": "3221:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 386, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3221:39:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 387, + "nodeType": "ExpressionStatement", + "src": "3221:39:1" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 389, + "name": "_mining", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 122, + "src": "3279:7:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 388, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1035, + 1036 + ], + "referencedDeclaration": 1035, + "src": "3271:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 390, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3271:16:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 391, + "nodeType": "ExpressionStatement", + "src": "3271:16:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 394, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 392, + "name": "_mining", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 122, + "src": "3308:7:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 393, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3318:5:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "3308:15:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 395, + "nodeType": "ExpressionStatement", + "src": "3308:15:1" + } + ] + }, + "documentation": null, + "id": 397, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 379, + "modifierName": { + "argumentTypes": null, + "id": 378, + "name": "onlyMiner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 173, + "src": "3200:9:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3200:9:1" + } + ], + "name": "stopMining", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 377, + "nodeType": "ParameterList", + "parameters": [], + "src": "3190:2:1" + }, + "payable": false, + "returnParameters": { + "id": 380, + "nodeType": "ParameterList", + "parameters": [], + "src": "3210:0:1" + }, + "scope": 482, + "src": "3171:160:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 464, + "nodeType": "Block", + "src": "3375:547:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_enum$_MinerState_$110", + "typeString": "enum AlgoMiner.MinerState" + }, + "id": 406, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 403, + "name": "_state", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 120, + "src": "3394:6:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$110", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 404, + "name": "MinerState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 110, + "src": "3404:10:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_MinerState_$110_$", + "typeString": "type(enum AlgoMiner.MinerState)" + } + }, + "id": 405, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Activated", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3404:20:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$110", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "src": "3394:30:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 402, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1035, + 1036 + ], + "referencedDeclaration": 1035, + "src": "3386:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 407, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3386:39:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 408, + "nodeType": "ExpressionStatement", + "src": "3386:39:1" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 410, + "name": "_mining", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 122, + "src": "3444:7:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 409, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1035, + 1036 + ], + "referencedDeclaration": 1035, + "src": "3436:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3436:16:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 412, + "nodeType": "ExpressionStatement", + "src": "3436:16:1" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "id": 415, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 413, + "name": "_currentDay", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 126, + "src": "3468:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 414, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3483:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3468:16:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 449, + "nodeType": "Block", + "src": "3565:238:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 426, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "3580:13:1", + "subExpression": { + "argumentTypes": null, + "id": 425, + "name": "_currentDay", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 126, + "src": "3580:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "id": 427, + "nodeType": "ExpressionStatement", + "src": "3580:13:1" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 433, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 428, + "name": "_currentDay", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 126, + "src": "3611:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 431, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 429, + "name": "DAYS_PER_YEAR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 105, + "src": "3627:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 430, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3643:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "3627:17:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 432, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "3626:19:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3611:34:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 448, + "nodeType": "IfStatement", + "src": "3608:184:1", + "trueBody": { + "id": 447, + "nodeType": "Block", + "src": "3647:145:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 435, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "3666:14:1", + "subExpression": { + "argumentTypes": null, + "id": 434, + "name": "_currentYear", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 124, + "src": "3666:12:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 436, + "nodeType": "ExpressionStatement", + "src": "3666:14:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 439, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 437, + "name": "_currentDay", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 126, + "src": "3699:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "31", + "id": 438, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3713:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "3699:15:1", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "id": 440, + "nodeType": "ExpressionStatement", + "src": "3699:15:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 441, + "name": "_currentYearSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 128, + "src": "3733:18:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 444, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 442, + "name": "_currentYearSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 128, + "src": "3754:18:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 443, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3775:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "3754:22:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3733:43:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 446, + "nodeType": "ExpressionStatement", + "src": "3733:43:1" + } + ] + } + } + ] + }, + "id": 450, + "nodeType": "IfStatement", + "src": "3465:338:1", + "trueBody": { + "id": 424, + "nodeType": "Block", + "src": "3486:73:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 418, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 416, + "name": "_currentYear", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 124, + "src": "3501:12:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "31", + "id": 417, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3516:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "3501:16:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 419, + "nodeType": "ExpressionStatement", + "src": "3501:16:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 422, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 420, + "name": "_currentDay", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 126, + "src": "3532:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "31", + "id": 421, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3546:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "3532:15:1", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "id": 423, + "nodeType": "ExpressionStatement", + "src": "3532:15:1" + } + ] + } + }, + { + "assignments": [ + 452 + ], + "declarations": [ + { + "constant": false, + "id": 452, + "name": "tokens", + "nodeType": "VariableDeclaration", + "scope": 465, + "src": "3815:14:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 451, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3815:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 456, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 455, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 453, + "name": "_currentYearSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 128, + "src": "3832:18:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 454, + "name": "DAYS_PER_YEAR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 105, + "src": "3853:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3832:34:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3815:51:1" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 460, + "name": "_miner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 116, + "src": "3899:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 461, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 452, + "src": "3907:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 457, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 118, + "src": "3879:6:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$873", + "typeString": "contract IERC20" + } + }, + "id": 459, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeTransfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 898, + "src": "3879:19:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$873_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$873_$", + "typeString": "function (contract IERC20,address,uint256)" + } + }, + "id": 462, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3879:35:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 463, + "nodeType": "ExpressionStatement", + "src": "3879:35:1" + } + ] + }, + "documentation": null, + "id": 465, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 400, + "modifierName": { + "argumentTypes": null, + "id": 399, + "name": "onlyCoreTeam", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27, + "src": "3362:12:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3362:12:1" + } + ], + "name": "mine", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 398, + "nodeType": "ParameterList", + "parameters": [], + "src": "3352:2:1" + }, + "payable": false, + "returnParameters": { + "id": 401, + "nodeType": "ParameterList", + "parameters": [], + "src": "3375:0:1" + }, + "scope": 482, + "src": "3339:583:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 472, + "nodeType": "Block", + "src": "3980:30:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 470, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3998:4:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 469, + "id": 471, + "nodeType": "Return", + "src": "3991:11:1" + } + ] + }, + "documentation": null, + "id": 473, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "isAlgoMiner", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 466, + "nodeType": "ParameterList", + "parameters": [], + "src": "3950:2:1" + }, + "payable": false, + "returnParameters": { + "id": 469, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 468, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 473, + "src": "3974:4:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 467, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3974:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3973:6:1" + }, + "scope": 482, + "src": "3930:80:1", + "stateMutability": "pure", + "superFunction": 576, + "visibility": "public" + }, + { + "body": { + "id": 480, + "nodeType": "Block", + "src": "4069:35:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 478, + "name": "_category", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 114, + "src": "4087:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "functionReturnParameters": 477, + "id": 479, + "nodeType": "Return", + "src": "4080:16:1" + } + ] + }, + "documentation": null, + "id": 481, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getCategory", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 474, + "nodeType": "ParameterList", + "parameters": [], + "src": "4038:2:1" + }, + "payable": false, + "returnParameters": { + "id": 477, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 476, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 481, + "src": "4062:5:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 475, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "4062:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4061:7:1" + }, + "scope": 482, + "src": "4018:86:1", + "stateMutability": "view", + "superFunction": 581, + "visibility": "public" + } + ], + "scope": 483, + "src": "490:3617:1" + } + ], + "src": "0:4109:1" + }, + "id": 1 + }, + "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/AlgoSupervisorRole.sol": { + "ast": { + "absolutePath": "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/AlgoSupervisorRole.sol", + "exportedSymbols": { + "AlgoSupervisorRole": [ + 569 + ] + }, + "id": 570, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 484, + "literals": [ + "solidity", + "^", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:24:2" + }, + { + "absolutePath": "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol", + "file": "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol", + "id": 485, + "nodeType": "ImportDirective", + "scope": 570, + "sourceUnit": 677, + "src": "28:171:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 569, + "linearizedBaseContracts": [ + 569 + ], + "name": "AlgoSupervisorRole", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 488, + "libraryName": { + "contractScope": null, + "id": 486, + "name": "Roles", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 676, + "src": "244:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Roles_$676", + "typeString": "library Roles" + } + }, + "nodeType": "UsingForDirective", + "src": "238:27:2", + "typeName": { + "contractScope": null, + "id": 487, + "name": "Roles.Role", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 589, + "src": "254:10:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$589_storage_ptr", + "typeString": "struct Roles.Role" + } + } + }, + { + "constant": false, + "id": 490, + "name": "_supervisors", + "nodeType": "VariableDeclaration", + "scope": 569, + "src": "273:31:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$589_storage", + "typeString": "struct Roles.Role" + }, + "typeName": { + "contractScope": null, + "id": 489, + "name": "Roles.Role", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 589, + "src": "273:10:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$589_storage_ptr", + "typeString": "struct Roles.Role" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 498, + "nodeType": "Block", + "src": "337:45:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 494, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1032, + "src": "363:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 495, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "363:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 493, + "name": "_addSupervisor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 556, + "src": "348:14:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 496, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "348:26:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 497, + "nodeType": "ExpressionStatement", + "src": "348:26:2" + } + ] + }, + "documentation": null, + "id": 499, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 491, + "nodeType": "ParameterList", + "parameters": [], + "src": "325:2:2" + }, + "payable": false, + "returnParameters": { + "id": 492, + "nodeType": "ParameterList", + "parameters": [], + "src": "337:0:2" + }, + "scope": 569, + "src": "313:69:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 509, + "nodeType": "Block", + "src": "416:64:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 503, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1032, + "src": "448:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 504, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "448:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 502, + "name": "isSupervisor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 523, + "src": "435:12:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 505, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "435:24:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 501, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1035, + 1036 + ], + "referencedDeclaration": 1035, + "src": "427:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 506, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "427:33:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 507, + "nodeType": "ExpressionStatement", + "src": "427:33:2" + }, + { + "id": 508, + "nodeType": "PlaceholderStatement", + "src": "471:1:2" + } + ] + }, + "documentation": null, + "id": 510, + "name": "onlySupervisor", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 500, + "nodeType": "ParameterList", + "parameters": [], + "src": "413:2:2" + }, + "src": "390:90:2", + "visibility": "internal" + }, + { + "body": { + "id": 522, + "nodeType": "Block", + "src": "554:51:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 519, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 512, + "src": "589:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 517, + "name": "_supervisors", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 490, + "src": "572:12:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$589_storage", + "typeString": "struct Roles.Role storage ref" + } + }, + "id": 518, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "has", + "nodeType": "MemberAccess", + "referencedDeclaration": 675, + "src": "572:16:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Role_$589_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Role_$589_storage_ptr_$", + "typeString": "function (struct Roles.Role storage pointer,address) view returns (bool)" + } + }, + "id": 520, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "572:25:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 516, + "id": 521, + "nodeType": "Return", + "src": "565:32:2" + } + ] + }, + "documentation": null, + "id": 523, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "isSupervisor", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 513, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 512, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 523, + "src": "510:15:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 511, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "510:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "509:17:2" + }, + "payable": false, + "returnParameters": { + "id": 516, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 515, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 523, + "src": "548:4:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 514, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "548:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "547:6:2" + }, + "scope": 569, + "src": "488:117:2", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 534, + "nodeType": "Block", + "src": "675:42:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 531, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 525, + "src": "701:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 530, + "name": "_addSupervisor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 556, + "src": "686:14:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 532, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "686:23:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 533, + "nodeType": "ExpressionStatement", + "src": "686:23:2" + } + ] + }, + "documentation": null, + "id": 535, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 528, + "modifierName": { + "argumentTypes": null, + "id": 527, + "name": "onlySupervisor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 510, + "src": "660:14:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "660:14:2" + } + ], + "name": "addSupervisor", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 526, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 525, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 535, + "src": "636:15:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 524, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "636:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "635:17:2" + }, + "payable": false, + "returnParameters": { + "id": 529, + "nodeType": "ParameterList", + "parameters": [], + "src": "675:0:2" + }, + "scope": 569, + "src": "613:104:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 543, + "nodeType": "Block", + "src": "762:48:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 539, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1032, + "src": "791:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 540, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "791:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 538, + "name": "_removeSupervisor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 568, + "src": "773:17:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 541, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "773:29:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 542, + "nodeType": "ExpressionStatement", + "src": "773:29:2" + } + ] + }, + "documentation": null, + "id": 544, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "renounceSupervisor", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 536, + "nodeType": "ParameterList", + "parameters": [], + "src": "752:2:2" + }, + "payable": false, + "returnParameters": { + "id": 537, + "nodeType": "ParameterList", + "parameters": [], + "src": "762:0:2" + }, + "scope": 569, + "src": "725:85:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 555, + "nodeType": "Block", + "src": "868:44:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 552, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 546, + "src": "896:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 549, + "name": "_supervisors", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 490, + "src": "879:12:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$589_storage", + "typeString": "struct Roles.Role storage ref" + } + }, + "id": 551, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 621, + "src": "879:16:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Role_$589_storage_ptr_$_t_address_$returns$__$bound_to$_t_struct$_Role_$589_storage_ptr_$", + "typeString": "function (struct Roles.Role storage pointer,address)" + } + }, + "id": 553, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "879:25:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 554, + "nodeType": "ExpressionStatement", + "src": "879:25:2" + } + ] + }, + "documentation": null, + "id": 556, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "_addSupervisor", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 547, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 546, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 556, + "src": "842:15:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 545, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "842:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "841:17:2" + }, + "payable": false, + "returnParameters": { + "id": 548, + "nodeType": "ParameterList", + "parameters": [], + "src": "868:0:2" + }, + "scope": 569, + "src": "818:94:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 567, + "nodeType": "Block", + "src": "973:47:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 564, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 558, + "src": "1004:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 561, + "name": "_supervisors", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 490, + "src": "984:12:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$589_storage", + "typeString": "struct Roles.Role storage ref" + } + }, + "id": 563, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "remove", + "nodeType": "MemberAccess", + "referencedDeclaration": 652, + "src": "984:19:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Role_$589_storage_ptr_$_t_address_$returns$__$bound_to$_t_struct$_Role_$589_storage_ptr_$", + "typeString": "function (struct Roles.Role storage pointer,address)" + } + }, + "id": 565, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "984:28:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 566, + "nodeType": "ExpressionStatement", + "src": "984:28:2" + } + ] + }, + "documentation": null, + "id": 568, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "_removeSupervisor", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 559, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 558, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 568, + "src": "947:15:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 557, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "947:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "946:17:2" + }, + "payable": false, + "returnParameters": { + "id": 560, + "nodeType": "ParameterList", + "parameters": [], + "src": "973:0:2" + }, + "scope": 569, + "src": "920:100:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 570, + "src": "203:820:2" + } + ], + "src": "0:1025:2" + }, + "id": 2 + }, + "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/IAlgoMiner.sol": { + "ast": { + "absolutePath": "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/IAlgoMiner.sol", + "exportedSymbols": { + "IAlgoMiner": [ + 582 + ] + }, + "id": 583, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 571, + "literals": [ + "solidity", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:23:3" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": false, + "id": 582, + "linearizedBaseContracts": [ + 582 + ], + "name": "IAlgoMiner", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "id": 576, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "isAlgoMiner", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 572, + "nodeType": "ParameterList", + "parameters": [], + "src": "74:2:3" + }, + "payable": false, + "returnParameters": { + "id": 575, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 574, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 576, + "src": "98:4:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 573, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "98:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "97:6:3" + }, + "scope": 582, + "src": "54:50:3", + "stateMutability": "pure", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 581, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getCategory", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 577, + "nodeType": "ParameterList", + "parameters": [], + "src": "130:2:3" + }, + "payable": false, + "returnParameters": { + "id": 580, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 579, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 581, + "src": "154:5:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 578, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "154:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "153:7:3" + }, + "scope": 582, + "src": "110:51:3", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 583, + "src": "27:137:3" + } + ], + "src": "0:164:3" + }, + "id": 3 + }, + "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol": { + "ast": { + "absolutePath": "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol", + "exportedSymbols": { + "Roles": [ + 676 + ] + }, + "id": 677, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 584, + "literals": [ + "solidity", + "^", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:24:4" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": "@title Roles\n@dev Library for managing addresses assigned to a Role.", + "fullyImplemented": true, + "id": 676, + "linearizedBaseContracts": [ + 676 + ], + "name": "Roles", + "nodeType": "ContractDefinition", + "nodes": [ + { + "canonicalName": "Roles.Role", + "id": 589, + "members": [ + { + "constant": false, + "id": 588, + "name": "bearer", + "nodeType": "VariableDeclaration", + "scope": 589, + "src": "145:32:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "typeName": { + "id": 587, + "keyType": { + "id": 585, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "154:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "145:25:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "valueType": { + "id": 586, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "165:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Role", + "nodeType": "StructDefinition", + "scope": 676, + "src": "127:55:4", + "visibility": "public" + }, + { + "body": { + "id": 620, + "nodeType": "Block", + "src": "302:109:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 601, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 597, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 593, + "src": "316:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 599, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "335:1:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 598, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "327:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 600, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "327:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "316:21:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 596, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1035, + 1036 + ], + "referencedDeclaration": 1035, + "src": "308:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 602, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "308:30:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 603, + "nodeType": "ExpressionStatement", + "src": "308:30:4" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 609, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "352:19:4", + "subExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 606, + "name": "role", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 591, + "src": "357:4:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$589_storage_ptr", + "typeString": "struct Roles.Role storage pointer" + } + }, + { + "argumentTypes": null, + "id": 607, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 593, + "src": "363:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Role_$589_storage_ptr", + "typeString": "struct Roles.Role storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 605, + "name": "has", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 675, + "src": "353:3:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Role_$589_storage_ptr_$_t_address_$returns$_t_bool_$", + "typeString": "function (struct Roles.Role storage pointer,address) view returns (bool)" + } + }, + "id": 608, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "353:18:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 604, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1035, + 1036 + ], + "referencedDeclaration": 1035, + "src": "344:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 610, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "344:28:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 611, + "nodeType": "ExpressionStatement", + "src": "344:28:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 618, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 612, + "name": "role", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 591, + "src": "379:4:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$589_storage_ptr", + "typeString": "struct Roles.Role storage pointer" + } + }, + "id": 615, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "bearer", + "nodeType": "MemberAccess", + "referencedDeclaration": 588, + "src": "379:11:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 616, + "indexExpression": { + "argumentTypes": null, + "id": 614, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 593, + "src": "391:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "379:20:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 617, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "402:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "379:27:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 619, + "nodeType": "ExpressionStatement", + "src": "379:27:4" + } + ] + }, + "documentation": "@dev give an account access to this role", + "id": 621, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "add", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 594, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 591, + "name": "role", + "nodeType": "VariableDeclaration", + "scope": 621, + "src": "257:17:4", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$589_storage_ptr", + "typeString": "struct Roles.Role" + }, + "typeName": { + "contractScope": null, + "id": 590, + "name": "Role", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 589, + "src": "257:4:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$589_storage_ptr", + "typeString": "struct Roles.Role" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 593, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 621, + "src": "276:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 592, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "276:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "256:36:4" + }, + "payable": false, + "returnParameters": { + "id": 595, + "nodeType": "ParameterList", + "parameters": [], + "src": "302:0:4" + }, + "scope": 676, + "src": "244:167:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 651, + "nodeType": "Block", + "src": "538:109:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 633, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 629, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 625, + "src": "552:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 631, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "571:1:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 630, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "563:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 632, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "563:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "552:21:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 628, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1035, + 1036 + ], + "referencedDeclaration": 1035, + "src": "544:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 634, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "544:30:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 635, + "nodeType": "ExpressionStatement", + "src": "544:30:4" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 638, + "name": "role", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 623, + "src": "592:4:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$589_storage_ptr", + "typeString": "struct Roles.Role storage pointer" + } + }, + { + "argumentTypes": null, + "id": 639, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 625, + "src": "598:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Role_$589_storage_ptr", + "typeString": "struct Roles.Role storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 637, + "name": "has", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 675, + "src": "588:3:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Role_$589_storage_ptr_$_t_address_$returns$_t_bool_$", + "typeString": "function (struct Roles.Role storage pointer,address) view returns (bool)" + } + }, + "id": 640, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "588:18:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 636, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1035, + 1036 + ], + "referencedDeclaration": 1035, + "src": "580:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 641, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "580:27:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 642, + "nodeType": "ExpressionStatement", + "src": "580:27:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 649, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 643, + "name": "role", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 623, + "src": "614:4:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$589_storage_ptr", + "typeString": "struct Roles.Role storage pointer" + } + }, + "id": 646, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "bearer", + "nodeType": "MemberAccess", + "referencedDeclaration": 588, + "src": "614:11:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 647, + "indexExpression": { + "argumentTypes": null, + "id": 645, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 625, + "src": "626:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "614:20:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 648, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "637:5:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "614:28:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 650, + "nodeType": "ExpressionStatement", + "src": "614:28:4" + } + ] + }, + "documentation": "@dev remove an account's access to this role", + "id": 652, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "remove", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 626, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 623, + "name": "role", + "nodeType": "VariableDeclaration", + "scope": 652, + "src": "493:17:4", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$589_storage_ptr", + "typeString": "struct Roles.Role" + }, + "typeName": { + "contractScope": null, + "id": 622, + "name": "Role", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 589, + "src": "493:4:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$589_storage_ptr", + "typeString": "struct Roles.Role" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 625, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 652, + "src": "512:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 624, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "512:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "492:36:4" + }, + "payable": false, + "returnParameters": { + "id": 627, + "nodeType": "ParameterList", + "parameters": [], + "src": "538:0:4" + }, + "scope": 676, + "src": "477:170:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 674, + "nodeType": "Block", + "src": "817:74:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 666, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 662, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 656, + "src": "831:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 664, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "850:1:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 663, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "842:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 665, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "842:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "831:21:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 661, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1035, + 1036 + ], + "referencedDeclaration": 1035, + "src": "823:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 667, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "823:30:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 668, + "nodeType": "ExpressionStatement", + "src": "823:30:4" + }, + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 669, + "name": "role", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 654, + "src": "866:4:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$589_storage_ptr", + "typeString": "struct Roles.Role storage pointer" + } + }, + "id": 670, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "bearer", + "nodeType": "MemberAccess", + "referencedDeclaration": 588, + "src": "866:11:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 672, + "indexExpression": { + "argumentTypes": null, + "id": 671, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 656, + "src": "878:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "866:20:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 660, + "id": 673, + "nodeType": "Return", + "src": "859:27:4" + } + ] + }, + "documentation": "@dev check if an account has this role\n@return bool", + "id": 675, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "has", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 657, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 654, + "name": "role", + "nodeType": "VariableDeclaration", + "scope": 675, + "src": "738:17:4", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$589_storage_ptr", + "typeString": "struct Roles.Role" + }, + "typeName": { + "contractScope": null, + "id": 653, + "name": "Role", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 589, + "src": "738:4:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$589_storage_ptr", + "typeString": "struct Roles.Role" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 656, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 675, + "src": "757:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 655, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "757:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "737:36:4" + }, + "payable": false, + "returnParameters": { + "id": 660, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 659, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 675, + "src": "809:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 658, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "809:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "808:6:4" + }, + "scope": 676, + "src": "725:166:4", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 677, + "src": "109:784:4" + } + ], + "src": "0:894:4" + }, + "id": 4 + }, + "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol": { + "ast": { + "absolutePath": "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol", + "exportedSymbols": { + "SafeMath": [ + 804 + ] + }, + "id": 805, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 678, + "literals": [ + "solidity", + "^", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:24:5" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": "@title SafeMath\n@dev Math operations with safety checks that revert on error", + "fullyImplemented": true, + "id": 804, + "linearizedBaseContracts": [ + 804 + ], + "name": "SafeMath", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 710, + "nodeType": "Block", + "src": "271:314:5", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 689, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 687, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 680, + "src": "486:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 688, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "491:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "486:6:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 693, + "nodeType": "IfStatement", + "src": "482:35:5", + "trueBody": { + "id": 692, + "nodeType": "Block", + "src": "494:23:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "30", + "id": 690, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "509:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "functionReturnParameters": 686, + "id": 691, + "nodeType": "Return", + "src": "502:8:5" + } + ] + } + }, + { + "assignments": [ + 695 + ], + "declarations": [ + { + "constant": false, + "id": 695, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 711, + "src": "523:9:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 694, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "523:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 699, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 698, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 696, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 680, + "src": "535:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 697, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 682, + "src": "539:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "535:5:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "523:17:5" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 705, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 703, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 701, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 695, + "src": "554:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 702, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 680, + "src": "558:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "554:5:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 704, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 682, + "src": "563:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "554:10:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 700, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1035, + 1036 + ], + "referencedDeclaration": 1035, + "src": "546:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 706, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "546:19:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 707, + "nodeType": "ExpressionStatement", + "src": "546:19:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 708, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 695, + "src": "579:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 686, + "id": 709, + "nodeType": "Return", + "src": "572:8:5" + } + ] + }, + "documentation": "@dev Multiplies two numbers, reverts on overflow.", + "id": 711, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "mul", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 683, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 680, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 711, + "src": "217:9:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 679, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "217:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 682, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 711, + "src": "228:9:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 681, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "228:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "216:22:5" + }, + "payable": false, + "returnParameters": { + "id": 686, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 685, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 711, + "src": "262:7:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 684, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "262:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "261:9:5" + }, + "scope": 804, + "src": "204:381:5", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 734, + "nodeType": "Block", + "src": "762:203:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 723, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 721, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 715, + "src": "776:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 722, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "780:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "776:5:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 720, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1035, + 1036 + ], + "referencedDeclaration": 1035, + "src": "768:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 724, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "768:14:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 725, + "nodeType": "ExpressionStatement", + "src": "768:14:5" + }, + { + "assignments": [ + 727 + ], + "declarations": [ + { + "constant": false, + "id": 727, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 735, + "src": "846:9:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 726, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "846:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 731, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 730, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 728, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 713, + "src": "858:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 729, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 715, + "src": "862:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "858:5:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "846:17:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 732, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 727, + "src": "959:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 719, + "id": 733, + "nodeType": "Return", + "src": "952:8:5" + } + ] + }, + "documentation": "@dev Integer division of two numbers truncating the quotient, reverts on division by zero.", + "id": 735, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "div", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 716, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 713, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 735, + "src": "708:9:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 712, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "708:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 715, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 735, + "src": "719:9:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 714, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "719:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "707:22:5" + }, + "payable": false, + "returnParameters": { + "id": 719, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 718, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 735, + "src": "753:7:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 717, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "753:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "752:9:5" + }, + "scope": 804, + "src": "695:270:5", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 758, + "nodeType": "Block", + "src": "1145:64:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 747, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 745, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 739, + "src": "1159:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 746, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 737, + "src": "1164:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1159:6:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 744, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1035, + 1036 + ], + "referencedDeclaration": 1035, + "src": "1151:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 748, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1151:15:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 749, + "nodeType": "ExpressionStatement", + "src": "1151:15:5" + }, + { + "assignments": [ + 751 + ], + "declarations": [ + { + "constant": false, + "id": 751, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 759, + "src": "1172:9:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 750, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1172:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 755, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 754, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 752, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 737, + "src": "1184:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 753, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 739, + "src": "1188:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1184:5:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1172:17:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 756, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 751, + "src": "1203:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 743, + "id": 757, + "nodeType": "Return", + "src": "1196:8:5" + } + ] + }, + "documentation": "@dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend).", + "id": 759, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "sub", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 740, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 737, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 759, + "src": "1091:9:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 736, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1091:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 739, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 759, + "src": "1102:9:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 738, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1102:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1090:22:5" + }, + "payable": false, + "returnParameters": { + "id": 743, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 742, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 759, + "src": "1136:7:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 741, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1136:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1135:9:5" + }, + "scope": 804, + "src": "1078:131:5", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 782, + "nodeType": "Block", + "src": "1339:64:5", + "statements": [ + { + "assignments": [ + 769 + ], + "declarations": [ + { + "constant": false, + "id": 769, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 783, + "src": "1345:9:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 768, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1345:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 773, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 772, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 770, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "1357:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 771, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 763, + "src": "1361:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1357:5:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1345:17:5" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 777, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 775, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 769, + "src": "1376:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 776, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "1381:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1376:6:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 774, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1035, + 1036 + ], + "referencedDeclaration": 1035, + "src": "1368:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 778, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1368:15:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 779, + "nodeType": "ExpressionStatement", + "src": "1368:15:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 780, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 769, + "src": "1397:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 767, + "id": 781, + "nodeType": "Return", + "src": "1390:8:5" + } + ] + }, + "documentation": "@dev Adds two numbers, reverts on overflow.", + "id": 783, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "add", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 764, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 761, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 783, + "src": "1285:9:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 760, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1285:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 763, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 783, + "src": "1296:9:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 762, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1296:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1284:22:5" + }, + "payable": false, + "returnParameters": { + "id": 767, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 766, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 783, + "src": "1330:7:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 765, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1330:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1329:9:5" + }, + "scope": 804, + "src": "1272:131:5", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 802, + "nodeType": "Block", + "src": "1602:44:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 795, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 793, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 787, + "src": "1616:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 794, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1621:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1616:6:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 792, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1035, + 1036 + ], + "referencedDeclaration": 1035, + "src": "1608:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 796, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1608:15:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 797, + "nodeType": "ExpressionStatement", + "src": "1608:15:5" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 800, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 798, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 785, + "src": "1636:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "%", + "rightExpression": { + "argumentTypes": null, + "id": 799, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 787, + "src": "1640:1:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1636:5:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 791, + "id": 801, + "nodeType": "Return", + "src": "1629:12:5" + } + ] + }, + "documentation": "@dev Divides two numbers and returns the remainder (unsigned integer modulo),\nreverts when dividing by zero.", + "id": 803, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "mod", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 788, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 785, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 803, + "src": "1548:9:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 784, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1548:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 787, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 803, + "src": "1559:9:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 786, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1559:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1547:22:5" + }, + "payable": false, + "returnParameters": { + "id": 791, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 790, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 803, + "src": "1593:7:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 789, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1593:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1592:9:5" + }, + "scope": 804, + "src": "1535:111:5", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 805, + "src": "117:1531:5" + } + ], + "src": "0:1649:5" + }, + "id": 5 + }, + "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol": { + "ast": { + "absolutePath": "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "exportedSymbols": { + "IERC20": [ + 873 + ] + }, + "id": 874, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 806, + "literals": [ + "solidity", + "^", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:24:6" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "interface", + "documentation": "@title ERC20 interface\n@dev see https://github.com/ethereum/EIPs/issues/20", + "fullyImplemented": false, + "id": 873, + "linearizedBaseContracts": [ + 873 + ], + "name": "IERC20", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "id": 811, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "totalSupply", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 807, + "nodeType": "ParameterList", + "parameters": [], + "src": "156:2:6" + }, + "payable": false, + "returnParameters": { + "id": 810, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 809, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 811, + "src": "182:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 808, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "182:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "181:9:6" + }, + "scope": 873, + "src": "136:55:6", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 818, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "balanceOf", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 814, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 813, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 818, + "src": "214:11:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 812, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "214:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "213:13:6" + }, + "payable": false, + "returnParameters": { + "id": 817, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 816, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 818, + "src": "250:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 815, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "250:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "249:9:6" + }, + "scope": 873, + "src": "195:64:6", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 827, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "allowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 823, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 820, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 827, + "src": "282:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 819, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "282:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 822, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 827, + "src": "297:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 821, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "297:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "281:32:6" + }, + "payable": false, + "returnParameters": { + "id": 826, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 825, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 827, + "src": "341:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 824, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "341:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "340:9:6" + }, + "scope": 873, + "src": "263:87:6", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 836, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 832, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 829, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 836, + "src": "372:10:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 828, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "372:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 831, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 836, + "src": "384:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 830, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "384:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "371:27:6" + }, + "payable": false, + "returnParameters": { + "id": 835, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 834, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 836, + "src": "417:4:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 833, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "417:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "416:6:6" + }, + "scope": 873, + "src": "354:69:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 845, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 841, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 838, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 845, + "src": "444:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 837, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "444:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 840, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 845, + "src": "461:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 839, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "461:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "443:32:6" + }, + "payable": false, + "returnParameters": { + "id": 844, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 843, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 845, + "src": "498:4:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 842, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "498:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "497:6:6" + }, + "scope": 873, + "src": "427:77:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 856, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 852, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 847, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 856, + "src": "530:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 846, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "530:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 849, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 856, + "src": "544:10:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 848, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "544:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 851, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 856, + "src": "556:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 850, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "556:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "529:41:6" + }, + "payable": false, + "returnParameters": { + "id": 855, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 854, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 856, + "src": "593:4:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 853, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "593:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "592:6:6" + }, + "scope": 873, + "src": "508:91:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "anonymous": false, + "documentation": null, + "id": 864, + "name": "Transfer", + "nodeType": "EventDefinition", + "parameters": { + "id": 863, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 858, + "indexed": true, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 864, + "src": "623:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 857, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "623:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 860, + "indexed": true, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 864, + "src": "649:18:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 859, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "649:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 862, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 864, + "src": "673:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 861, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "673:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "617:73:6" + }, + "src": "603:88:6" + }, + { + "anonymous": false, + "documentation": null, + "id": 872, + "name": "Approval", + "nodeType": "EventDefinition", + "parameters": { + "id": 871, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 866, + "indexed": true, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 872, + "src": "715:21:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 865, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "715:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 868, + "indexed": true, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 872, + "src": "742:23:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 867, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "742:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 870, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 872, + "src": "771:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 869, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "771:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "709:79:6" + }, + "src": "695:94:6" + } + ], + "scope": 874, + "src": "115:676:6" + } + ], + "src": "0:792:6" + }, + "id": 6 + }, + "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol": { + "ast": { + "absolutePath": "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol", + "exportedSymbols": { + "SafeERC20": [ + 1017 + ] + }, + "id": 1018, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 875, + "literals": [ + "solidity", + "^", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:24:7" + }, + { + "absolutePath": "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "file": "./IERC20.sol", + "id": 876, + "nodeType": "ImportDirective", + "scope": 1018, + "sourceUnit": 874, + "src": "26:22:7", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol", + "file": "../../math/SafeMath.sol", + "id": 877, + "nodeType": "ImportDirective", + "scope": 1018, + "sourceUnit": 805, + "src": "49:33:7", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": "@title SafeERC20\n@dev Wrappers around ERC20 operations that throw on failure.\nTo use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\nwhich allows you to call the safe operations as `token.safeTransfer(...)`, etc.", + "fullyImplemented": true, + "id": 1017, + "linearizedBaseContracts": [ + 1017 + ], + "name": "SafeERC20", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 880, + "libraryName": { + "contractScope": null, + "id": 878, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 804, + "src": "382:8:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$804", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "376:27:7", + "typeName": { + "id": 879, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "395:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "body": { + "id": 897, + "nodeType": "Block", + "src": "501:45:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 892, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 884, + "src": "530:2:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 893, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 886, + "src": "534:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 890, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 882, + "src": "515:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$873", + "typeString": "contract IERC20" + } + }, + "id": 891, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 836, + "src": "515:14:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 894, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "515:25:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 889, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1035, + 1036 + ], + "referencedDeclaration": 1035, + "src": "507:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 895, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "507:34:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 896, + "nodeType": "ExpressionStatement", + "src": "507:34:7" + } + ] + }, + "documentation": null, + "id": 898, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "safeTransfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 887, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 882, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 898, + "src": "434:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$873", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 881, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 873, + "src": "434:6:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$873", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 884, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 898, + "src": "452:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 883, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "452:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 886, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 898, + "src": "468:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 885, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "468:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "428:57:7" + }, + "payable": false, + "returnParameters": { + "id": 888, + "nodeType": "ParameterList", + "parameters": [], + "src": "501:0:7" + }, + "scope": 1017, + "src": "407:139:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 918, + "nodeType": "Block", + "src": "666:55:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 912, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 902, + "src": "699:4:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 913, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 904, + "src": "705:2:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 914, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 906, + "src": "709:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 910, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 900, + "src": "680:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$873", + "typeString": "contract IERC20" + } + }, + "id": 911, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 856, + "src": "680:18:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,address,uint256) external returns (bool)" + } + }, + "id": 915, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "680:35:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 909, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1035, + 1036 + ], + "referencedDeclaration": 1035, + "src": "672:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 916, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "672:44:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 917, + "nodeType": "ExpressionStatement", + "src": "672:44:7" + } + ] + }, + "documentation": null, + "id": 919, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "safeTransferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 907, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 900, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 919, + "src": "581:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$873", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 899, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 873, + "src": "581:6:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$873", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 902, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 919, + "src": "599:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 901, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "599:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 904, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 919, + "src": "617:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 903, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "617:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 906, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 919, + "src": "633:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 905, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "633:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "575:75:7" + }, + "payable": false, + "returnParameters": { + "id": 908, + "nodeType": "ParameterList", + "parameters": [], + "src": "666:0:7" + }, + "scope": 1017, + "src": "550:171:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 953, + "nodeType": "Block", + "src": "823:330:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 942, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 931, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 929, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 925, + "src": "1045:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 930, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1054:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1045:10:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 932, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "1044:12:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 940, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 935, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1032, + "src": "1077:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 936, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1077:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 937, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 923, + "src": "1089:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 933, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 921, + "src": "1061:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$873", + "typeString": "contract IERC20" + } + }, + "id": 934, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "allowance", + "nodeType": "MemberAccess", + "referencedDeclaration": 827, + "src": "1061:15:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", + "typeString": "function (address,address) view external returns (uint256)" + } + }, + "id": 938, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1061:36:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 939, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1101:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1061:41:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 941, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "1060:43:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1044:59:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 928, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1035, + 1036 + ], + "referencedDeclaration": 1035, + "src": "1036:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 943, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1036:68:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 944, + "nodeType": "ExpressionStatement", + "src": "1036:68:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 948, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 923, + "src": "1132:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 949, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 925, + "src": "1141:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 946, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 921, + "src": "1118:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$873", + "typeString": "contract IERC20" + } + }, + "id": 947, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "approve", + "nodeType": "MemberAccess", + "referencedDeclaration": 845, + "src": "1118:13:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 950, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1118:29:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 945, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1035, + 1036 + ], + "referencedDeclaration": 1035, + "src": "1110:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 951, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1110:38:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 952, + "nodeType": "ExpressionStatement", + "src": "1110:38:7" + } + ] + }, + "documentation": null, + "id": 954, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "safeApprove", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 926, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 921, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 954, + "src": "751:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$873", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 920, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 873, + "src": "751:6:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$873", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 923, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 954, + "src": "769:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 922, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "769:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 925, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 954, + "src": "790:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 924, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "790:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "745:62:7" + }, + "payable": false, + "returnParameters": { + "id": 927, + "nodeType": "ParameterList", + "parameters": [], + "src": "823:0:7" + }, + "scope": 1017, + "src": "725:428:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 984, + "nodeType": "Block", + "src": "1265:135:7", + "statements": [ + { + "assignments": [ + 964 + ], + "declarations": [ + { + "constant": false, + "id": 964, + "name": "newAllowance", + "nodeType": "VariableDeclaration", + "scope": 985, + "src": "1271:20:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 963, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1271:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 975, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 973, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 960, + "src": "1338:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 968, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1053, + "src": "1318:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeERC20_$1017", + "typeString": "library SafeERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_SafeERC20_$1017", + "typeString": "library SafeERC20" + } + ], + "id": 967, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1310:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 969, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1310:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 970, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 958, + "src": "1325:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 965, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 956, + "src": "1294:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$873", + "typeString": "contract IERC20" + } + }, + "id": 966, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "allowance", + "nodeType": "MemberAccess", + "referencedDeclaration": 827, + "src": "1294:15:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", + "typeString": "function (address,address) view external returns (uint256)" + } + }, + "id": 971, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1294:39:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 972, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 783, + "src": "1294:43:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 974, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1294:50:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1271:73:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 979, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 958, + "src": "1372:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 980, + "name": "newAllowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 964, + "src": "1381:12:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 977, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 956, + "src": "1358:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$873", + "typeString": "contract IERC20" + } + }, + "id": 978, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "approve", + "nodeType": "MemberAccess", + "referencedDeclaration": 845, + "src": "1358:13:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 981, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1358:36:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 976, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1035, + 1036 + ], + "referencedDeclaration": 1035, + "src": "1350:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 982, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1350:45:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 983, + "nodeType": "ExpressionStatement", + "src": "1350:45:7" + } + ] + }, + "documentation": null, + "id": 985, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "safeIncreaseAllowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 961, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 956, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 985, + "src": "1193:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$873", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 955, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 873, + "src": "1193:6:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$873", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 958, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 985, + "src": "1211:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 957, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1211:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 960, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 985, + "src": "1232:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 959, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1232:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1187:62:7" + }, + "payable": false, + "returnParameters": { + "id": 962, + "nodeType": "ParameterList", + "parameters": [], + "src": "1265:0:7" + }, + "scope": 1017, + "src": "1157:243:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1015, + "nodeType": "Block", + "src": "1512:135:7", + "statements": [ + { + "assignments": [ + 995 + ], + "declarations": [ + { + "constant": false, + "id": 995, + "name": "newAllowance", + "nodeType": "VariableDeclaration", + "scope": 1016, + "src": "1518:20:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 994, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1518:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1006, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1004, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 991, + "src": "1585:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 999, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1053, + "src": "1565:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeERC20_$1017", + "typeString": "library SafeERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_SafeERC20_$1017", + "typeString": "library SafeERC20" + } + ], + "id": 998, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1557:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1000, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1557:13:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1001, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 989, + "src": "1572:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 996, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 987, + "src": "1541:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$873", + "typeString": "contract IERC20" + } + }, + "id": 997, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "allowance", + "nodeType": "MemberAccess", + "referencedDeclaration": 827, + "src": "1541:15:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", + "typeString": "function (address,address) view external returns (uint256)" + } + }, + "id": 1002, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1541:39:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1003, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 759, + "src": "1541:43:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1005, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1541:50:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1518:73:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1010, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 989, + "src": "1619:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1011, + "name": "newAllowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 995, + "src": "1628:12:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1008, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 987, + "src": "1605:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$873", + "typeString": "contract IERC20" + } + }, + "id": 1009, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "approve", + "nodeType": "MemberAccess", + "referencedDeclaration": 845, + "src": "1605:13:7", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 1012, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1605:36:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1007, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1035, + 1036 + ], + "referencedDeclaration": 1035, + "src": "1597:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1013, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1597:45:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1014, + "nodeType": "ExpressionStatement", + "src": "1597:45:7" + } + ] + }, + "documentation": null, + "id": 1016, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "safeDecreaseAllowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 992, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 987, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 1016, + "src": "1440:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$873", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 986, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 873, + "src": "1440:6:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$873", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 989, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1016, + "src": "1458:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 988, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1458:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 991, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1016, + "src": "1479:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 990, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1479:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1434:62:7" + }, + "payable": false, + "returnParameters": { + "id": 993, + "nodeType": "ParameterList", + "parameters": [], + "src": "1512:0:7" + }, + "scope": 1017, + "src": "1404:243:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 1018, + "src": "353:1296:7" + } + ], + "src": "0:1650:7" + }, + "id": 7 + } + } +} \ No newline at end of file diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/bin/AlgoMiner.abi b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/bin/AlgoMiner.abi new file mode 100644 index 000000000..ce944c245 --- /dev/null +++ b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/bin/AlgoMiner.abi @@ -0,0 +1 @@ +[{"constant":false,"inputs":[],"name":"pauseMining","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"isAlgoMiner","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[],"name":"startMining","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newMinerAddress","type":"address"}],"name":"migrateMiner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"account","type":"address"}],"name":"addSupervisor","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"account","type":"address"}],"name":"addCoreTeam","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"stopAndRemoveOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"resumeMining","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"account","type":"address"}],"name":"isCoreTeam","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getCategory","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"account","type":"address"}],"name":"isSupervisor","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"mine","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"deactivateMiner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newOwnerAddress","type":"address"}],"name":"resetMiner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"activateMiner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"renounceSupervisor","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"DAYS_PER_YEAR","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceCoreTeam","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"stopMining","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"minerType","type":"uint16"},{"name":"category","type":"uint8"},{"name":"ownerAddress","type":"address"},{"name":"tokenAddress","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"}] \ No newline at end of file diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/bin/AlgoMiner.bin b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/bin/AlgoMiner.bin new file mode 100644 index 000000000..b27ef5f2c --- /dev/null +++ b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/bin/AlgoMiner.bin @@ -0,0 +1 @@ +608060405234801561001057600080fd5b50604051608080610ea08339810160409081528151602083015191830151606090930151909290610049336401000000006100c3810204565b61005b336401000000006100de810204565b6002805461ffff191661ffff959095169490941762ff000019166201000060ff949094169390930292909217630100000060b860020a0319166301000000600160a060020a03928316021790925560038054600160a060020a03191691909216179055610184565b6100db600082640100000000610c476100f682021704565b50565b6100db600182640100000000610c476100f682021704565b600160a060020a038116151561010b57600080fd5b61011e828264010000000061014d810204565b1561012857600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b6000600160a060020a038216151561016457600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b610d0d806101936000396000f3006080604052600436106101065763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663162f986d811461010b5780631777fb4b1461012257806321b79d981461014b578063231d4e2a1461016057806329d10b6e146101815780632e6b6849146101a2578063363aa6c7146101c3578063427534a4146101d8578063608d3d3d146101ed57806380258e471461020e57806381a244591461023957806399f4b2511461025a5780639e614ca01461026f578063ada436e914610284578063b2a32cd5146102a5578063be952494146102ba578063c6846ef8146102cf578063d43acc79146102f6578063da4086791461030b575b600080fd5b34801561011757600080fd5b50610120610320565b005b34801561012e57600080fd5b50610137610386565b604080519115158252519081900360200190f35b34801561015757600080fd5b5061012061038b565b34801561016c57600080fd5b50610120600160a060020a036004351661042f565b34801561018d57600080fd5b50610120600160a060020a036004351661051b565b3480156101ae57600080fd5b50610120600160a060020a0360043516610538565b3480156101cf57600080fd5b50610120610555565b3480156101e457600080fd5b506101206105fd565b3480156101f957600080fd5b50610137600160a060020a0360043516610660565b34801561021a57600080fd5b50610223610678565b6040805160ff9092168252519081900360200190f35b34801561024557600080fd5b50610137600160a060020a0360043516610687565b34801561026657600080fd5b5061012061069a565b34801561027b57600080fd5b5061012061086c565b34801561029057600080fd5b50610120600160a060020a03600435166108c6565b3480156102b157600080fd5b5061012061095b565b3480156102c657600080fd5b50610120610a6d565b3480156102db57600080fd5b506102e4610a78565b60408051918252519081900360200190f35b34801561030257600080fd5b50610120610a7e565b34801561031757600080fd5b50610120610a87565b61032933610687565b151561033457600080fd5b60016003805460a060020a900460ff169081111561034e57fe5b1461035857600080fd5b600380546002919074ff0000000000000000000000000000000000000000191660a060020a835b0217905550565b600190565b60025463010000009004600160a060020a031633146103a957600080fd5b60016003805460a060020a900460ff16908111156103c357fe5b146103cd57600080fd5b6003547501000000000000000000000000000000000000000000900460ff16156103f657600080fd5b6003805475ff00000000000000000000000000000000000000000019167501000000000000000000000000000000000000000000179055565b61043833610660565b151561044357600080fd5b60006003805460a060020a900460ff169081111561045d57fe5b1461046757600080fd5b600354604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051610518928492600160a060020a03909116916370a08231916024808201926020929091908290030181600087803b1580156104d357600080fd5b505af11580156104e7573d6000803e3d6000fd5b505050506040513d60208110156104fd57600080fd5b5051600354600160a060020a0316919063ffffffff610b1416565b50565b61052433610687565b151561052f57600080fd5b61051881610bcc565b61054133610660565b151561054c57600080fd5b61051881610bdd565b61055e33610687565b151561056957600080fd5b600380805460a060020a900460ff169081111561058257fe5b141561058d57600080fd5b6003805474ff00000000000000000000000000000000000000001916740300000000000000000000000000000000000000001775ff000000000000000000000000000000000000000000191690556002805476ffffffffffffffffffffffffffffffffffffffff00000019169055565b61060633610687565b151561061157600080fd5b60026003805460a060020a900460ff169081111561062b57fe5b1461063557600080fd5b600380546001919074ff0000000000000000000000000000000000000000191660a060020a8361037f565b6000610672818363ffffffff610bee16565b92915050565b60025462010000900460ff1690565b600061067260018363ffffffff610bee16565b60006106a533610660565b15156106b057600080fd5b60016003805460a060020a900460ff16908111156106ca57fe5b146106d457600080fd5b6003547501000000000000000000000000000000000000000000900460ff1615156106fe57600080fd5b60035460b860020a900461ffff161515610774576003805478ffff00000000000000000000000000000000000000000000001976ff0000000000000000000000000000000000000000000019909116760100000000000000000000000000000000000000000000171660b860020a17905561083c565b60038054600161ffff60b860020a8084048216929092018116820278ffff00000000000000000000000000000000000000000000001990931692909217928390559091041661016e141561083c576003805478ffff000000000000000000000000000000000000000000000019600160ff760100000000000000000000000000000000000000000000808504821692909201160276ff0000000000000000000000000000000000000000000019909216919091171660b860020a179055600454600290046004555b5060045460025460035461016d9092049161051891600160a060020a039182169163010000009091041683610b14565b61087533610660565b151561088057600080fd5b60006003805460a060020a900460ff169081111561089a57fe5b14156108a557600080fd5b6003805475ffff000000000000000000000000000000000000000019169055565b6108cf33610687565b15156108da57600080fd5b600380805460a060020a900460ff16908111156108f357fe5b146108fd57600080fd5b6003805474ff0000000000000000000000000000000000000000191660a060020a17905560028054600160a060020a039290921663010000000276ffffffffffffffffffffffffffffffffffffffff00000019909216919091179055565b600061096633610660565b151561097157600080fd5b60006003805460a060020a900460ff169081111561098b57fe5b1461099557600080fd5b6004541515610a4657600354604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a03909216916370a08231916024808201926020929091908290030181600087803b158015610a0457600080fd5b505af1158015610a18573d6000803e3d6000fd5b505050506040513d6020811015610a2e57600080fd5b50519050801515610a3e57600080fd5b600281046004555b506003805474ff0000000000000000000000000000000000000000191660a060020a179055565b610a7633610c25565b565b61016d81565b610a7633610c36565b60025463010000009004600160a060020a03163314610aa557600080fd5b60016003805460a060020a900460ff1690811115610abf57fe5b14610ac957600080fd5b6003547501000000000000000000000000000000000000000000900460ff161515610af357600080fd5b6003805475ff00000000000000000000000000000000000000000019169055565b82600160a060020a031663a9059cbb83836040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b158015610b9057600080fd5b505af1158015610ba4573d6000803e3d6000fd5b505050506040513d6020811015610bba57600080fd5b50511515610bc757600080fd5b505050565b61051860018263ffffffff610c4716565b61051860008263ffffffff610c4716565b6000600160a060020a0382161515610c0557600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b61051860018263ffffffff610c9516565b61051860008263ffffffff610c9516565b600160a060020a0381161515610c5c57600080fd5b610c668282610bee565b15610c7057600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b600160a060020a0381161515610caa57600080fd5b610cb48282610bee565b1515610cbf57600080fd5b600160a060020a0316600090815260209190915260409020805460ff191690555600a165627a7a723058207b121e87532d8c1f7a6b96bd6424aeda0c92676f8aeca5bd4496952ce22529cc0029 \ No newline at end of file diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/bin/AlgoMiner.json b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/bin/AlgoMiner.json new file mode 100644 index 000000000..33bd2c2b7 --- /dev/null +++ b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/bin/AlgoMiner.json @@ -0,0 +1,303 @@ +{ + "abi": [ + { + "constant": false, + "inputs": [], + "name": "pauseMining", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "isAlgoMiner", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "pure", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "startMining", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "newMinerAddress", + "type": "address" + } + ], + "name": "migrateMiner", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "addSupervisor", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "addCoreTeam", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "stopAndRemoveOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "resumeMining", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "isCoreTeam", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getCategory", + "outputs": [ + { + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "isSupervisor", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "mine", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "deactivateMiner", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "newOwnerAddress", + "type": "address" + } + ], + "name": "resetMiner", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "activateMiner", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renounceSupervisor", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "DAYS_PER_YEAR", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renounceCoreTeam", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "stopMining", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "name": "minerType", + "type": "uint16" + }, + { + "name": "category", + "type": "uint8" + }, + { + "name": "ownerAddress", + "type": "address" + }, + { + "name": "tokenAddress", + "type": "address" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + } + ], + "bytecode": "608060405234801561001057600080fd5b50604051608080610ea08339810160409081528151602083015191830151606090930151909290610049336401000000006100c3810204565b61005b336401000000006100de810204565b6002805461ffff191661ffff959095169490941762ff000019166201000060ff949094169390930292909217630100000060b860020a0319166301000000600160a060020a03928316021790925560038054600160a060020a03191691909216179055610184565b6100db600082640100000000610c476100f682021704565b50565b6100db600182640100000000610c476100f682021704565b600160a060020a038116151561010b57600080fd5b61011e828264010000000061014d810204565b1561012857600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b6000600160a060020a038216151561016457600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b610d0d806101936000396000f3006080604052600436106101065763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663162f986d811461010b5780631777fb4b1461012257806321b79d981461014b578063231d4e2a1461016057806329d10b6e146101815780632e6b6849146101a2578063363aa6c7146101c3578063427534a4146101d8578063608d3d3d146101ed57806380258e471461020e57806381a244591461023957806399f4b2511461025a5780639e614ca01461026f578063ada436e914610284578063b2a32cd5146102a5578063be952494146102ba578063c6846ef8146102cf578063d43acc79146102f6578063da4086791461030b575b600080fd5b34801561011757600080fd5b50610120610320565b005b34801561012e57600080fd5b50610137610386565b604080519115158252519081900360200190f35b34801561015757600080fd5b5061012061038b565b34801561016c57600080fd5b50610120600160a060020a036004351661042f565b34801561018d57600080fd5b50610120600160a060020a036004351661051b565b3480156101ae57600080fd5b50610120600160a060020a0360043516610538565b3480156101cf57600080fd5b50610120610555565b3480156101e457600080fd5b506101206105fd565b3480156101f957600080fd5b50610137600160a060020a0360043516610660565b34801561021a57600080fd5b50610223610678565b6040805160ff9092168252519081900360200190f35b34801561024557600080fd5b50610137600160a060020a0360043516610687565b34801561026657600080fd5b5061012061069a565b34801561027b57600080fd5b5061012061086c565b34801561029057600080fd5b50610120600160a060020a03600435166108c6565b3480156102b157600080fd5b5061012061095b565b3480156102c657600080fd5b50610120610a6d565b3480156102db57600080fd5b506102e4610a78565b60408051918252519081900360200190f35b34801561030257600080fd5b50610120610a7e565b34801561031757600080fd5b50610120610a87565b61032933610687565b151561033457600080fd5b60016003805460a060020a900460ff169081111561034e57fe5b1461035857600080fd5b600380546002919074ff0000000000000000000000000000000000000000191660a060020a835b0217905550565b600190565b60025463010000009004600160a060020a031633146103a957600080fd5b60016003805460a060020a900460ff16908111156103c357fe5b146103cd57600080fd5b6003547501000000000000000000000000000000000000000000900460ff16156103f657600080fd5b6003805475ff00000000000000000000000000000000000000000019167501000000000000000000000000000000000000000000179055565b61043833610660565b151561044357600080fd5b60006003805460a060020a900460ff169081111561045d57fe5b1461046757600080fd5b600354604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051610518928492600160a060020a03909116916370a08231916024808201926020929091908290030181600087803b1580156104d357600080fd5b505af11580156104e7573d6000803e3d6000fd5b505050506040513d60208110156104fd57600080fd5b5051600354600160a060020a0316919063ffffffff610b1416565b50565b61052433610687565b151561052f57600080fd5b61051881610bcc565b61054133610660565b151561054c57600080fd5b61051881610bdd565b61055e33610687565b151561056957600080fd5b600380805460a060020a900460ff169081111561058257fe5b141561058d57600080fd5b6003805474ff00000000000000000000000000000000000000001916740300000000000000000000000000000000000000001775ff000000000000000000000000000000000000000000191690556002805476ffffffffffffffffffffffffffffffffffffffff00000019169055565b61060633610687565b151561061157600080fd5b60026003805460a060020a900460ff169081111561062b57fe5b1461063557600080fd5b600380546001919074ff0000000000000000000000000000000000000000191660a060020a8361037f565b6000610672818363ffffffff610bee16565b92915050565b60025462010000900460ff1690565b600061067260018363ffffffff610bee16565b60006106a533610660565b15156106b057600080fd5b60016003805460a060020a900460ff16908111156106ca57fe5b146106d457600080fd5b6003547501000000000000000000000000000000000000000000900460ff1615156106fe57600080fd5b60035460b860020a900461ffff161515610774576003805478ffff00000000000000000000000000000000000000000000001976ff0000000000000000000000000000000000000000000019909116760100000000000000000000000000000000000000000000171660b860020a17905561083c565b60038054600161ffff60b860020a8084048216929092018116820278ffff00000000000000000000000000000000000000000000001990931692909217928390559091041661016e141561083c576003805478ffff000000000000000000000000000000000000000000000019600160ff760100000000000000000000000000000000000000000000808504821692909201160276ff0000000000000000000000000000000000000000000019909216919091171660b860020a179055600454600290046004555b5060045460025460035461016d9092049161051891600160a060020a039182169163010000009091041683610b14565b61087533610660565b151561088057600080fd5b60006003805460a060020a900460ff169081111561089a57fe5b14156108a557600080fd5b6003805475ffff000000000000000000000000000000000000000019169055565b6108cf33610687565b15156108da57600080fd5b600380805460a060020a900460ff16908111156108f357fe5b146108fd57600080fd5b6003805474ff0000000000000000000000000000000000000000191660a060020a17905560028054600160a060020a039290921663010000000276ffffffffffffffffffffffffffffffffffffffff00000019909216919091179055565b600061096633610660565b151561097157600080fd5b60006003805460a060020a900460ff169081111561098b57fe5b1461099557600080fd5b6004541515610a4657600354604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a03909216916370a08231916024808201926020929091908290030181600087803b158015610a0457600080fd5b505af1158015610a18573d6000803e3d6000fd5b505050506040513d6020811015610a2e57600080fd5b50519050801515610a3e57600080fd5b600281046004555b506003805474ff0000000000000000000000000000000000000000191660a060020a179055565b610a7633610c25565b565b61016d81565b610a7633610c36565b60025463010000009004600160a060020a03163314610aa557600080fd5b60016003805460a060020a900460ff1690811115610abf57fe5b14610ac957600080fd5b6003547501000000000000000000000000000000000000000000900460ff161515610af357600080fd5b6003805475ff00000000000000000000000000000000000000000019169055565b82600160a060020a031663a9059cbb83836040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b158015610b9057600080fd5b505af1158015610ba4573d6000803e3d6000fd5b505050506040513d6020811015610bba57600080fd5b50511515610bc757600080fd5b505050565b61051860018263ffffffff610c4716565b61051860008263ffffffff610c4716565b6000600160a060020a0382161515610c0557600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b61051860018263ffffffff610c9516565b61051860008263ffffffff610c9516565b600160a060020a0381161515610c5c57600080fd5b610c668282610bee565b15610c7057600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b600160a060020a0381161515610caa57600080fd5b610cb48282610bee565b1515610cbf57600080fd5b600160a060020a0316600090815260209190915260409020805460ff191690555600a165627a7a723058207b121e87532d8c1f7a6b96bd6424aeda0c92676f8aeca5bd4496952ce22529cc0029", + "functionHashes": { + "DAYS_PER_YEAR()": "c6846ef8", + "activateMiner()": "b2a32cd5", + "addCoreTeam(address)": "2e6b6849", + "addSupervisor(address)": "29d10b6e", + "deactivateMiner()": "9e614ca0", + "getCategory()": "80258e47", + "isAlgoMiner()": "1777fb4b", + "isCoreTeam(address)": "608d3d3d", + "isSupervisor(address)": "81a24459", + "migrateMiner(address)": "231d4e2a", + "mine()": "99f4b251", + "pauseMining()": "162f986d", + "renounceCoreTeam()": "d43acc79", + "renounceSupervisor()": "be952494", + "resetMiner(address)": "ada436e9", + "resumeMining()": "427534a4", + "startMining()": "21b79d98", + "stopAndRemoveOwnership()": "363aa6c7", + "stopMining()": "da408679" + }, + "gasEstimates": { + "creation": { + "codeDepositCost": "668200", + "executionCost": "infinite", + "totalCost": "infinite" + }, + "external": { + "DAYS_PER_YEAR()": "536", + "activateMiner()": "infinite", + "addCoreTeam(address)": "infinite", + "addSupervisor(address)": "infinite", + "deactivateMiner()": "infinite", + "getCategory()": "608", + "isAlgoMiner()": "212", + "isCoreTeam(address)": "infinite", + "isSupervisor(address)": "infinite", + "migrateMiner(address)": "infinite", + "mine()": "infinite", + "pauseMining()": "infinite", + "renounceCoreTeam()": "infinite", + "renounceSupervisor()": "infinite", + "resetMiner(address)": "infinite", + "resumeMining()": "infinite", + "startMining()": "21275", + "stopAndRemoveOwnership()": "infinite", + "stopMining()": "21624" + } + } +} \ No newline at end of file diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/bin/AlgoPool-sol-output.json b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/bin/AlgoPool-sol-output.json new file mode 100644 index 000000000..f92d8fff4 --- /dev/null +++ b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/bin/AlgoPool-sol-output.json @@ -0,0 +1,10176 @@ +{ + "contracts": { + "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/AlgoCoreTeamRole.sol": { + "AlgoCoreTeamRole": { + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "addCoreTeam", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "isCoreTeam", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renounceCoreTeam", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + } + ], + "devdoc": { + "methods": {} + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "gasEstimates": null, + "methodIdentifiers": { + "addCoreTeam(address)": "2e6b6849", + "isCoreTeam(address)": "608d3d3d", + "renounceCoreTeam()": "d43acc79" + } + }, + "metadata": "", + "userdoc": { + "methods": {} + } + } + }, + "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/AlgoPool.sol": { + "AlgoPool": { + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "minerAddress", + "type": "address" + } + ], + "name": "trasferToMiner", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "TOKEN_FACTOR", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "addCoreTeam", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "CAT_4_VALUE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "CAT_1_VALUE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "CAT_3_VALUE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "isCoreTeam", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "CAT_0_VALUE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "CAT_5_VALUE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "CAT_2_VALUE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renounceCoreTeam", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "name": "poolType", + "type": "uint16" + }, + { + "name": "tokenAddress", + "type": "address" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + } + ], + "devdoc": { + "methods": {} + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "608060405234801561001057600080fd5b5060405160408061076083398101604052805160209091015161003b33640100000000610077810204565b60018054600160a060020a0390921662010000026201000060b060020a031961ffff90941661ffff199093169290921792909216179055610120565b61008f60008264010000000061056b61009282021704565b50565b600160a060020a03811615156100a757600080fd5b6100ba82826401000000006100e9810204565b156100c457600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b6000600160a060020a038216151561010057600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b6106318061012f6000396000f3006080604052600436106100955763ffffffff60e060020a6000350416632296f4c7811461009a57806325109e8b146100bd5780632e6b6849146100e4578063455acbcd14610105578063492fba841461011a57806349dc9ed01461012f578063608d3d3d146101445780639fc3c98314610179578063a89febb21461018e578063aed6183f146101a3578063d43acc79146101b8575b600080fd5b3480156100a657600080fd5b506100bb600160a060020a03600435166101cd565b005b3480156100c957600080fd5b506100d26103cc565b60408051918252519081900360200190f35b3480156100f057600080fd5b506100bb600160a060020a03600435166103d8565b34801561011157600080fd5b506100d26103f8565b34801561012657600080fd5b506100d2610407565b34801561013b57600080fd5b506100d2610415565b34801561015057600080fd5b50610165600160a060020a0360043516610424565b604080519115158252519081900360200190f35b34801561018557600080fd5b506100d261043c565b34801561019a57600080fd5b506100d261044a565b3480156101af57600080fd5b506100d2610459565b3480156101c457600080fd5b506100bb610468565b60008060006101db33610424565b15156101e657600080fd5b83925082600160a060020a0316631777fb4b6040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561022757600080fd5b505af115801561023b573d6000803e3d6000fd5b505050506040513d602081101561025157600080fd5b5051151561025e57600080fd5b82600160a060020a03166380258e476040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561029c57600080fd5b505af11580156102b0573d6000803e3d6000fd5b505050506040513d60208110156102c657600080fd5b50519150600060ff8316108015906102e2575060058260ff1611155b15156102ed57600080fd5b50600060ff8216151561030b575069152d02c7e14af680000061039c565b8160ff1660011415610328575069d3c21bcecceda100000061039c565b8160ff166002141561034657506a01a784379d99db4200000061039c565b8160ff166003141561036457506a027b46536c66c8e300000061039c565b8160ff166004141561038257506a034f086f3b33b68400000061039c565b8160ff166005141561039c57506a0422ca8b0a00a4250000005b600081116103a957600080fd5b6001546103c690620100009004600160a060020a03168583610473565b50505050565b670de0b6b3a764000081565b6103e133610424565b15156103ec57600080fd5b6103f581610512565b50565b6a034f086f3b33b68400000081565b69d3c21bcecceda100000081565b6a027b46536c66c8e300000081565b6000610436818363ffffffff61052316565b92915050565b69152d02c7e14af680000081565b6a0422ca8b0a00a42500000081565b6a01a784379d99db4200000081565b6104713361055a565b565b82600160a060020a031663a9059cbb83836040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b1580156104d657600080fd5b505af11580156104ea573d6000803e3d6000fd5b505050506040513d602081101561050057600080fd5b5051151561050d57600080fd5b505050565b6103f560008263ffffffff61056b16565b6000600160a060020a038216151561053a57600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b6103f560008263ffffffff6105b916565b600160a060020a038116151561058057600080fd5b61058a8282610523565b1561059457600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b600160a060020a03811615156105ce57600080fd5b6105d88282610523565b15156105e357600080fd5b600160a060020a0316600090815260209190915260409020805460ff191690555600a165627a7a72305820f296b4ffb64dca2d6eb3a2164312cba487eba728c8b0729ef90193efdf3b0b3d0029", + "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH1 0x40 DUP1 PUSH2 0x760 DUP4 CODECOPY DUP2 ADD PUSH1 0x40 MSTORE DUP1 MLOAD PUSH1 0x20 SWAP1 SWAP2 ADD MLOAD PUSH2 0x3B CALLER PUSH5 0x100000000 PUSH2 0x77 DUP2 MUL DIV JUMP JUMPDEST PUSH1 0x1 DUP1 SLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB SWAP1 SWAP3 AND PUSH3 0x10000 MUL PUSH3 0x10000 PUSH1 0xB0 PUSH1 0x2 EXP SUB NOT PUSH2 0xFFFF SWAP1 SWAP5 AND PUSH2 0xFFFF NOT SWAP1 SWAP4 AND SWAP3 SWAP1 SWAP3 OR SWAP3 SWAP1 SWAP3 AND OR SWAP1 SSTORE PUSH2 0x120 JUMP JUMPDEST PUSH2 0x8F PUSH1 0x0 DUP3 PUSH5 0x100000000 PUSH2 0x56B PUSH2 0x92 DUP3 MUL OR DIV JUMP JUMPDEST POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP2 AND ISZERO ISZERO PUSH2 0xA7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xBA DUP3 DUP3 PUSH5 0x100000000 PUSH2 0xE9 DUP2 MUL DIV JUMP JUMPDEST ISZERO PUSH2 0xC4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP1 SLOAD PUSH1 0xFF NOT AND PUSH1 0x1 OR SWAP1 SSTORE JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP3 AND ISZERO ISZERO PUSH2 0x100 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND SWAP1 JUMP JUMPDEST PUSH2 0x631 DUP1 PUSH2 0x12F PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN STOP PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0x95 JUMPI PUSH4 0xFFFFFFFF PUSH1 0xE0 PUSH1 0x2 EXP PUSH1 0x0 CALLDATALOAD DIV AND PUSH4 0x2296F4C7 DUP2 EQ PUSH2 0x9A JUMPI DUP1 PUSH4 0x25109E8B EQ PUSH2 0xBD JUMPI DUP1 PUSH4 0x2E6B6849 EQ PUSH2 0xE4 JUMPI DUP1 PUSH4 0x455ACBCD EQ PUSH2 0x105 JUMPI DUP1 PUSH4 0x492FBA84 EQ PUSH2 0x11A JUMPI DUP1 PUSH4 0x49DC9ED0 EQ PUSH2 0x12F JUMPI DUP1 PUSH4 0x608D3D3D EQ PUSH2 0x144 JUMPI DUP1 PUSH4 0x9FC3C983 EQ PUSH2 0x179 JUMPI DUP1 PUSH4 0xA89FEBB2 EQ PUSH2 0x18E JUMPI DUP1 PUSH4 0xAED6183F EQ PUSH2 0x1A3 JUMPI DUP1 PUSH4 0xD43ACC79 EQ PUSH2 0x1B8 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xA6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xBB PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB PUSH1 0x4 CALLDATALOAD AND PUSH2 0x1CD JUMP JUMPDEST STOP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xC9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xD2 PUSH2 0x3CC JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xF0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xBB PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB PUSH1 0x4 CALLDATALOAD AND PUSH2 0x3D8 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x111 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xD2 PUSH2 0x3F8 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x126 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xD2 PUSH2 0x407 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x13B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xD2 PUSH2 0x415 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x150 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x165 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB PUSH1 0x4 CALLDATALOAD AND PUSH2 0x424 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 ISZERO ISZERO DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x185 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xD2 PUSH2 0x43C JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x19A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xD2 PUSH2 0x44A JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x1AF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xD2 PUSH2 0x459 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x1C4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xBB PUSH2 0x468 JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH2 0x1DB CALLER PUSH2 0x424 JUMP JUMPDEST ISZERO ISZERO PUSH2 0x1E6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP4 SWAP3 POP DUP3 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH4 0x1777FB4B PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 PUSH1 0x2 EXP MUL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x227 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x23B JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x251 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP MLOAD ISZERO ISZERO PUSH2 0x25E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH4 0x80258E47 PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 PUSH1 0x2 EXP MUL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x29C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x2B0 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x2C6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP MLOAD SWAP2 POP PUSH1 0x0 PUSH1 0xFF DUP4 AND LT DUP1 ISZERO SWAP1 PUSH2 0x2E2 JUMPI POP PUSH1 0x5 DUP3 PUSH1 0xFF AND GT ISZERO JUMPDEST ISZERO ISZERO PUSH2 0x2ED JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x0 PUSH1 0xFF DUP3 AND ISZERO ISZERO PUSH2 0x30B JUMPI POP PUSH10 0x152D02C7E14AF6800000 PUSH2 0x39C JUMP JUMPDEST DUP2 PUSH1 0xFF AND PUSH1 0x1 EQ ISZERO PUSH2 0x328 JUMPI POP PUSH10 0xD3C21BCECCEDA1000000 PUSH2 0x39C JUMP JUMPDEST DUP2 PUSH1 0xFF AND PUSH1 0x2 EQ ISZERO PUSH2 0x346 JUMPI POP PUSH11 0x1A784379D99DB42000000 PUSH2 0x39C JUMP JUMPDEST DUP2 PUSH1 0xFF AND PUSH1 0x3 EQ ISZERO PUSH2 0x364 JUMPI POP PUSH11 0x27B46536C66C8E3000000 PUSH2 0x39C JUMP JUMPDEST DUP2 PUSH1 0xFF AND PUSH1 0x4 EQ ISZERO PUSH2 0x382 JUMPI POP PUSH11 0x34F086F3B33B684000000 PUSH2 0x39C JUMP JUMPDEST DUP2 PUSH1 0xFF AND PUSH1 0x5 EQ ISZERO PUSH2 0x39C JUMPI POP PUSH11 0x422CA8B0A00A425000000 JUMPDEST PUSH1 0x0 DUP2 GT PUSH2 0x3A9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 SLOAD PUSH2 0x3C6 SWAP1 PUSH3 0x10000 SWAP1 DIV PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND DUP6 DUP4 PUSH2 0x473 JUMP JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH8 0xDE0B6B3A7640000 DUP2 JUMP JUMPDEST PUSH2 0x3E1 CALLER PUSH2 0x424 JUMP JUMPDEST ISZERO ISZERO PUSH2 0x3EC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x3F5 DUP2 PUSH2 0x512 JUMP JUMPDEST POP JUMP JUMPDEST PUSH11 0x34F086F3B33B684000000 DUP2 JUMP JUMPDEST PUSH10 0xD3C21BCECCEDA1000000 DUP2 JUMP JUMPDEST PUSH11 0x27B46536C66C8E3000000 DUP2 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x436 DUP2 DUP4 PUSH4 0xFFFFFFFF PUSH2 0x523 AND JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH10 0x152D02C7E14AF6800000 DUP2 JUMP JUMPDEST PUSH11 0x422CA8B0A00A425000000 DUP2 JUMP JUMPDEST PUSH11 0x1A784379D99DB42000000 DUP2 JUMP JUMPDEST PUSH2 0x471 CALLER PUSH2 0x55A JUMP JUMPDEST JUMP JUMPDEST DUP3 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH4 0xA9059CBB DUP4 DUP4 PUSH1 0x40 MLOAD DUP4 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 PUSH1 0x2 EXP MUL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP4 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP3 POP POP POP PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x4D6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x4EA JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x500 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP MLOAD ISZERO ISZERO PUSH2 0x50D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP POP POP JUMP JUMPDEST PUSH2 0x3F5 PUSH1 0x0 DUP3 PUSH4 0xFFFFFFFF PUSH2 0x56B AND JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP3 AND ISZERO ISZERO PUSH2 0x53A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND SWAP1 JUMP JUMPDEST PUSH2 0x3F5 PUSH1 0x0 DUP3 PUSH4 0xFFFFFFFF PUSH2 0x5B9 AND JUMP JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP2 AND ISZERO ISZERO PUSH2 0x580 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x58A DUP3 DUP3 PUSH2 0x523 JUMP JUMPDEST ISZERO PUSH2 0x594 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP1 SLOAD PUSH1 0xFF NOT AND PUSH1 0x1 OR SWAP1 SSTORE JUMP JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP2 AND ISZERO ISZERO PUSH2 0x5CE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x5D8 DUP3 DUP3 PUSH2 0x523 JUMP JUMPDEST ISZERO ISZERO PUSH2 0x5E3 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP1 SLOAD PUSH1 0xFF NOT AND SWAP1 SSTORE JUMP STOP LOG1 PUSH6 0x627A7A723058 KECCAK256 CALLCODE SWAP7 0xb4 SELFDESTRUCT 0xb6 0x4d 0xca 0x2d PUSH15 0xB3A2164312CBA487EBA728C8B0729E 0xf9 ADD SWAP4 0xef 0xdf EXTCODESIZE SIGNEXTEND RETURNDATASIZE STOP 0x29 ", + "sourceMap": "454:1691:1:-;;;1077:174;8:9:-1;5:2;;;30:1;27;20:12;5:2;1077:174:1;;;;;;;;;;;;;;;;;;;350:24:0;363:10;350:12;;;;:24;:::i;:::-;1183:9:1;:20;;-1:-1:-1;;;;;1214:29:1;;;;;-1:-1:-1;;;;;;1183:20:1;;;;-1:-1:-1;;1183:20:1;;;;;;;1214:29;;;;;;;454:1691;;806:96:0;865:29;:16;886:7;865:20;;;;;;:29;:::i;:::-;806:96;:::o;244:167:3:-;-1:-1:-1;;;;;316:21:3;;;;308:30;;;;;;353:18;357:4;363:7;353:3;;;;:18;:::i;:::-;352:19;344:28;;;;;;-1:-1:-1;;;;;379:20:3;:11;:20;;;;;;;;;;;:27;;-1:-1:-1;;379:27:3;402:4;379:27;;;244:167::o;725:166::-;809:4;-1:-1:-1;;;;;831:21:3;;;;823:30;;;;;;-1:-1:-1;;;;;;866:20:3;:11;:20;;;;;;;;;;;;;;;725:166::o;454:1691:1:-;;;;;;;" + }, + "gasEstimates": { + "creation": { + "codeDepositCost": "317000", + "executionCost": "infinite", + "totalCost": "infinite" + }, + "external": { + "CAT_0_VALUE()": "401", + "CAT_1_VALUE()": "335", + "CAT_2_VALUE()": "445", + "CAT_3_VALUE()": "357", + "CAT_4_VALUE()": "313", + "CAT_5_VALUE()": "423", + "TOKEN_FACTOR()": "269", + "addCoreTeam(address)": "infinite", + "isCoreTeam(address)": "infinite", + "renounceCoreTeam()": "infinite", + "trasferToMiner(address)": "infinite" + } + }, + "methodIdentifiers": { + "CAT_0_VALUE()": "9fc3c983", + "CAT_1_VALUE()": "492fba84", + "CAT_2_VALUE()": "aed6183f", + "CAT_3_VALUE()": "49dc9ed0", + "CAT_4_VALUE()": "455acbcd", + "CAT_5_VALUE()": "a89febb2", + "TOKEN_FACTOR()": "25109e8b", + "addCoreTeam(address)": "2e6b6849", + "isCoreTeam(address)": "608d3d3d", + "renounceCoreTeam()": "d43acc79", + "trasferToMiner(address)": "2296f4c7" + } + }, + "metadata": "{\"compiler\":{\"version\":\"0.4.24+commit.e67f0147\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":false,\"inputs\":[{\"name\":\"minerAddress\",\"type\":\"address\"}],\"name\":\"trasferToMiner\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"TOKEN_FACTOR\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"addCoreTeam\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"CAT_4_VALUE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"CAT_1_VALUE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"CAT_3_VALUE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"isCoreTeam\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"CAT_0_VALUE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"CAT_5_VALUE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"CAT_2_VALUE\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceCoreTeam\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"poolType\",\"type\":\"uint16\"},{\"name\":\"tokenAddress\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/AlgoPool.sol\":\"AlgoPool\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/AlgoCoreTeamRole.sol\":{\"keccak256\":\"0x98513c8bd78301543260967ae791ebb2a652f73fef585417f72a3097f4e1ae21\",\"urls\":[\"bzzr://a9cfa1df913c0a9ad0937d821ead954e31f7da6a462933bcfa20abe2b44ec984\"]},\"d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/AlgoPool.sol\":{\"keccak256\":\"0xe9776836589d57d2294c261fbeefaac9b146ad2ea4c06995ce258abc1cd44bee\",\"urls\":[\"bzzr://d8fc6e549c0eb65e15d6f14cf317dbd8a736804709bd1e443922c1c97b873aa0\"]},\"d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/IAlgoMiner.sol\":{\"keccak256\":\"0xb457e39e512b5475c3e70193ab0a751f6626a50417954247f0cf47c7ca15eff7\",\"urls\":[\"bzzr://3b585a4055121fee393f2b691538036c87f56556f43f0b6e851a88de7b8275e6\"]},\"d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol\":{\"keccak256\":\"0xa6e47d62e68903c8fff23500d80e7cc8085b9127995803478d9982cd8a6d49e4\",\"urls\":[\"bzzr://7c87eb3c145fe7592c97baa287501faff7e81c1965333c9b042ffb6b387e94a1\"]},\"d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0xdd18f05c74536a06166c90a17ec3c6932853764f292bed314ceb23e730ff83af\",\"urls\":[\"bzzr://1d8a608339978ac18782f7051816cf23b4072d8814979e3ef74788cc6025cca0\"]},\"d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xc8a7f15fa44eb10057f8bcb58418d3aed6f5267d211d18f93f3d4e0293e3da44\",\"urls\":[\"bzzr://8825e2508348b01a091ff47b8525e583b6e5604f6679684f805d67a9a6a2a7e9\"]},\"d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol\":{\"keccak256\":\"0x0a172a0ef8681d4a7d8034d003670a9b1968d914b0bfa64e13ddca289a85d24a\",\"urls\":[\"bzzr://733b6203c967b44d6de90b5c6b144e58a380a3f29befb2dc70e765dae2f1ca18\"]}},\"version\":1}", + "userdoc": { + "methods": {} + } + } + }, + "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/IAlgoMiner.sol": { + "IAlgoMiner": { + "abi": [ + { + "constant": true, + "inputs": [], + "name": "isAlgoMiner", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "pure", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getCategory", + "outputs": [ + { + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + } + ], + "devdoc": { + "methods": {} + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "gasEstimates": null, + "methodIdentifiers": { + "getCategory()": "80258e47", + "isAlgoMiner()": "1777fb4b" + } + }, + "metadata": "", + "userdoc": { + "methods": {} + } + } + }, + "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol": { + "Roles": { + "abi": [], + "devdoc": { + "methods": {}, + "title": "Roles" + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a72305820bfa74e3170abc2ace25475dc7dfb71c6416c34449905f1f30a00ec4431d9206c0029", + "opcodes": "PUSH1 0x4C PUSH1 0x2C PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x0 DUP2 EQ PUSH1 0x1C JUMPI PUSH1 0x1E JUMP JUMPDEST INVALID JUMPDEST POP ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN STOP PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT STOP LOG1 PUSH6 0x627A7A723058 KECCAK256 0xbf 0xa7 0x4e BALANCE PUSH17 0xABC2ACE25475DC7DFB71C6416C34449905 CALL RETURN EXP STOP 0xec DIFFICULTY BALANCE 0xd9 KECCAK256 PUSH13 0x290000000000000000000000 ", + "sourceMap": "109:784:3:-;;132:2:-1;166:7;155:9;146:7;137:37;252:7;246:14;243:1;238:23;232:4;229:33;270:1;265:20;;;;222:63;;265:20;274:9;222:63;;298:9;295:1;288:20;328:4;319:7;311:22;352:7;343;336:24" + }, + "gasEstimates": { + "creation": { + "codeDepositCost": "15200", + "executionCost": "116", + "totalCost": "15316" + }, + "internal": { + "add(struct Roles.Role storage pointer,address)": "infinite", + "has(struct Roles.Role storage pointer,address)": "infinite", + "remove(struct Roles.Role storage pointer,address)": "infinite" + } + }, + "methodIdentifiers": {} + }, + "metadata": "{\"compiler\":{\"version\":\"0.4.24+commit.e67f0147\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"methods\":{},\"title\":\"Roles\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol\":\"Roles\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol\":{\"keccak256\":\"0xa6e47d62e68903c8fff23500d80e7cc8085b9127995803478d9982cd8a6d49e4\",\"urls\":[\"bzzr://7c87eb3c145fe7592c97baa287501faff7e81c1965333c9b042ffb6b387e94a1\"]}},\"version\":1}", + "userdoc": { + "methods": {} + } + } + }, + "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol": { + "SafeMath": { + "abi": [], + "devdoc": { + "methods": {}, + "title": "SafeMath" + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a723058204094b52d7c5ef1d5aa4907b2604c65a23d27d58f9b4359f5187db6598b2799300029", + "opcodes": "PUSH1 0x4C PUSH1 0x2C PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x0 DUP2 EQ PUSH1 0x1C JUMPI PUSH1 0x1E JUMP JUMPDEST INVALID JUMPDEST POP ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN STOP PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT STOP LOG1 PUSH6 0x627A7A723058 KECCAK256 BLOCKHASH SWAP5 0xb5 0x2d PUSH29 0x5EF1D5AA4907B2604C65A23D27D58F9B4359F5187DB6598B2799300029 ", + "sourceMap": "117:1531:4:-;;132:2:-1;166:7;155:9;146:7;137:37;252:7;246:14;243:1;238:23;232:4;229:33;270:1;265:20;;;;222:63;;265:20;274:9;222:63;;298:9;295:1;288:20;328:4;319:7;311:22;352:7;343;336:24" + }, + "gasEstimates": { + "creation": { + "codeDepositCost": "15200", + "executionCost": "116", + "totalCost": "15316" + }, + "internal": { + "add(uint256,uint256)": "infinite", + "div(uint256,uint256)": "infinite", + "mod(uint256,uint256)": "infinite", + "mul(uint256,uint256)": "infinite", + "sub(uint256,uint256)": "infinite" + } + }, + "methodIdentifiers": {} + }, + "metadata": "{\"compiler\":{\"version\":\"0.4.24+commit.e67f0147\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"methods\":{},\"title\":\"SafeMath\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol\":\"SafeMath\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0xdd18f05c74536a06166c90a17ec3c6932853764f292bed314ceb23e730ff83af\",\"urls\":[\"bzzr://1d8a608339978ac18782f7051816cf23b4072d8814979e3ef74788cc6025cca0\"]}},\"version\":1}", + "userdoc": { + "methods": {} + } + } + }, + "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol": { + "IERC20": { + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "spender", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "from", + "type": "address" + }, + { + "name": "to", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "who", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "to", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "owner", + "type": "address" + }, + { + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "from", + "type": "address" + }, + { + "indexed": true, + "name": "to", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + } + ], + "devdoc": { + "methods": {}, + "title": "ERC20 interface" + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "gasEstimates": null, + "methodIdentifiers": { + "allowance(address,address)": "dd62ed3e", + "approve(address,uint256)": "095ea7b3", + "balanceOf(address)": "70a08231", + "totalSupply()": "18160ddd", + "transfer(address,uint256)": "a9059cbb", + "transferFrom(address,address,uint256)": "23b872dd" + } + }, + "metadata": "", + "userdoc": { + "methods": {} + } + } + }, + "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol": { + "SafeERC20": { + "abi": [], + "devdoc": { + "methods": {}, + "title": "SafeERC20" + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a723058207a38fb4cb6c1c093de86b1ba91e5add211165e6c76b8cc0d294ecbd35bbbeb2c0029", + "opcodes": "PUSH1 0x4C PUSH1 0x2C PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x0 DUP2 EQ PUSH1 0x1C JUMPI PUSH1 0x1E JUMP JUMPDEST INVALID JUMPDEST POP ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN STOP PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT STOP LOG1 PUSH6 0x627A7A723058 KECCAK256 PUSH27 0x38FB4CB6C1C093DE86B1BA91E5ADD211165E6C76B8CC0D294ECBD3 JUMPDEST 0xbb 0xeb 0x2c STOP 0x29 ", + "sourceMap": "353:1296:6:-;;132:2:-1;166:7;155:9;146:7;137:37;252:7;246:14;243:1;238:23;232:4;229:33;270:1;265:20;;;;222:63;;265:20;274:9;222:63;;298:9;295:1;288:20;328:4;319:7;311:22;352:7;343;336:24" + }, + "gasEstimates": { + "creation": { + "codeDepositCost": "15200", + "executionCost": "116", + "totalCost": "15316" + }, + "internal": { + "safeApprove(contract IERC20,address,uint256)": "infinite", + "safeDecreaseAllowance(contract IERC20,address,uint256)": "infinite", + "safeIncreaseAllowance(contract IERC20,address,uint256)": "infinite", + "safeTransfer(contract IERC20,address,uint256)": "infinite", + "safeTransferFrom(contract IERC20,address,address,uint256)": "infinite" + } + }, + "methodIdentifiers": {} + }, + "metadata": "{\"compiler\":{\"version\":\"0.4.24+commit.e67f0147\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"methods\":{},\"title\":\"SafeERC20\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol\":\"SafeERC20\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0xdd18f05c74536a06166c90a17ec3c6932853764f292bed314ceb23e730ff83af\",\"urls\":[\"bzzr://1d8a608339978ac18782f7051816cf23b4072d8814979e3ef74788cc6025cca0\"]},\"d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xc8a7f15fa44eb10057f8bcb58418d3aed6f5267d211d18f93f3d4e0293e3da44\",\"urls\":[\"bzzr://8825e2508348b01a091ff47b8525e583b6e5604f6679684f805d67a9a6a2a7e9\"]},\"d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol\":{\"keccak256\":\"0x0a172a0ef8681d4a7d8034d003670a9b1968d914b0bfa64e13ddca289a85d24a\",\"urls\":[\"bzzr://733b6203c967b44d6de90b5c6b144e58a380a3f29befb2dc70e765dae2f1ca18\"]}},\"version\":1}", + "userdoc": { + "methods": {} + } + } + } + }, + "sources": { + "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/AlgoCoreTeamRole.sol": { + "ast": { + "absolutePath": "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/AlgoCoreTeamRole.sol", + "exportedSymbols": { + "AlgoCoreTeamRole": [ + 86 + ] + }, + "id": 87, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "^", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:24:0" + }, + { + "absolutePath": "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol", + "file": "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol", + "id": 2, + "nodeType": "ImportDirective", + "scope": 87, + "sourceUnit": 382, + "src": "28:171:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 86, + "linearizedBaseContracts": [ + 86 + ], + "name": "AlgoCoreTeamRole", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 5, + "libraryName": { + "contractScope": null, + "id": 3, + "name": "Roles", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 381, + "src": "242:5:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Roles_$381", + "typeString": "library Roles" + } + }, + "nodeType": "UsingForDirective", + "src": "236:27:0", + "typeName": { + "contractScope": null, + "id": 4, + "name": "Roles.Role", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 294, + "src": "252:10:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$294_storage_ptr", + "typeString": "struct Roles.Role" + } + } + }, + { + "constant": false, + "id": 7, + "name": "_coreTeamMembers", + "nodeType": "VariableDeclaration", + "scope": 86, + "src": "271:35:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$294_storage", + "typeString": "struct Roles.Role" + }, + "typeName": { + "contractScope": null, + "id": 6, + "name": "Roles.Role", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 294, + "src": "271:10:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$294_storage_ptr", + "typeString": "struct Roles.Role" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 15, + "nodeType": "Block", + "src": "339:43:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 737, + "src": "363:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 12, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "363:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 10, + "name": "_addCoreTeam", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 73, + "src": "350:12:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 13, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "350:24:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14, + "nodeType": "ExpressionStatement", + "src": "350:24:0" + } + ] + }, + "documentation": null, + "id": 16, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 8, + "nodeType": "ParameterList", + "parameters": [], + "src": "327:2:0" + }, + "payable": false, + "returnParameters": { + "id": 9, + "nodeType": "ParameterList", + "parameters": [], + "src": "339:0:0" + }, + "scope": 86, + "src": "315:67:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 26, + "nodeType": "Block", + "src": "414:62:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 20, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 737, + "src": "444:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 21, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "444:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 19, + "name": "isCoreTeam", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 40, + "src": "433:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 22, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "433:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 18, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 740, + 741 + ], + "referencedDeclaration": 740, + "src": "425:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 23, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "425:31:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 24, + "nodeType": "ExpressionStatement", + "src": "425:31:0" + }, + { + "id": 25, + "nodeType": "PlaceholderStatement", + "src": "467:1:0" + } + ] + }, + "documentation": null, + "id": 27, + "name": "onlyCoreTeam", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 17, + "nodeType": "ParameterList", + "parameters": [], + "src": "411:2:0" + }, + "src": "390:86:0", + "visibility": "internal" + }, + { + "body": { + "id": 39, + "nodeType": "Block", + "src": "548:55:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 36, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 29, + "src": "587:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 34, + "name": "_coreTeamMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7, + "src": "566:16:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$294_storage", + "typeString": "struct Roles.Role storage ref" + } + }, + "id": 35, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "has", + "nodeType": "MemberAccess", + "referencedDeclaration": 380, + "src": "566:20:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Role_$294_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Role_$294_storage_ptr_$", + "typeString": "function (struct Roles.Role storage pointer,address) view returns (bool)" + } + }, + "id": 37, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "566:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 33, + "id": 38, + "nodeType": "Return", + "src": "559:36:0" + } + ] + }, + "documentation": null, + "id": 40, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "isCoreTeam", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 30, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 29, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 40, + "src": "504:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 28, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "504:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "503:17:0" + }, + "payable": false, + "returnParameters": { + "id": 33, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 32, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 40, + "src": "542:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 31, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "542:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "541:6:0" + }, + "scope": 86, + "src": "484:119:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 51, + "nodeType": "Block", + "src": "669:40:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 48, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 42, + "src": "693:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 47, + "name": "_addCoreTeam", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 73, + "src": "680:12:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 49, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "680:21:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 50, + "nodeType": "ExpressionStatement", + "src": "680:21:0" + } + ] + }, + "documentation": null, + "id": 52, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 45, + "modifierName": { + "argumentTypes": null, + "id": 44, + "name": "onlyCoreTeam", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27, + "src": "656:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "656:12:0" + } + ], + "name": "addCoreTeam", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 43, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 42, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 52, + "src": "632:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 41, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "632:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "631:17:0" + }, + "payable": false, + "returnParameters": { + "id": 46, + "nodeType": "ParameterList", + "parameters": [], + "src": "669:0:0" + }, + "scope": 86, + "src": "611:98:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 60, + "nodeType": "Block", + "src": "752:46:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 56, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 737, + "src": "779:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 57, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "779:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 55, + "name": "_removeCoreTeam", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 85, + "src": "763:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 58, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "763:27:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 59, + "nodeType": "ExpressionStatement", + "src": "763:27:0" + } + ] + }, + "documentation": null, + "id": 61, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "renounceCoreTeam", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 53, + "nodeType": "ParameterList", + "parameters": [], + "src": "742:2:0" + }, + "payable": false, + "returnParameters": { + "id": 54, + "nodeType": "ParameterList", + "parameters": [], + "src": "752:0:0" + }, + "scope": 86, + "src": "717:81:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 72, + "nodeType": "Block", + "src": "854:48:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 69, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 63, + "src": "886:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 66, + "name": "_coreTeamMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7, + "src": "865:16:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$294_storage", + "typeString": "struct Roles.Role storage ref" + } + }, + "id": 68, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 326, + "src": "865:20:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Role_$294_storage_ptr_$_t_address_$returns$__$bound_to$_t_struct$_Role_$294_storage_ptr_$", + "typeString": "function (struct Roles.Role storage pointer,address)" + } + }, + "id": 70, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "865:29:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 71, + "nodeType": "ExpressionStatement", + "src": "865:29:0" + } + ] + }, + "documentation": null, + "id": 73, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "_addCoreTeam", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 64, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 63, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 73, + "src": "828:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 62, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "828:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "827:17:0" + }, + "payable": false, + "returnParameters": { + "id": 65, + "nodeType": "ParameterList", + "parameters": [], + "src": "854:0:0" + }, + "scope": 86, + "src": "806:96:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 84, + "nodeType": "Block", + "src": "961:51:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 81, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 75, + "src": "996:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 78, + "name": "_coreTeamMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7, + "src": "972:16:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$294_storage", + "typeString": "struct Roles.Role storage ref" + } + }, + "id": 80, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "remove", + "nodeType": "MemberAccess", + "referencedDeclaration": 357, + "src": "972:23:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Role_$294_storage_ptr_$_t_address_$returns$__$bound_to$_t_struct$_Role_$294_storage_ptr_$", + "typeString": "function (struct Roles.Role storage pointer,address)" + } + }, + "id": 82, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "972:32:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 83, + "nodeType": "ExpressionStatement", + "src": "972:32:0" + } + ] + }, + "documentation": null, + "id": 85, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "_removeCoreTeam", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 76, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 75, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 85, + "src": "935:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 74, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "935:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "934:17:0" + }, + "payable": false, + "returnParameters": { + "id": 77, + "nodeType": "ParameterList", + "parameters": [], + "src": "961:0:0" + }, + "scope": 86, + "src": "910:102:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 87, + "src": "203:812:0" + } + ], + "src": "0:1017:0" + }, + "id": 0 + }, + "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/AlgoPool.sol": { + "ast": { + "absolutePath": "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/AlgoPool.sol", + "exportedSymbols": { + "AlgoPool": [ + 274 + ] + }, + "id": 275, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 88, + "literals": [ + "solidity", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:23:1" + }, + { + "absolutePath": "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "file": "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "id": 89, + "nodeType": "ImportDirective", + "scope": 275, + "sourceUnit": 579, + "src": "27:177:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol", + "file": "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol", + "id": 90, + "nodeType": "ImportDirective", + "scope": 275, + "sourceUnit": 723, + "src": "206:180:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/IAlgoMiner.sol", + "file": "./IAlgoMiner.sol", + "id": 91, + "nodeType": "ImportDirective", + "scope": 275, + "sourceUnit": 288, + "src": "390:26:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/AlgoCoreTeamRole.sol", + "file": "./AlgoCoreTeamRole.sol", + "id": 92, + "nodeType": "ImportDirective", + "scope": 275, + "sourceUnit": 87, + "src": "418:32:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 93, + "name": "AlgoCoreTeamRole", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 86, + "src": "475:16:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_AlgoCoreTeamRole_$86", + "typeString": "contract AlgoCoreTeamRole" + } + }, + "id": 94, + "nodeType": "InheritanceSpecifier", + "src": "475:16:1" + } + ], + "contractDependencies": [ + 86 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 274, + "linearizedBaseContracts": [ + 274, + 86 + ], + "name": "AlgoPool", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 97, + "libraryName": { + "contractScope": null, + "id": 95, + "name": "SafeERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 722, + "src": "505:9:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeERC20_$722", + "typeString": "library SafeERC20" + } + }, + "nodeType": "UsingForDirective", + "src": "499:27:1", + "typeName": { + "contractScope": null, + "id": 96, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 578, + "src": "519:6:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$578", + "typeString": "contract IERC20" + } + } + }, + { + "constant": true, + "id": 104, + "name": "TOKEN_FACTOR", + "nodeType": "VariableDeclaration", + "scope": 274, + "src": "534:56:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 98, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "534:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 103, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 99, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "573:2:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "3138", + "id": 101, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "587:2:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_18_by_1", + "typeString": "int_const 18" + }, + "value": "18" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_18_by_1", + "typeString": "int_const 18" + } + ], + "id": 100, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "579:7:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": "uint256" + }, + "id": 102, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "579:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "573:17:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "public" + }, + { + "constant": true, + "id": 109, + "name": "CAT_0_VALUE", + "nodeType": "VariableDeclaration", + "scope": 274, + "src": "597:59:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 105, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "597:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 108, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "313030303030", + "id": 106, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "635:6:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_100000_by_1", + "typeString": "int_const 100000" + }, + "value": "100000" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 107, + "name": "TOKEN_FACTOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 104, + "src": "644:12:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "635:21:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "public" + }, + { + "constant": true, + "id": 114, + "name": "CAT_1_VALUE", + "nodeType": "VariableDeclaration", + "scope": 274, + "src": "663:60:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 110, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "663:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 113, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "31303030303030", + "id": 111, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "701:7:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000_by_1", + "typeString": "int_const 1000000" + }, + "value": "1000000" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 112, + "name": "TOKEN_FACTOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 104, + "src": "711:12:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "701:22:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "public" + }, + { + "constant": true, + "id": 121, + "name": "CAT_2_VALUE", + "nodeType": "VariableDeclaration", + "scope": 274, + "src": "730:64:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 115, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "730:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 120, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_rational_2000000_by_1", + "typeString": "int_const 2000000" + }, + "id": 118, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 116, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "768:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31303030303030", + "id": 117, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "772:7:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000_by_1", + "typeString": "int_const 1000000" + }, + "value": "1000000" + }, + "src": "768:11:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_2000000_by_1", + "typeString": "int_const 2000000" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 119, + "name": "TOKEN_FACTOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 104, + "src": "782:12:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "768:26:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "public" + }, + { + "constant": true, + "id": 128, + "name": "CAT_3_VALUE", + "nodeType": "VariableDeclaration", + "scope": 274, + "src": "801:64:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 122, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "801:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 127, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_rational_3000000_by_1", + "typeString": "int_const 3000000" + }, + "id": 125, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "33", + "id": 123, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "839:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31303030303030", + "id": 124, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "843:7:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000_by_1", + "typeString": "int_const 1000000" + }, + "value": "1000000" + }, + "src": "839:11:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_3000000_by_1", + "typeString": "int_const 3000000" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 126, + "name": "TOKEN_FACTOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 104, + "src": "853:12:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "839:26:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "public" + }, + { + "constant": true, + "id": 135, + "name": "CAT_4_VALUE", + "nodeType": "VariableDeclaration", + "scope": 274, + "src": "872:64:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 129, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "872:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 134, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_rational_4000000_by_1", + "typeString": "int_const 4000000" + }, + "id": 132, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "34", + "id": 130, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "910:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31303030303030", + "id": 131, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "914:7:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000_by_1", + "typeString": "int_const 1000000" + }, + "value": "1000000" + }, + "src": "910:11:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_4000000_by_1", + "typeString": "int_const 4000000" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 133, + "name": "TOKEN_FACTOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 104, + "src": "924:12:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "910:26:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "public" + }, + { + "constant": true, + "id": 142, + "name": "CAT_5_VALUE", + "nodeType": "VariableDeclaration", + "scope": 274, + "src": "943:64:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 136, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "943:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 141, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_rational_5000000_by_1", + "typeString": "int_const 5000000" + }, + "id": 139, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "35", + "id": 137, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "981:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31303030303030", + "id": 138, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "985:7:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000_by_1", + "typeString": "int_const 1000000" + }, + "value": "1000000" + }, + "src": "981:11:1", + "typeDescriptions": { + "typeIdentifier": "t_rational_5000000_by_1", + "typeString": "int_const 5000000" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 140, + "name": "TOKEN_FACTOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 104, + "src": "995:12:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "981:26:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "public" + }, + { + "constant": false, + "id": 144, + "name": "_poolType", + "nodeType": "VariableDeclaration", + "scope": 274, + "src": "1016:24:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 143, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "1016:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 146, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 274, + "src": "1047:21:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$578", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 145, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 578, + "src": "1047:6:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$578", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 165, + "nodeType": "Block", + "src": "1172:79:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 155, + "name": "_poolType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 144, + "src": "1183:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 156, + "name": "poolType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 148, + "src": "1195:8:1", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "src": "1183:20:1", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "id": 158, + "nodeType": "ExpressionStatement", + "src": "1183:20:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 163, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 159, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 146, + "src": "1214:6:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$578", + "typeString": "contract IERC20" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 161, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 150, + "src": "1230:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 160, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 578, + "src": "1223:6:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$578_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 162, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1223:20:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$578", + "typeString": "contract IERC20" + } + }, + "src": "1214:29:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$578", + "typeString": "contract IERC20" + } + }, + "id": 164, + "nodeType": "ExpressionStatement", + "src": "1214:29:1" + } + ] + }, + "documentation": null, + "id": 166, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 153, + "modifierName": { + "argumentTypes": null, + "id": 152, + "name": "AlgoCoreTeamRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 86, + "src": "1137:16:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AlgoCoreTeamRole_$86_$", + "typeString": "type(contract AlgoCoreTeamRole)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1137:18:1" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 151, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 148, + "name": "poolType", + "nodeType": "VariableDeclaration", + "scope": 166, + "src": "1089:15:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 147, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "1089:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 150, + "name": "tokenAddress", + "nodeType": "VariableDeclaration", + "scope": 166, + "src": "1106:20:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 149, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1106:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1088:39:1" + }, + "payable": false, + "returnParameters": { + "id": 154, + "nodeType": "ParameterList", + "parameters": [], + "src": "1172:0:1" + }, + "scope": 274, + "src": "1077:174:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 272, + "nodeType": "Block", + "src": "1325:817:1", + "statements": [ + { + "assignments": [ + 174 + ], + "declarations": [ + { + "constant": false, + "id": 174, + "name": "algoMiner", + "nodeType": "VariableDeclaration", + "scope": 273, + "src": "1336:20:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IAlgoMiner_$287", + "typeString": "contract IAlgoMiner" + }, + "typeName": { + "contractScope": null, + "id": 173, + "name": "IAlgoMiner", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 287, + "src": "1336:10:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IAlgoMiner_$287", + "typeString": "contract IAlgoMiner" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 178, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 176, + "name": "minerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 168, + "src": "1370:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 175, + "name": "IAlgoMiner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 287, + "src": "1359:10:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IAlgoMiner_$287_$", + "typeString": "type(contract IAlgoMiner)" + } + }, + "id": 177, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1359:24:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IAlgoMiner_$287", + "typeString": "contract IAlgoMiner" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1336:47:1" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 180, + "name": "algoMiner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 174, + "src": "1412:9:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IAlgoMiner_$287", + "typeString": "contract IAlgoMiner" + } + }, + "id": 181, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isAlgoMiner", + "nodeType": "MemberAccess", + "referencedDeclaration": 281, + "src": "1412:21:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_pure$__$returns$_t_bool_$", + "typeString": "function () pure external returns (bool)" + } + }, + "id": 182, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1412:23:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 179, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 740, + 741 + ], + "referencedDeclaration": 740, + "src": "1404:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 183, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1404:32:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 184, + "nodeType": "ExpressionStatement", + "src": "1404:32:1" + }, + { + "assignments": [ + 186 + ], + "declarations": [ + { + "constant": false, + "id": 186, + "name": "minerCategory", + "nodeType": "VariableDeclaration", + "scope": 273, + "src": "1457:19:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 185, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1457:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 190, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 187, + "name": "algoMiner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 174, + "src": "1479:9:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IAlgoMiner_$287", + "typeString": "contract IAlgoMiner" + } + }, + "id": 188, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getCategory", + "nodeType": "MemberAccess", + "referencedDeclaration": 286, + "src": "1479:21:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint8_$", + "typeString": "function () view external returns (uint8)" + } + }, + "id": 189, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1479:23:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1457:45:1" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 198, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 194, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 192, + "name": "minerCategory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 186, + "src": "1523:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 193, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1540:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1523:18:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 197, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 195, + "name": "minerCategory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 186, + "src": "1545:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "35", + "id": 196, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1562:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "src": "1545:18:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1523:40:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 191, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 740, + 741 + ], + "referencedDeclaration": 740, + "src": "1515:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 199, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1515:49:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 200, + "nodeType": "ExpressionStatement", + "src": "1515:49:1" + }, + { + "assignments": [ + 202 + ], + "declarations": [ + { + "constant": false, + "id": 202, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 273, + "src": "1577:13:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 201, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1577:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 204, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 203, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1593:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "1577:17:1" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 205, + "name": "minerCategory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 186, + "src": "1610:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 206, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1627:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1610:18:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 215, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 213, + "name": "minerCategory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 186, + "src": "1685:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 214, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1702:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "1685:18:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 223, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 221, + "name": "minerCategory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 186, + "src": "1760:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 222, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1777:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "1760:18:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 231, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 229, + "name": "minerCategory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 186, + "src": "1835:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "33", + "id": 230, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1852:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "src": "1835:18:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 239, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 237, + "name": "minerCategory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 186, + "src": "1910:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "34", + "id": 238, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1927:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "src": "1910:18:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 247, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 245, + "name": "minerCategory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 186, + "src": "1985:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "35", + "id": 246, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2002:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "src": "1985:18:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 253, + "nodeType": "IfStatement", + "src": "1982:69:1", + "trueBody": { + "id": 252, + "nodeType": "Block", + "src": "2005:46:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 250, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 248, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "2020:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 249, + "name": "CAT_5_VALUE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 142, + "src": "2028:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2020:19:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 251, + "nodeType": "ExpressionStatement", + "src": "2020:19:1" + } + ] + } + }, + "id": 254, + "nodeType": "IfStatement", + "src": "1907:144:1", + "trueBody": { + "id": 244, + "nodeType": "Block", + "src": "1930:46:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 242, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 240, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "1945:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 241, + "name": "CAT_4_VALUE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 135, + "src": "1953:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1945:19:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 243, + "nodeType": "ExpressionStatement", + "src": "1945:19:1" + } + ] + } + }, + "id": 255, + "nodeType": "IfStatement", + "src": "1832:219:1", + "trueBody": { + "id": 236, + "nodeType": "Block", + "src": "1855:46:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 234, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 232, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "1870:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 233, + "name": "CAT_3_VALUE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 128, + "src": "1878:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1870:19:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 235, + "nodeType": "ExpressionStatement", + "src": "1870:19:1" + } + ] + } + }, + "id": 256, + "nodeType": "IfStatement", + "src": "1757:294:1", + "trueBody": { + "id": 228, + "nodeType": "Block", + "src": "1780:46:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 226, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 224, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "1795:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 225, + "name": "CAT_2_VALUE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 121, + "src": "1803:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1795:19:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 227, + "nodeType": "ExpressionStatement", + "src": "1795:19:1" + } + ] + } + }, + "id": 257, + "nodeType": "IfStatement", + "src": "1682:369:1", + "trueBody": { + "id": 220, + "nodeType": "Block", + "src": "1705:46:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 218, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 216, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "1720:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 217, + "name": "CAT_1_VALUE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 114, + "src": "1728:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1720:19:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 219, + "nodeType": "ExpressionStatement", + "src": "1720:19:1" + } + ] + } + }, + "id": 258, + "nodeType": "IfStatement", + "src": "1607:444:1", + "trueBody": { + "id": 212, + "nodeType": "Block", + "src": "1630:46:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 210, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 208, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "1645:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 209, + "name": "CAT_0_VALUE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 109, + "src": "1653:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1645:19:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 211, + "nodeType": "ExpressionStatement", + "src": "1645:19:1" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 262, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 260, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "2071:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 261, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2079:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2071:9:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 259, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 740, + 741 + ], + "referencedDeclaration": 740, + "src": "2063:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 263, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2063:18:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 264, + "nodeType": "ExpressionStatement", + "src": "2063:18:1" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 268, + "name": "minerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 168, + "src": "2114:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 269, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "2128:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 265, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 146, + "src": "2094:6:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$578", + "typeString": "contract IERC20" + } + }, + "id": 267, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeTransfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 603, + "src": "2094:19:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$578_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$578_$", + "typeString": "function (contract IERC20,address,uint256)" + } + }, + "id": 270, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2094:40:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 271, + "nodeType": "ExpressionStatement", + "src": "2094:40:1" + } + ] + }, + "documentation": null, + "id": 273, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 171, + "modifierName": { + "argumentTypes": null, + "id": 170, + "name": "onlyCoreTeam", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27, + "src": "1312:12:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1312:12:1" + } + ], + "name": "trasferToMiner", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 169, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 168, + "name": "minerAddress", + "nodeType": "VariableDeclaration", + "scope": 273, + "src": "1283:20:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 167, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1283:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1282:22:1" + }, + "payable": false, + "returnParameters": { + "id": 172, + "nodeType": "ParameterList", + "parameters": [], + "src": "1325:0:1" + }, + "scope": 274, + "src": "1259:883:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 275, + "src": "454:1691:1" + } + ], + "src": "0:2147:1" + }, + "id": 1 + }, + "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/IAlgoMiner.sol": { + "ast": { + "absolutePath": "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/IAlgoMiner.sol", + "exportedSymbols": { + "IAlgoMiner": [ + 287 + ] + }, + "id": 288, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 276, + "literals": [ + "solidity", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:23:2" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": false, + "id": 287, + "linearizedBaseContracts": [ + 287 + ], + "name": "IAlgoMiner", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "id": 281, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "isAlgoMiner", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 277, + "nodeType": "ParameterList", + "parameters": [], + "src": "74:2:2" + }, + "payable": false, + "returnParameters": { + "id": 280, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 279, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 281, + "src": "98:4:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 278, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "98:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "97:6:2" + }, + "scope": 287, + "src": "54:50:2", + "stateMutability": "pure", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 286, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getCategory", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 282, + "nodeType": "ParameterList", + "parameters": [], + "src": "130:2:2" + }, + "payable": false, + "returnParameters": { + "id": 285, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 284, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 286, + "src": "154:5:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 283, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "154:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "153:7:2" + }, + "scope": 287, + "src": "110:51:2", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 288, + "src": "27:137:2" + } + ], + "src": "0:164:2" + }, + "id": 2 + }, + "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol": { + "ast": { + "absolutePath": "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol", + "exportedSymbols": { + "Roles": [ + 381 + ] + }, + "id": 382, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 289, + "literals": [ + "solidity", + "^", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:24:3" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": "@title Roles\n@dev Library for managing addresses assigned to a Role.", + "fullyImplemented": true, + "id": 381, + "linearizedBaseContracts": [ + 381 + ], + "name": "Roles", + "nodeType": "ContractDefinition", + "nodes": [ + { + "canonicalName": "Roles.Role", + "id": 294, + "members": [ + { + "constant": false, + "id": 293, + "name": "bearer", + "nodeType": "VariableDeclaration", + "scope": 294, + "src": "145:32:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "typeName": { + "id": 292, + "keyType": { + "id": 290, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "154:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "145:25:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "valueType": { + "id": 291, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "165:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Role", + "nodeType": "StructDefinition", + "scope": 381, + "src": "127:55:3", + "visibility": "public" + }, + { + "body": { + "id": 325, + "nodeType": "Block", + "src": "302:109:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 306, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 302, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 298, + "src": "316:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 304, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "335:1:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 303, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "327:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 305, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "327:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "316:21:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 301, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 740, + 741 + ], + "referencedDeclaration": 740, + "src": "308:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 307, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "308:30:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 308, + "nodeType": "ExpressionStatement", + "src": "308:30:3" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 314, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "352:19:3", + "subExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 311, + "name": "role", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 296, + "src": "357:4:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$294_storage_ptr", + "typeString": "struct Roles.Role storage pointer" + } + }, + { + "argumentTypes": null, + "id": 312, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 298, + "src": "363:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Role_$294_storage_ptr", + "typeString": "struct Roles.Role storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 310, + "name": "has", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 380, + "src": "353:3:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Role_$294_storage_ptr_$_t_address_$returns$_t_bool_$", + "typeString": "function (struct Roles.Role storage pointer,address) view returns (bool)" + } + }, + "id": 313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "353:18:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 309, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 740, + 741 + ], + "referencedDeclaration": 740, + "src": "344:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 315, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "344:28:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 316, + "nodeType": "ExpressionStatement", + "src": "344:28:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 323, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 317, + "name": "role", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 296, + "src": "379:4:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$294_storage_ptr", + "typeString": "struct Roles.Role storage pointer" + } + }, + "id": 320, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "bearer", + "nodeType": "MemberAccess", + "referencedDeclaration": 293, + "src": "379:11:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 321, + "indexExpression": { + "argumentTypes": null, + "id": 319, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 298, + "src": "391:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "379:20:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 322, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "402:4:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "379:27:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 324, + "nodeType": "ExpressionStatement", + "src": "379:27:3" + } + ] + }, + "documentation": "@dev give an account access to this role", + "id": 326, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "add", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 299, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 296, + "name": "role", + "nodeType": "VariableDeclaration", + "scope": 326, + "src": "257:17:3", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$294_storage_ptr", + "typeString": "struct Roles.Role" + }, + "typeName": { + "contractScope": null, + "id": 295, + "name": "Role", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 294, + "src": "257:4:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$294_storage_ptr", + "typeString": "struct Roles.Role" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 298, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 326, + "src": "276:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 297, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "276:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "256:36:3" + }, + "payable": false, + "returnParameters": { + "id": 300, + "nodeType": "ParameterList", + "parameters": [], + "src": "302:0:3" + }, + "scope": 381, + "src": "244:167:3", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 356, + "nodeType": "Block", + "src": "538:109:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 338, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 334, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 330, + "src": "552:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 336, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "571:1:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 335, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "563:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 337, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "563:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "552:21:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 333, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 740, + 741 + ], + "referencedDeclaration": 740, + "src": "544:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 339, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "544:30:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 340, + "nodeType": "ExpressionStatement", + "src": "544:30:3" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 343, + "name": "role", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 328, + "src": "592:4:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$294_storage_ptr", + "typeString": "struct Roles.Role storage pointer" + } + }, + { + "argumentTypes": null, + "id": 344, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 330, + "src": "598:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Role_$294_storage_ptr", + "typeString": "struct Roles.Role storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 342, + "name": "has", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 380, + "src": "588:3:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Role_$294_storage_ptr_$_t_address_$returns$_t_bool_$", + "typeString": "function (struct Roles.Role storage pointer,address) view returns (bool)" + } + }, + "id": 345, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "588:18:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 341, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 740, + 741 + ], + "referencedDeclaration": 740, + "src": "580:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 346, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "580:27:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 347, + "nodeType": "ExpressionStatement", + "src": "580:27:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 354, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 348, + "name": "role", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 328, + "src": "614:4:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$294_storage_ptr", + "typeString": "struct Roles.Role storage pointer" + } + }, + "id": 351, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "bearer", + "nodeType": "MemberAccess", + "referencedDeclaration": 293, + "src": "614:11:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 352, + "indexExpression": { + "argumentTypes": null, + "id": 350, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 330, + "src": "626:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "614:20:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 353, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "637:5:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "614:28:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 355, + "nodeType": "ExpressionStatement", + "src": "614:28:3" + } + ] + }, + "documentation": "@dev remove an account's access to this role", + "id": 357, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "remove", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 331, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 328, + "name": "role", + "nodeType": "VariableDeclaration", + "scope": 357, + "src": "493:17:3", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$294_storage_ptr", + "typeString": "struct Roles.Role" + }, + "typeName": { + "contractScope": null, + "id": 327, + "name": "Role", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 294, + "src": "493:4:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$294_storage_ptr", + "typeString": "struct Roles.Role" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 330, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 357, + "src": "512:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 329, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "512:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "492:36:3" + }, + "payable": false, + "returnParameters": { + "id": 332, + "nodeType": "ParameterList", + "parameters": [], + "src": "538:0:3" + }, + "scope": 381, + "src": "477:170:3", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 379, + "nodeType": "Block", + "src": "817:74:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 371, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 367, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 361, + "src": "831:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 369, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "850:1:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 368, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "842:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 370, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "842:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "831:21:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 366, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 740, + 741 + ], + "referencedDeclaration": 740, + "src": "823:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 372, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "823:30:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 373, + "nodeType": "ExpressionStatement", + "src": "823:30:3" + }, + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 374, + "name": "role", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 359, + "src": "866:4:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$294_storage_ptr", + "typeString": "struct Roles.Role storage pointer" + } + }, + "id": 375, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "bearer", + "nodeType": "MemberAccess", + "referencedDeclaration": 293, + "src": "866:11:3", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 377, + "indexExpression": { + "argumentTypes": null, + "id": 376, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 361, + "src": "878:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "866:20:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 365, + "id": 378, + "nodeType": "Return", + "src": "859:27:3" + } + ] + }, + "documentation": "@dev check if an account has this role\n@return bool", + "id": 380, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "has", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 362, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 359, + "name": "role", + "nodeType": "VariableDeclaration", + "scope": 380, + "src": "738:17:3", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$294_storage_ptr", + "typeString": "struct Roles.Role" + }, + "typeName": { + "contractScope": null, + "id": 358, + "name": "Role", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 294, + "src": "738:4:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$294_storage_ptr", + "typeString": "struct Roles.Role" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 361, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 380, + "src": "757:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 360, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "757:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "737:36:3" + }, + "payable": false, + "returnParameters": { + "id": 365, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 364, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 380, + "src": "809:4:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 363, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "809:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "808:6:3" + }, + "scope": 381, + "src": "725:166:3", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 382, + "src": "109:784:3" + } + ], + "src": "0:894:3" + }, + "id": 3 + }, + "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol": { + "ast": { + "absolutePath": "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol", + "exportedSymbols": { + "SafeMath": [ + 509 + ] + }, + "id": 510, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 383, + "literals": [ + "solidity", + "^", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:24:4" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": "@title SafeMath\n@dev Math operations with safety checks that revert on error", + "fullyImplemented": true, + "id": 509, + "linearizedBaseContracts": [ + 509 + ], + "name": "SafeMath", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 415, + "nodeType": "Block", + "src": "271:314:4", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 394, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 392, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 385, + "src": "486:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 393, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "491:1:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "486:6:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 398, + "nodeType": "IfStatement", + "src": "482:35:4", + "trueBody": { + "id": 397, + "nodeType": "Block", + "src": "494:23:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "30", + "id": 395, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "509:1:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "functionReturnParameters": 391, + "id": 396, + "nodeType": "Return", + "src": "502:8:4" + } + ] + } + }, + { + "assignments": [ + 400 + ], + "declarations": [ + { + "constant": false, + "id": 400, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 416, + "src": "523:9:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 399, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "523:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 404, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 403, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 401, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 385, + "src": "535:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 402, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 387, + "src": "539:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "535:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "523:17:4" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 410, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 408, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 406, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 400, + "src": "554:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 407, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 385, + "src": "558:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "554:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 409, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 387, + "src": "563:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "554:10:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 405, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 740, + 741 + ], + "referencedDeclaration": 740, + "src": "546:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "546:19:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 412, + "nodeType": "ExpressionStatement", + "src": "546:19:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 413, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 400, + "src": "579:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 391, + "id": 414, + "nodeType": "Return", + "src": "572:8:4" + } + ] + }, + "documentation": "@dev Multiplies two numbers, reverts on overflow.", + "id": 416, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "mul", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 388, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 385, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 416, + "src": "217:9:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 384, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "217:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 387, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 416, + "src": "228:9:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 386, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "228:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "216:22:4" + }, + "payable": false, + "returnParameters": { + "id": 391, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 390, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 416, + "src": "262:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 389, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "262:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "261:9:4" + }, + "scope": 509, + "src": "204:381:4", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 439, + "nodeType": "Block", + "src": "762:203:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 428, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 426, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 420, + "src": "776:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 427, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "780:1:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "776:5:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 425, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 740, + 741 + ], + "referencedDeclaration": 740, + "src": "768:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 429, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "768:14:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 430, + "nodeType": "ExpressionStatement", + "src": "768:14:4" + }, + { + "assignments": [ + 432 + ], + "declarations": [ + { + "constant": false, + "id": 432, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 440, + "src": "846:9:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 431, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "846:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 436, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 435, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 433, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 418, + "src": "858:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 434, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 420, + "src": "862:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "858:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "846:17:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 437, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 432, + "src": "959:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 424, + "id": 438, + "nodeType": "Return", + "src": "952:8:4" + } + ] + }, + "documentation": "@dev Integer division of two numbers truncating the quotient, reverts on division by zero.", + "id": 440, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "div", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 421, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 418, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 440, + "src": "708:9:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 417, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "708:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 420, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 440, + "src": "719:9:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 419, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "719:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "707:22:4" + }, + "payable": false, + "returnParameters": { + "id": 424, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 423, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 440, + "src": "753:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 422, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "753:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "752:9:4" + }, + "scope": 509, + "src": "695:270:4", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 463, + "nodeType": "Block", + "src": "1145:64:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 452, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 450, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 444, + "src": "1159:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 451, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 442, + "src": "1164:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1159:6:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 449, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 740, + 741 + ], + "referencedDeclaration": 740, + "src": "1151:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 453, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1151:15:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 454, + "nodeType": "ExpressionStatement", + "src": "1151:15:4" + }, + { + "assignments": [ + 456 + ], + "declarations": [ + { + "constant": false, + "id": 456, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 464, + "src": "1172:9:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 455, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1172:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 460, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 459, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 457, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 442, + "src": "1184:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 458, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 444, + "src": "1188:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1184:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1172:17:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 461, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 456, + "src": "1203:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 448, + "id": 462, + "nodeType": "Return", + "src": "1196:8:4" + } + ] + }, + "documentation": "@dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend).", + "id": 464, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "sub", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 445, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 442, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 464, + "src": "1091:9:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 441, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1091:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 444, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 464, + "src": "1102:9:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 443, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1102:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1090:22:4" + }, + "payable": false, + "returnParameters": { + "id": 448, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 447, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 464, + "src": "1136:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 446, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1136:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1135:9:4" + }, + "scope": 509, + "src": "1078:131:4", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 487, + "nodeType": "Block", + "src": "1339:64:4", + "statements": [ + { + "assignments": [ + 474 + ], + "declarations": [ + { + "constant": false, + "id": 474, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 488, + "src": "1345:9:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 473, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1345:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 478, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 477, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 475, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 466, + "src": "1357:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 476, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 468, + "src": "1361:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1357:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1345:17:4" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 482, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 480, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 474, + "src": "1376:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 481, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 466, + "src": "1381:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1376:6:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 479, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 740, + 741 + ], + "referencedDeclaration": 740, + "src": "1368:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 483, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1368:15:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 484, + "nodeType": "ExpressionStatement", + "src": "1368:15:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 485, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 474, + "src": "1397:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 472, + "id": 486, + "nodeType": "Return", + "src": "1390:8:4" + } + ] + }, + "documentation": "@dev Adds two numbers, reverts on overflow.", + "id": 488, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "add", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 469, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 466, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 488, + "src": "1285:9:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 465, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1285:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 468, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 488, + "src": "1296:9:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 467, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1296:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1284:22:4" + }, + "payable": false, + "returnParameters": { + "id": 472, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 471, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 488, + "src": "1330:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 470, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1330:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1329:9:4" + }, + "scope": 509, + "src": "1272:131:4", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 507, + "nodeType": "Block", + "src": "1602:44:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 500, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 498, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 492, + "src": "1616:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 499, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1621:1:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1616:6:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 497, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 740, + 741 + ], + "referencedDeclaration": 740, + "src": "1608:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 501, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1608:15:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 502, + "nodeType": "ExpressionStatement", + "src": "1608:15:4" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 505, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 503, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 490, + "src": "1636:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "%", + "rightExpression": { + "argumentTypes": null, + "id": 504, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 492, + "src": "1640:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1636:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 496, + "id": 506, + "nodeType": "Return", + "src": "1629:12:4" + } + ] + }, + "documentation": "@dev Divides two numbers and returns the remainder (unsigned integer modulo),\nreverts when dividing by zero.", + "id": 508, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "mod", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 493, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 490, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 508, + "src": "1548:9:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 489, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1548:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 492, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 508, + "src": "1559:9:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 491, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1559:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1547:22:4" + }, + "payable": false, + "returnParameters": { + "id": 496, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 495, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 508, + "src": "1593:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 494, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1593:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1592:9:4" + }, + "scope": 509, + "src": "1535:111:4", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 510, + "src": "117:1531:4" + } + ], + "src": "0:1649:4" + }, + "id": 4 + }, + "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol": { + "ast": { + "absolutePath": "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "exportedSymbols": { + "IERC20": [ + 578 + ] + }, + "id": 579, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 511, + "literals": [ + "solidity", + "^", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:24:5" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "interface", + "documentation": "@title ERC20 interface\n@dev see https://github.com/ethereum/EIPs/issues/20", + "fullyImplemented": false, + "id": 578, + "linearizedBaseContracts": [ + 578 + ], + "name": "IERC20", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "id": 516, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "totalSupply", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 512, + "nodeType": "ParameterList", + "parameters": [], + "src": "156:2:5" + }, + "payable": false, + "returnParameters": { + "id": 515, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 514, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 516, + "src": "182:7:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 513, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "182:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "181:9:5" + }, + "scope": 578, + "src": "136:55:5", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 523, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "balanceOf", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 519, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 518, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 523, + "src": "214:11:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 517, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "214:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "213:13:5" + }, + "payable": false, + "returnParameters": { + "id": 522, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 521, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 523, + "src": "250:7:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 520, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "250:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "249:9:5" + }, + "scope": 578, + "src": "195:64:5", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 532, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "allowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 528, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 525, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 532, + "src": "282:13:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 524, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "282:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 527, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 532, + "src": "297:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 526, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "297:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "281:32:5" + }, + "payable": false, + "returnParameters": { + "id": 531, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 530, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 532, + "src": "341:7:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 529, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "341:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "340:9:5" + }, + "scope": 578, + "src": "263:87:5", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 541, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 537, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 534, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 541, + "src": "372:10:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 533, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "372:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 536, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 541, + "src": "384:13:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 535, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "384:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "371:27:5" + }, + "payable": false, + "returnParameters": { + "id": 540, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 539, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 541, + "src": "417:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 538, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "417:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "416:6:5" + }, + "scope": 578, + "src": "354:69:5", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 550, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 546, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 543, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 550, + "src": "444:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 542, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "444:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 545, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 550, + "src": "461:13:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 544, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "461:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "443:32:5" + }, + "payable": false, + "returnParameters": { + "id": 549, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 548, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 550, + "src": "498:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 547, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "498:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "497:6:5" + }, + "scope": 578, + "src": "427:77:5", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 561, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 557, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 552, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 561, + "src": "530:12:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 551, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "530:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 554, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 561, + "src": "544:10:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 553, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "544:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 556, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 561, + "src": "556:13:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 555, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "556:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "529:41:5" + }, + "payable": false, + "returnParameters": { + "id": 560, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 559, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 561, + "src": "593:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 558, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "593:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "592:6:5" + }, + "scope": 578, + "src": "508:91:5", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "anonymous": false, + "documentation": null, + "id": 569, + "name": "Transfer", + "nodeType": "EventDefinition", + "parameters": { + "id": 568, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 563, + "indexed": true, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 569, + "src": "623:20:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 562, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "623:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 565, + "indexed": true, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 569, + "src": "649:18:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 564, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "649:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 567, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 569, + "src": "673:13:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 566, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "673:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "617:73:5" + }, + "src": "603:88:5" + }, + { + "anonymous": false, + "documentation": null, + "id": 577, + "name": "Approval", + "nodeType": "EventDefinition", + "parameters": { + "id": 576, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 571, + "indexed": true, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 577, + "src": "715:21:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 570, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "715:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 573, + "indexed": true, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 577, + "src": "742:23:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 572, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "742:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 575, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 577, + "src": "771:13:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 574, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "771:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "709:79:5" + }, + "src": "695:94:5" + } + ], + "scope": 579, + "src": "115:676:5" + } + ], + "src": "0:792:5" + }, + "id": 5 + }, + "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol": { + "ast": { + "absolutePath": "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol", + "exportedSymbols": { + "SafeERC20": [ + 722 + ] + }, + "id": 723, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 580, + "literals": [ + "solidity", + "^", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:24:6" + }, + { + "absolutePath": "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "file": "./IERC20.sol", + "id": 581, + "nodeType": "ImportDirective", + "scope": 723, + "sourceUnit": 579, + "src": "26:22:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "d:/GitHub/Sabra/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol", + "file": "../../math/SafeMath.sol", + "id": 582, + "nodeType": "ImportDirective", + "scope": 723, + "sourceUnit": 510, + "src": "49:33:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": "@title SafeERC20\n@dev Wrappers around ERC20 operations that throw on failure.\nTo use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\nwhich allows you to call the safe operations as `token.safeTransfer(...)`, etc.", + "fullyImplemented": true, + "id": 722, + "linearizedBaseContracts": [ + 722 + ], + "name": "SafeERC20", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 585, + "libraryName": { + "contractScope": null, + "id": 583, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 509, + "src": "382:8:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$509", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "376:27:6", + "typeName": { + "id": 584, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "395:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "body": { + "id": 602, + "nodeType": "Block", + "src": "501:45:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 597, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 589, + "src": "530:2:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 598, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 591, + "src": "534:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 595, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 587, + "src": "515:5:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$578", + "typeString": "contract IERC20" + } + }, + "id": 596, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 541, + "src": "515:14:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 599, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "515:25:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 594, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 740, + 741 + ], + "referencedDeclaration": 740, + "src": "507:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 600, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "507:34:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 601, + "nodeType": "ExpressionStatement", + "src": "507:34:6" + } + ] + }, + "documentation": null, + "id": 603, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "safeTransfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 592, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 587, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 603, + "src": "434:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$578", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 586, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 578, + "src": "434:6:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$578", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 589, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 603, + "src": "452:10:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 588, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "452:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 591, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 603, + "src": "468:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 590, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "468:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "428:57:6" + }, + "payable": false, + "returnParameters": { + "id": 593, + "nodeType": "ParameterList", + "parameters": [], + "src": "501:0:6" + }, + "scope": 722, + "src": "407:139:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 623, + "nodeType": "Block", + "src": "666:55:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 617, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 607, + "src": "699:4:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 618, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 609, + "src": "705:2:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 619, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 611, + "src": "709:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 615, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 605, + "src": "680:5:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$578", + "typeString": "contract IERC20" + } + }, + "id": 616, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 561, + "src": "680:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,address,uint256) external returns (bool)" + } + }, + "id": 620, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "680:35:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 614, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 740, + 741 + ], + "referencedDeclaration": 740, + "src": "672:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 621, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "672:44:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 622, + "nodeType": "ExpressionStatement", + "src": "672:44:6" + } + ] + }, + "documentation": null, + "id": 624, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "safeTransferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 612, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 605, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 624, + "src": "581:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$578", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 604, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 578, + "src": "581:6:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$578", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 607, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 624, + "src": "599:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 606, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "599:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 609, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 624, + "src": "617:10:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 608, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "617:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 611, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 624, + "src": "633:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 610, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "633:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "575:75:6" + }, + "payable": false, + "returnParameters": { + "id": 613, + "nodeType": "ParameterList", + "parameters": [], + "src": "666:0:6" + }, + "scope": 722, + "src": "550:171:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 658, + "nodeType": "Block", + "src": "823:330:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 647, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 636, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 634, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 630, + "src": "1045:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 635, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1054:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1045:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 637, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "1044:12:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 645, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 640, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 737, + "src": "1077:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 641, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1077:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 642, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 628, + "src": "1089:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 638, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 626, + "src": "1061:5:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$578", + "typeString": "contract IERC20" + } + }, + "id": 639, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "allowance", + "nodeType": "MemberAccess", + "referencedDeclaration": 532, + "src": "1061:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", + "typeString": "function (address,address) view external returns (uint256)" + } + }, + "id": 643, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1061:36:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 644, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1101:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1061:41:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 646, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "1060:43:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1044:59:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 633, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 740, + 741 + ], + "referencedDeclaration": 740, + "src": "1036:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 648, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1036:68:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 649, + "nodeType": "ExpressionStatement", + "src": "1036:68:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 653, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 628, + "src": "1132:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 654, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 630, + "src": "1141:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 651, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 626, + "src": "1118:5:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$578", + "typeString": "contract IERC20" + } + }, + "id": 652, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "approve", + "nodeType": "MemberAccess", + "referencedDeclaration": 550, + "src": "1118:13:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 655, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1118:29:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 650, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 740, + 741 + ], + "referencedDeclaration": 740, + "src": "1110:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 656, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1110:38:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 657, + "nodeType": "ExpressionStatement", + "src": "1110:38:6" + } + ] + }, + "documentation": null, + "id": 659, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "safeApprove", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 631, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 626, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 659, + "src": "751:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$578", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 625, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 578, + "src": "751:6:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$578", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 628, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 659, + "src": "769:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 627, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "769:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 630, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 659, + "src": "790:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 629, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "790:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "745:62:6" + }, + "payable": false, + "returnParameters": { + "id": 632, + "nodeType": "ParameterList", + "parameters": [], + "src": "823:0:6" + }, + "scope": 722, + "src": "725:428:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 689, + "nodeType": "Block", + "src": "1265:135:6", + "statements": [ + { + "assignments": [ + 669 + ], + "declarations": [ + { + "constant": false, + "id": 669, + "name": "newAllowance", + "nodeType": "VariableDeclaration", + "scope": 690, + "src": "1271:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 668, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1271:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 680, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 678, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 665, + "src": "1338:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 673, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 758, + "src": "1318:4:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeERC20_$722", + "typeString": "library SafeERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_SafeERC20_$722", + "typeString": "library SafeERC20" + } + ], + "id": 672, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1310:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 674, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1310:13:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 675, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 663, + "src": "1325:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 670, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 661, + "src": "1294:5:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$578", + "typeString": "contract IERC20" + } + }, + "id": 671, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "allowance", + "nodeType": "MemberAccess", + "referencedDeclaration": 532, + "src": "1294:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", + "typeString": "function (address,address) view external returns (uint256)" + } + }, + "id": 676, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1294:39:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 677, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 488, + "src": "1294:43:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 679, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1294:50:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1271:73:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 684, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 663, + "src": "1372:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 685, + "name": "newAllowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 669, + "src": "1381:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 682, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 661, + "src": "1358:5:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$578", + "typeString": "contract IERC20" + } + }, + "id": 683, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "approve", + "nodeType": "MemberAccess", + "referencedDeclaration": 550, + "src": "1358:13:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 686, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1358:36:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 681, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 740, + 741 + ], + "referencedDeclaration": 740, + "src": "1350:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 687, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1350:45:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 688, + "nodeType": "ExpressionStatement", + "src": "1350:45:6" + } + ] + }, + "documentation": null, + "id": 690, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "safeIncreaseAllowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 666, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 661, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 690, + "src": "1193:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$578", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 660, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 578, + "src": "1193:6:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$578", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 663, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 690, + "src": "1211:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 662, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1211:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 665, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 690, + "src": "1232:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 664, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1232:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1187:62:6" + }, + "payable": false, + "returnParameters": { + "id": 667, + "nodeType": "ParameterList", + "parameters": [], + "src": "1265:0:6" + }, + "scope": 722, + "src": "1157:243:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 720, + "nodeType": "Block", + "src": "1512:135:6", + "statements": [ + { + "assignments": [ + 700 + ], + "declarations": [ + { + "constant": false, + "id": 700, + "name": "newAllowance", + "nodeType": "VariableDeclaration", + "scope": 721, + "src": "1518:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 699, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1518:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 711, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 709, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 696, + "src": "1585:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 704, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 758, + "src": "1565:4:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeERC20_$722", + "typeString": "library SafeERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_SafeERC20_$722", + "typeString": "library SafeERC20" + } + ], + "id": 703, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1557:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 705, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1557:13:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 706, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 694, + "src": "1572:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 701, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 692, + "src": "1541:5:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$578", + "typeString": "contract IERC20" + } + }, + "id": 702, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "allowance", + "nodeType": "MemberAccess", + "referencedDeclaration": 532, + "src": "1541:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", + "typeString": "function (address,address) view external returns (uint256)" + } + }, + "id": 707, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1541:39:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 708, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 464, + "src": "1541:43:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 710, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1541:50:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1518:73:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 715, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 694, + "src": "1619:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 716, + "name": "newAllowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 700, + "src": "1628:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 713, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 692, + "src": "1605:5:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$578", + "typeString": "contract IERC20" + } + }, + "id": 714, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "approve", + "nodeType": "MemberAccess", + "referencedDeclaration": 550, + "src": "1605:13:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 717, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1605:36:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 712, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 740, + 741 + ], + "referencedDeclaration": 740, + "src": "1597:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 718, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1597:45:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 719, + "nodeType": "ExpressionStatement", + "src": "1597:45:6" + } + ] + }, + "documentation": null, + "id": 721, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "safeDecreaseAllowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 697, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 692, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 721, + "src": "1440:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$578", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 691, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 578, + "src": "1440:6:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$578", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 694, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 721, + "src": "1458:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 693, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1458:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 696, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 721, + "src": "1479:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 695, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1479:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1434:62:6" + }, + "payable": false, + "returnParameters": { + "id": 698, + "nodeType": "ParameterList", + "parameters": [], + "src": "1512:0:6" + }, + "scope": 722, + "src": "1404:243:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 723, + "src": "353:1296:6" + } + ], + "src": "0:1650:6" + }, + "id": 6 + } + } +} \ No newline at end of file diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/bin/AlgoPool.abi b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/bin/AlgoPool.abi new file mode 100644 index 000000000..38dd233d4 --- /dev/null +++ b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/bin/AlgoPool.abi @@ -0,0 +1 @@ +[{"constant":false,"inputs":[{"name":"minerAddress","type":"address"}],"name":"trasferToMiner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"TOKEN_FACTOR","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"account","type":"address"}],"name":"addCoreTeam","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"CAT_4_VALUE","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"CAT_1_VALUE","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"CAT_3_VALUE","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"account","type":"address"}],"name":"isCoreTeam","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"CAT_0_VALUE","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"CAT_5_VALUE","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"CAT_2_VALUE","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceCoreTeam","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"poolType","type":"uint16"},{"name":"tokenAddress","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"}] \ No newline at end of file diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/bin/AlgoPool.bin b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/bin/AlgoPool.bin new file mode 100644 index 000000000..4bb8a74af --- /dev/null +++ b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/bin/AlgoPool.bin @@ -0,0 +1 @@ +608060405234801561001057600080fd5b5060405160408061076083398101604052805160209091015161003b33640100000000610077810204565b60018054600160a060020a0390921662010000026201000060b060020a031961ffff90941661ffff199093169290921792909216179055610120565b61008f60008264010000000061056b61009282021704565b50565b600160a060020a03811615156100a757600080fd5b6100ba82826401000000006100e9810204565b156100c457600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b6000600160a060020a038216151561010057600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b6106318061012f6000396000f3006080604052600436106100955763ffffffff60e060020a6000350416632296f4c7811461009a57806325109e8b146100bd5780632e6b6849146100e4578063455acbcd14610105578063492fba841461011a57806349dc9ed01461012f578063608d3d3d146101445780639fc3c98314610179578063a89febb21461018e578063aed6183f146101a3578063d43acc79146101b8575b600080fd5b3480156100a657600080fd5b506100bb600160a060020a03600435166101cd565b005b3480156100c957600080fd5b506100d26103cc565b60408051918252519081900360200190f35b3480156100f057600080fd5b506100bb600160a060020a03600435166103d8565b34801561011157600080fd5b506100d26103f8565b34801561012657600080fd5b506100d2610407565b34801561013b57600080fd5b506100d2610415565b34801561015057600080fd5b50610165600160a060020a0360043516610424565b604080519115158252519081900360200190f35b34801561018557600080fd5b506100d261043c565b34801561019a57600080fd5b506100d261044a565b3480156101af57600080fd5b506100d2610459565b3480156101c457600080fd5b506100bb610468565b60008060006101db33610424565b15156101e657600080fd5b83925082600160a060020a0316631777fb4b6040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561022757600080fd5b505af115801561023b573d6000803e3d6000fd5b505050506040513d602081101561025157600080fd5b5051151561025e57600080fd5b82600160a060020a03166380258e476040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561029c57600080fd5b505af11580156102b0573d6000803e3d6000fd5b505050506040513d60208110156102c657600080fd5b50519150600060ff8316108015906102e2575060058260ff1611155b15156102ed57600080fd5b50600060ff8216151561030b575069152d02c7e14af680000061039c565b8160ff1660011415610328575069d3c21bcecceda100000061039c565b8160ff166002141561034657506a01a784379d99db4200000061039c565b8160ff166003141561036457506a027b46536c66c8e300000061039c565b8160ff166004141561038257506a034f086f3b33b68400000061039c565b8160ff166005141561039c57506a0422ca8b0a00a4250000005b600081116103a957600080fd5b6001546103c690620100009004600160a060020a03168583610473565b50505050565b670de0b6b3a764000081565b6103e133610424565b15156103ec57600080fd5b6103f581610512565b50565b6a034f086f3b33b68400000081565b69d3c21bcecceda100000081565b6a027b46536c66c8e300000081565b6000610436818363ffffffff61052316565b92915050565b69152d02c7e14af680000081565b6a0422ca8b0a00a42500000081565b6a01a784379d99db4200000081565b6104713361055a565b565b82600160a060020a031663a9059cbb83836040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b1580156104d657600080fd5b505af11580156104ea573d6000803e3d6000fd5b505050506040513d602081101561050057600080fd5b5051151561050d57600080fd5b505050565b6103f560008263ffffffff61056b16565b6000600160a060020a038216151561053a57600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b6103f560008263ffffffff6105b916565b600160a060020a038116151561058057600080fd5b61058a8282610523565b1561059457600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b600160a060020a03811615156105ce57600080fd5b6105d88282610523565b15156105e357600080fd5b600160a060020a0316600090815260209190915260409020805460ff191690555600a165627a7a72305820f296b4ffb64dca2d6eb3a2164312cba487eba728c8b0729ef90193efdf3b0b3d0029 \ No newline at end of file diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/bin/AlgoPool.json b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/bin/AlgoPool.json new file mode 100644 index 000000000..39b79f14d --- /dev/null +++ b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/bin/AlgoPool.json @@ -0,0 +1,207 @@ +{ + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "minerAddress", + "type": "address" + } + ], + "name": "trasferToMiner", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "TOKEN_FACTOR", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "addCoreTeam", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "CAT_4_VALUE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "CAT_1_VALUE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "CAT_3_VALUE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "isCoreTeam", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "CAT_0_VALUE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "CAT_5_VALUE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "CAT_2_VALUE", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renounceCoreTeam", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "name": "poolType", + "type": "uint16" + }, + { + "name": "tokenAddress", + "type": "address" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + } + ], + "bytecode": "608060405234801561001057600080fd5b5060405160408061076083398101604052805160209091015161003b33640100000000610077810204565b60018054600160a060020a0390921662010000026201000060b060020a031961ffff90941661ffff199093169290921792909216179055610120565b61008f60008264010000000061056b61009282021704565b50565b600160a060020a03811615156100a757600080fd5b6100ba82826401000000006100e9810204565b156100c457600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b6000600160a060020a038216151561010057600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b6106318061012f6000396000f3006080604052600436106100955763ffffffff60e060020a6000350416632296f4c7811461009a57806325109e8b146100bd5780632e6b6849146100e4578063455acbcd14610105578063492fba841461011a57806349dc9ed01461012f578063608d3d3d146101445780639fc3c98314610179578063a89febb21461018e578063aed6183f146101a3578063d43acc79146101b8575b600080fd5b3480156100a657600080fd5b506100bb600160a060020a03600435166101cd565b005b3480156100c957600080fd5b506100d26103cc565b60408051918252519081900360200190f35b3480156100f057600080fd5b506100bb600160a060020a03600435166103d8565b34801561011157600080fd5b506100d26103f8565b34801561012657600080fd5b506100d2610407565b34801561013b57600080fd5b506100d2610415565b34801561015057600080fd5b50610165600160a060020a0360043516610424565b604080519115158252519081900360200190f35b34801561018557600080fd5b506100d261043c565b34801561019a57600080fd5b506100d261044a565b3480156101af57600080fd5b506100d2610459565b3480156101c457600080fd5b506100bb610468565b60008060006101db33610424565b15156101e657600080fd5b83925082600160a060020a0316631777fb4b6040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561022757600080fd5b505af115801561023b573d6000803e3d6000fd5b505050506040513d602081101561025157600080fd5b5051151561025e57600080fd5b82600160a060020a03166380258e476040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561029c57600080fd5b505af11580156102b0573d6000803e3d6000fd5b505050506040513d60208110156102c657600080fd5b50519150600060ff8316108015906102e2575060058260ff1611155b15156102ed57600080fd5b50600060ff8216151561030b575069152d02c7e14af680000061039c565b8160ff1660011415610328575069d3c21bcecceda100000061039c565b8160ff166002141561034657506a01a784379d99db4200000061039c565b8160ff166003141561036457506a027b46536c66c8e300000061039c565b8160ff166004141561038257506a034f086f3b33b68400000061039c565b8160ff166005141561039c57506a0422ca8b0a00a4250000005b600081116103a957600080fd5b6001546103c690620100009004600160a060020a03168583610473565b50505050565b670de0b6b3a764000081565b6103e133610424565b15156103ec57600080fd5b6103f581610512565b50565b6a034f086f3b33b68400000081565b69d3c21bcecceda100000081565b6a027b46536c66c8e300000081565b6000610436818363ffffffff61052316565b92915050565b69152d02c7e14af680000081565b6a0422ca8b0a00a42500000081565b6a01a784379d99db4200000081565b6104713361055a565b565b82600160a060020a031663a9059cbb83836040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b1580156104d657600080fd5b505af11580156104ea573d6000803e3d6000fd5b505050506040513d602081101561050057600080fd5b5051151561050d57600080fd5b505050565b6103f560008263ffffffff61056b16565b6000600160a060020a038216151561053a57600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b6103f560008263ffffffff6105b916565b600160a060020a038116151561058057600080fd5b61058a8282610523565b1561059457600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b600160a060020a03811615156105ce57600080fd5b6105d88282610523565b15156105e357600080fd5b600160a060020a0316600090815260209190915260409020805460ff191690555600a165627a7a72305820f296b4ffb64dca2d6eb3a2164312cba487eba728c8b0729ef90193efdf3b0b3d0029", + "functionHashes": { + "CAT_0_VALUE()": "9fc3c983", + "CAT_1_VALUE()": "492fba84", + "CAT_2_VALUE()": "aed6183f", + "CAT_3_VALUE()": "49dc9ed0", + "CAT_4_VALUE()": "455acbcd", + "CAT_5_VALUE()": "a89febb2", + "TOKEN_FACTOR()": "25109e8b", + "addCoreTeam(address)": "2e6b6849", + "isCoreTeam(address)": "608d3d3d", + "renounceCoreTeam()": "d43acc79", + "trasferToMiner(address)": "2296f4c7" + }, + "gasEstimates": { + "creation": { + "codeDepositCost": "317000", + "executionCost": "infinite", + "totalCost": "infinite" + }, + "external": { + "CAT_0_VALUE()": "401", + "CAT_1_VALUE()": "335", + "CAT_2_VALUE()": "445", + "CAT_3_VALUE()": "357", + "CAT_4_VALUE()": "313", + "CAT_5_VALUE()": "423", + "TOKEN_FACTOR()": "269", + "addCoreTeam(address)": "infinite", + "isCoreTeam(address)": "infinite", + "renounceCoreTeam()": "infinite", + "trasferToMiner(address)": "infinite" + } + } +} \ No newline at end of file diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/bin/AlgoTokenV1-sol-output.json b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/bin/AlgoTokenV1-sol-output.json new file mode 100644 index 000000000..0daf3eb06 --- /dev/null +++ b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/bin/AlgoTokenV1-sol-output.json @@ -0,0 +1,16216 @@ +{ + "contracts": { + "d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/AlgoTokenV1.sol": { + "AlgoTokenV1": { + "abi": [ + { + "constant": true, + "inputs": [], + "name": "name", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "spender", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "from", + "type": "address" + }, + { + "name": "to", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "INITIAL_SUPPLY", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "decimals", + "outputs": [ + { + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "spender", + "type": "address" + }, + { + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "unpause", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "isPauser", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "paused", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renouncePauser", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "addPauser", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "pause", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "symbol", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "spender", + "type": "address" + }, + { + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "to", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "owner", + "type": "address" + }, + { + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "account", + "type": "address" + } + ], + "name": "PauserAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "account", + "type": "address" + } + ], + "name": "PauserRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "from", + "type": "address" + }, + { + "indexed": true, + "name": "to", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + } + ], + "devdoc": { + "methods": { + "allowance(address,address)": { + "details": "Function to check the amount of tokens that an owner allowed to a spender.", + "params": { + "owner": "address The address which owns the funds.", + "spender": "address The address which will spend the funds." + }, + "return": "A uint256 specifying the amount of tokens still available for the spender." + }, + "balanceOf(address)": { + "details": "Gets the balance of the specified address.", + "params": { + "owner": "The address to query the balance of." + }, + "return": "An uint256 representing the amount owned by the passed address." + }, + "decimals()": { + "return": "the number of decimals of the token." + }, + "name()": { + "return": "the name of the token." + }, + "pause()": { + "details": "called by the owner to pause, triggers stopped state" + }, + "paused()": { + "return": "true if the contract is paused, false otherwise." + }, + "symbol()": { + "return": "the symbol of the token." + }, + "totalSupply()": { + "details": "Total number of tokens in existence" + }, + "unpause()": { + "details": "called by the owner to unpause, returns to normal state" + } + } + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "60806040523480156200001157600080fd5b50604080518082018252600581527f416c676f7300000000000000000000000000000000000000000000000000000060208083019182528351808501909452600484527f414c474f00000000000000000000000000000000000000000000000000000000908401528151919291601291620000909160039190620002c1565b508151620000a6906004906020850190620002c1565b506005805460ff191660ff9290921691909117905550620000d290503364010000000062000103810204565b6007805460ff19169055620000fd336b033b2e3c9fd0803ce800000064010000000062000155810204565b62000366565b6200011e60068264010000000062000b2c6200021482021704565b604051600160a060020a038216907f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f890600090a250565b600160a060020a03821615156200016b57600080fd5b60025462000188908264010000000062000ace6200026f82021704565b600255600160a060020a038216600090815260208190526040902054620001be908264010000000062000ace6200026f82021704565b600160a060020a0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b600160a060020a03811615156200022a57600080fd5b6200023f828264010000000062000289810204565b156200024a57600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b6000828201838110156200028257600080fd5b9392505050565b6000600160a060020a0382161515620002a157600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200030457805160ff191683800117855562000334565b8280016001018555821562000334579182015b828111156200033457825182559160200191906001019062000317565b506200034292915062000346565b5090565b6200036391905b808211156200034257600081556001016200034d565b90565b610ba680620003766000396000f3fe608060405234801561001057600080fd5b5060043610610133576000357c0100000000000000000000000000000000000000000000000000000000900480635c975abb116100bf5780638456cb591161008e5780638456cb591461032357806395d89b411461032b578063a457c2d714610333578063a9059cbb1461035f578063dd62ed3e1461038b57610133565b80635c975abb146102c75780636ef8d66d146102cf57806370a08231146102d757806382dc1ec4146102fd57610133565b80632ff2e9dc116101065780632ff2e9dc14610245578063313ce5671461024d578063395093511461026b5780633f4ba83a1461029757806346fbf68e146102a157610133565b806306fdde0314610138578063095ea7b3146101b557806318160ddd146101f557806323b872dd1461020f575b600080fd5b6101406103b9565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561017a578181015183820152602001610162565b50505050905090810190601f1680156101a75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101e1600480360360408110156101cb57600080fd5b50600160a060020a03813516906020013561044f565b604080519115158252519081900360200190f35b6101fd610473565b60408051918252519081900360200190f35b6101e16004803603606081101561022557600080fd5b50600160a060020a03813581169160208101359091169060400135610479565b6101fd61049f565b6102556104af565b6040805160ff9092168252519081900360200190f35b6101e16004803603604081101561028157600080fd5b50600160a060020a0381351690602001356104b8565b61029f6104d5565b005b6101e1600480360360208110156102b757600080fd5b5035600160a060020a0316610539565b6101e1610552565b61029f61055b565b6101fd600480360360208110156102ed57600080fd5b5035600160a060020a0316610566565b61029f6004803603602081101561031357600080fd5b5035600160a060020a0316610581565b61029f6105a1565b610140610607565b6101e16004803603604081101561034957600080fd5b50600160a060020a038135169060200135610668565b6101e16004803603604081101561037557600080fd5b50600160a060020a038135169060200135610685565b6101fd600480360360408110156103a157600080fd5b50600160a060020a03813581169160200135166106a2565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104455780601f1061041a57610100808354040283529160200191610445565b820191906000526020600020905b81548152906001019060200180831161042857829003601f168201915b5050505050905090565b60075460009060ff161561046257600080fd5b61046c83836106cd565b9392505050565b60025490565b60075460009060ff161561048c57600080fd5b61049784848461074b565b949350505050565b6b033b2e3c9fd0803ce800000081565b60055460ff1690565b60075460009060ff16156104cb57600080fd5b61046c8383610814565b6104de33610539565b15156104e957600080fd5b60075460ff1615156104fa57600080fd5b6007805460ff191690556040805133815290517f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa9181900360200190a1565b600061054c60068363ffffffff6108c416565b92915050565b60075460ff1690565b610564336108fb565b565b600160a060020a031660009081526020819052604090205490565b61058a33610539565b151561059557600080fd5b61059e81610943565b50565b6105aa33610539565b15156105b557600080fd5b60075460ff16156105c557600080fd5b6007805460ff191660011790556040805133815290517f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2589181900360200190a1565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104455780601f1061041a57610100808354040283529160200191610445565b60075460009060ff161561067b57600080fd5b61046c838361098b565b60075460009060ff161561069857600080fd5b61046c83836109d6565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6000600160a060020a03831615156106e457600080fd5b336000818152600160209081526040808320600160a060020a03881680855290835292819020869055805186815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a350600192915050565b600160a060020a038316600090815260016020908152604080832033845290915281205461077f908363ffffffff6109ec16565b600160a060020a03851660009081526001602090815260408083203384529091529020556107ae848484610a01565b600160a060020a0384166000818152600160209081526040808320338085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b6000600160a060020a038316151561082b57600080fd5b336000908152600160209081526040808320600160a060020a038716845290915290205461085f908363ffffffff610ace16565b336000818152600160209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b6000600160a060020a03821615156108db57600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b61090c60068263ffffffff610ae016565b604051600160a060020a038216907fcd265ebaf09df2871cc7bd4133404a235ba12eff2041bb89d9c714a2621c7c7e90600090a250565b61095460068263ffffffff610b2c16565b604051600160a060020a038216907f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f890600090a250565b6000600160a060020a03831615156109a257600080fd5b336000908152600160209081526040808320600160a060020a038716845290915290205461085f908363ffffffff6109ec16565b60006109e3338484610a01565b50600192915050565b6000828211156109fb57600080fd5b50900390565b600160a060020a0382161515610a1657600080fd5b600160a060020a038316600090815260208190526040902054610a3f908263ffffffff6109ec16565b600160a060020a038085166000908152602081905260408082209390935590841681522054610a74908263ffffffff610ace16565b600160a060020a038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008282018381101561046c57600080fd5b600160a060020a0381161515610af557600080fd5b610aff82826108c4565b1515610b0a57600080fd5b600160a060020a0316600090815260209190915260409020805460ff19169055565b600160a060020a0381161515610b4157600080fd5b610b4b82826108c4565b15610b5557600080fd5b600160a060020a0316600090815260209190915260409020805460ff1916600117905556fea165627a7a72305820a8673657c914c80ad8879e073b63b3c05fd0190188d56a14948896f8205677a60029", + "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH3 0x11 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD DUP3 MSTORE PUSH1 0x5 DUP2 MSTORE PUSH32 0x416C676F73000000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP1 DUP4 ADD SWAP2 DUP3 MSTORE DUP4 MLOAD DUP1 DUP6 ADD SWAP1 SWAP5 MSTORE PUSH1 0x4 DUP5 MSTORE PUSH32 0x414C474F00000000000000000000000000000000000000000000000000000000 SWAP1 DUP5 ADD MSTORE DUP2 MLOAD SWAP2 SWAP3 SWAP2 PUSH1 0x12 SWAP2 PUSH3 0x90 SWAP2 PUSH1 0x3 SWAP2 SWAP1 PUSH3 0x2C1 JUMP JUMPDEST POP DUP2 MLOAD PUSH3 0xA6 SWAP1 PUSH1 0x4 SWAP1 PUSH1 0x20 DUP6 ADD SWAP1 PUSH3 0x2C1 JUMP JUMPDEST POP PUSH1 0x5 DUP1 SLOAD PUSH1 0xFF NOT AND PUSH1 0xFF SWAP3 SWAP1 SWAP3 AND SWAP2 SWAP1 SWAP2 OR SWAP1 SSTORE POP PUSH3 0xD2 SWAP1 POP CALLER PUSH5 0x100000000 PUSH3 0x103 DUP2 MUL DIV JUMP JUMPDEST PUSH1 0x7 DUP1 SLOAD PUSH1 0xFF NOT AND SWAP1 SSTORE PUSH3 0xFD CALLER PUSH12 0x33B2E3C9FD0803CE8000000 PUSH5 0x100000000 PUSH3 0x155 DUP2 MUL DIV JUMP JUMPDEST PUSH3 0x366 JUMP JUMPDEST PUSH3 0x11E PUSH1 0x6 DUP3 PUSH5 0x100000000 PUSH3 0xB2C PUSH3 0x214 DUP3 MUL OR DIV JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP3 AND SWAP1 PUSH32 0x6719D08C1888103BEA251A4ED56406BD0C3E69723C8A1686E017E7BBE159B6F8 SWAP1 PUSH1 0x0 SWAP1 LOG2 POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP3 AND ISZERO ISZERO PUSH3 0x16B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x2 SLOAD PUSH3 0x188 SWAP1 DUP3 PUSH5 0x100000000 PUSH3 0xACE PUSH3 0x26F DUP3 MUL OR DIV JUMP JUMPDEST PUSH1 0x2 SSTORE PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH3 0x1BE SWAP1 DUP3 PUSH5 0x100000000 PUSH3 0xACE PUSH3 0x26F DUP3 MUL OR DIV JUMP JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP4 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 DUP2 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SWAP5 SWAP1 SWAP5 SSTORE DUP4 MLOAD DUP6 DUP2 MSTORE SWAP4 MLOAD SWAP3 SWAP4 SWAP2 SWAP3 PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF SWAP3 DUP2 SWAP1 SUB SWAP1 SWAP2 ADD SWAP1 LOG3 POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP2 AND ISZERO ISZERO PUSH3 0x22A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH3 0x23F DUP3 DUP3 PUSH5 0x100000000 PUSH3 0x289 DUP2 MUL DIV JUMP JUMPDEST ISZERO PUSH3 0x24A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP1 SLOAD PUSH1 0xFF NOT AND PUSH1 0x1 OR SWAP1 SSTORE JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 ADD DUP4 DUP2 LT ISZERO PUSH3 0x282 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP3 AND ISZERO ISZERO PUSH3 0x2A1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND SWAP1 JUMP JUMPDEST DUP3 DUP1 SLOAD PUSH1 0x1 DUP2 PUSH1 0x1 AND ISZERO PUSH2 0x100 MUL SUB AND PUSH1 0x2 SWAP1 DIV SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 PUSH1 0x1F ADD PUSH1 0x20 SWAP1 DIV DUP2 ADD SWAP3 DUP3 PUSH1 0x1F LT PUSH3 0x304 JUMPI DUP1 MLOAD PUSH1 0xFF NOT AND DUP4 DUP1 ADD OR DUP6 SSTORE PUSH3 0x334 JUMP JUMPDEST DUP3 DUP1 ADD PUSH1 0x1 ADD DUP6 SSTORE DUP3 ISZERO PUSH3 0x334 JUMPI SWAP2 DUP3 ADD JUMPDEST DUP3 DUP2 GT ISZERO PUSH3 0x334 JUMPI DUP3 MLOAD DUP3 SSTORE SWAP2 PUSH1 0x20 ADD SWAP2 SWAP1 PUSH1 0x1 ADD SWAP1 PUSH3 0x317 JUMP JUMPDEST POP PUSH3 0x342 SWAP3 SWAP2 POP PUSH3 0x346 JUMP JUMPDEST POP SWAP1 JUMP JUMPDEST PUSH3 0x363 SWAP2 SWAP1 JUMPDEST DUP1 DUP3 GT ISZERO PUSH3 0x342 JUMPI PUSH1 0x0 DUP2 SSTORE PUSH1 0x1 ADD PUSH3 0x34D JUMP JUMPDEST SWAP1 JUMP JUMPDEST PUSH2 0xBA6 DUP1 PUSH3 0x376 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x133 JUMPI PUSH1 0x0 CALLDATALOAD PUSH29 0x100000000000000000000000000000000000000000000000000000000 SWAP1 DIV DUP1 PUSH4 0x5C975ABB GT PUSH2 0xBF JUMPI DUP1 PUSH4 0x8456CB59 GT PUSH2 0x8E JUMPI DUP1 PUSH4 0x8456CB59 EQ PUSH2 0x323 JUMPI DUP1 PUSH4 0x95D89B41 EQ PUSH2 0x32B JUMPI DUP1 PUSH4 0xA457C2D7 EQ PUSH2 0x333 JUMPI DUP1 PUSH4 0xA9059CBB EQ PUSH2 0x35F JUMPI DUP1 PUSH4 0xDD62ED3E EQ PUSH2 0x38B JUMPI PUSH2 0x133 JUMP JUMPDEST DUP1 PUSH4 0x5C975ABB EQ PUSH2 0x2C7 JUMPI DUP1 PUSH4 0x6EF8D66D EQ PUSH2 0x2CF JUMPI DUP1 PUSH4 0x70A08231 EQ PUSH2 0x2D7 JUMPI DUP1 PUSH4 0x82DC1EC4 EQ PUSH2 0x2FD JUMPI PUSH2 0x133 JUMP JUMPDEST DUP1 PUSH4 0x2FF2E9DC GT PUSH2 0x106 JUMPI DUP1 PUSH4 0x2FF2E9DC EQ PUSH2 0x245 JUMPI DUP1 PUSH4 0x313CE567 EQ PUSH2 0x24D JUMPI DUP1 PUSH4 0x39509351 EQ PUSH2 0x26B JUMPI DUP1 PUSH4 0x3F4BA83A EQ PUSH2 0x297 JUMPI DUP1 PUSH4 0x46FBF68E EQ PUSH2 0x2A1 JUMPI PUSH2 0x133 JUMP JUMPDEST DUP1 PUSH4 0x6FDDE03 EQ PUSH2 0x138 JUMPI DUP1 PUSH4 0x95EA7B3 EQ PUSH2 0x1B5 JUMPI DUP1 PUSH4 0x18160DDD EQ PUSH2 0x1F5 JUMPI DUP1 PUSH4 0x23B872DD EQ PUSH2 0x20F JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x140 PUSH2 0x3B9 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 DUP1 DUP3 MSTORE DUP4 MLOAD DUP2 DUP4 ADD MSTORE DUP4 MLOAD SWAP2 SWAP3 DUP4 SWAP3 SWAP1 DUP4 ADD SWAP2 DUP6 ADD SWAP1 DUP1 DUP4 DUP4 PUSH1 0x0 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0x17A JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x162 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x1A7 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP3 POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0x1E1 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x1CB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP2 CALLDATALOAD AND SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH2 0x44F JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 ISZERO ISZERO DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH2 0x1FD PUSH2 0x473 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH2 0x1E1 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x60 DUP2 LT ISZERO PUSH2 0x225 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP2 CALLDATALOAD DUP2 AND SWAP2 PUSH1 0x20 DUP2 ADD CALLDATALOAD SWAP1 SWAP2 AND SWAP1 PUSH1 0x40 ADD CALLDATALOAD PUSH2 0x479 JUMP JUMPDEST PUSH2 0x1FD PUSH2 0x49F JUMP JUMPDEST PUSH2 0x255 PUSH2 0x4AF JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0xFF SWAP1 SWAP3 AND DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH2 0x1E1 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x281 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP2 CALLDATALOAD AND SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH2 0x4B8 JUMP JUMPDEST PUSH2 0x29F PUSH2 0x4D5 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x1E1 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x2B7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH2 0x539 JUMP JUMPDEST PUSH2 0x1E1 PUSH2 0x552 JUMP JUMPDEST PUSH2 0x29F PUSH2 0x55B JUMP JUMPDEST PUSH2 0x1FD PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x2ED JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH2 0x566 JUMP JUMPDEST PUSH2 0x29F PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x313 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH2 0x581 JUMP JUMPDEST PUSH2 0x29F PUSH2 0x5A1 JUMP JUMPDEST PUSH2 0x140 PUSH2 0x607 JUMP JUMPDEST PUSH2 0x1E1 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x349 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP2 CALLDATALOAD AND SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH2 0x668 JUMP JUMPDEST PUSH2 0x1E1 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x375 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP2 CALLDATALOAD AND SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH2 0x685 JUMP JUMPDEST PUSH2 0x1FD PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x3A1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP2 CALLDATALOAD DUP2 AND SWAP2 PUSH1 0x20 ADD CALLDATALOAD AND PUSH2 0x6A2 JUMP JUMPDEST PUSH1 0x3 DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x1F PUSH1 0x2 PUSH1 0x0 NOT PUSH2 0x100 PUSH1 0x1 DUP9 AND ISZERO MUL ADD SWAP1 SWAP6 AND SWAP5 SWAP1 SWAP5 DIV SWAP4 DUP5 ADD DUP2 SWAP1 DIV DUP2 MUL DUP3 ADD DUP2 ADD SWAP1 SWAP3 MSTORE DUP3 DUP2 MSTORE PUSH1 0x60 SWAP4 SWAP1 SWAP3 SWAP1 SWAP2 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x445 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x41A JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x445 JUMP JUMPDEST DUP3 ADD SWAP2 SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 SWAP1 JUMPDEST DUP2 SLOAD DUP2 MSTORE SWAP1 PUSH1 0x1 ADD SWAP1 PUSH1 0x20 ADD DUP1 DUP4 GT PUSH2 0x428 JUMPI DUP3 SWAP1 SUB PUSH1 0x1F AND DUP3 ADD SWAP2 JUMPDEST POP POP POP POP POP SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x7 SLOAD PUSH1 0x0 SWAP1 PUSH1 0xFF AND ISZERO PUSH2 0x462 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x46C DUP4 DUP4 PUSH2 0x6CD JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x2 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x7 SLOAD PUSH1 0x0 SWAP1 PUSH1 0xFF AND ISZERO PUSH2 0x48C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x497 DUP5 DUP5 DUP5 PUSH2 0x74B JUMP JUMPDEST SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH12 0x33B2E3C9FD0803CE8000000 DUP2 JUMP JUMPDEST PUSH1 0x5 SLOAD PUSH1 0xFF AND SWAP1 JUMP JUMPDEST PUSH1 0x7 SLOAD PUSH1 0x0 SWAP1 PUSH1 0xFF AND ISZERO PUSH2 0x4CB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x46C DUP4 DUP4 PUSH2 0x814 JUMP JUMPDEST PUSH2 0x4DE CALLER PUSH2 0x539 JUMP JUMPDEST ISZERO ISZERO PUSH2 0x4E9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x7 SLOAD PUSH1 0xFF AND ISZERO ISZERO PUSH2 0x4FA JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x7 DUP1 SLOAD PUSH1 0xFF NOT AND SWAP1 SSTORE PUSH1 0x40 DUP1 MLOAD CALLER DUP2 MSTORE SWAP1 MLOAD PUSH32 0x5DB9EE0A495BF2E6FF9C91A7834C1BA4FDD244A5E8AA4E537BD38AEAE4B073AA SWAP2 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 LOG1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x54C PUSH1 0x6 DUP4 PUSH4 0xFFFFFFFF PUSH2 0x8C4 AND JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x7 SLOAD PUSH1 0xFF AND SWAP1 JUMP JUMPDEST PUSH2 0x564 CALLER PUSH2 0x8FB JUMP JUMPDEST JUMP JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD SWAP1 JUMP JUMPDEST PUSH2 0x58A CALLER PUSH2 0x539 JUMP JUMPDEST ISZERO ISZERO PUSH2 0x595 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x59E DUP2 PUSH2 0x943 JUMP JUMPDEST POP JUMP JUMPDEST PUSH2 0x5AA CALLER PUSH2 0x539 JUMP JUMPDEST ISZERO ISZERO PUSH2 0x5B5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x7 SLOAD PUSH1 0xFF AND ISZERO PUSH2 0x5C5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x7 DUP1 SLOAD PUSH1 0xFF NOT AND PUSH1 0x1 OR SWAP1 SSTORE PUSH1 0x40 DUP1 MLOAD CALLER DUP2 MSTORE SWAP1 MLOAD PUSH32 0x62E78CEA01BEE320CD4E420270B5EA74000D11B0C9F74754EBDBFC544B05A258 SWAP2 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 LOG1 JUMP JUMPDEST PUSH1 0x4 DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 PUSH1 0x1F PUSH1 0x2 PUSH1 0x0 NOT PUSH2 0x100 PUSH1 0x1 DUP9 AND ISZERO MUL ADD SWAP1 SWAP6 AND SWAP5 SWAP1 SWAP5 DIV SWAP4 DUP5 ADD DUP2 SWAP1 DIV DUP2 MUL DUP3 ADD DUP2 ADD SWAP1 SWAP3 MSTORE DUP3 DUP2 MSTORE PUSH1 0x60 SWAP4 SWAP1 SWAP3 SWAP1 SWAP2 DUP4 ADD DUP3 DUP3 DUP1 ISZERO PUSH2 0x445 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x41A JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x445 JUMP JUMPDEST PUSH1 0x7 SLOAD PUSH1 0x0 SWAP1 PUSH1 0xFF AND ISZERO PUSH2 0x67B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x46C DUP4 DUP4 PUSH2 0x98B JUMP JUMPDEST PUSH1 0x7 SLOAD PUSH1 0x0 SWAP1 PUSH1 0xFF AND ISZERO PUSH2 0x698 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x46C DUP4 DUP4 PUSH2 0x9D6 JUMP JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB SWAP2 DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SWAP4 SWAP1 SWAP5 AND DUP3 MSTORE SWAP2 SWAP1 SWAP2 MSTORE KECCAK256 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP4 AND ISZERO ISZERO PUSH2 0x6E4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST CALLER PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP9 AND DUP1 DUP6 MSTORE SWAP1 DUP4 MSTORE SWAP3 DUP2 SWAP1 KECCAK256 DUP7 SWAP1 SSTORE DUP1 MLOAD DUP7 DUP2 MSTORE SWAP1 MLOAD SWAP3 SWAP4 SWAP3 PUSH32 0x8C5BE1E5EBEC7D5BD14F71427D1E84F3DD0314C0F7B2291E5B200AC8C7C3B925 SWAP3 SWAP2 DUP2 SWAP1 SUB SWAP1 SWAP2 ADD SWAP1 LOG3 POP PUSH1 0x1 SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 CALLER DUP5 MSTORE SWAP1 SWAP2 MSTORE DUP2 KECCAK256 SLOAD PUSH2 0x77F SWAP1 DUP4 PUSH4 0xFFFFFFFF PUSH2 0x9EC AND JUMP JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP6 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 CALLER DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SSTORE PUSH2 0x7AE DUP5 DUP5 DUP5 PUSH2 0xA01 JUMP JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP5 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 CALLER DUP1 DUP6 MSTORE SWAP1 DUP4 MSTORE SWAP3 DUP2 SWAP1 KECCAK256 SLOAD DUP2 MLOAD SWAP1 DUP2 MSTORE SWAP1 MLOAD SWAP3 SWAP4 SWAP3 PUSH32 0x8C5BE1E5EBEC7D5BD14F71427D1E84F3DD0314C0F7B2291E5B200AC8C7C3B925 SWAP3 SWAP2 DUP2 SWAP1 SUB SWAP1 SWAP2 ADD SWAP1 LOG3 POP PUSH1 0x1 SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP4 AND ISZERO ISZERO PUSH2 0x82B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST CALLER PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP8 AND DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SLOAD PUSH2 0x85F SWAP1 DUP4 PUSH4 0xFFFFFFFF PUSH2 0xACE AND JUMP JUMPDEST CALLER PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP10 AND DUP1 DUP6 MSTORE SWAP1 DUP4 MSTORE SWAP3 DUP2 SWAP1 KECCAK256 DUP6 SWAP1 SSTORE DUP1 MLOAD SWAP5 DUP6 MSTORE MLOAD SWAP2 SWAP4 PUSH32 0x8C5BE1E5EBEC7D5BD14F71427D1E84F3DD0314C0F7B2291E5B200AC8C7C3B925 SWAP3 SWAP1 DUP2 SWAP1 SUB SWAP1 SWAP2 ADD SWAP1 LOG3 POP PUSH1 0x1 SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP3 AND ISZERO ISZERO PUSH2 0x8DB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND SWAP1 JUMP JUMPDEST PUSH2 0x90C PUSH1 0x6 DUP3 PUSH4 0xFFFFFFFF PUSH2 0xAE0 AND JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP3 AND SWAP1 PUSH32 0xCD265EBAF09DF2871CC7BD4133404A235BA12EFF2041BB89D9C714A2621C7C7E SWAP1 PUSH1 0x0 SWAP1 LOG2 POP JUMP JUMPDEST PUSH2 0x954 PUSH1 0x6 DUP3 PUSH4 0xFFFFFFFF PUSH2 0xB2C AND JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP3 AND SWAP1 PUSH32 0x6719D08C1888103BEA251A4ED56406BD0C3E69723C8A1686E017E7BBE159B6F8 SWAP1 PUSH1 0x0 SWAP1 LOG2 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP4 AND ISZERO ISZERO PUSH2 0x9A2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST CALLER PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP8 AND DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SLOAD PUSH2 0x85F SWAP1 DUP4 PUSH4 0xFFFFFFFF PUSH2 0x9EC AND JUMP JUMPDEST PUSH1 0x0 PUSH2 0x9E3 CALLER DUP5 DUP5 PUSH2 0xA01 JUMP JUMPDEST POP PUSH1 0x1 SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 GT ISZERO PUSH2 0x9FB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP SWAP1 SUB SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP3 AND ISZERO ISZERO PUSH2 0xA16 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH2 0xA3F SWAP1 DUP3 PUSH4 0xFFFFFFFF PUSH2 0x9EC AND JUMP JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP1 DUP6 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 DUP1 DUP3 KECCAK256 SWAP4 SWAP1 SWAP4 SSTORE SWAP1 DUP5 AND DUP2 MSTORE KECCAK256 SLOAD PUSH2 0xA74 SWAP1 DUP3 PUSH4 0xFFFFFFFF PUSH2 0xACE AND JUMP JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP1 DUP5 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 DUP2 DUP2 MSTORE PUSH1 0x40 SWAP2 DUP3 SWAP1 KECCAK256 SWAP5 SWAP1 SWAP5 SSTORE DUP1 MLOAD DUP6 DUP2 MSTORE SWAP1 MLOAD SWAP2 SWAP4 SWAP3 DUP8 AND SWAP3 PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF SWAP3 SWAP2 DUP3 SWAP1 SUB ADD SWAP1 LOG3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 ADD DUP4 DUP2 LT ISZERO PUSH2 0x46C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP2 AND ISZERO ISZERO PUSH2 0xAF5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xAFF DUP3 DUP3 PUSH2 0x8C4 JUMP JUMPDEST ISZERO ISZERO PUSH2 0xB0A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP1 SLOAD PUSH1 0xFF NOT AND SWAP1 SSTORE JUMP JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP2 AND ISZERO ISZERO PUSH2 0xB41 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xB4B DUP3 DUP3 PUSH2 0x8C4 JUMP JUMPDEST ISZERO PUSH2 0xB55 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP1 SLOAD PUSH1 0xFF NOT AND PUSH1 0x1 OR SWAP1 SSTORE JUMP INVALID LOG1 PUSH6 0x627A7A723058 KECCAK256 0xa8 PUSH8 0x3657C914C80AD887 SWAP15 SMOD EXTCODESIZE PUSH4 0xB3C05FD0 NOT ADD DUP9 0xd5 PUSH11 0x14948896F8205677A60029 ", + "sourceMap": "408:310:0:-;;;559:156;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;405:163:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;493:12;;405:163;;;638:2:0;;493:12:6;;:5;;405:163;493:12;:::i;:::-;-1:-1:-1;515:16:6;;;;:7;;:16;;;;;:::i;:::-;-1:-1:-1;541:9:6;:20;;-1:-1:-1;;541:20:6;;;;;;;;;;;;-1:-1:-1;275:22:2;;-1:-1:-1;286:10:2;275;;;;:22;:::i;:::-;352:7:3;:15;;-1:-1:-1;;352:15:3;;;674:33:0;680:10;518:32;674:5;;;;:33;:::i;:::-;408:310;;685:119:2;741:21;:8;754:7;741:12;;;;;;:21;:::i;:::-;777:20;;-1:-1:-1;;;;;777:20:2;;;;;;;;685:119;:::o;6198:263:5:-;-1:-1:-1;;;;;6272:21:5;;;;6264:30;;;;;;6320:12;;:23;;6337:5;6320:16;;;;;;:23;:::i;:::-;6305:12;:38;-1:-1:-1;;;;;6374:18:5;;:9;:18;;;;;;;;;;;:29;;6397:5;6374:22;;;;;;:29;:::i;:::-;-1:-1:-1;;;;;6353:18:5;;:9;:18;;;;;;;;;;;:50;;;;6418:36;;;;;;;6353:18;;:9;;6418:36;;;;;;;;;;6198:263;;:::o;259:181:1:-;-1:-1:-1;;;;;335:21:1;;;;327:30;;;;;;376:18;380:4;386:7;376:3;;;;:18;:::i;:::-;375:19;367:28;;;;;;-1:-1:-1;;;;;406:20:1;:11;:20;;;;;;;;;;;:27;;-1:-1:-1;;406:27:1;429:4;406:27;;;259:181::o;1431:145:4:-;1489:7;1520:5;;;1543:6;;;;1535:15;;;;;;1568:1;1431:145;-1:-1:-1;;;1431:145:4:o;786:162:1:-;858:4;-1:-1:-1;;;;;882:21:1;;;;874:30;;;;;;-1:-1:-1;;;;;;921:20:1;:11;:20;;;;;;;;;;;;;;;786:162::o;408:310:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;408:310:0;;;-1:-1:-1;408:310:0;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;" + }, + "gasEstimates": { + "creation": { + "codeDepositCost": "596400", + "executionCost": "infinite", + "totalCost": "infinite" + }, + "external": { + "INITIAL_SUPPLY()": "226", + "addPauser(address)": "infinite", + "allowance(address,address)": "879", + "approve(address,uint256)": "22820", + "balanceOf(address)": "731", + "decimals()": "463", + "decreaseAllowance(address,uint256)": "infinite", + "increaseAllowance(address,uint256)": "infinite", + "isPauser(address)": "infinite", + "name()": "infinite", + "pause()": "infinite", + "paused()": "438", + "renouncePauser()": "infinite", + "symbol()": "infinite", + "totalSupply()": "471", + "transfer(address,uint256)": "infinite", + "transferFrom(address,address,uint256)": "infinite", + "unpause()": "infinite" + } + }, + "methodIdentifiers": { + "INITIAL_SUPPLY()": "2ff2e9dc", + "addPauser(address)": "82dc1ec4", + "allowance(address,address)": "dd62ed3e", + "approve(address,uint256)": "095ea7b3", + "balanceOf(address)": "70a08231", + "decimals()": "313ce567", + "decreaseAllowance(address,uint256)": "a457c2d7", + "increaseAllowance(address,uint256)": "39509351", + "isPauser(address)": "46fbf68e", + "name()": "06fdde03", + "pause()": "8456cb59", + "paused()": "5c975abb", + "renouncePauser()": "6ef8d66d", + "symbol()": "95d89b41", + "totalSupply()": "18160ddd", + "transfer(address,uint256)": "a9059cbb", + "transferFrom(address,address,uint256)": "23b872dd", + "unpause()": "3f4ba83a" + } + }, + "metadata": "{\"compiler\":{\"version\":\"0.5.4+commit.9549d8ff\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"from\",\"type\":\"address\"},{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"INITIAL_SUPPLY\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"isPauser\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renouncePauser\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"addPauser\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"account\",\"type\":\"address\"}],\"name\":\"PauserAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"account\",\"type\":\"address\"}],\"name\":\"PauserRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"}],\"devdoc\":{\"methods\":{\"allowance(address,address)\":{\"details\":\"Function to check the amount of tokens that an owner allowed to a spender.\",\"params\":{\"owner\":\"address The address which owns the funds.\",\"spender\":\"address The address which will spend the funds.\"},\"return\":\"A uint256 specifying the amount of tokens still available for the spender.\"},\"balanceOf(address)\":{\"details\":\"Gets the balance of the specified address.\",\"params\":{\"owner\":\"The address to query the balance of.\"},\"return\":\"An uint256 representing the amount owned by the passed address.\"},\"decimals()\":{\"return\":\"the number of decimals of the token.\"},\"name()\":{\"return\":\"the name of the token.\"},\"pause()\":{\"details\":\"called by the owner to pause, triggers stopped state\"},\"paused()\":{\"return\":\"true if the contract is paused, false otherwise.\"},\"symbol()\":{\"return\":\"the symbol of the token.\"},\"totalSupply()\":{\"details\":\"Total number of tokens in existence\"},\"unpause()\":{\"details\":\"called by the owner to unpause, returns to normal state\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/AlgoTokenV1.sol\":\"AlgoTokenV1\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/AlgoTokenV1.sol\":{\"keccak256\":\"0xdcc3037af0c6df03d255c9499734f93c105ed0243f985fa6a75b52d96e2b5f9d\",\"urls\":[\"bzzr://2be58cc40034bf60a6bb2ef81726c354a2e8cbd63751809a8349697ba26d509d\"]},\"d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol\":{\"keccak256\":\"0x659ba0f9a3392cd50a8a5fafaf5dfd8c6a0878f6a4613bceff4e90dceddcd865\",\"urls\":[\"bzzr://f704341d520fbc98716541f1b3f67737f0ee6e94adf072a66acb2bd25d593c2b\"]},\"d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/roles/PauserRole.sol\":{\"keccak256\":\"0x6506133e295a7199df2ac5dfc52853d9d767f68450b6d0193e9d8056b164ce86\",\"urls\":[\"bzzr://357744ad2278716087860855e31728d9f99493bb4a3567a2e39a910cb219601a\"]},\"d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/lifecycle/Pausable.sol\":{\"keccak256\":\"0x3b0ed31deeba7e3c6cfbbe8092a6b427084ee390800a06acdea5c17c8185d606\",\"urls\":[\"bzzr://64665e3aefdb15dd5d2ebe3cba5103a150199e27219fc16e9d71815328e6f64f\"]},\"d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x965012d27b4262d7a41f5028cbb30c51ebd9ecd4be8fb30380aaa7a3c64fbc8b\",\"urls\":[\"bzzr://41ca38f6b0fa4b77b0feec43e422cfbec48b7eb38a41edf0b85c77e8d9a296b1\"]},\"d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0xba431353cb4fe70777ac026231eb5468e41aa1e81240a2b8136917acc5fff4dc\",\"urls\":[\"bzzr://80cd02a56e6e33504318124d0d645c82e615cc8a4b5829cc9d82d17635c644c8\"]},\"d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol\":{\"keccak256\":\"0xe195405e9993d575173cdb5dd408db7459a026b9a98085c1a3b676f020f46584\",\"urls\":[\"bzzr://4463a0d4f49767f59c02f2a987b90d48e0d31b3ed3424f3e743496f102f96044\"]},\"d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/ERC20Pausable.sol\":{\"keccak256\":\"0x37b840977505e5f6d74bc8fa3d0217facc7913d0ecf064da3e3b26494acd37de\",\"urls\":[\"bzzr://81265bcdcca15f8a460cef608b40ca729559f2afbd6e6e7124b542d28da1c890\"]},\"d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x079c4e23ee448f529e43bfa3c4e8fb4be52cd0318ee923a276835bedf45b93d8\",\"urls\":[\"bzzr://48248e86f64407a95f241d6c5c8cfea6b4d4ebf4ebb467e5c98c8af3868fafe4\"]}},\"version\":1}", + "userdoc": { + "methods": {} + } + } + }, + "d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol": { + "Roles": { + "abi": [], + "devdoc": { + "details": "Library for managing addresses assigned to a Role.", + "methods": {}, + "title": "Roles" + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea165627a7a723058205d69966d67651bfd2b7c5e5caddd667e55aa5b27b0278c4a8cb13c82ef1921600029", + "opcodes": "PUSH1 0x4C PUSH1 0x2C PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x0 DUP2 EQ PUSH1 0x1C JUMPI PUSH1 0x1E JUMP JUMPDEST INVALID JUMPDEST POP ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG1 PUSH6 0x627A7A723058 KECCAK256 0x5d PUSH10 0x966D67651BFD2B7C5E5C 0xad 0xdd PUSH7 0x7E55AA5B27B027 DUP13 0x4a DUP13 0xb1 EXTCODECOPY DUP3 0xef NOT 0x21 PUSH1 0x0 0x29 ", + "sourceMap": "108:842:1:-;;132:2:-1;166:7;155:9;146:7;137:37;252:7;246:14;243:1;238:23;232:4;229:33;270:1;265:20;;;;222:63;;265:20;274:9;222:63;;298:9;295:1;288:20;328:4;319:7;311:22;352:7;343;336:24" + }, + "gasEstimates": { + "creation": { + "codeDepositCost": "15200", + "executionCost": "116", + "totalCost": "15316" + }, + "internal": { + "add(struct Roles.Role storage pointer,address)": "infinite", + "has(struct Roles.Role storage pointer,address)": "infinite", + "remove(struct Roles.Role storage pointer,address)": "infinite" + } + }, + "methodIdentifiers": {} + }, + "metadata": "{\"compiler\":{\"version\":\"0.5.4+commit.9549d8ff\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Library for managing addresses assigned to a Role.\",\"methods\":{},\"title\":\"Roles\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol\":\"Roles\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol\":{\"keccak256\":\"0x659ba0f9a3392cd50a8a5fafaf5dfd8c6a0878f6a4613bceff4e90dceddcd865\",\"urls\":[\"bzzr://f704341d520fbc98716541f1b3f67737f0ee6e94adf072a66acb2bd25d593c2b\"]}},\"version\":1}", + "userdoc": { + "methods": {} + } + } + }, + "d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/roles/PauserRole.sol": { + "PauserRole": { + "abi": [ + { + "constant": true, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "isPauser", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renouncePauser", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "addPauser", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "account", + "type": "address" + } + ], + "name": "PauserAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "account", + "type": "address" + } + ], + "name": "PauserRemoved", + "type": "event" + } + ], + "devdoc": { + "methods": {} + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "gasEstimates": null, + "methodIdentifiers": { + "addPauser(address)": "82dc1ec4", + "isPauser(address)": "46fbf68e", + "renouncePauser()": "6ef8d66d" + } + }, + "metadata": "", + "userdoc": { + "methods": {} + } + } + }, + "d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/lifecycle/Pausable.sol": { + "Pausable": { + "abi": [ + { + "constant": false, + "inputs": [], + "name": "unpause", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "isPauser", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "paused", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renouncePauser", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "addPauser", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "pause", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "account", + "type": "address" + } + ], + "name": "PauserAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "account", + "type": "address" + } + ], + "name": "PauserRemoved", + "type": "event" + } + ], + "devdoc": { + "details": "Base contract which allows children to implement an emergency stop mechanism.", + "methods": { + "pause()": { + "details": "called by the owner to pause, triggers stopped state" + }, + "paused()": { + "return": "true if the contract is paused, false otherwise." + }, + "unpause()": { + "details": "called by the owner to unpause, returns to normal state" + } + }, + "title": "Pausable" + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "gasEstimates": null, + "methodIdentifiers": { + "addPauser(address)": "82dc1ec4", + "isPauser(address)": "46fbf68e", + "pause()": "8456cb59", + "paused()": "5c975abb", + "renouncePauser()": "6ef8d66d", + "unpause()": "3f4ba83a" + } + }, + "metadata": "", + "userdoc": { + "methods": {} + } + } + }, + "d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol": { + "SafeMath": { + "abi": [], + "devdoc": { + "details": "Unsigned math operations with safety checks that revert on error", + "methods": {}, + "title": "SafeMath" + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea165627a7a72305820009f8e16279448e3368b519ea60818fa88fd7d5cf7185ad39cac36325f88401d0029", + "opcodes": "PUSH1 0x4C PUSH1 0x2C PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x0 DUP2 EQ PUSH1 0x1C JUMPI PUSH1 0x1E JUMP JUMPDEST INVALID JUMPDEST POP ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG1 PUSH6 0x627A7A723058 KECCAK256 STOP SWAP16 DUP15 AND 0x27 SWAP5 0x48 0xe3 CALLDATASIZE DUP12 MLOAD SWAP15 0xa6 ADDMOD XOR STATICCALL DUP9 REVERT PUSH30 0x5CF7185AD39CAC36325F88401D0029000000000000000000000000000000 ", + "sourceMap": "125:1726:4:-;;132:2:-1;166:7;155:9;146:7;137:37;252:7;246:14;243:1;238:23;232:4;229:33;270:1;265:20;;;;222:63;;265:20;274:9;222:63;;298:9;295:1;288:20;328:4;319:7;311:22;352:7;343;336:24" + }, + "gasEstimates": { + "creation": { + "codeDepositCost": "15200", + "executionCost": "116", + "totalCost": "15316" + }, + "internal": { + "add(uint256,uint256)": "infinite", + "div(uint256,uint256)": "infinite", + "mod(uint256,uint256)": "infinite", + "mul(uint256,uint256)": "infinite", + "sub(uint256,uint256)": "infinite" + } + }, + "methodIdentifiers": {} + }, + "metadata": "{\"compiler\":{\"version\":\"0.5.4+commit.9549d8ff\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Unsigned math operations with safety checks that revert on error\",\"methods\":{},\"title\":\"SafeMath\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol\":\"SafeMath\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x965012d27b4262d7a41f5028cbb30c51ebd9ecd4be8fb30380aaa7a3c64fbc8b\",\"urls\":[\"bzzr://41ca38f6b0fa4b77b0feec43e422cfbec48b7eb38a41edf0b85c77e8d9a296b1\"]}},\"version\":1}", + "userdoc": { + "methods": {} + } + } + }, + "d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/ERC20.sol": { + "ERC20": { + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "spender", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "from", + "type": "address" + }, + { + "name": "to", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "spender", + "type": "address" + }, + { + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "spender", + "type": "address" + }, + { + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "to", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "owner", + "type": "address" + }, + { + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "from", + "type": "address" + }, + { + "indexed": true, + "name": "to", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + } + ], + "devdoc": { + "details": "Implementation of the basic standard token. https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md Originally based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol * This implementation emits additional Approval events, allowing applications to reconstruct the allowance status for all accounts just by listening to said events. Note that this isn't required by the specification, and other compliant implementations may not do it.", + "methods": { + "allowance(address,address)": { + "details": "Function to check the amount of tokens that an owner allowed to a spender.", + "params": { + "owner": "address The address which owns the funds.", + "spender": "address The address which will spend the funds." + }, + "return": "A uint256 specifying the amount of tokens still available for the spender." + }, + "approve(address,uint256)": { + "details": "Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729", + "params": { + "spender": "The address which will spend the funds.", + "value": "The amount of tokens to be spent." + } + }, + "balanceOf(address)": { + "details": "Gets the balance of the specified address.", + "params": { + "owner": "The address to query the balance of." + }, + "return": "An uint256 representing the amount owned by the passed address." + }, + "decreaseAllowance(address,uint256)": { + "details": "Decrease the amount of tokens that an owner allowed to a spender. approve should be called when allowed_[_spender] == 0. To decrement allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol Emits an Approval event.", + "params": { + "spender": "The address which will spend the funds.", + "subtractedValue": "The amount of tokens to decrease the allowance by." + } + }, + "increaseAllowance(address,uint256)": { + "details": "Increase the amount of tokens that an owner allowed to a spender. approve should be called when allowed_[_spender] == 0. To increment allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol Emits an Approval event.", + "params": { + "addedValue": "The amount of tokens to increase the allowance by.", + "spender": "The address which will spend the funds." + } + }, + "totalSupply()": { + "details": "Total number of tokens in existence" + }, + "transfer(address,uint256)": { + "details": "Transfer token for a specified address", + "params": { + "to": "The address to transfer to.", + "value": "The amount to be transferred." + } + }, + "transferFrom(address,address,uint256)": { + "details": "Transfer tokens from one address to another. Note that while this function emits an Approval event, this is not required as per the specification, and other compliant implementations may not emit the event.", + "params": { + "from": "address The address which you want to send tokens from", + "to": "address The address which you want to transfer to", + "value": "uint256 the amount of tokens to be transferred" + } + } + }, + "title": "Standard ERC20 token" + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "608060405234801561001057600080fd5b506105dd806100206000396000f3fe608060405234801561001057600080fd5b50600436106100a5576000357c01000000000000000000000000000000000000000000000000000000009004806370a082311161007857806370a0823114610166578063a457c2d71461018c578063a9059cbb146101b8578063dd62ed3e146101e4576100a5565b8063095ea7b3146100aa57806318160ddd146100ea57806323b872dd14610104578063395093511461013a575b600080fd5b6100d6600480360360408110156100c057600080fd5b50600160a060020a038135169060200135610212565b604080519115158252519081900360200190f35b6100f2610290565b60408051918252519081900360200190f35b6100d66004803603606081101561011a57600080fd5b50600160a060020a03813581169160208101359091169060400135610296565b6100d66004803603604081101561015057600080fd5b50600160a060020a03813516906020013561035f565b6100f26004803603602081101561017c57600080fd5b5035600160a060020a031661040f565b6100d6600480360360408110156101a257600080fd5b50600160a060020a03813516906020013561042a565b6100d6600480360360408110156101ce57600080fd5b50600160a060020a038135169060200135610475565b6100f2600480360360408110156101fa57600080fd5b50600160a060020a038135811691602001351661048b565b6000600160a060020a038316151561022957600080fd5b336000818152600160209081526040808320600160a060020a03881680855290835292819020869055805186815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a350600192915050565b60025490565b600160a060020a03831660009081526001602090815260408083203384529091528120546102ca908363ffffffff6104b616565b600160a060020a03851660009081526001602090815260408083203384529091529020556102f98484846104cb565b600160a060020a0384166000818152600160209081526040808320338085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b6000600160a060020a038316151561037657600080fd5b336000908152600160209081526040808320600160a060020a03871684529091529020546103aa908363ffffffff61059816565b336000818152600160209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a031660009081526020819052604090205490565b6000600160a060020a038316151561044157600080fd5b336000908152600160209081526040808320600160a060020a03871684529091529020546103aa908363ffffffff6104b616565b60006104823384846104cb565b50600192915050565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6000828211156104c557600080fd5b50900390565b600160a060020a03821615156104e057600080fd5b600160a060020a038316600090815260208190526040902054610509908263ffffffff6104b616565b600160a060020a03808516600090815260208190526040808220939093559084168152205461053e908263ffffffff61059816565b600160a060020a038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6000828201838110156105aa57600080fd5b939250505056fea165627a7a72305820e36c0e5397edd1025b92feed31da1b82b50b4a5f0b779dcf48bc94596302fe170029", + "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x5DD DUP1 PUSH2 0x20 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0xA5 JUMPI PUSH1 0x0 CALLDATALOAD PUSH29 0x100000000000000000000000000000000000000000000000000000000 SWAP1 DIV DUP1 PUSH4 0x70A08231 GT PUSH2 0x78 JUMPI DUP1 PUSH4 0x70A08231 EQ PUSH2 0x166 JUMPI DUP1 PUSH4 0xA457C2D7 EQ PUSH2 0x18C JUMPI DUP1 PUSH4 0xA9059CBB EQ PUSH2 0x1B8 JUMPI DUP1 PUSH4 0xDD62ED3E EQ PUSH2 0x1E4 JUMPI PUSH2 0xA5 JUMP JUMPDEST DUP1 PUSH4 0x95EA7B3 EQ PUSH2 0xAA JUMPI DUP1 PUSH4 0x18160DDD EQ PUSH2 0xEA JUMPI DUP1 PUSH4 0x23B872DD EQ PUSH2 0x104 JUMPI DUP1 PUSH4 0x39509351 EQ PUSH2 0x13A JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xD6 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0xC0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP2 CALLDATALOAD AND SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH2 0x212 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 ISZERO ISZERO DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH2 0xF2 PUSH2 0x290 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH2 0xD6 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x60 DUP2 LT ISZERO PUSH2 0x11A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP2 CALLDATALOAD DUP2 AND SWAP2 PUSH1 0x20 DUP2 ADD CALLDATALOAD SWAP1 SWAP2 AND SWAP1 PUSH1 0x40 ADD CALLDATALOAD PUSH2 0x296 JUMP JUMPDEST PUSH2 0xD6 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x150 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP2 CALLDATALOAD AND SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH2 0x35F JUMP JUMPDEST PUSH2 0xF2 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x17C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH2 0x40F JUMP JUMPDEST PUSH2 0xD6 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x1A2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP2 CALLDATALOAD AND SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH2 0x42A JUMP JUMPDEST PUSH2 0xD6 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x1CE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP2 CALLDATALOAD AND SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH2 0x475 JUMP JUMPDEST PUSH2 0xF2 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x1FA JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP2 CALLDATALOAD DUP2 AND SWAP2 PUSH1 0x20 ADD CALLDATALOAD AND PUSH2 0x48B JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP4 AND ISZERO ISZERO PUSH2 0x229 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST CALLER PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP9 AND DUP1 DUP6 MSTORE SWAP1 DUP4 MSTORE SWAP3 DUP2 SWAP1 KECCAK256 DUP7 SWAP1 SSTORE DUP1 MLOAD DUP7 DUP2 MSTORE SWAP1 MLOAD SWAP3 SWAP4 SWAP3 PUSH32 0x8C5BE1E5EBEC7D5BD14F71427D1E84F3DD0314C0F7B2291E5B200AC8C7C3B925 SWAP3 SWAP2 DUP2 SWAP1 SUB SWAP1 SWAP2 ADD SWAP1 LOG3 POP PUSH1 0x1 SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x2 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 CALLER DUP5 MSTORE SWAP1 SWAP2 MSTORE DUP2 KECCAK256 SLOAD PUSH2 0x2CA SWAP1 DUP4 PUSH4 0xFFFFFFFF PUSH2 0x4B6 AND JUMP JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP6 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 CALLER DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SSTORE PUSH2 0x2F9 DUP5 DUP5 DUP5 PUSH2 0x4CB JUMP JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP5 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 CALLER DUP1 DUP6 MSTORE SWAP1 DUP4 MSTORE SWAP3 DUP2 SWAP1 KECCAK256 SLOAD DUP2 MLOAD SWAP1 DUP2 MSTORE SWAP1 MLOAD SWAP3 SWAP4 SWAP3 PUSH32 0x8C5BE1E5EBEC7D5BD14F71427D1E84F3DD0314C0F7B2291E5B200AC8C7C3B925 SWAP3 SWAP2 DUP2 SWAP1 SUB SWAP1 SWAP2 ADD SWAP1 LOG3 POP PUSH1 0x1 SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP4 AND ISZERO ISZERO PUSH2 0x376 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST CALLER PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP8 AND DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SLOAD PUSH2 0x3AA SWAP1 DUP4 PUSH4 0xFFFFFFFF PUSH2 0x598 AND JUMP JUMPDEST CALLER PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP10 AND DUP1 DUP6 MSTORE SWAP1 DUP4 MSTORE SWAP3 DUP2 SWAP1 KECCAK256 DUP6 SWAP1 SSTORE DUP1 MLOAD SWAP5 DUP6 MSTORE MLOAD SWAP2 SWAP4 PUSH32 0x8C5BE1E5EBEC7D5BD14F71427D1E84F3DD0314C0F7B2291E5B200AC8C7C3B925 SWAP3 SWAP1 DUP2 SWAP1 SUB SWAP1 SWAP2 ADD SWAP1 LOG3 POP PUSH1 0x1 SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP4 AND ISZERO ISZERO PUSH2 0x441 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST CALLER PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP8 AND DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SLOAD PUSH2 0x3AA SWAP1 DUP4 PUSH4 0xFFFFFFFF PUSH2 0x4B6 AND JUMP JUMPDEST PUSH1 0x0 PUSH2 0x482 CALLER DUP5 DUP5 PUSH2 0x4CB JUMP JUMPDEST POP PUSH1 0x1 SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB SWAP2 DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SWAP4 SWAP1 SWAP5 AND DUP3 MSTORE SWAP2 SWAP1 SWAP2 MSTORE KECCAK256 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 GT ISZERO PUSH2 0x4C5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP SWAP1 SUB SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP3 AND ISZERO ISZERO PUSH2 0x4E0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH2 0x509 SWAP1 DUP3 PUSH4 0xFFFFFFFF PUSH2 0x4B6 AND JUMP JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP1 DUP6 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 DUP1 DUP3 KECCAK256 SWAP4 SWAP1 SWAP4 SSTORE SWAP1 DUP5 AND DUP2 MSTORE KECCAK256 SLOAD PUSH2 0x53E SWAP1 DUP3 PUSH4 0xFFFFFFFF PUSH2 0x598 AND JUMP JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP1 DUP5 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 DUP2 DUP2 MSTORE PUSH1 0x40 SWAP2 DUP3 SWAP1 KECCAK256 SWAP5 SWAP1 SWAP5 SSTORE DUP1 MLOAD DUP6 DUP2 MSTORE SWAP1 MLOAD SWAP2 SWAP4 SWAP3 DUP8 AND SWAP3 PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF SWAP3 SWAP2 DUP3 SWAP1 SUB ADD SWAP1 LOG3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 ADD DUP4 DUP2 LT ISZERO PUSH2 0x5AA JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP4 SWAP3 POP POP POP JUMP INVALID LOG1 PUSH6 0x627A7A723058 KECCAK256 0xe3 PUSH13 0xE5397EDD1025B92FEED31DA1B DUP3 0xb5 SIGNEXTEND 0x4a 0x5f SIGNEXTEND PUSH24 0x9DCF48BC94596302FE170029000000000000000000000000 ", + "sourceMap": "649:6947:5:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;649:6947:5;;;;;;;" + }, + "gasEstimates": { + "creation": { + "codeDepositCost": "300200", + "executionCost": "337", + "totalCost": "300537" + }, + "external": { + "allowance(address,address)": "835", + "approve(address,uint256)": "22501", + "balanceOf(address)": "664", + "decreaseAllowance(address,uint256)": "infinite", + "increaseAllowance(address,uint256)": "infinite", + "totalSupply()": "426", + "transfer(address,uint256)": "infinite", + "transferFrom(address,address,uint256)": "infinite" + }, + "internal": { + "_burn(address,uint256)": "infinite", + "_burnFrom(address,uint256)": "infinite", + "_mint(address,uint256)": "infinite", + "_transfer(address,address,uint256)": "infinite" + } + }, + "methodIdentifiers": { + "allowance(address,address)": "dd62ed3e", + "approve(address,uint256)": "095ea7b3", + "balanceOf(address)": "70a08231", + "decreaseAllowance(address,uint256)": "a457c2d7", + "increaseAllowance(address,uint256)": "39509351", + "totalSupply()": "18160ddd", + "transfer(address,uint256)": "a9059cbb", + "transferFrom(address,address,uint256)": "23b872dd" + } + }, + "metadata": "{\"compiler\":{\"version\":\"0.5.4+commit.9549d8ff\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"from\",\"type\":\"address\"},{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"}],\"devdoc\":{\"details\":\"Implementation of the basic standard token. https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md Originally based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol * This implementation emits additional Approval events, allowing applications to reconstruct the allowance status for all accounts just by listening to said events. Note that this isn't required by the specification, and other compliant implementations may not do it.\",\"methods\":{\"allowance(address,address)\":{\"details\":\"Function to check the amount of tokens that an owner allowed to a spender.\",\"params\":{\"owner\":\"address The address which owns the funds.\",\"spender\":\"address The address which will spend the funds.\"},\"return\":\"A uint256 specifying the amount of tokens still available for the spender.\"},\"approve(address,uint256)\":{\"details\":\"Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\",\"params\":{\"spender\":\"The address which will spend the funds.\",\"value\":\"The amount of tokens to be spent.\"}},\"balanceOf(address)\":{\"details\":\"Gets the balance of the specified address.\",\"params\":{\"owner\":\"The address to query the balance of.\"},\"return\":\"An uint256 representing the amount owned by the passed address.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Decrease the amount of tokens that an owner allowed to a spender. approve should be called when allowed_[_spender] == 0. To decrement allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol Emits an Approval event.\",\"params\":{\"spender\":\"The address which will spend the funds.\",\"subtractedValue\":\"The amount of tokens to decrease the allowance by.\"}},\"increaseAllowance(address,uint256)\":{\"details\":\"Increase the amount of tokens that an owner allowed to a spender. approve should be called when allowed_[_spender] == 0. To increment allowed value is better to use this function to avoid 2 calls (and wait until the first transaction is mined) From MonolithDAO Token.sol Emits an Approval event.\",\"params\":{\"addedValue\":\"The amount of tokens to increase the allowance by.\",\"spender\":\"The address which will spend the funds.\"}},\"totalSupply()\":{\"details\":\"Total number of tokens in existence\"},\"transfer(address,uint256)\":{\"details\":\"Transfer token for a specified address\",\"params\":{\"to\":\"The address to transfer to.\",\"value\":\"The amount to be transferred.\"}},\"transferFrom(address,address,uint256)\":{\"details\":\"Transfer tokens from one address to another. Note that while this function emits an Approval event, this is not required as per the specification, and other compliant implementations may not emit the event.\",\"params\":{\"from\":\"address The address which you want to send tokens from\",\"to\":\"address The address which you want to transfer to\",\"value\":\"uint256 the amount of tokens to be transferred\"}}},\"title\":\"Standard ERC20 token\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\":\"ERC20\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x965012d27b4262d7a41f5028cbb30c51ebd9ecd4be8fb30380aaa7a3c64fbc8b\",\"urls\":[\"bzzr://41ca38f6b0fa4b77b0feec43e422cfbec48b7eb38a41edf0b85c77e8d9a296b1\"]},\"d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0xba431353cb4fe70777ac026231eb5468e41aa1e81240a2b8136917acc5fff4dc\",\"urls\":[\"bzzr://80cd02a56e6e33504318124d0d645c82e615cc8a4b5829cc9d82d17635c644c8\"]},\"d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x079c4e23ee448f529e43bfa3c4e8fb4be52cd0318ee923a276835bedf45b93d8\",\"urls\":[\"bzzr://48248e86f64407a95f241d6c5c8cfea6b4d4ebf4ebb467e5c98c8af3868fafe4\"]}},\"version\":1}", + "userdoc": { + "methods": {} + } + } + }, + "d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol": { + "ERC20Detailed": { + "abi": [ + { + "constant": true, + "inputs": [], + "name": "name", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "spender", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "from", + "type": "address" + }, + { + "name": "to", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "decimals", + "outputs": [ + { + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "who", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "symbol", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "to", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "owner", + "type": "address" + }, + { + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "name": "name", + "type": "string" + }, + { + "name": "symbol", + "type": "string" + }, + { + "name": "decimals", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "from", + "type": "address" + }, + { + "indexed": true, + "name": "to", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + } + ], + "devdoc": { + "details": "The decimals are only for visualization purposes. All the operations are done using the smallest and indivisible token unit, just as on Ethereum all the operations are done in wei.", + "methods": { + "decimals()": { + "return": "the number of decimals of the token." + }, + "name()": { + "return": "the name of the token." + }, + "symbol()": { + "return": "the symbol of the token." + } + }, + "title": "ERC20Detailed token" + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "gasEstimates": null, + "methodIdentifiers": { + "allowance(address,address)": "dd62ed3e", + "approve(address,uint256)": "095ea7b3", + "balanceOf(address)": "70a08231", + "decimals()": "313ce567", + "name()": "06fdde03", + "symbol()": "95d89b41", + "totalSupply()": "18160ddd", + "transfer(address,uint256)": "a9059cbb", + "transferFrom(address,address,uint256)": "23b872dd" + } + }, + "metadata": "", + "userdoc": { + "methods": {} + } + } + }, + "d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/ERC20Pausable.sol": { + "ERC20Pausable": { + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "spender", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "from", + "type": "address" + }, + { + "name": "to", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "spender", + "type": "address" + }, + { + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "unpause", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "isPauser", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "paused", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renouncePauser", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "addPauser", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "pause", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "spender", + "type": "address" + }, + { + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "to", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "owner", + "type": "address" + }, + { + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "account", + "type": "address" + } + ], + "name": "PauserAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "account", + "type": "address" + } + ], + "name": "PauserRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "from", + "type": "address" + }, + { + "indexed": true, + "name": "to", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + } + ], + "devdoc": { + "details": "ERC20 modified with pausable transfers.*", + "methods": { + "allowance(address,address)": { + "details": "Function to check the amount of tokens that an owner allowed to a spender.", + "params": { + "owner": "address The address which owns the funds.", + "spender": "address The address which will spend the funds." + }, + "return": "A uint256 specifying the amount of tokens still available for the spender." + }, + "balanceOf(address)": { + "details": "Gets the balance of the specified address.", + "params": { + "owner": "The address to query the balance of." + }, + "return": "An uint256 representing the amount owned by the passed address." + }, + "pause()": { + "details": "called by the owner to pause, triggers stopped state" + }, + "paused()": { + "return": "true if the contract is paused, false otherwise." + }, + "totalSupply()": { + "details": "Total number of tokens in existence" + }, + "unpause()": { + "details": "called by the owner to unpause, returns to normal state" + } + }, + "title": "Pausable token" + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "608060405261001633640100000000610025810204565b6004805460ff19169055610102565b61003d60038264010000000061094561007482021704565b604051600160a060020a038216907f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f890600090a250565b600160a060020a038116151561008957600080fd5b61009c82826401000000006100cb810204565b156100a657600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b6000600160a060020a03821615156100e257600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b6109bf806101116000396000f3fe608060405234801561001057600080fd5b5060043610610107576000357c0100000000000000000000000000000000000000000000000000000000900480636ef8d66d116100a95780638456cb59116100835780638456cb5914610254578063a457c2d71461025c578063a9059cbb14610288578063dd62ed3e146102b457610107565b80636ef8d66d1461020057806370a082311461020857806382dc1ec41461022e57610107565b806339509351116100e5578063395093511461019c5780633f4ba83a146101c857806346fbf68e146101d25780635c975abb146101f857610107565b8063095ea7b31461010c57806318160ddd1461014c57806323b872dd14610166575b600080fd5b6101386004803603604081101561012257600080fd5b50600160a060020a0381351690602001356102e2565b604080519115158252519081900360200190f35b610154610306565b60408051918252519081900360200190f35b6101386004803603606081101561017c57600080fd5b50600160a060020a0381358116916020810135909116906040013561030c565b610138600480360360408110156101b257600080fd5b50600160a060020a038135169060200135610332565b6101d061034f565b005b610138600480360360208110156101e857600080fd5b5035600160a060020a03166103b3565b6101386103cc565b6101d06103d5565b6101546004803603602081101561021e57600080fd5b5035600160a060020a03166103e0565b6101d06004803603602081101561024457600080fd5b5035600160a060020a03166103fb565b6101d061041b565b6101386004803603604081101561027257600080fd5b50600160a060020a038135169060200135610481565b6101386004803603604081101561029e57600080fd5b50600160a060020a03813516906020013561049e565b610154600480360360408110156102ca57600080fd5b50600160a060020a03813581169160200135166104bb565b60045460009060ff16156102f557600080fd5b6102ff83836104e6565b9392505050565b60025490565b60045460009060ff161561031f57600080fd5b61032a848484610564565b949350505050565b60045460009060ff161561034557600080fd5b6102ff838361062d565b610358336103b3565b151561036357600080fd5b60045460ff16151561037457600080fd5b6004805460ff191690556040805133815290517f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa9181900360200190a1565b60006103c660038363ffffffff6106dd16565b92915050565b60045460ff1690565b6103de33610714565b565b600160a060020a031660009081526020819052604090205490565b610404336103b3565b151561040f57600080fd5b6104188161075c565b50565b610424336103b3565b151561042f57600080fd5b60045460ff161561043f57600080fd5b6004805460ff191660011790556040805133815290517f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2589181900360200190a1565b60045460009060ff161561049457600080fd5b6102ff83836107a4565b60045460009060ff16156104b157600080fd5b6102ff83836107ef565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6000600160a060020a03831615156104fd57600080fd5b336000818152600160209081526040808320600160a060020a03881680855290835292819020869055805186815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a350600192915050565b600160a060020a0383166000908152600160209081526040808320338452909152812054610598908363ffffffff61080516565b600160a060020a03851660009081526001602090815260408083203384529091529020556105c784848461081a565b600160a060020a0384166000818152600160209081526040808320338085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b6000600160a060020a038316151561064457600080fd5b336000908152600160209081526040808320600160a060020a0387168452909152902054610678908363ffffffff6108e716565b336000818152600160209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b6000600160a060020a03821615156106f457600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b61072560038263ffffffff6108f916565b604051600160a060020a038216907fcd265ebaf09df2871cc7bd4133404a235ba12eff2041bb89d9c714a2621c7c7e90600090a250565b61076d60038263ffffffff61094516565b604051600160a060020a038216907f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f890600090a250565b6000600160a060020a03831615156107bb57600080fd5b336000908152600160209081526040808320600160a060020a0387168452909152902054610678908363ffffffff61080516565b60006107fc33848461081a565b50600192915050565b60008282111561081457600080fd5b50900390565b600160a060020a038216151561082f57600080fd5b600160a060020a038316600090815260208190526040902054610858908263ffffffff61080516565b600160a060020a03808516600090815260208190526040808220939093559084168152205461088d908263ffffffff6108e716565b600160a060020a038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6000828201838110156102ff57600080fd5b600160a060020a038116151561090e57600080fd5b61091882826106dd565b151561092357600080fd5b600160a060020a0316600090815260209190915260409020805460ff19169055565b600160a060020a038116151561095a57600080fd5b61096482826106dd565b1561096e57600080fd5b600160a060020a0316600090815260209190915260409020805460ff1916600117905556fea165627a7a723058209b9f6d57f3339392d2370056a1b0d3f8b34a52c54183a75740f4e2c02a5001f60029", + "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE PUSH2 0x16 CALLER PUSH5 0x100000000 PUSH2 0x25 DUP2 MUL DIV JUMP JUMPDEST PUSH1 0x4 DUP1 SLOAD PUSH1 0xFF NOT AND SWAP1 SSTORE PUSH2 0x102 JUMP JUMPDEST PUSH2 0x3D PUSH1 0x3 DUP3 PUSH5 0x100000000 PUSH2 0x945 PUSH2 0x74 DUP3 MUL OR DIV JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP3 AND SWAP1 PUSH32 0x6719D08C1888103BEA251A4ED56406BD0C3E69723C8A1686E017E7BBE159B6F8 SWAP1 PUSH1 0x0 SWAP1 LOG2 POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP2 AND ISZERO ISZERO PUSH2 0x89 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x9C DUP3 DUP3 PUSH5 0x100000000 PUSH2 0xCB DUP2 MUL DIV JUMP JUMPDEST ISZERO PUSH2 0xA6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP1 SLOAD PUSH1 0xFF NOT AND PUSH1 0x1 OR SWAP1 SSTORE JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP3 AND ISZERO ISZERO PUSH2 0xE2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND SWAP1 JUMP JUMPDEST PUSH2 0x9BF DUP1 PUSH2 0x111 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x107 JUMPI PUSH1 0x0 CALLDATALOAD PUSH29 0x100000000000000000000000000000000000000000000000000000000 SWAP1 DIV DUP1 PUSH4 0x6EF8D66D GT PUSH2 0xA9 JUMPI DUP1 PUSH4 0x8456CB59 GT PUSH2 0x83 JUMPI DUP1 PUSH4 0x8456CB59 EQ PUSH2 0x254 JUMPI DUP1 PUSH4 0xA457C2D7 EQ PUSH2 0x25C JUMPI DUP1 PUSH4 0xA9059CBB EQ PUSH2 0x288 JUMPI DUP1 PUSH4 0xDD62ED3E EQ PUSH2 0x2B4 JUMPI PUSH2 0x107 JUMP JUMPDEST DUP1 PUSH4 0x6EF8D66D EQ PUSH2 0x200 JUMPI DUP1 PUSH4 0x70A08231 EQ PUSH2 0x208 JUMPI DUP1 PUSH4 0x82DC1EC4 EQ PUSH2 0x22E JUMPI PUSH2 0x107 JUMP JUMPDEST DUP1 PUSH4 0x39509351 GT PUSH2 0xE5 JUMPI DUP1 PUSH4 0x39509351 EQ PUSH2 0x19C JUMPI DUP1 PUSH4 0x3F4BA83A EQ PUSH2 0x1C8 JUMPI DUP1 PUSH4 0x46FBF68E EQ PUSH2 0x1D2 JUMPI DUP1 PUSH4 0x5C975ABB EQ PUSH2 0x1F8 JUMPI PUSH2 0x107 JUMP JUMPDEST DUP1 PUSH4 0x95EA7B3 EQ PUSH2 0x10C JUMPI DUP1 PUSH4 0x18160DDD EQ PUSH2 0x14C JUMPI DUP1 PUSH4 0x23B872DD EQ PUSH2 0x166 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x138 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x122 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP2 CALLDATALOAD AND SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH2 0x2E2 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 ISZERO ISZERO DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH2 0x154 PUSH2 0x306 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH2 0x138 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x60 DUP2 LT ISZERO PUSH2 0x17C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP2 CALLDATALOAD DUP2 AND SWAP2 PUSH1 0x20 DUP2 ADD CALLDATALOAD SWAP1 SWAP2 AND SWAP1 PUSH1 0x40 ADD CALLDATALOAD PUSH2 0x30C JUMP JUMPDEST PUSH2 0x138 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x1B2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP2 CALLDATALOAD AND SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH2 0x332 JUMP JUMPDEST PUSH2 0x1D0 PUSH2 0x34F JUMP JUMPDEST STOP JUMPDEST PUSH2 0x138 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x1E8 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH2 0x3B3 JUMP JUMPDEST PUSH2 0x138 PUSH2 0x3CC JUMP JUMPDEST PUSH2 0x1D0 PUSH2 0x3D5 JUMP JUMPDEST PUSH2 0x154 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x21E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH2 0x3E0 JUMP JUMPDEST PUSH2 0x1D0 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x244 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH2 0x3FB JUMP JUMPDEST PUSH2 0x1D0 PUSH2 0x41B JUMP JUMPDEST PUSH2 0x138 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x272 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP2 CALLDATALOAD AND SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH2 0x481 JUMP JUMPDEST PUSH2 0x138 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x29E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP2 CALLDATALOAD AND SWAP1 PUSH1 0x20 ADD CALLDATALOAD PUSH2 0x49E JUMP JUMPDEST PUSH2 0x154 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x2CA JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP2 CALLDATALOAD DUP2 AND SWAP2 PUSH1 0x20 ADD CALLDATALOAD AND PUSH2 0x4BB JUMP JUMPDEST PUSH1 0x4 SLOAD PUSH1 0x0 SWAP1 PUSH1 0xFF AND ISZERO PUSH2 0x2F5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x2FF DUP4 DUP4 PUSH2 0x4E6 JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x2 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x4 SLOAD PUSH1 0x0 SWAP1 PUSH1 0xFF AND ISZERO PUSH2 0x31F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x32A DUP5 DUP5 DUP5 PUSH2 0x564 JUMP JUMPDEST SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x4 SLOAD PUSH1 0x0 SWAP1 PUSH1 0xFF AND ISZERO PUSH2 0x345 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x2FF DUP4 DUP4 PUSH2 0x62D JUMP JUMPDEST PUSH2 0x358 CALLER PUSH2 0x3B3 JUMP JUMPDEST ISZERO ISZERO PUSH2 0x363 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x4 SLOAD PUSH1 0xFF AND ISZERO ISZERO PUSH2 0x374 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x4 DUP1 SLOAD PUSH1 0xFF NOT AND SWAP1 SSTORE PUSH1 0x40 DUP1 MLOAD CALLER DUP2 MSTORE SWAP1 MLOAD PUSH32 0x5DB9EE0A495BF2E6FF9C91A7834C1BA4FDD244A5E8AA4E537BD38AEAE4B073AA SWAP2 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 LOG1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x3C6 PUSH1 0x3 DUP4 PUSH4 0xFFFFFFFF PUSH2 0x6DD AND JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x4 SLOAD PUSH1 0xFF AND SWAP1 JUMP JUMPDEST PUSH2 0x3DE CALLER PUSH2 0x714 JUMP JUMPDEST JUMP JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD SWAP1 JUMP JUMPDEST PUSH2 0x404 CALLER PUSH2 0x3B3 JUMP JUMPDEST ISZERO ISZERO PUSH2 0x40F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x418 DUP2 PUSH2 0x75C JUMP JUMPDEST POP JUMP JUMPDEST PUSH2 0x424 CALLER PUSH2 0x3B3 JUMP JUMPDEST ISZERO ISZERO PUSH2 0x42F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x4 SLOAD PUSH1 0xFF AND ISZERO PUSH2 0x43F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x4 DUP1 SLOAD PUSH1 0xFF NOT AND PUSH1 0x1 OR SWAP1 SSTORE PUSH1 0x40 DUP1 MLOAD CALLER DUP2 MSTORE SWAP1 MLOAD PUSH32 0x62E78CEA01BEE320CD4E420270B5EA74000D11B0C9F74754EBDBFC544B05A258 SWAP2 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 LOG1 JUMP JUMPDEST PUSH1 0x4 SLOAD PUSH1 0x0 SWAP1 PUSH1 0xFF AND ISZERO PUSH2 0x494 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x2FF DUP4 DUP4 PUSH2 0x7A4 JUMP JUMPDEST PUSH1 0x4 SLOAD PUSH1 0x0 SWAP1 PUSH1 0xFF AND ISZERO PUSH2 0x4B1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x2FF DUP4 DUP4 PUSH2 0x7EF JUMP JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB SWAP2 DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 SWAP4 SWAP1 SWAP5 AND DUP3 MSTORE SWAP2 SWAP1 SWAP2 MSTORE KECCAK256 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP4 AND ISZERO ISZERO PUSH2 0x4FD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST CALLER PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP9 AND DUP1 DUP6 MSTORE SWAP1 DUP4 MSTORE SWAP3 DUP2 SWAP1 KECCAK256 DUP7 SWAP1 SSTORE DUP1 MLOAD DUP7 DUP2 MSTORE SWAP1 MLOAD SWAP3 SWAP4 SWAP3 PUSH32 0x8C5BE1E5EBEC7D5BD14F71427D1E84F3DD0314C0F7B2291E5B200AC8C7C3B925 SWAP3 SWAP2 DUP2 SWAP1 SUB SWAP1 SWAP2 ADD SWAP1 LOG3 POP PUSH1 0x1 SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 CALLER DUP5 MSTORE SWAP1 SWAP2 MSTORE DUP2 KECCAK256 SLOAD PUSH2 0x598 SWAP1 DUP4 PUSH4 0xFFFFFFFF PUSH2 0x805 AND JUMP JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP6 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 CALLER DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SSTORE PUSH2 0x5C7 DUP5 DUP5 DUP5 PUSH2 0x81A JUMP JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP5 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 CALLER DUP1 DUP6 MSTORE SWAP1 DUP4 MSTORE SWAP3 DUP2 SWAP1 KECCAK256 SLOAD DUP2 MLOAD SWAP1 DUP2 MSTORE SWAP1 MLOAD SWAP3 SWAP4 SWAP3 PUSH32 0x8C5BE1E5EBEC7D5BD14F71427D1E84F3DD0314C0F7B2291E5B200AC8C7C3B925 SWAP3 SWAP2 DUP2 SWAP1 SUB SWAP1 SWAP2 ADD SWAP1 LOG3 POP PUSH1 0x1 SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP4 AND ISZERO ISZERO PUSH2 0x644 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST CALLER PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP8 AND DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SLOAD PUSH2 0x678 SWAP1 DUP4 PUSH4 0xFFFFFFFF PUSH2 0x8E7 AND JUMP JUMPDEST CALLER PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP10 AND DUP1 DUP6 MSTORE SWAP1 DUP4 MSTORE SWAP3 DUP2 SWAP1 KECCAK256 DUP6 SWAP1 SSTORE DUP1 MLOAD SWAP5 DUP6 MSTORE MLOAD SWAP2 SWAP4 PUSH32 0x8C5BE1E5EBEC7D5BD14F71427D1E84F3DD0314C0F7B2291E5B200AC8C7C3B925 SWAP3 SWAP1 DUP2 SWAP1 SUB SWAP1 SWAP2 ADD SWAP1 LOG3 POP PUSH1 0x1 SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP3 AND ISZERO ISZERO PUSH2 0x6F4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND SWAP1 JUMP JUMPDEST PUSH2 0x725 PUSH1 0x3 DUP3 PUSH4 0xFFFFFFFF PUSH2 0x8F9 AND JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP3 AND SWAP1 PUSH32 0xCD265EBAF09DF2871CC7BD4133404A235BA12EFF2041BB89D9C714A2621C7C7E SWAP1 PUSH1 0x0 SWAP1 LOG2 POP JUMP JUMPDEST PUSH2 0x76D PUSH1 0x3 DUP3 PUSH4 0xFFFFFFFF PUSH2 0x945 AND JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP3 AND SWAP1 PUSH32 0x6719D08C1888103BEA251A4ED56406BD0C3E69723C8A1686E017E7BBE159B6F8 SWAP1 PUSH1 0x0 SWAP1 LOG2 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP4 AND ISZERO ISZERO PUSH2 0x7BB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST CALLER PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 KECCAK256 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP8 AND DUP5 MSTORE SWAP1 SWAP2 MSTORE SWAP1 KECCAK256 SLOAD PUSH2 0x678 SWAP1 DUP4 PUSH4 0xFFFFFFFF PUSH2 0x805 AND JUMP JUMPDEST PUSH1 0x0 PUSH2 0x7FC CALLER DUP5 DUP5 PUSH2 0x81A JUMP JUMPDEST POP PUSH1 0x1 SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 GT ISZERO PUSH2 0x814 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP SWAP1 SUB SWAP1 JUMP JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP3 AND ISZERO ISZERO PUSH2 0x82F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH2 0x858 SWAP1 DUP3 PUSH4 0xFFFFFFFF PUSH2 0x805 AND JUMP JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP1 DUP6 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 DUP1 DUP3 KECCAK256 SWAP4 SWAP1 SWAP4 SSTORE SWAP1 DUP5 AND DUP2 MSTORE KECCAK256 SLOAD PUSH2 0x88D SWAP1 DUP3 PUSH4 0xFFFFFFFF PUSH2 0x8E7 AND JUMP JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP1 DUP5 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 DUP2 DUP2 MSTORE PUSH1 0x40 SWAP2 DUP3 SWAP1 KECCAK256 SWAP5 SWAP1 SWAP5 SSTORE DUP1 MLOAD DUP6 DUP2 MSTORE SWAP1 MLOAD SWAP2 SWAP4 SWAP3 DUP8 AND SWAP3 PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF SWAP3 SWAP2 DUP3 SWAP1 SUB ADD SWAP1 LOG3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP3 DUP3 ADD DUP4 DUP2 LT ISZERO PUSH2 0x2FF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP2 AND ISZERO ISZERO PUSH2 0x90E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x918 DUP3 DUP3 PUSH2 0x6DD JUMP JUMPDEST ISZERO ISZERO PUSH2 0x923 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP1 SLOAD PUSH1 0xFF NOT AND SWAP1 SSTORE JUMP JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP2 AND ISZERO ISZERO PUSH2 0x95A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x964 DUP3 DUP3 PUSH2 0x6DD JUMP JUMPDEST ISZERO PUSH2 0x96E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP1 SLOAD PUSH1 0xFF NOT AND PUSH1 0x1 OR SWAP1 SSTORE JUMP INVALID LOG1 PUSH6 0x627A7A723058 KECCAK256 SWAP12 SWAP16 PUSH14 0x57F3339392D2370056A1B0D3F8B3 0x4a MSTORE 0xc5 COINBASE DUP4 0xa7 JUMPI BLOCKHASH DELEGATECALL 0xe2 0xc0 0x2a POP ADD 0xf6 STOP 0x29 ", + "sourceMap": "169:856:7:-;;;275:22:2;286:10;275;;;;:22;:::i;:::-;352:7:3;:15;;-1:-1:-1;;352:15:3;;;169:856:7;;685:119:2;741:21;:8;754:7;741:12;;;;;;:21;:::i;:::-;777:20;;-1:-1:-1;;;;;777:20:2;;;;;;;;685:119;:::o;259:181:1:-;-1:-1:-1;;;;;335:21:1;;;;327:30;;;;;;376:18;380:4;386:7;376:3;;;;:18;:::i;:::-;375:19;367:28;;;;;;-1:-1:-1;;;;;406:20:1;:11;:20;;;;;;;;;;;:27;;-1:-1:-1;;406:27:1;429:4;406:27;;;259:181::o;786:162::-;858:4;-1:-1:-1;;;;;882:21:1;;;;874:30;;;;;;-1:-1:-1;;;;;;921:20:1;:11;:20;;;;;;;;;;;;;;;786:162::o;169:856:7:-;;;;;;;" + }, + "gasEstimates": { + "creation": { + "codeDepositCost": "499000", + "executionCost": "infinite", + "totalCost": "infinite" + }, + "external": { + "addPauser(address)": "infinite", + "allowance(address,address)": "857", + "approve(address,uint256)": "22798", + "balanceOf(address)": "709", + "decreaseAllowance(address,uint256)": "infinite", + "increaseAllowance(address,uint256)": "infinite", + "isPauser(address)": "infinite", + "pause()": "infinite", + "paused()": "504", + "renouncePauser()": "infinite", + "totalSupply()": "449", + "transfer(address,uint256)": "infinite", + "transferFrom(address,address,uint256)": "infinite", + "unpause()": "infinite" + } + }, + "methodIdentifiers": { + "addPauser(address)": "82dc1ec4", + "allowance(address,address)": "dd62ed3e", + "approve(address,uint256)": "095ea7b3", + "balanceOf(address)": "70a08231", + "decreaseAllowance(address,uint256)": "a457c2d7", + "increaseAllowance(address,uint256)": "39509351", + "isPauser(address)": "46fbf68e", + "pause()": "8456cb59", + "paused()": "5c975abb", + "renouncePauser()": "6ef8d66d", + "totalSupply()": "18160ddd", + "transfer(address,uint256)": "a9059cbb", + "transferFrom(address,address,uint256)": "23b872dd", + "unpause()": "3f4ba83a" + } + }, + "metadata": "{\"compiler\":{\"version\":\"0.5.4+commit.9549d8ff\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"from\",\"type\":\"address\"},{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"isPauser\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renouncePauser\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"addPauser\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"account\",\"type\":\"address\"}],\"name\":\"PauserAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"account\",\"type\":\"address\"}],\"name\":\"PauserRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"}],\"devdoc\":{\"details\":\"ERC20 modified with pausable transfers.*\",\"methods\":{\"allowance(address,address)\":{\"details\":\"Function to check the amount of tokens that an owner allowed to a spender.\",\"params\":{\"owner\":\"address The address which owns the funds.\",\"spender\":\"address The address which will spend the funds.\"},\"return\":\"A uint256 specifying the amount of tokens still available for the spender.\"},\"balanceOf(address)\":{\"details\":\"Gets the balance of the specified address.\",\"params\":{\"owner\":\"The address to query the balance of.\"},\"return\":\"An uint256 representing the amount owned by the passed address.\"},\"pause()\":{\"details\":\"called by the owner to pause, triggers stopped state\"},\"paused()\":{\"return\":\"true if the contract is paused, false otherwise.\"},\"totalSupply()\":{\"details\":\"Total number of tokens in existence\"},\"unpause()\":{\"details\":\"called by the owner to unpause, returns to normal state\"}},\"title\":\"Pausable token\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/ERC20Pausable.sol\":\"ERC20Pausable\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol\":{\"keccak256\":\"0x659ba0f9a3392cd50a8a5fafaf5dfd8c6a0878f6a4613bceff4e90dceddcd865\",\"urls\":[\"bzzr://f704341d520fbc98716541f1b3f67737f0ee6e94adf072a66acb2bd25d593c2b\"]},\"d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/roles/PauserRole.sol\":{\"keccak256\":\"0x6506133e295a7199df2ac5dfc52853d9d767f68450b6d0193e9d8056b164ce86\",\"urls\":[\"bzzr://357744ad2278716087860855e31728d9f99493bb4a3567a2e39a910cb219601a\"]},\"d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/lifecycle/Pausable.sol\":{\"keccak256\":\"0x3b0ed31deeba7e3c6cfbbe8092a6b427084ee390800a06acdea5c17c8185d606\",\"urls\":[\"bzzr://64665e3aefdb15dd5d2ebe3cba5103a150199e27219fc16e9d71815328e6f64f\"]},\"d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x965012d27b4262d7a41f5028cbb30c51ebd9ecd4be8fb30380aaa7a3c64fbc8b\",\"urls\":[\"bzzr://41ca38f6b0fa4b77b0feec43e422cfbec48b7eb38a41edf0b85c77e8d9a296b1\"]},\"d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0xba431353cb4fe70777ac026231eb5468e41aa1e81240a2b8136917acc5fff4dc\",\"urls\":[\"bzzr://80cd02a56e6e33504318124d0d645c82e615cc8a4b5829cc9d82d17635c644c8\"]},\"d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/ERC20Pausable.sol\":{\"keccak256\":\"0x37b840977505e5f6d74bc8fa3d0217facc7913d0ecf064da3e3b26494acd37de\",\"urls\":[\"bzzr://81265bcdcca15f8a460cef608b40ca729559f2afbd6e6e7124b542d28da1c890\"]},\"d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x079c4e23ee448f529e43bfa3c4e8fb4be52cd0318ee923a276835bedf45b93d8\",\"urls\":[\"bzzr://48248e86f64407a95f241d6c5c8cfea6b4d4ebf4ebb467e5c98c8af3868fafe4\"]}},\"version\":1}", + "userdoc": { + "methods": {} + } + } + }, + "d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol": { + "IERC20": { + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "spender", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "from", + "type": "address" + }, + { + "name": "to", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "who", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "to", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "owner", + "type": "address" + }, + { + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "from", + "type": "address" + }, + { + "indexed": true, + "name": "to", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + } + ], + "devdoc": { + "details": "see https://github.com/ethereum/EIPs/issues/20", + "methods": {}, + "title": "ERC20 interface" + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "gasEstimates": null, + "methodIdentifiers": { + "allowance(address,address)": "dd62ed3e", + "approve(address,uint256)": "095ea7b3", + "balanceOf(address)": "70a08231", + "totalSupply()": "18160ddd", + "transfer(address,uint256)": "a9059cbb", + "transferFrom(address,address,uint256)": "23b872dd" + } + }, + "metadata": "", + "userdoc": { + "methods": {} + } + } + } + }, + "sources": { + "d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/AlgoTokenV1.sol": { + "ast": { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/AlgoTokenV1.sol", + "exportedSymbols": { + "AlgoTokenV1": [ + 37 + ] + }, + "id": 38, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "0.5", + ".4" + ], + "nodeType": "PragmaDirective", + "src": "0:22:0" + }, + { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol", + "file": "d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol", + "id": 2, + "nodeType": "ImportDirective", + "scope": 38, + "sourceUnit": 936, + "src": "26:188:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/ERC20Pausable.sol", + "file": "d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/ERC20Pausable.sol", + "id": 3, + "nodeType": "ImportDirective", + "scope": 38, + "sourceUnit": 1038, + "src": "216:188:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 4, + "name": "ERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 877, + "src": "432:5:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20_$877", + "typeString": "contract ERC20" + } + }, + "id": 5, + "nodeType": "InheritanceSpecifier", + "src": "432:5:0" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 6, + "name": "ERC20Detailed", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 935, + "src": "439:13:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Detailed_$935", + "typeString": "contract ERC20Detailed" + } + }, + "id": 7, + "nodeType": "InheritanceSpecifier", + "src": "439:13:0" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 8, + "name": "ERC20Pausable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1037, + "src": "454:13:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Pausable_$1037", + "typeString": "contract ERC20Pausable" + } + }, + "id": 9, + "nodeType": "InheritanceSpecifier", + "src": "454:13:0" + } + ], + "contractDependencies": [ + 234, + 317, + 877, + 935, + 1037, + 1106 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 37, + "linearizedBaseContracts": [ + 37, + 1037, + 317, + 234, + 935, + 877, + 1106 + ], + "name": "AlgoTokenV1", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": true, + "id": 19, + "name": "INITIAL_SUPPLY", + "nodeType": "VariableDeclaration", + "scope": 37, + "src": "477:73:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 10, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "477:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 18, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "31303030303030303030", + "id": 11, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "518:10:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000000_by_1", + "typeString": "int_const 1000000000" + }, + "value": "1000000000" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 16, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 12, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "532:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "3138", + "id": 14, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "546:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_18_by_1", + "typeString": "int_const 18" + }, + "value": "18" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_18_by_1", + "typeString": "int_const 18" + } + ], + "id": 13, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "538:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": "uint256" + }, + "id": 15, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "538:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "532:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 17, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "531:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "518:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "public" + }, + { + "body": { + "id": 35, + "nodeType": "Block", + "src": "663:52:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 30, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1121, + "src": "680:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 31, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "680:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 32, + "name": "INITIAL_SUPPLY", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19, + "src": "692:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 29, + "name": "_mint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 792, + "src": "674:5:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 33, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "674:33:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 34, + "nodeType": "ExpressionStatement", + "src": "674:33:0" + } + ] + }, + "documentation": null, + "id": 36, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [], + "id": 22, + "modifierName": { + "argumentTypes": null, + "id": 21, + "name": "ERC20Pausable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1037, + "src": "582:13:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20Pausable_$1037_$", + "typeString": "type(contract ERC20Pausable)" + } + }, + "nodeType": "ModifierInvocation", + "src": "582:15:0" + }, + { + "arguments": [ + { + "argumentTypes": null, + "hexValue": "416c676f73", + "id": 24, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "621:7:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f431b25e990e179f4656b6db11d387ab1d3ba961e80647281b655f4c6f523207", + "typeString": "literal_string \"Algos\"" + }, + "value": "Algos" + }, + { + "argumentTypes": null, + "hexValue": "414c474f", + "id": 25, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "630:6:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_fef8132823c3ac25abf2126d6030ba0dd95564834b498fa7005f7c43e8b10551", + "typeString": "literal_string \"ALGO\"" + }, + "value": "ALGO" + }, + { + "argumentTypes": null, + "hexValue": "3138", + "id": 26, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "638:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_18_by_1", + "typeString": "int_const 18" + }, + "value": "18" + } + ], + "id": 27, + "modifierName": { + "argumentTypes": null, + "id": 23, + "name": "ERC20Detailed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 935, + "src": "607:13:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20Detailed_$935_$", + "typeString": "type(contract ERC20Detailed)" + } + }, + "nodeType": "ModifierInvocation", + "src": "607:34:0" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 20, + "nodeType": "ParameterList", + "parameters": [], + "src": "570:2:0" + }, + "returnParameters": { + "id": 28, + "nodeType": "ParameterList", + "parameters": [], + "src": "663:0:0" + }, + "scope": 37, + "src": "559:156:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 38, + "src": "408:310:0" + } + ], + "src": "0:720:0" + }, + "id": 0 + }, + "d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol": { + "ast": { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol", + "exportedSymbols": { + "Roles": [ + 131 + ] + }, + "id": 132, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 39, + "literals": [ + "solidity", + "^", + "0.5", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "0:23:1" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": "@title Roles\n@dev Library for managing addresses assigned to a Role.", + "fullyImplemented": true, + "id": 131, + "linearizedBaseContracts": [ + 131 + ], + "name": "Roles", + "nodeType": "ContractDefinition", + "nodes": [ + { + "canonicalName": "Roles.Role", + "id": 44, + "members": [ + { + "constant": false, + "id": 43, + "name": "bearer", + "nodeType": "VariableDeclaration", + "scope": 44, + "src": "150:32:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "typeName": { + "id": 42, + "keyType": { + "id": 40, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "159:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "150:25:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "valueType": { + "id": 41, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "170:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Role", + "nodeType": "StructDefinition", + "scope": 131, + "src": "128:61:1", + "visibility": "public" + }, + { + "body": { + "id": 75, + "nodeType": "Block", + "src": "317:123:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 56, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 52, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48, + "src": "335:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 54, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "354:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 53, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "346:7:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 55, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "346:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "335:21:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 51, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1124, + 1125 + ], + "referencedDeclaration": 1124, + "src": "327:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 57, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "327:30:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 58, + "nodeType": "ExpressionStatement", + "src": "327:30:1" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 64, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "375:19:1", + "subExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 61, + "name": "role", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46, + "src": "380:4:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$44_storage_ptr", + "typeString": "struct Roles.Role storage pointer" + } + }, + { + "argumentTypes": null, + "id": 62, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48, + "src": "386:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Role_$44_storage_ptr", + "typeString": "struct Roles.Role storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 60, + "name": "has", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 130, + "src": "376:3:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Role_$44_storage_ptr_$_t_address_$returns$_t_bool_$", + "typeString": "function (struct Roles.Role storage pointer,address) view returns (bool)" + } + }, + "id": 63, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "376:18:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 59, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1124, + 1125 + ], + "referencedDeclaration": 1124, + "src": "367:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 65, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "367:28:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 66, + "nodeType": "ExpressionStatement", + "src": "367:28:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 73, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 67, + "name": "role", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46, + "src": "406:4:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$44_storage_ptr", + "typeString": "struct Roles.Role storage pointer" + } + }, + "id": 70, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "bearer", + "nodeType": "MemberAccess", + "referencedDeclaration": 43, + "src": "406:11:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 71, + "indexExpression": { + "argumentTypes": null, + "id": 69, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48, + "src": "418:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "406:20:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 72, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "429:4:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "406:27:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 74, + "nodeType": "ExpressionStatement", + "src": "406:27:1" + } + ] + }, + "documentation": "@dev give an account access to this role", + "id": 76, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "add", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 49, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 46, + "name": "role", + "nodeType": "VariableDeclaration", + "scope": 76, + "src": "272:17:1", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$44_storage_ptr", + "typeString": "struct Roles.Role" + }, + "typeName": { + "contractScope": null, + "id": 45, + "name": "Role", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 44, + "src": "272:4:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$44_storage_ptr", + "typeString": "struct Roles.Role" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 48, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 76, + "src": "291:15:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 47, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "291:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "271:36:1" + }, + "returnParameters": { + "id": 50, + "nodeType": "ParameterList", + "parameters": [], + "src": "317:0:1" + }, + "scope": 131, + "src": "259:181:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 106, + "nodeType": "Block", + "src": "575:123:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 88, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 84, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 80, + "src": "593:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 86, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "612:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 85, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "604:7:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 87, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "604:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "593:21:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 83, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1124, + 1125 + ], + "referencedDeclaration": 1124, + "src": "585:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 89, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "585:30:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 90, + "nodeType": "ExpressionStatement", + "src": "585:30:1" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 93, + "name": "role", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 78, + "src": "637:4:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$44_storage_ptr", + "typeString": "struct Roles.Role storage pointer" + } + }, + { + "argumentTypes": null, + "id": 94, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 80, + "src": "643:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Role_$44_storage_ptr", + "typeString": "struct Roles.Role storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 92, + "name": "has", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 130, + "src": "633:3:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Role_$44_storage_ptr_$_t_address_$returns$_t_bool_$", + "typeString": "function (struct Roles.Role storage pointer,address) view returns (bool)" + } + }, + "id": 95, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "633:18:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 91, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1124, + 1125 + ], + "referencedDeclaration": 1124, + "src": "625:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 96, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "625:27:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 97, + "nodeType": "ExpressionStatement", + "src": "625:27:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 98, + "name": "role", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 78, + "src": "663:4:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$44_storage_ptr", + "typeString": "struct Roles.Role storage pointer" + } + }, + "id": 101, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "bearer", + "nodeType": "MemberAccess", + "referencedDeclaration": 43, + "src": "663:11:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 102, + "indexExpression": { + "argumentTypes": null, + "id": 100, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 80, + "src": "675:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "663:20:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 103, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "686:5:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "663:28:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 105, + "nodeType": "ExpressionStatement", + "src": "663:28:1" + } + ] + }, + "documentation": "@dev remove an account's access to this role", + "id": 107, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "remove", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 81, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 78, + "name": "role", + "nodeType": "VariableDeclaration", + "scope": 107, + "src": "530:17:1", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$44_storage_ptr", + "typeString": "struct Roles.Role" + }, + "typeName": { + "contractScope": null, + "id": 77, + "name": "Role", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 44, + "src": "530:4:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$44_storage_ptr", + "typeString": "struct Roles.Role" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 80, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 107, + "src": "549:15:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 79, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "549:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "529:36:1" + }, + "returnParameters": { + "id": 82, + "nodeType": "ParameterList", + "parameters": [], + "src": "575:0:1" + }, + "scope": 131, + "src": "514:184:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 129, + "nodeType": "Block", + "src": "864:84:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 121, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 117, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 111, + "src": "882:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 119, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "901:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 118, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "893:7:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 120, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "893:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "882:21:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 116, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1124, + 1125 + ], + "referencedDeclaration": 1124, + "src": "874:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 122, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "874:30:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 123, + "nodeType": "ExpressionStatement", + "src": "874:30:1" + }, + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 124, + "name": "role", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 109, + "src": "921:4:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$44_storage_ptr", + "typeString": "struct Roles.Role storage pointer" + } + }, + "id": 125, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "bearer", + "nodeType": "MemberAccess", + "referencedDeclaration": 43, + "src": "921:11:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 127, + "indexExpression": { + "argumentTypes": null, + "id": 126, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 111, + "src": "933:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "921:20:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 115, + "id": 128, + "nodeType": "Return", + "src": "914:27:1" + } + ] + }, + "documentation": "@dev check if an account has this role\n@return bool", + "id": 130, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "has", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 112, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 109, + "name": "role", + "nodeType": "VariableDeclaration", + "scope": 130, + "src": "799:17:1", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$44_storage_ptr", + "typeString": "struct Roles.Role" + }, + "typeName": { + "contractScope": null, + "id": 108, + "name": "Role", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 44, + "src": "799:4:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$44_storage_ptr", + "typeString": "struct Roles.Role" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 111, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 130, + "src": "818:15:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 110, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "818:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "798:36:1" + }, + "returnParameters": { + "id": 115, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 114, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 130, + "src": "858:4:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 113, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "858:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "857:6:1" + }, + "scope": 131, + "src": "786:162:1", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 132, + "src": "108:842:1" + } + ], + "src": "0:951:1" + }, + "id": 1 + }, + "d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/roles/PauserRole.sol": { + "ast": { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/roles/PauserRole.sol", + "exportedSymbols": { + "PauserRole": [ + 234 + ] + }, + "id": 235, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 133, + "literals": [ + "solidity", + "^", + "0.5", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "0:23:2" + }, + { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol", + "file": "../Roles.sol", + "id": 134, + "nodeType": "ImportDirective", + "scope": 235, + "sourceUnit": 132, + "src": "25:22:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 234, + "linearizedBaseContracts": [ + 234 + ], + "name": "PauserRole", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 137, + "libraryName": { + "contractScope": null, + "id": 135, + "name": "Roles", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 131, + "src": "81:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Roles_$131", + "typeString": "library Roles" + } + }, + "nodeType": "UsingForDirective", + "src": "75:27:2", + "typeName": { + "contractScope": null, + "id": 136, + "name": "Roles.Role", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 44, + "src": "91:10:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$44_storage_ptr", + "typeString": "struct Roles.Role" + } + } + }, + { + "anonymous": false, + "documentation": null, + "id": 141, + "name": "PauserAdded", + "nodeType": "EventDefinition", + "parameters": { + "id": 140, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 139, + "indexed": true, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 141, + "src": "126:23:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 138, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "126:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "125:25:2" + }, + "src": "108:43:2" + }, + { + "anonymous": false, + "documentation": null, + "id": 145, + "name": "PauserRemoved", + "nodeType": "EventDefinition", + "parameters": { + "id": 144, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 143, + "indexed": true, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 145, + "src": "176:23:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 142, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "176:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "175:25:2" + }, + "src": "156:45:2" + }, + { + "constant": false, + "id": 147, + "name": "_pausers", + "nodeType": "VariableDeclaration", + "scope": 234, + "src": "207:27:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$44_storage", + "typeString": "struct Roles.Role" + }, + "typeName": { + "contractScope": null, + "id": 146, + "name": "Roles.Role", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 44, + "src": "207:10:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$44_storage_ptr", + "typeString": "struct Roles.Role" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 155, + "nodeType": "Block", + "src": "265:39:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 151, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1121, + "src": "286:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 152, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "286:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 150, + "name": "_addPauser", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 217, + "src": "275:10:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 153, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "275:22:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 154, + "nodeType": "ExpressionStatement", + "src": "275:22:2" + } + ] + }, + "documentation": null, + "id": 156, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 148, + "nodeType": "ParameterList", + "parameters": [], + "src": "253:2:2" + }, + "returnParameters": { + "id": 149, + "nodeType": "ParameterList", + "parameters": [], + "src": "265:0:2" + }, + "scope": 234, + "src": "241:63:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 166, + "nodeType": "Block", + "src": "332:57:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 160, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1121, + "src": "359:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 161, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "359:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 159, + "name": "isPauser", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 180, + "src": "350:8:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 162, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "350:20:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 158, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1124, + 1125 + ], + "referencedDeclaration": 1124, + "src": "342:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 163, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "342:29:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 164, + "nodeType": "ExpressionStatement", + "src": "342:29:2" + }, + { + "id": 165, + "nodeType": "PlaceholderStatement", + "src": "381:1:2" + } + ] + }, + "documentation": null, + "id": 167, + "name": "onlyPauser", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 157, + "nodeType": "ParameterList", + "parameters": [], + "src": "329:2:2" + }, + "src": "310:79:2", + "visibility": "internal" + }, + { + "body": { + "id": 179, + "nodeType": "Block", + "src": "457:45:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 176, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 169, + "src": "487:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 174, + "name": "_pausers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 147, + "src": "474:8:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$44_storage", + "typeString": "struct Roles.Role storage ref" + } + }, + "id": 175, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "has", + "nodeType": "MemberAccess", + "referencedDeclaration": 130, + "src": "474:12:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Role_$44_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Role_$44_storage_ptr_$", + "typeString": "function (struct Roles.Role storage pointer,address) view returns (bool)" + } + }, + "id": 177, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "474:21:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 173, + "id": 178, + "nodeType": "Return", + "src": "467:28:2" + } + ] + }, + "documentation": null, + "id": 180, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isPauser", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 170, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 169, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 180, + "src": "413:15:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 168, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "413:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "412:17:2" + }, + "returnParameters": { + "id": 173, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 172, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 180, + "src": "451:4:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 171, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "451:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "450:6:2" + }, + "scope": 234, + "src": "395:107:2", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 191, + "nodeType": "Block", + "src": "562:36:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 188, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 182, + "src": "583:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 187, + "name": "_addPauser", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 217, + "src": "572:10:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 189, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "572:19:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 190, + "nodeType": "ExpressionStatement", + "src": "572:19:2" + } + ] + }, + "documentation": null, + "id": 192, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 185, + "modifierName": { + "argumentTypes": null, + "id": 184, + "name": "onlyPauser", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 167, + "src": "551:10:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "551:10:2" + } + ], + "name": "addPauser", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 183, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 182, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 192, + "src": "527:15:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 181, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "527:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "526:17:2" + }, + "returnParameters": { + "id": 186, + "nodeType": "ParameterList", + "parameters": [], + "src": "562:0:2" + }, + "scope": 234, + "src": "508:90:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 200, + "nodeType": "Block", + "src": "637:42:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 196, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1121, + "src": "661:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 197, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "661:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 195, + "name": "_removePauser", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 233, + "src": "647:13:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 198, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "647:25:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 199, + "nodeType": "ExpressionStatement", + "src": "647:25:2" + } + ] + }, + "documentation": null, + "id": 201, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "renouncePauser", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 193, + "nodeType": "ParameterList", + "parameters": [], + "src": "627:2:2" + }, + "returnParameters": { + "id": 194, + "nodeType": "ParameterList", + "parameters": [], + "src": "637:0:2" + }, + "scope": 234, + "src": "604:75:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 216, + "nodeType": "Block", + "src": "731:73:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 209, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 203, + "src": "754:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 206, + "name": "_pausers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 147, + "src": "741:8:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$44_storage", + "typeString": "struct Roles.Role storage ref" + } + }, + "id": 208, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 76, + "src": "741:12:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Role_$44_storage_ptr_$_t_address_$returns$__$bound_to$_t_struct$_Role_$44_storage_ptr_$", + "typeString": "function (struct Roles.Role storage pointer,address)" + } + }, + "id": 210, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "741:21:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 211, + "nodeType": "ExpressionStatement", + "src": "741:21:2" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 213, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 203, + "src": "789:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 212, + "name": "PauserAdded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 141, + "src": "777:11:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 214, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "777:20:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 215, + "nodeType": "EmitStatement", + "src": "772:25:2" + } + ] + }, + "documentation": null, + "id": 217, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_addPauser", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 204, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 203, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 217, + "src": "705:15:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 202, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "705:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "704:17:2" + }, + "returnParameters": { + "id": 205, + "nodeType": "ParameterList", + "parameters": [], + "src": "731:0:2" + }, + "scope": 234, + "src": "685:119:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 232, + "nodeType": "Block", + "src": "859:78:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 225, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 219, + "src": "885:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 222, + "name": "_pausers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 147, + "src": "869:8:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$44_storage", + "typeString": "struct Roles.Role storage ref" + } + }, + "id": 224, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "remove", + "nodeType": "MemberAccess", + "referencedDeclaration": 107, + "src": "869:15:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Role_$44_storage_ptr_$_t_address_$returns$__$bound_to$_t_struct$_Role_$44_storage_ptr_$", + "typeString": "function (struct Roles.Role storage pointer,address)" + } + }, + "id": 226, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "869:24:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 227, + "nodeType": "ExpressionStatement", + "src": "869:24:2" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 229, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 219, + "src": "922:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 228, + "name": "PauserRemoved", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 145, + "src": "908:13:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 230, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "908:22:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 231, + "nodeType": "EmitStatement", + "src": "903:27:2" + } + ] + }, + "documentation": null, + "id": 233, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_removePauser", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 220, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 219, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 233, + "src": "833:15:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 218, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "833:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "832:17:2" + }, + "returnParameters": { + "id": 221, + "nodeType": "ParameterList", + "parameters": [], + "src": "859:0:2" + }, + "scope": 234, + "src": "810:127:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 235, + "src": "49:890:2" + } + ], + "src": "0:940:2" + }, + "id": 2 + }, + "d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/lifecycle/Pausable.sol": { + "ast": { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/lifecycle/Pausable.sol", + "exportedSymbols": { + "Pausable": [ + 317 + ] + }, + "id": 318, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 236, + "literals": [ + "solidity", + "^", + "0.5", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "0:23:3" + }, + { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/roles/PauserRole.sol", + "file": "../access/roles/PauserRole.sol", + "id": 237, + "nodeType": "ImportDirective", + "scope": 318, + "sourceUnit": 235, + "src": "25:40:3", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 238, + "name": "PauserRole", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 234, + "src": "201:10:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_PauserRole_$234", + "typeString": "contract PauserRole" + } + }, + "id": 239, + "nodeType": "InheritanceSpecifier", + "src": "201:10:3" + } + ], + "contractDependencies": [ + 234 + ], + "contractKind": "contract", + "documentation": "@title Pausable\n@dev Base contract which allows children to implement an emergency stop mechanism.", + "fullyImplemented": true, + "id": 317, + "linearizedBaseContracts": [ + 317, + 234 + ], + "name": "Pausable", + "nodeType": "ContractDefinition", + "nodes": [ + { + "anonymous": false, + "documentation": null, + "id": 243, + "name": "Paused", + "nodeType": "EventDefinition", + "parameters": { + "id": 242, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 241, + "indexed": false, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 243, + "src": "231:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 240, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "231:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "230:17:3" + }, + "src": "218:30:3" + }, + { + "anonymous": false, + "documentation": null, + "id": 247, + "name": "Unpaused", + "nodeType": "EventDefinition", + "parameters": { + "id": 246, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 245, + "indexed": false, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 247, + "src": "268:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 244, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "268:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "267:17:3" + }, + "src": "253:32:3" + }, + { + "constant": false, + "id": 249, + "name": "_paused", + "nodeType": "VariableDeclaration", + "scope": 317, + "src": "291:20:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 248, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "291:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 256, + "nodeType": "Block", + "src": "342:32:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 254, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 252, + "name": "_paused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 249, + "src": "352:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 253, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "362:5:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "352:15:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 255, + "nodeType": "ExpressionStatement", + "src": "352:15:3" + } + ] + }, + "documentation": null, + "id": 257, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 250, + "nodeType": "ParameterList", + "parameters": [], + "src": "330:2:3" + }, + "returnParameters": { + "id": 251, + "nodeType": "ParameterList", + "parameters": [], + "src": "342:0:3" + }, + "scope": 317, + "src": "318:56:3", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 264, + "nodeType": "Block", + "src": "505:31:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 262, + "name": "_paused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 249, + "src": "522:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 261, + "id": 263, + "nodeType": "Return", + "src": "515:14:3" + } + ] + }, + "documentation": "@return true if the contract is paused, false otherwise.", + "id": 265, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "paused", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 258, + "nodeType": "ParameterList", + "parameters": [], + "src": "475:2:3" + }, + "returnParameters": { + "id": 261, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 260, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 265, + "src": "499:4:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 259, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "499:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "498:6:3" + }, + "scope": 317, + "src": "460:76:3", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 273, + "nodeType": "Block", + "src": "670:45:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 269, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "688:8:3", + "subExpression": { + "argumentTypes": null, + "id": 268, + "name": "_paused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 249, + "src": "689:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 267, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1124, + 1125 + ], + "referencedDeclaration": 1124, + "src": "680:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 270, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "680:17:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 271, + "nodeType": "ExpressionStatement", + "src": "680:17:3" + }, + { + "id": 272, + "nodeType": "PlaceholderStatement", + "src": "707:1:3" + } + ] + }, + "documentation": "@dev Modifier to make a function callable only when the contract is not paused.", + "id": 274, + "name": "whenNotPaused", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 266, + "nodeType": "ParameterList", + "parameters": [], + "src": "667:2:3" + }, + "src": "645:70:3", + "visibility": "internal" + }, + { + "body": { + "id": 281, + "nodeType": "Block", + "src": "842:44:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 277, + "name": "_paused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 249, + "src": "860:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 276, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1124, + 1125 + ], + "referencedDeclaration": 1124, + "src": "852:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 278, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "852:16:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 279, + "nodeType": "ExpressionStatement", + "src": "852:16:3" + }, + { + "id": 280, + "nodeType": "PlaceholderStatement", + "src": "878:1:3" + } + ] + }, + "documentation": "@dev Modifier to make a function callable only when the contract is paused.", + "id": 282, + "name": "whenPaused", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 275, + "nodeType": "ParameterList", + "parameters": [], + "src": "839:2:3" + }, + "src": "820:66:3", + "visibility": "internal" + }, + { + "body": { + "id": 298, + "nodeType": "Block", + "src": "1022:64:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 291, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 289, + "name": "_paused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 249, + "src": "1032:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 290, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1042:4:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1032:14:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 292, + "nodeType": "ExpressionStatement", + "src": "1032:14:3" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 294, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1121, + "src": "1068:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 295, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1068:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 293, + "name": "Paused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 243, + "src": "1061:6:3", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 296, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1061:18:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 297, + "nodeType": "EmitStatement", + "src": "1056:23:3" + } + ] + }, + "documentation": "@dev called by the owner to pause, triggers stopped state", + "id": 299, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 285, + "modifierName": { + "argumentTypes": null, + "id": 284, + "name": "onlyPauser", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 167, + "src": "997:10:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "997:10:3" + }, + { + "arguments": null, + "id": 287, + "modifierName": { + "argumentTypes": null, + "id": 286, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 274, + "src": "1008:13:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1008:13:3" + } + ], + "name": "pause", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 283, + "nodeType": "ParameterList", + "parameters": [], + "src": "987:2:3" + }, + "returnParameters": { + "id": 288, + "nodeType": "ParameterList", + "parameters": [], + "src": "1022:0:3" + }, + "scope": 317, + "src": "973:113:3", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 315, + "nodeType": "Block", + "src": "1224:67:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 308, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 306, + "name": "_paused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 249, + "src": "1234:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 307, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1244:5:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "1234:15:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 309, + "nodeType": "ExpressionStatement", + "src": "1234:15:3" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 311, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1121, + "src": "1273:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 312, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1273:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 310, + "name": "Unpaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 247, + "src": "1264:8:3", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1264:20:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 314, + "nodeType": "EmitStatement", + "src": "1259:25:3" + } + ] + }, + "documentation": "@dev called by the owner to unpause, returns to normal state", + "id": 316, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 302, + "modifierName": { + "argumentTypes": null, + "id": 301, + "name": "onlyPauser", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 167, + "src": "1202:10:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1202:10:3" + }, + { + "arguments": null, + "id": 304, + "modifierName": { + "argumentTypes": null, + "id": 303, + "name": "whenPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 282, + "src": "1213:10:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1213:10:3" + } + ], + "name": "unpause", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 300, + "nodeType": "ParameterList", + "parameters": [], + "src": "1192:2:3" + }, + "returnParameters": { + "id": 305, + "nodeType": "ParameterList", + "parameters": [], + "src": "1224:0:3" + }, + "scope": 317, + "src": "1176:115:3", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 318, + "src": "180:1113:3" + } + ], + "src": "0:1294:3" + }, + "id": 3 + }, + "d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol": { + "ast": { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol", + "exportedSymbols": { + "SafeMath": [ + 445 + ] + }, + "id": 446, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 319, + "literals": [ + "solidity", + "^", + "0.5", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "0:23:4" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": "@title SafeMath\n@dev Unsigned math operations with safety checks that revert on error", + "fullyImplemented": true, + "id": 445, + "linearizedBaseContracts": [ + 445 + ], + "name": "SafeMath", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 351, + "nodeType": "Block", + "src": "296:354:4", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 330, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 328, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 321, + "src": "527:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 329, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "532:1:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "527:6:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 334, + "nodeType": "IfStatement", + "src": "523:45:4", + "trueBody": { + "id": 333, + "nodeType": "Block", + "src": "535:33:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "30", + "id": 331, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "556:1:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "functionReturnParameters": 327, + "id": 332, + "nodeType": "Return", + "src": "549:8:4" + } + ] + } + }, + { + "assignments": [ + 336 + ], + "declarations": [ + { + "constant": false, + "id": 336, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 351, + "src": "578:9:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 335, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "578:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 340, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 339, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 337, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 321, + "src": "590:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 338, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 323, + "src": "594:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "590:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "578:17:4" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 346, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 344, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 342, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 336, + "src": "613:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 343, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 321, + "src": "617:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "613:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 345, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 323, + "src": "622:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "613:10:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 341, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1124, + 1125 + ], + "referencedDeclaration": 1124, + "src": "605:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 347, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "605:19:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 348, + "nodeType": "ExpressionStatement", + "src": "605:19:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 349, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 336, + "src": "642:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 327, + "id": 350, + "nodeType": "Return", + "src": "635:8:4" + } + ] + }, + "documentation": "@dev Multiplies two unsigned integers, reverts on overflow.", + "id": 352, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "mul", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 324, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 321, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 352, + "src": "242:9:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 320, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "242:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 323, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 352, + "src": "253:9:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 322, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "253:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "241:22:4" + }, + "returnParameters": { + "id": 327, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 326, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 352, + "src": "287:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 325, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "287:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "286:9:4" + }, + "scope": 445, + "src": "229:421:4", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 375, + "nodeType": "Block", + "src": "845:229:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 364, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 362, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 356, + "src": "929:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 363, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "933:1:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "929:5:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 361, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1124, + 1125 + ], + "referencedDeclaration": 1124, + "src": "921:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 365, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "921:14:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 366, + "nodeType": "ExpressionStatement", + "src": "921:14:4" + }, + { + "assignments": [ + 368 + ], + "declarations": [ + { + "constant": false, + "id": 368, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 375, + "src": "945:9:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 367, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "945:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 372, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 371, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 369, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 354, + "src": "957:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 370, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 356, + "src": "961:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "957:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "945:17:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 373, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 368, + "src": "1066:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 360, + "id": 374, + "nodeType": "Return", + "src": "1059:8:4" + } + ] + }, + "documentation": "@dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero.", + "id": 376, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "div", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 357, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 354, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 376, + "src": "791:9:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 353, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "791:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 356, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 376, + "src": "802:9:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 355, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "802:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "790:22:4" + }, + "returnParameters": { + "id": 360, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 359, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 376, + "src": "836:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 358, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "836:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "835:9:4" + }, + "scope": 445, + "src": "778:296:4", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 399, + "nodeType": "Block", + "src": "1272:78:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 388, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 386, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 380, + "src": "1290:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 387, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 378, + "src": "1295:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1290:6:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 385, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1124, + 1125 + ], + "referencedDeclaration": 1124, + "src": "1282:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 389, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1282:15:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 390, + "nodeType": "ExpressionStatement", + "src": "1282:15:4" + }, + { + "assignments": [ + 392 + ], + "declarations": [ + { + "constant": false, + "id": 392, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 399, + "src": "1307:9:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 391, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1307:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 396, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 395, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 393, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 378, + "src": "1319:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 394, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 380, + "src": "1323:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1319:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1307:17:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 397, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 392, + "src": "1342:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 384, + "id": 398, + "nodeType": "Return", + "src": "1335:8:4" + } + ] + }, + "documentation": "@dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend).", + "id": 400, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "sub", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 381, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 378, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 400, + "src": "1218:9:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 377, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1218:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 380, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 400, + "src": "1229:9:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 379, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1229:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1217:22:4" + }, + "returnParameters": { + "id": 384, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 383, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 400, + "src": "1263:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 382, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1263:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1262:9:4" + }, + "scope": 445, + "src": "1205:145:4", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 423, + "nodeType": "Block", + "src": "1498:78:4", + "statements": [ + { + "assignments": [ + 410 + ], + "declarations": [ + { + "constant": false, + "id": 410, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 423, + "src": "1508:9:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 409, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1508:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 414, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 413, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 411, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 402, + "src": "1520:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 412, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 404, + "src": "1524:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1520:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1508:17:4" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 418, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 416, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 410, + "src": "1543:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 417, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 402, + "src": "1548:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1543:6:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 415, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1124, + 1125 + ], + "referencedDeclaration": 1124, + "src": "1535:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 419, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1535:15:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 420, + "nodeType": "ExpressionStatement", + "src": "1535:15:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 421, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 410, + "src": "1568:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 408, + "id": 422, + "nodeType": "Return", + "src": "1561:8:4" + } + ] + }, + "documentation": "@dev Adds two unsigned integers, reverts on overflow.", + "id": 424, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "add", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 405, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 402, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 424, + "src": "1444:9:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 401, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1444:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 404, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 424, + "src": "1455:9:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 403, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1455:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1443:22:4" + }, + "returnParameters": { + "id": 408, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 407, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 424, + "src": "1489:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 406, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1489:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1488:9:4" + }, + "scope": 445, + "src": "1431:145:4", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 443, + "nodeType": "Block", + "src": "1795:54:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 436, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 434, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 428, + "src": "1813:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 435, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1818:1:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1813:6:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 433, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1124, + 1125 + ], + "referencedDeclaration": 1124, + "src": "1805:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 437, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1805:15:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 438, + "nodeType": "ExpressionStatement", + "src": "1805:15:4" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 441, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 439, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 426, + "src": "1837:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "%", + "rightExpression": { + "argumentTypes": null, + "id": 440, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 428, + "src": "1841:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1837:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 432, + "id": 442, + "nodeType": "Return", + "src": "1830:12:4" + } + ] + }, + "documentation": "@dev Divides two unsigned integers and returns the remainder (unsigned integer modulo),\nreverts when dividing by zero.", + "id": 444, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "mod", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 429, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 426, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 444, + "src": "1741:9:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 425, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1741:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 428, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 444, + "src": "1752:9:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 427, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1752:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1740:22:4" + }, + "returnParameters": { + "id": 432, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 431, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 444, + "src": "1786:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 430, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1786:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1785:9:4" + }, + "scope": 445, + "src": "1728:121:4", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 446, + "src": "125:1726:4" + } + ], + "src": "0:1852:4" + }, + "id": 4 + }, + "d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/ERC20.sol": { + "ast": { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/ERC20.sol", + "exportedSymbols": { + "ERC20": [ + 877 + ] + }, + "id": 878, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 447, + "literals": [ + "solidity", + "^", + "0.5", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "0:23:5" + }, + { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "file": "./IERC20.sol", + "id": 448, + "nodeType": "ImportDirective", + "scope": 878, + "sourceUnit": 1107, + "src": "25:22:5", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol", + "file": "../../math/SafeMath.sol", + "id": 449, + "nodeType": "ImportDirective", + "scope": 878, + "sourceUnit": 446, + "src": "48:33:5", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 450, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1106, + "src": "667:6:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1106", + "typeString": "contract IERC20" + } + }, + "id": 451, + "nodeType": "InheritanceSpecifier", + "src": "667:6:5" + } + ], + "contractDependencies": [ + 1106 + ], + "contractKind": "contract", + "documentation": "@title Standard ERC20 token\n * @dev Implementation of the basic standard token.\nhttps://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md\nOriginally based on code by FirstBlood:\nhttps://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n * This implementation emits additional Approval events, allowing applications to reconstruct the allowance status for\nall accounts just by listening to said events. Note that this isn't required by the specification, and other\ncompliant implementations may not do it.", + "fullyImplemented": true, + "id": 877, + "linearizedBaseContracts": [ + 877, + 1106 + ], + "name": "ERC20", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 454, + "libraryName": { + "contractScope": null, + "id": 452, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 445, + "src": "686:8:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$445", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "680:27:5", + "typeName": { + "id": 453, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "699:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": false, + "id": 458, + "name": "_balances", + "nodeType": "VariableDeclaration", + "scope": 877, + "src": "713:46:5", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 457, + "keyType": { + "id": 455, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "722:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "713:28:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 456, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "733:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 464, + "name": "_allowed", + "nodeType": "VariableDeclaration", + "scope": 877, + "src": "766:66:5", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "typeName": { + "id": 463, + "keyType": { + "id": 459, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "775:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "766:49:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "valueType": { + "id": 462, + "keyType": { + "id": 460, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "795:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "786:28:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 461, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "806:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 466, + "name": "_totalSupply", + "nodeType": "VariableDeclaration", + "scope": 877, + "src": "839:28:5", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 465, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "839:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 473, + "nodeType": "Block", + "src": "989:36:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 471, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 466, + "src": "1006:12:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 470, + "id": 472, + "nodeType": "Return", + "src": "999:19:5" + } + ] + }, + "documentation": "@dev Total number of tokens in existence", + "id": 474, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "totalSupply", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 467, + "nodeType": "ParameterList", + "parameters": [], + "src": "956:2:5" + }, + "returnParameters": { + "id": 470, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 469, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 474, + "src": "980:7:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 468, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "980:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "979:9:5" + }, + "scope": 877, + "src": "936:89:5", + "stateMutability": "view", + "superFunction": 1073, + "visibility": "public" + }, + { + "body": { + "id": 485, + "nodeType": "Block", + "src": "1298:40:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 481, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 458, + "src": "1315:9:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 483, + "indexExpression": { + "argumentTypes": null, + "id": 482, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 476, + "src": "1325:5:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1315:16:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 480, + "id": 484, + "nodeType": "Return", + "src": "1308:23:5" + } + ] + }, + "documentation": "@dev Gets the balance of the specified address.\n@param owner The address to query the balance of.\n@return An uint256 representing the amount owned by the passed address.", + "id": 486, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "balanceOf", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 477, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 476, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 486, + "src": "1253:13:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 475, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1253:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1252:15:5" + }, + "returnParameters": { + "id": 480, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 479, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 486, + "src": "1289:7:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 478, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1289:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1288:9:5" + }, + "scope": 877, + "src": "1234:104:5", + "stateMutability": "view", + "superFunction": 1080, + "visibility": "public" + }, + { + "body": { + "id": 501, + "nodeType": "Block", + "src": "1750:48:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 495, + "name": "_allowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 464, + "src": "1767:8:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 497, + "indexExpression": { + "argumentTypes": null, + "id": 496, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 488, + "src": "1776:5:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1767:15:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 499, + "indexExpression": { + "argumentTypes": null, + "id": 498, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 490, + "src": "1783:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1767:24:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 494, + "id": 500, + "nodeType": "Return", + "src": "1760:31:5" + } + ] + }, + "documentation": "@dev Function to check the amount of tokens that an owner allowed to a spender.\n@param owner address The address which owns the funds.\n@param spender address The address which will spend the funds.\n@return A uint256 specifying the amount of tokens still available for the spender.", + "id": 502, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "allowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 491, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 488, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 502, + "src": "1688:13:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 487, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1688:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 490, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 502, + "src": "1703:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 489, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1703:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1687:32:5" + }, + "returnParameters": { + "id": 494, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 493, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 502, + "src": "1741:7:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 492, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1741:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1740:9:5" + }, + "scope": 877, + "src": "1669:129:5", + "stateMutability": "view", + "superFunction": 1089, + "visibility": "public" + }, + { + "body": { + "id": 520, + "nodeType": "Block", + "src": "2029:70:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 512, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1121, + "src": "2049:3:5", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 513, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2049:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 514, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 504, + "src": "2061:2:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 515, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 506, + "src": "2065:5:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 511, + "name": "_transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 750, + "src": "2039:9:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 516, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2039:32:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 517, + "nodeType": "ExpressionStatement", + "src": "2039:32:5" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 518, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2088:4:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 510, + "id": 519, + "nodeType": "Return", + "src": "2081:11:5" + } + ] + }, + "documentation": "@dev Transfer token for a specified address\n@param to The address to transfer to.\n@param value The amount to be transferred.", + "id": 521, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 507, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 504, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 521, + "src": "1980:10:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 503, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1980:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 506, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 521, + "src": "1992:13:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 505, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1992:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1979:27:5" + }, + "returnParameters": { + "id": 510, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 509, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 521, + "src": "2023:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 508, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2023:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2022:6:5" + }, + "scope": 877, + "src": "1962:137:5", + "stateMutability": "nonpayable", + "superFunction": 1048, + "visibility": "public" + }, + { + "body": { + "id": 556, + "nodeType": "Block", + "src": "2806:167:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 535, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 531, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 523, + "src": "2824:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 533, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2843:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 532, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2835:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 534, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2835:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "2824:21:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 530, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1124, + 1125 + ], + "referencedDeclaration": 1124, + "src": "2816:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 536, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2816:30:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 537, + "nodeType": "ExpressionStatement", + "src": "2816:30:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 545, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 538, + "name": "_allowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 464, + "src": "2857:8:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 542, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 539, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1121, + "src": "2866:3:5", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 540, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2866:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2857:20:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 543, + "indexExpression": { + "argumentTypes": null, + "id": 541, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 523, + "src": "2878:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2857:29:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 544, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 525, + "src": "2889:5:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2857:37:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 546, + "nodeType": "ExpressionStatement", + "src": "2857:37:5" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 548, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1121, + "src": "2918:3:5", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 549, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2918:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 550, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 523, + "src": "2930:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 551, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 525, + "src": "2939:5:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 547, + "name": "Approval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1105, + "src": "2909:8:5", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 552, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2909:36:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 553, + "nodeType": "EmitStatement", + "src": "2904:41:5" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 554, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2962:4:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 529, + "id": 555, + "nodeType": "Return", + "src": "2955:11:5" + } + ] + }, + "documentation": "@dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\nBeware that changing an allowance with this method brings the risk that someone may use both the old\nand the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\nrace condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\nhttps://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n@param spender The address which will spend the funds.\n@param value The amount of tokens to be spent.", + "id": 557, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 526, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 523, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 557, + "src": "2752:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 522, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2752:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 525, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 557, + "src": "2769:13:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 524, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2769:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2751:32:5" + }, + "returnParameters": { + "id": 529, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 528, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 557, + "src": "2800:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 527, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2800:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2799:6:5" + }, + "scope": 877, + "src": "2735:238:5", + "stateMutability": "nonpayable", + "superFunction": 1057, + "visibility": "public" + }, + { + "body": { + "id": 605, + "nodeType": "Block", + "src": "3521:209:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 583, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 568, + "name": "_allowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 464, + "src": "3531:8:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 572, + "indexExpression": { + "argumentTypes": null, + "id": 569, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 559, + "src": "3540:4:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3531:14:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 573, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 570, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1121, + "src": "3546:3:5", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 571, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3546:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3531:26:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 581, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 563, + "src": "3591:5:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 574, + "name": "_allowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 464, + "src": "3560:8:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 576, + "indexExpression": { + "argumentTypes": null, + "id": 575, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 559, + "src": "3569:4:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3560:14:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 579, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 577, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1121, + "src": "3575:3:5", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 578, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3575:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3560:26:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 580, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 400, + "src": "3560:30:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 582, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3560:37:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3531:66:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 584, + "nodeType": "ExpressionStatement", + "src": "3531:66:5" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 586, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 559, + "src": "3617:4:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 587, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 561, + "src": "3623:2:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 588, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 563, + "src": "3627:5:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 585, + "name": "_transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 750, + "src": "3607:9:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 589, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3607:26:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 590, + "nodeType": "ExpressionStatement", + "src": "3607:26:5" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 592, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 559, + "src": "3657:4:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 593, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1121, + "src": "3663:3:5", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 594, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3663:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 595, + "name": "_allowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 464, + "src": "3675:8:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 597, + "indexExpression": { + "argumentTypes": null, + "id": 596, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 559, + "src": "3684:4:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3675:14:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 600, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 598, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1121, + "src": "3690:3:5", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 599, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3690:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3675:26:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 591, + "name": "Approval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1105, + "src": "3648:8:5", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 601, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3648:54:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 602, + "nodeType": "EmitStatement", + "src": "3643:59:5" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 603, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3719:4:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 567, + "id": 604, + "nodeType": "Return", + "src": "3712:11:5" + } + ] + }, + "documentation": "@dev Transfer tokens from one address to another.\nNote that while this function emits an Approval event, this is not required as per the specification,\nand other compliant implementations may not emit the event.\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", + "id": 606, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 564, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 559, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 606, + "src": "3458:12:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 558, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3458:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 561, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 606, + "src": "3472:10:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 560, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3472:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 563, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 606, + "src": "3484:13:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 562, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3484:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3457:41:5" + }, + "returnParameters": { + "id": 567, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 566, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 606, + "src": "3515:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 565, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3515:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3514:6:5" + }, + "scope": 877, + "src": "3436:294:5", + "stateMutability": "nonpayable", + "superFunction": 1068, + "visibility": "public" + }, + { + "body": { + "id": 654, + "nodeType": "Block", + "src": "4319:231:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 620, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 616, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 608, + "src": "4337:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 618, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4356:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 617, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4348:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 619, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4348:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "4337:21:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 615, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1124, + 1125 + ], + "referencedDeclaration": 1124, + "src": "4329:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 621, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4329:30:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 622, + "nodeType": "ExpressionStatement", + "src": "4329:30:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 638, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 623, + "name": "_allowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 464, + "src": "4370:8:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 627, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 624, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1121, + "src": "4379:3:5", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 625, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4379:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4370:20:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 628, + "indexExpression": { + "argumentTypes": null, + "id": 626, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 608, + "src": "4391:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4370:29:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 636, + "name": "addedValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 610, + "src": "4436:10:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 629, + "name": "_allowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 464, + "src": "4402:8:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 632, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 630, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1121, + "src": "4411:3:5", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 631, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4411:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4402:20:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 634, + "indexExpression": { + "argumentTypes": null, + "id": 633, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 608, + "src": "4423:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4402:29:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 635, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 424, + "src": "4402:33:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 637, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4402:45:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4370:77:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 639, + "nodeType": "ExpressionStatement", + "src": "4370:77:5" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 641, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1121, + "src": "4471:3:5", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 642, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4471:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 643, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 608, + "src": "4483:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 644, + "name": "_allowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 464, + "src": "4492:8:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 647, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 645, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1121, + "src": "4501:3:5", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 646, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4501:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4492:20:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 649, + "indexExpression": { + "argumentTypes": null, + "id": 648, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 608, + "src": "4513:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4492:29:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 640, + "name": "Approval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1105, + "src": "4462:8:5", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 650, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4462:60:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 651, + "nodeType": "EmitStatement", + "src": "4457:65:5" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 652, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4539:4:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 614, + "id": 653, + "nodeType": "Return", + "src": "4532:11:5" + } + ] + }, + "documentation": "@dev Increase the amount of tokens that an owner allowed to a spender.\napprove should be called when allowed_[_spender] == 0. To increment\nallowed value is better to use this function to avoid 2 calls (and wait until\nthe first transaction is mined)\nFrom MonolithDAO Token.sol\nEmits an Approval event.\n@param spender The address which will spend the funds.\n@param addedValue The amount of tokens to increase the allowance by.", + "id": 655, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "increaseAllowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 611, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 608, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 655, + "src": "4260:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 607, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4260:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 610, + "name": "addedValue", + "nodeType": "VariableDeclaration", + "scope": 655, + "src": "4277:18:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 609, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4277:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4259:37:5" + }, + "returnParameters": { + "id": 614, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 613, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 655, + "src": "4313:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 612, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4313:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4312:6:5" + }, + "scope": 877, + "src": "4233:317:5", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 703, + "nodeType": "Block", + "src": "5149:236:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 669, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 665, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 657, + "src": "5167:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 667, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5186:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 666, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5178:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 668, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5178:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "5167:21:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 664, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1124, + 1125 + ], + "referencedDeclaration": 1124, + "src": "5159:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 670, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5159:30:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 671, + "nodeType": "ExpressionStatement", + "src": "5159:30:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 687, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 672, + "name": "_allowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 464, + "src": "5200:8:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 676, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 673, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1121, + "src": "5209:3:5", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 674, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5209:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5200:20:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 677, + "indexExpression": { + "argumentTypes": null, + "id": 675, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 657, + "src": "5221:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5200:29:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 685, + "name": "subtractedValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 659, + "src": "5266:15:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 678, + "name": "_allowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 464, + "src": "5232:8:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 681, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 679, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1121, + "src": "5241:3:5", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 680, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5241:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5232:20:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 683, + "indexExpression": { + "argumentTypes": null, + "id": 682, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 657, + "src": "5253:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5232:29:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 684, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 400, + "src": "5232:33:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 686, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5232:50:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5200:82:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 688, + "nodeType": "ExpressionStatement", + "src": "5200:82:5" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 690, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1121, + "src": "5306:3:5", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 691, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5306:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 692, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 657, + "src": "5318:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 693, + "name": "_allowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 464, + "src": "5327:8:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 696, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 694, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1121, + "src": "5336:3:5", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 695, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5336:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5327:20:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 698, + "indexExpression": { + "argumentTypes": null, + "id": 697, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 657, + "src": "5348:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5327:29:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 689, + "name": "Approval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1105, + "src": "5297:8:5", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 699, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5297:60:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 700, + "nodeType": "EmitStatement", + "src": "5292:65:5" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 701, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5374:4:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 663, + "id": 702, + "nodeType": "Return", + "src": "5367:11:5" + } + ] + }, + "documentation": "@dev Decrease the amount of tokens that an owner allowed to a spender.\napprove should be called when allowed_[_spender] == 0. To decrement\nallowed value is better to use this function to avoid 2 calls (and wait until\nthe first transaction is mined)\nFrom MonolithDAO Token.sol\nEmits an Approval event.\n@param spender The address which will spend the funds.\n@param subtractedValue The amount of tokens to decrease the allowance by.", + "id": 704, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "decreaseAllowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 660, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 657, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 704, + "src": "5085:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 656, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5085:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 659, + "name": "subtractedValue", + "nodeType": "VariableDeclaration", + "scope": 704, + "src": "5102:23:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 658, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5102:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5084:42:5" + }, + "returnParameters": { + "id": 663, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 662, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 704, + "src": "5143:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 661, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5143:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5142:6:5" + }, + "scope": 877, + "src": "5058:327:5", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 749, + "nodeType": "Block", + "src": "5668:187:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 718, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 714, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 708, + "src": "5686:2:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 716, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5700:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 715, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5692:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 717, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5692:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "5686:16:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 713, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1124, + 1125 + ], + "referencedDeclaration": 1124, + "src": "5678:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 719, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5678:25:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 720, + "nodeType": "ExpressionStatement", + "src": "5678:25:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 730, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 721, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 458, + "src": "5714:9:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 723, + "indexExpression": { + "argumentTypes": null, + "id": 722, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 706, + "src": "5724:4:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5714:15:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 728, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 710, + "src": "5752:5:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 724, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 458, + "src": "5732:9:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 726, + "indexExpression": { + "argumentTypes": null, + "id": 725, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 706, + "src": "5742:4:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5732:15:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 727, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 400, + "src": "5732:19:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 729, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5732:26:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5714:44:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 731, + "nodeType": "ExpressionStatement", + "src": "5714:44:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 741, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 732, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 458, + "src": "5768:9:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 734, + "indexExpression": { + "argumentTypes": null, + "id": 733, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 708, + "src": "5778:2:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5768:13:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 739, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 710, + "src": "5802:5:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 735, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 458, + "src": "5784:9:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 737, + "indexExpression": { + "argumentTypes": null, + "id": 736, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 708, + "src": "5794:2:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5784:13:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 738, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 424, + "src": "5784:17:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 740, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5784:24:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5768:40:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 742, + "nodeType": "ExpressionStatement", + "src": "5768:40:5" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 744, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 706, + "src": "5832:4:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 745, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 708, + "src": "5838:2:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 746, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 710, + "src": "5842:5:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 743, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1097, + "src": "5823:8:5", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 747, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5823:25:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 748, + "nodeType": "EmitStatement", + "src": "5818:30:5" + } + ] + }, + "documentation": "@dev Transfer token for a specified addresses\n@param from The address to transfer from.\n@param to The address to transfer to.\n@param value The amount to be transferred.", + "id": 750, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 711, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 706, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 750, + "src": "5618:12:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 705, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5618:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 708, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 750, + "src": "5632:10:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 707, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5632:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 710, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 750, + "src": "5644:13:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 709, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5644:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5617:41:5" + }, + "returnParameters": { + "id": 712, + "nodeType": "ParameterList", + "parameters": [], + "src": "5668:0:5" + }, + "scope": 877, + "src": "5599:256:5", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 791, + "nodeType": "Block", + "src": "6254:207:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 762, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 758, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 752, + "src": "6272:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 760, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6291:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 759, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6283:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 761, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6283:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "6272:21:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 757, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1124, + 1125 + ], + "referencedDeclaration": 1124, + "src": "6264:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 763, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6264:30:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 764, + "nodeType": "ExpressionStatement", + "src": "6264:30:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 770, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 765, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 466, + "src": "6305:12:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 768, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 754, + "src": "6337:5:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 766, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 466, + "src": "6320:12:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 767, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 424, + "src": "6320:16:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 769, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6320:23:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6305:38:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 771, + "nodeType": "ExpressionStatement", + "src": "6305:38:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 781, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 772, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 458, + "src": "6353:9:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 774, + "indexExpression": { + "argumentTypes": null, + "id": 773, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 752, + "src": "6363:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6353:18:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 779, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 754, + "src": "6397:5:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 775, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 458, + "src": "6374:9:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 777, + "indexExpression": { + "argumentTypes": null, + "id": 776, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 752, + "src": "6384:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6374:18:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 778, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 424, + "src": "6374:22:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 780, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6374:29:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6353:50:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 782, + "nodeType": "ExpressionStatement", + "src": "6353:50:5" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 785, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6435:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 784, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6427:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 786, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6427:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 787, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 752, + "src": "6439:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 788, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 754, + "src": "6448:5:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 783, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1097, + "src": "6418:8:5", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 789, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6418:36:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 790, + "nodeType": "EmitStatement", + "src": "6413:41:5" + } + ] + }, + "documentation": "@dev Internal function that mints an amount of the token and assigns it to\nan account. This encapsulates the modification of balances such that the\nproper events are emitted.\n@param account The account that will receive the created tokens.\n@param value The amount that will be created.", + "id": 792, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_mint", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 755, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 752, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 792, + "src": "6213:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 751, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6213:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 754, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 792, + "src": "6230:13:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 753, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6230:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6212:32:5" + }, + "returnParameters": { + "id": 756, + "nodeType": "ParameterList", + "parameters": [], + "src": "6254:0:5" + }, + "scope": 877, + "src": "6198:263:5", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 833, + "nodeType": "Block", + "src": "6743:207:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 804, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 800, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 794, + "src": "6761:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 802, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6780:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 801, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6772:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 803, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6772:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "6761:21:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 799, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1124, + 1125 + ], + "referencedDeclaration": 1124, + "src": "6753:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 805, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6753:30:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 806, + "nodeType": "ExpressionStatement", + "src": "6753:30:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 812, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 807, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 466, + "src": "6794:12:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 810, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 796, + "src": "6826:5:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 808, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 466, + "src": "6809:12:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 809, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 400, + "src": "6809:16:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 811, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6809:23:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6794:38:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 813, + "nodeType": "ExpressionStatement", + "src": "6794:38:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 823, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 814, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 458, + "src": "6842:9:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 816, + "indexExpression": { + "argumentTypes": null, + "id": 815, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 794, + "src": "6852:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6842:18:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 821, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 796, + "src": "6886:5:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 817, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 458, + "src": "6863:9:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 819, + "indexExpression": { + "argumentTypes": null, + "id": 818, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 794, + "src": "6873:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6863:18:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 820, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 400, + "src": "6863:22:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 822, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6863:29:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6842:50:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 824, + "nodeType": "ExpressionStatement", + "src": "6842:50:5" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 826, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 794, + "src": "6916:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 828, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6933:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 827, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6925:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 829, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6925:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 830, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 796, + "src": "6937:5:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 825, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1097, + "src": "6907:8:5", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 831, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6907:36:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 832, + "nodeType": "EmitStatement", + "src": "6902:41:5" + } + ] + }, + "documentation": "@dev Internal function that burns an amount of the token of a given\naccount.\n@param account The account whose tokens will be burnt.\n@param value The amount that will be burnt.", + "id": 834, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_burn", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 797, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 794, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 834, + "src": "6702:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 793, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6702:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 796, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 834, + "src": "6719:13:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 795, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6719:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6701:32:5" + }, + "returnParameters": { + "id": 798, + "nodeType": "ParameterList", + "parameters": [], + "src": "6743:0:5" + }, + "scope": 877, + "src": "6687:263:5", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 875, + "nodeType": "Block", + "src": "7399:195:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 856, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 841, + "name": "_allowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 464, + "src": "7409:8:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 845, + "indexExpression": { + "argumentTypes": null, + "id": 842, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 836, + "src": "7418:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7409:17:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 846, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 843, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1121, + "src": "7427:3:5", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 844, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7427:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7409:29:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 854, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 838, + "src": "7475:5:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 847, + "name": "_allowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 464, + "src": "7441:8:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 849, + "indexExpression": { + "argumentTypes": null, + "id": 848, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 836, + "src": "7450:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7441:17:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 852, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 850, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1121, + "src": "7459:3:5", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 851, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7459:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7441:29:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 853, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 400, + "src": "7441:33:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 855, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7441:40:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7409:72:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 857, + "nodeType": "ExpressionStatement", + "src": "7409:72:5" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 859, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 836, + "src": "7497:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 860, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 838, + "src": "7506:5:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 858, + "name": "_burn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 834, + "src": "7491:5:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 861, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7491:21:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 862, + "nodeType": "ExpressionStatement", + "src": "7491:21:5" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 864, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 836, + "src": "7536:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 865, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1121, + "src": "7545:3:5", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 866, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7545:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 867, + "name": "_allowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 464, + "src": "7557:8:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 869, + "indexExpression": { + "argumentTypes": null, + "id": 868, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 836, + "src": "7566:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7557:17:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 872, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 870, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1121, + "src": "7575:3:5", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 871, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7575:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7557:29:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 863, + "name": "Approval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1105, + "src": "7527:8:5", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 873, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7527:60:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 874, + "nodeType": "EmitStatement", + "src": "7522:65:5" + } + ] + }, + "documentation": "@dev Internal function that burns an amount of the token of a given\naccount, deducting from the sender's allowance for said account. Uses the\ninternal burn function.\nEmits an Approval event (reflecting the reduced allowance).\n@param account The account whose tokens will be burnt.\n@param value The amount that will be burnt.", + "id": 876, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_burnFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 839, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 836, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 876, + "src": "7358:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 835, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7358:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 838, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 876, + "src": "7375:13:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 837, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7375:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7357:32:5" + }, + "returnParameters": { + "id": 840, + "nodeType": "ParameterList", + "parameters": [], + "src": "7399:0:5" + }, + "scope": 877, + "src": "7339:255:5", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 878, + "src": "649:6947:5" + } + ], + "src": "0:7597:5" + }, + "id": 5 + }, + "d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol": { + "ast": { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol", + "exportedSymbols": { + "ERC20Detailed": [ + 935 + ] + }, + "id": 936, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 879, + "literals": [ + "solidity", + "^", + "0.5", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "0:23:6" + }, + { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "file": "./IERC20.sol", + "id": 880, + "nodeType": "ImportDirective", + "scope": 936, + "sourceUnit": 1107, + "src": "25:22:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 881, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1106, + "src": "308:6:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1106", + "typeString": "contract IERC20" + } + }, + "id": 882, + "nodeType": "InheritanceSpecifier", + "src": "308:6:6" + } + ], + "contractDependencies": [ + 1106 + ], + "contractKind": "contract", + "documentation": "@title ERC20Detailed token\n@dev The decimals are only for visualization purposes.\nAll the operations are done using the smallest and indivisible token unit,\njust as on Ethereum all the operations are done in wei.", + "fullyImplemented": false, + "id": 935, + "linearizedBaseContracts": [ + 935, + 1106 + ], + "name": "ERC20Detailed", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 884, + "name": "_name", + "nodeType": "VariableDeclaration", + "scope": 935, + "src": "321:20:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 883, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "321:6:6", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 886, + "name": "_symbol", + "nodeType": "VariableDeclaration", + "scope": 935, + "src": "347:22:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 885, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "347:6:6", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 888, + "name": "_decimals", + "nodeType": "VariableDeclaration", + "scope": 935, + "src": "375:23:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 887, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "375:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 909, + "nodeType": "Block", + "src": "483:85:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 899, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 897, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 884, + "src": "493:5:6", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 898, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 890, + "src": "501:4:6", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "493:12:6", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 900, + "nodeType": "ExpressionStatement", + "src": "493:12:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 903, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 901, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 886, + "src": "515:7:6", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 902, + "name": "symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 892, + "src": "525:6:6", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "515:16:6", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 904, + "nodeType": "ExpressionStatement", + "src": "515:16:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 907, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 905, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 888, + "src": "541:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 906, + "name": "decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 894, + "src": "553:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "541:20:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 908, + "nodeType": "ExpressionStatement", + "src": "541:20:6" + } + ] + }, + "documentation": null, + "id": 910, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 895, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 890, + "name": "name", + "nodeType": "VariableDeclaration", + "scope": 910, + "src": "418:18:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 889, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "418:6:6", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 892, + "name": "symbol", + "nodeType": "VariableDeclaration", + "scope": 910, + "src": "438:20:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 891, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "438:6:6", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 894, + "name": "decimals", + "nodeType": "VariableDeclaration", + "scope": 910, + "src": "460:14:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 893, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "460:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "417:58:6" + }, + "returnParameters": { + "id": 896, + "nodeType": "ParameterList", + "parameters": [], + "src": "483:0:6" + }, + "scope": 935, + "src": "405:163:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 917, + "nodeType": "Block", + "src": "680:29:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 915, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 884, + "src": "697:5:6", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "functionReturnParameters": 914, + "id": 916, + "nodeType": "Return", + "src": "690:12:6" + } + ] + }, + "documentation": "@return the name of the token.", + "id": 918, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "name", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 911, + "nodeType": "ParameterList", + "parameters": [], + "src": "641:2:6" + }, + "returnParameters": { + "id": 914, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 913, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 918, + "src": "665:13:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 912, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "665:6:6", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "664:15:6" + }, + "scope": 935, + "src": "628:81:6", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 925, + "nodeType": "Block", + "src": "825:31:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 923, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 886, + "src": "842:7:6", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "functionReturnParameters": 922, + "id": 924, + "nodeType": "Return", + "src": "835:14:6" + } + ] + }, + "documentation": "@return the symbol of the token.", + "id": 926, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "symbol", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 919, + "nodeType": "ParameterList", + "parameters": [], + "src": "786:2:6" + }, + "returnParameters": { + "id": 922, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 921, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 926, + "src": "810:13:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 920, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "810:6:6", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "809:15:6" + }, + "scope": 935, + "src": "771:85:6", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 933, + "nodeType": "Block", + "src": "978:33:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 931, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 888, + "src": "995:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "functionReturnParameters": 930, + "id": 932, + "nodeType": "Return", + "src": "988:16:6" + } + ] + }, + "documentation": "@return the number of decimals of the token.", + "id": 934, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "decimals", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 927, + "nodeType": "ParameterList", + "parameters": [], + "src": "947:2:6" + }, + "returnParameters": { + "id": 930, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 929, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 934, + "src": "971:5:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 928, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "971:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "970:7:6" + }, + "scope": 935, + "src": "930:81:6", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 936, + "src": "282:731:6" + } + ], + "src": "0:1014:6" + }, + "id": 6 + }, + "d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/ERC20Pausable.sol": { + "ast": { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/ERC20Pausable.sol", + "exportedSymbols": { + "ERC20Pausable": [ + 1037 + ] + }, + "id": 1038, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 937, + "literals": [ + "solidity", + "^", + "0.5", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "0:23:7" + }, + { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/ERC20.sol", + "file": "./ERC20.sol", + "id": 938, + "nodeType": "ImportDirective", + "scope": 1038, + "sourceUnit": 878, + "src": "25:21:7", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/lifecycle/Pausable.sol", + "file": "../../lifecycle/Pausable.sol", + "id": 939, + "nodeType": "ImportDirective", + "scope": 1038, + "sourceUnit": 318, + "src": "47:38:7", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 940, + "name": "ERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 877, + "src": "195:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20_$877", + "typeString": "contract ERC20" + } + }, + "id": 941, + "nodeType": "InheritanceSpecifier", + "src": "195:5:7" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 942, + "name": "Pausable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 317, + "src": "202:8:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pausable_$317", + "typeString": "contract Pausable" + } + }, + "id": 943, + "nodeType": "InheritanceSpecifier", + "src": "202:8:7" + } + ], + "contractDependencies": [ + 234, + 317, + 877, + 1106 + ], + "contractKind": "contract", + "documentation": "@title Pausable token\n@dev ERC20 modified with pausable transfers.*", + "fullyImplemented": true, + "id": 1037, + "linearizedBaseContracts": [ + 1037, + 317, + 234, + 877, + 1106 + ], + "name": "ERC20Pausable", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 960, + "nodeType": "Block", + "src": "298:49:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 956, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 945, + "src": "330:2:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 957, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 947, + "src": "334:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 954, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1150, + "src": "315:5:7", + "typeDescriptions": { + "typeIdentifier": "t_super$_ERC20Pausable_$1037", + "typeString": "contract super ERC20Pausable" + } + }, + "id": 955, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 521, + "src": "315:14:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) returns (bool)" + } + }, + "id": 958, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "315:25:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 953, + "id": 959, + "nodeType": "Return", + "src": "308:32:7" + } + ] + }, + "documentation": null, + "id": 961, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 950, + "modifierName": { + "argumentTypes": null, + "id": 949, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 274, + "src": "269:13:7", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "269:13:7" + } + ], + "name": "transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 948, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 945, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 961, + "src": "235:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 944, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "235:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 947, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 961, + "src": "247:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 946, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "247:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "234:27:7" + }, + "returnParameters": { + "id": 953, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 952, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 961, + "src": "292:4:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 951, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "292:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "291:6:7" + }, + "scope": 1037, + "src": "217:130:7", + "stateMutability": "nonpayable", + "superFunction": 521, + "visibility": "public" + }, + { + "body": { + "id": 981, + "nodeType": "Block", + "src": "452:59:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 976, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 963, + "src": "488:4:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 977, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 965, + "src": "494:2:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 978, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 967, + "src": "498:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 974, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1150, + "src": "469:5:7", + "typeDescriptions": { + "typeIdentifier": "t_super$_ERC20Pausable_$1037", + "typeString": "contract super ERC20Pausable" + } + }, + "id": 975, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 606, + "src": "469:18:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,address,uint256) returns (bool)" + } + }, + "id": 979, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "469:35:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 973, + "id": 980, + "nodeType": "Return", + "src": "462:42:7" + } + ] + }, + "documentation": null, + "id": 982, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 970, + "modifierName": { + "argumentTypes": null, + "id": 969, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 274, + "src": "423:13:7", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "423:13:7" + } + ], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 968, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 963, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 982, + "src": "375:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 962, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "375:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 965, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 982, + "src": "389:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 964, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "389:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 967, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 982, + "src": "401:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 966, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "401:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "374:41:7" + }, + "returnParameters": { + "id": 973, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 972, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 982, + "src": "446:4:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 971, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "446:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "445:6:7" + }, + "scope": 1037, + "src": "353:158:7", + "stateMutability": "nonpayable", + "superFunction": 606, + "visibility": "public" + }, + { + "body": { + "id": 999, + "nodeType": "Block", + "src": "602:53:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 995, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 984, + "src": "633:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 996, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 986, + "src": "642:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 993, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1150, + "src": "619:5:7", + "typeDescriptions": { + "typeIdentifier": "t_super$_ERC20Pausable_$1037", + "typeString": "contract super ERC20Pausable" + } + }, + "id": 994, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "approve", + "nodeType": "MemberAccess", + "referencedDeclaration": 557, + "src": "619:13:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) returns (bool)" + } + }, + "id": 997, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "619:29:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 992, + "id": 998, + "nodeType": "Return", + "src": "612:36:7" + } + ] + }, + "documentation": null, + "id": 1000, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 989, + "modifierName": { + "argumentTypes": null, + "id": 988, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 274, + "src": "573:13:7", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "573:13:7" + } + ], + "name": "approve", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 987, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 984, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1000, + "src": "534:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 983, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "534:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 986, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1000, + "src": "551:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 985, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "551:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "533:32:7" + }, + "returnParameters": { + "id": 992, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 991, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1000, + "src": "596:4:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 990, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "596:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "595:6:7" + }, + "scope": 1037, + "src": "517:138:7", + "stateMutability": "nonpayable", + "superFunction": 557, + "visibility": "public" + }, + { + "body": { + "id": 1017, + "nodeType": "Block", + "src": "766:68:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1013, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1002, + "src": "807:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1014, + "name": "addedValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1004, + "src": "816:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1011, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1150, + "src": "783:5:7", + "typeDescriptions": { + "typeIdentifier": "t_super$_ERC20Pausable_$1037", + "typeString": "contract super ERC20Pausable" + } + }, + "id": 1012, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "increaseAllowance", + "nodeType": "MemberAccess", + "referencedDeclaration": 655, + "src": "783:23:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) returns (bool)" + } + }, + "id": 1015, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "783:44:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1010, + "id": 1016, + "nodeType": "Return", + "src": "776:51:7" + } + ] + }, + "documentation": null, + "id": 1018, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 1007, + "modifierName": { + "argumentTypes": null, + "id": 1006, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 274, + "src": "729:13:7", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "729:13:7" + } + ], + "name": "increaseAllowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1005, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1002, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1018, + "src": "688:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1001, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "688:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1004, + "name": "addedValue", + "nodeType": "VariableDeclaration", + "scope": 1018, + "src": "705:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1003, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "705:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "687:34:7" + }, + "returnParameters": { + "id": 1010, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1009, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1018, + "src": "752:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1008, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "752:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "751:14:7" + }, + "scope": 1037, + "src": "661:173:7", + "stateMutability": "nonpayable", + "superFunction": 655, + "visibility": "public" + }, + { + "body": { + "id": 1035, + "nodeType": "Block", + "src": "950:73:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1031, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1020, + "src": "991:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1032, + "name": "subtractedValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1022, + "src": "1000:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1029, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1150, + "src": "967:5:7", + "typeDescriptions": { + "typeIdentifier": "t_super$_ERC20Pausable_$1037", + "typeString": "contract super ERC20Pausable" + } + }, + "id": 1030, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "decreaseAllowance", + "nodeType": "MemberAccess", + "referencedDeclaration": 704, + "src": "967:23:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) returns (bool)" + } + }, + "id": 1033, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "967:49:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1028, + "id": 1034, + "nodeType": "Return", + "src": "960:56:7" + } + ] + }, + "documentation": null, + "id": 1036, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 1025, + "modifierName": { + "argumentTypes": null, + "id": 1024, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 274, + "src": "913:13:7", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "913:13:7" + } + ], + "name": "decreaseAllowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1023, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1020, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1036, + "src": "867:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1019, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "867:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1022, + "name": "subtractedValue", + "nodeType": "VariableDeclaration", + "scope": 1036, + "src": "884:20:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1021, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "884:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "866:39:7" + }, + "returnParameters": { + "id": 1028, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1027, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1036, + "src": "936:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1026, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "936:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "935:14:7" + }, + "scope": 1037, + "src": "840:183:7", + "stateMutability": "nonpayable", + "superFunction": 704, + "visibility": "public" + } + ], + "scope": 1038, + "src": "169:856:7" + } + ], + "src": "0:1026:7" + }, + "id": 7 + }, + "d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol": { + "ast": { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "exportedSymbols": { + "IERC20": [ + 1106 + ] + }, + "id": 1107, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1039, + "literals": [ + "solidity", + "^", + "0.5", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "0:23:8" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "interface", + "documentation": "@title ERC20 interface\n@dev see https://github.com/ethereum/EIPs/issues/20", + "fullyImplemented": false, + "id": 1106, + "linearizedBaseContracts": [ + 1106 + ], + "name": "IERC20", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "id": 1048, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1044, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1041, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1048, + "src": "155:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1040, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "155:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1043, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1048, + "src": "167:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1042, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "167:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "154:27:8" + }, + "returnParameters": { + "id": 1047, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1046, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1048, + "src": "200:4:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1045, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "200:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "199:6:8" + }, + "scope": 1106, + "src": "137:69:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 1057, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1053, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1050, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1057, + "src": "229:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1049, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "229:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1052, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1057, + "src": "246:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1051, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "246:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "228:32:8" + }, + "returnParameters": { + "id": 1056, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1055, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1057, + "src": "279:4:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1054, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "279:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "278:6:8" + }, + "scope": 1106, + "src": "212:73:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 1068, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1064, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1059, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 1068, + "src": "313:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1058, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "313:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1061, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1068, + "src": "327:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1060, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "327:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1063, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1068, + "src": "339:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1062, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "339:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "312:41:8" + }, + "returnParameters": { + "id": 1067, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1066, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1068, + "src": "372:4:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1065, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "372:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "371:6:8" + }, + "scope": 1106, + "src": "291:87:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 1073, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "totalSupply", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1069, + "nodeType": "ParameterList", + "parameters": [], + "src": "404:2:8" + }, + "returnParameters": { + "id": 1072, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1071, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1073, + "src": "430:7:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1070, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "430:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "429:9:8" + }, + "scope": 1106, + "src": "384:55:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 1080, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "balanceOf", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1076, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1075, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 1080, + "src": "464:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1074, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "464:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "463:13:8" + }, + "returnParameters": { + "id": 1079, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1078, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1080, + "src": "500:7:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1077, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "500:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "499:9:8" + }, + "scope": 1106, + "src": "445:64:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 1089, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "allowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1085, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1082, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 1089, + "src": "534:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1081, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "534:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1084, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1089, + "src": "549:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1083, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "549:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "533:32:8" + }, + "returnParameters": { + "id": 1088, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1087, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1089, + "src": "589:7:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1086, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "589:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "588:9:8" + }, + "scope": 1106, + "src": "515:83:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "anonymous": false, + "documentation": null, + "id": 1097, + "name": "Transfer", + "nodeType": "EventDefinition", + "parameters": { + "id": 1096, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1091, + "indexed": true, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 1097, + "src": "619:20:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1090, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "619:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1093, + "indexed": true, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1097, + "src": "641:18:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1092, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "641:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1095, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1097, + "src": "661:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1094, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "661:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "618:57:8" + }, + "src": "604:72:8" + }, + { + "anonymous": false, + "documentation": null, + "id": 1105, + "name": "Approval", + "nodeType": "EventDefinition", + "parameters": { + "id": 1104, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1099, + "indexed": true, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 1105, + "src": "697:21:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1098, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "697:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1101, + "indexed": true, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1105, + "src": "720:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1100, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "720:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1103, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1105, + "src": "745:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1102, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "745:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "696:63:8" + }, + "src": "682:78:8" + } + ], + "scope": 1107, + "src": "114:648:8" + } + ], + "src": "0:763:8" + }, + "id": 8 + } + } +} \ No newline at end of file diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/bin/AlgoTokenV1.abi b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/bin/AlgoTokenV1.abi new file mode 100644 index 000000000..2b88afa15 --- /dev/null +++ b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/bin/AlgoTokenV1.abi @@ -0,0 +1 @@ +[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"value","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"from","type":"address"},{"name":"to","type":"address"},{"name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"INITIAL_SUPPLY","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"unpause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"account","type":"address"}],"name":"isPauser","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"paused","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renouncePauser","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"account","type":"address"}],"name":"addPauser","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"pause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"to","type":"address"},{"name":"value","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"},{"name":"spender","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"account","type":"address"}],"name":"PauserAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"account","type":"address"}],"name":"PauserRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"spender","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Approval","type":"event"}] \ No newline at end of file diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/bin/AlgoTokenV1.bin b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/bin/AlgoTokenV1.bin new file mode 100644 index 000000000..0bcdf427e --- /dev/null +++ b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/bin/AlgoTokenV1.bin @@ -0,0 +1 @@ +60806040523480156200001157600080fd5b50604080518082018252600581527f416c676f7300000000000000000000000000000000000000000000000000000060208083019182528351808501909452600484527f414c474f00000000000000000000000000000000000000000000000000000000908401528151919291601291620000909160039190620002c1565b508151620000a6906004906020850190620002c1565b506005805460ff191660ff9290921691909117905550620000d290503364010000000062000103810204565b6007805460ff19169055620000fd336b033b2e3c9fd0803ce800000064010000000062000155810204565b62000366565b6200011e60068264010000000062000b2c6200021482021704565b604051600160a060020a038216907f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f890600090a250565b600160a060020a03821615156200016b57600080fd5b60025462000188908264010000000062000ace6200026f82021704565b600255600160a060020a038216600090815260208190526040902054620001be908264010000000062000ace6200026f82021704565b600160a060020a0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b600160a060020a03811615156200022a57600080fd5b6200023f828264010000000062000289810204565b156200024a57600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b6000828201838110156200028257600080fd5b9392505050565b6000600160a060020a0382161515620002a157600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200030457805160ff191683800117855562000334565b8280016001018555821562000334579182015b828111156200033457825182559160200191906001019062000317565b506200034292915062000346565b5090565b6200036391905b808211156200034257600081556001016200034d565b90565b610ba680620003766000396000f3fe608060405234801561001057600080fd5b5060043610610133576000357c0100000000000000000000000000000000000000000000000000000000900480635c975abb116100bf5780638456cb591161008e5780638456cb591461032357806395d89b411461032b578063a457c2d714610333578063a9059cbb1461035f578063dd62ed3e1461038b57610133565b80635c975abb146102c75780636ef8d66d146102cf57806370a08231146102d757806382dc1ec4146102fd57610133565b80632ff2e9dc116101065780632ff2e9dc14610245578063313ce5671461024d578063395093511461026b5780633f4ba83a1461029757806346fbf68e146102a157610133565b806306fdde0314610138578063095ea7b3146101b557806318160ddd146101f557806323b872dd1461020f575b600080fd5b6101406103b9565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561017a578181015183820152602001610162565b50505050905090810190601f1680156101a75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101e1600480360360408110156101cb57600080fd5b50600160a060020a03813516906020013561044f565b604080519115158252519081900360200190f35b6101fd610473565b60408051918252519081900360200190f35b6101e16004803603606081101561022557600080fd5b50600160a060020a03813581169160208101359091169060400135610479565b6101fd61049f565b6102556104af565b6040805160ff9092168252519081900360200190f35b6101e16004803603604081101561028157600080fd5b50600160a060020a0381351690602001356104b8565b61029f6104d5565b005b6101e1600480360360208110156102b757600080fd5b5035600160a060020a0316610539565b6101e1610552565b61029f61055b565b6101fd600480360360208110156102ed57600080fd5b5035600160a060020a0316610566565b61029f6004803603602081101561031357600080fd5b5035600160a060020a0316610581565b61029f6105a1565b610140610607565b6101e16004803603604081101561034957600080fd5b50600160a060020a038135169060200135610668565b6101e16004803603604081101561037557600080fd5b50600160a060020a038135169060200135610685565b6101fd600480360360408110156103a157600080fd5b50600160a060020a03813581169160200135166106a2565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104455780601f1061041a57610100808354040283529160200191610445565b820191906000526020600020905b81548152906001019060200180831161042857829003601f168201915b5050505050905090565b60075460009060ff161561046257600080fd5b61046c83836106cd565b9392505050565b60025490565b60075460009060ff161561048c57600080fd5b61049784848461074b565b949350505050565b6b033b2e3c9fd0803ce800000081565b60055460ff1690565b60075460009060ff16156104cb57600080fd5b61046c8383610814565b6104de33610539565b15156104e957600080fd5b60075460ff1615156104fa57600080fd5b6007805460ff191690556040805133815290517f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa9181900360200190a1565b600061054c60068363ffffffff6108c416565b92915050565b60075460ff1690565b610564336108fb565b565b600160a060020a031660009081526020819052604090205490565b61058a33610539565b151561059557600080fd5b61059e81610943565b50565b6105aa33610539565b15156105b557600080fd5b60075460ff16156105c557600080fd5b6007805460ff191660011790556040805133815290517f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2589181900360200190a1565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104455780601f1061041a57610100808354040283529160200191610445565b60075460009060ff161561067b57600080fd5b61046c838361098b565b60075460009060ff161561069857600080fd5b61046c83836109d6565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6000600160a060020a03831615156106e457600080fd5b336000818152600160209081526040808320600160a060020a03881680855290835292819020869055805186815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a350600192915050565b600160a060020a038316600090815260016020908152604080832033845290915281205461077f908363ffffffff6109ec16565b600160a060020a03851660009081526001602090815260408083203384529091529020556107ae848484610a01565b600160a060020a0384166000818152600160209081526040808320338085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b6000600160a060020a038316151561082b57600080fd5b336000908152600160209081526040808320600160a060020a038716845290915290205461085f908363ffffffff610ace16565b336000818152600160209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b6000600160a060020a03821615156108db57600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b61090c60068263ffffffff610ae016565b604051600160a060020a038216907fcd265ebaf09df2871cc7bd4133404a235ba12eff2041bb89d9c714a2621c7c7e90600090a250565b61095460068263ffffffff610b2c16565b604051600160a060020a038216907f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f890600090a250565b6000600160a060020a03831615156109a257600080fd5b336000908152600160209081526040808320600160a060020a038716845290915290205461085f908363ffffffff6109ec16565b60006109e3338484610a01565b50600192915050565b6000828211156109fb57600080fd5b50900390565b600160a060020a0382161515610a1657600080fd5b600160a060020a038316600090815260208190526040902054610a3f908263ffffffff6109ec16565b600160a060020a038085166000908152602081905260408082209390935590841681522054610a74908263ffffffff610ace16565b600160a060020a038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008282018381101561046c57600080fd5b600160a060020a0381161515610af557600080fd5b610aff82826108c4565b1515610b0a57600080fd5b600160a060020a0316600090815260209190915260409020805460ff19169055565b600160a060020a0381161515610b4157600080fd5b610b4b82826108c4565b15610b5557600080fd5b600160a060020a0316600090815260209190915260409020805460ff1916600117905556fea165627a7a72305820a8673657c914c80ad8879e073b63b3c05fd0190188d56a14948896f8205677a60029 \ No newline at end of file diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/bin/AlgoTokenV1.json b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/bin/AlgoTokenV1.json new file mode 100644 index 000000000..7ffc522e5 --- /dev/null +++ b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/bin/AlgoTokenV1.json @@ -0,0 +1,455 @@ +{ + "abi": [ + { + "constant": true, + "inputs": [], + "name": "name", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "spender", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "from", + "type": "address" + }, + { + "name": "to", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "INITIAL_SUPPLY", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "decimals", + "outputs": [ + { + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "spender", + "type": "address" + }, + { + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "unpause", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "isPauser", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "paused", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renouncePauser", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "addPauser", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "pause", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "symbol", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "spender", + "type": "address" + }, + { + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "to", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "owner", + "type": "address" + }, + { + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "account", + "type": "address" + } + ], + "name": "PauserAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "account", + "type": "address" + } + ], + "name": "PauserRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "from", + "type": "address" + }, + { + "indexed": true, + "name": "to", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + } + ], + "bytecode": "60806040523480156200001157600080fd5b50604080518082018252600581527f416c676f7300000000000000000000000000000000000000000000000000000060208083019182528351808501909452600484527f414c474f00000000000000000000000000000000000000000000000000000000908401528151919291601291620000909160039190620002c1565b508151620000a6906004906020850190620002c1565b506005805460ff191660ff9290921691909117905550620000d290503364010000000062000103810204565b6007805460ff19169055620000fd336b033b2e3c9fd0803ce800000064010000000062000155810204565b62000366565b6200011e60068264010000000062000b2c6200021482021704565b604051600160a060020a038216907f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f890600090a250565b600160a060020a03821615156200016b57600080fd5b60025462000188908264010000000062000ace6200026f82021704565b600255600160a060020a038216600090815260208190526040902054620001be908264010000000062000ace6200026f82021704565b600160a060020a0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b600160a060020a03811615156200022a57600080fd5b6200023f828264010000000062000289810204565b156200024a57600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b6000828201838110156200028257600080fd5b9392505050565b6000600160a060020a0382161515620002a157600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200030457805160ff191683800117855562000334565b8280016001018555821562000334579182015b828111156200033457825182559160200191906001019062000317565b506200034292915062000346565b5090565b6200036391905b808211156200034257600081556001016200034d565b90565b610ba680620003766000396000f3fe608060405234801561001057600080fd5b5060043610610133576000357c0100000000000000000000000000000000000000000000000000000000900480635c975abb116100bf5780638456cb591161008e5780638456cb591461032357806395d89b411461032b578063a457c2d714610333578063a9059cbb1461035f578063dd62ed3e1461038b57610133565b80635c975abb146102c75780636ef8d66d146102cf57806370a08231146102d757806382dc1ec4146102fd57610133565b80632ff2e9dc116101065780632ff2e9dc14610245578063313ce5671461024d578063395093511461026b5780633f4ba83a1461029757806346fbf68e146102a157610133565b806306fdde0314610138578063095ea7b3146101b557806318160ddd146101f557806323b872dd1461020f575b600080fd5b6101406103b9565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561017a578181015183820152602001610162565b50505050905090810190601f1680156101a75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101e1600480360360408110156101cb57600080fd5b50600160a060020a03813516906020013561044f565b604080519115158252519081900360200190f35b6101fd610473565b60408051918252519081900360200190f35b6101e16004803603606081101561022557600080fd5b50600160a060020a03813581169160208101359091169060400135610479565b6101fd61049f565b6102556104af565b6040805160ff9092168252519081900360200190f35b6101e16004803603604081101561028157600080fd5b50600160a060020a0381351690602001356104b8565b61029f6104d5565b005b6101e1600480360360208110156102b757600080fd5b5035600160a060020a0316610539565b6101e1610552565b61029f61055b565b6101fd600480360360208110156102ed57600080fd5b5035600160a060020a0316610566565b61029f6004803603602081101561031357600080fd5b5035600160a060020a0316610581565b61029f6105a1565b610140610607565b6101e16004803603604081101561034957600080fd5b50600160a060020a038135169060200135610668565b6101e16004803603604081101561037557600080fd5b50600160a060020a038135169060200135610685565b6101fd600480360360408110156103a157600080fd5b50600160a060020a03813581169160200135166106a2565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104455780601f1061041a57610100808354040283529160200191610445565b820191906000526020600020905b81548152906001019060200180831161042857829003601f168201915b5050505050905090565b60075460009060ff161561046257600080fd5b61046c83836106cd565b9392505050565b60025490565b60075460009060ff161561048c57600080fd5b61049784848461074b565b949350505050565b6b033b2e3c9fd0803ce800000081565b60055460ff1690565b60075460009060ff16156104cb57600080fd5b61046c8383610814565b6104de33610539565b15156104e957600080fd5b60075460ff1615156104fa57600080fd5b6007805460ff191690556040805133815290517f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa9181900360200190a1565b600061054c60068363ffffffff6108c416565b92915050565b60075460ff1690565b610564336108fb565b565b600160a060020a031660009081526020819052604090205490565b61058a33610539565b151561059557600080fd5b61059e81610943565b50565b6105aa33610539565b15156105b557600080fd5b60075460ff16156105c557600080fd5b6007805460ff191660011790556040805133815290517f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2589181900360200190a1565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104455780601f1061041a57610100808354040283529160200191610445565b60075460009060ff161561067b57600080fd5b61046c838361098b565b60075460009060ff161561069857600080fd5b61046c83836109d6565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6000600160a060020a03831615156106e457600080fd5b336000818152600160209081526040808320600160a060020a03881680855290835292819020869055805186815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a350600192915050565b600160a060020a038316600090815260016020908152604080832033845290915281205461077f908363ffffffff6109ec16565b600160a060020a03851660009081526001602090815260408083203384529091529020556107ae848484610a01565b600160a060020a0384166000818152600160209081526040808320338085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b6000600160a060020a038316151561082b57600080fd5b336000908152600160209081526040808320600160a060020a038716845290915290205461085f908363ffffffff610ace16565b336000818152600160209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b6000600160a060020a03821615156108db57600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b61090c60068263ffffffff610ae016565b604051600160a060020a038216907fcd265ebaf09df2871cc7bd4133404a235ba12eff2041bb89d9c714a2621c7c7e90600090a250565b61095460068263ffffffff610b2c16565b604051600160a060020a038216907f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f890600090a250565b6000600160a060020a03831615156109a257600080fd5b336000908152600160209081526040808320600160a060020a038716845290915290205461085f908363ffffffff6109ec16565b60006109e3338484610a01565b50600192915050565b6000828211156109fb57600080fd5b50900390565b600160a060020a0382161515610a1657600080fd5b600160a060020a038316600090815260208190526040902054610a3f908263ffffffff6109ec16565b600160a060020a038085166000908152602081905260408082209390935590841681522054610a74908263ffffffff610ace16565b600160a060020a038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008282018381101561046c57600080fd5b600160a060020a0381161515610af557600080fd5b610aff82826108c4565b1515610b0a57600080fd5b600160a060020a0316600090815260209190915260409020805460ff19169055565b600160a060020a0381161515610b4157600080fd5b610b4b82826108c4565b15610b5557600080fd5b600160a060020a0316600090815260209190915260409020805460ff1916600117905556fea165627a7a72305820a8673657c914c80ad8879e073b63b3c05fd0190188d56a14948896f8205677a60029", + "functionHashes": { + "INITIAL_SUPPLY()": "2ff2e9dc", + "addPauser(address)": "82dc1ec4", + "allowance(address,address)": "dd62ed3e", + "approve(address,uint256)": "095ea7b3", + "balanceOf(address)": "70a08231", + "decimals()": "313ce567", + "decreaseAllowance(address,uint256)": "a457c2d7", + "increaseAllowance(address,uint256)": "39509351", + "isPauser(address)": "46fbf68e", + "name()": "06fdde03", + "pause()": "8456cb59", + "paused()": "5c975abb", + "renouncePauser()": "6ef8d66d", + "symbol()": "95d89b41", + "totalSupply()": "18160ddd", + "transfer(address,uint256)": "a9059cbb", + "transferFrom(address,address,uint256)": "23b872dd", + "unpause()": "3f4ba83a" + }, + "gasEstimates": { + "creation": { + "codeDepositCost": "596400", + "executionCost": "infinite", + "totalCost": "infinite" + }, + "external": { + "INITIAL_SUPPLY()": "226", + "addPauser(address)": "infinite", + "allowance(address,address)": "879", + "approve(address,uint256)": "22820", + "balanceOf(address)": "731", + "decimals()": "463", + "decreaseAllowance(address,uint256)": "infinite", + "increaseAllowance(address,uint256)": "infinite", + "isPauser(address)": "infinite", + "name()": "infinite", + "pause()": "infinite", + "paused()": "438", + "renouncePauser()": "infinite", + "symbol()": "infinite", + "totalSupply()": "471", + "transfer(address,uint256)": "infinite", + "transferFrom(address,address,uint256)": "infinite", + "unpause()": "infinite" + } + } +} \ No newline at end of file diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/package-lock.json b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/package-lock.json new file mode 100644 index 000000000..58a232dee --- /dev/null +++ b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/package-lock.json @@ -0,0 +1,555 @@ +{ + "name": "algo-erc20-token", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "requires": { + "file-uri-to-path": "1.0.0" + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=" + }, + "cliui": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "requires": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + } + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" + }, + "command-exists": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/command-exists/-/command-exists-1.2.8.tgz", + "integrity": "sha512-PM54PkseWbiiD/mMsbvW351/u+dafwTJ0ye2qB60G1aGQP9j3xK2gmMDc+R34L3nDtx4qMCitXT75mkbkGJDLw==" + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "requires": { + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" + }, + "execa": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "requires": { + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, + "file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "requires": { + "locate-path": "^2.0.0" + } + }, + "fs-extra": { + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", + "integrity": "sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A=", + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^2.1.0", + "klaw": "^1.0.0", + "path-is-absolute": "^1.0.0", + "rimraf": "^2.2.8" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "get-caller-file": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", + "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==" + }, + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" + }, + "glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "graceful-fs": { + "version": "4.1.15", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", + "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==" + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=" + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + }, + "jsonfile": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", + "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "keccak": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/keccak/-/keccak-1.4.0.tgz", + "integrity": "sha512-eZVaCpblK5formjPjeTBik7TAg+pqnDrMHIffSvi9Lh7PQgM1+hSzakUeZFCk9DVVG0dacZJuaz2ntwlzZUIBw==", + "requires": { + "bindings": "^1.2.1", + "inherits": "^2.0.3", + "nan": "^2.2.1", + "safe-buffer": "^5.1.0" + } + }, + "klaw": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", + "integrity": "sha1-QIhDO0azsbolnXh4XY6W9zugJDk=", + "requires": { + "graceful-fs": "^4.1.9" + } + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "requires": { + "invert-kv": "^1.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "mem": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", + "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "memorystream": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", + "integrity": "sha1-htcJCzDORV1j+64S3aUaR93K+bI=" + }, + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==" + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "nan": { + "version": "2.12.1", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.12.1.tgz", + "integrity": "sha512-JY7V6lRkStKcKTvHO5NVSQRv+RV+FIL5pvDoLiAtSL9pKlC5x9PKQcZDsq7m4FO4d57mkhC6Z+QhAh3Jdk5JFw==" + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "requires": { + "path-key": "^2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "openzeppelin-solidity": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/openzeppelin-solidity/-/openzeppelin-solidity-2.1.3.tgz", + "integrity": "sha512-Zz595xw6w4ZrNU3JJJTlPd8bHFbHv5OkJlkqsM2i+NBs6CzImoHI3dZ+nmhkfR+p52cGXKmayAGbnfdCum1SMg==" + }, + "os-locale": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", + "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", + "requires": { + "execa": "^0.7.0", + "lcid": "^1.0.0", + "mem": "^1.1.0" + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=" + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" + }, + "require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==" + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=" + }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "requires": { + "glob": "^7.1.3" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "semver": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==" + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" + }, + "solc": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/solc/-/solc-0.5.4.tgz", + "integrity": "sha512-Jz3yz2mct0AYzR83/jBgxDqrLXTHhYUg2G2PVJbMMt5Vu+8e3Of1Mn3nvjPw5mh46jrzt8l4fBN7vHqG5ZF0cw==", + "requires": { + "command-exists": "^1.2.8", + "fs-extra": "^0.30.0", + "keccak": "^1.0.2", + "memorystream": "^0.3.1", + "require-from-string": "^2.0.0", + "semver": "^5.5.0", + "tmp": "0.0.33", + "yargs": "^11.0.0" + } + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" + }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "requires": { + "os-tmpdir": "~1.0.2" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "requires": { + "isexe": "^2.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "^2.0.0" + } + } + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=" + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" + }, + "yargs": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-11.1.0.tgz", + "integrity": "sha512-NwW69J42EsCSanF8kyn5upxvjp5ds+t3+udGBeTbFnERA+lF541DDpMawzo4z6W/QrzNM18D+BPMiOBibnFV5A==", + "requires": { + "cliui": "^4.0.0", + "decamelize": "^1.1.1", + "find-up": "^2.1.0", + "get-caller-file": "^1.0.1", + "os-locale": "^2.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^9.0.2" + } + }, + "yargs-parser": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-9.0.2.tgz", + "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", + "requires": { + "camelcase": "^4.1.0" + } + } + } +} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/package.json b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/package.json new file mode 100644 index 000000000..4233f45c1 --- /dev/null +++ b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/package.json @@ -0,0 +1,15 @@ +{ + "name": "algo-erc20-token", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "dependencies": { + "openzeppelin-solidity": "^2.1.3", + "solc": "^0.5.4" + } +} diff --git a/labs/algo-erc20-token/test/AdvancedAlgos.AlgoToken.AlgoErc20Token.IntegrationTests/AdvancedAlgos.AlgoToken.AlgoErc20Token.IntegrationTests.csproj b/labs/algo-erc20-token/test/AdvancedAlgos.AlgoToken.AlgoErc20Token.IntegrationTests/AdvancedAlgos.AlgoToken.AlgoErc20Token.IntegrationTests.csproj new file mode 100644 index 000000000..923b75de0 --- /dev/null +++ b/labs/algo-erc20-token/test/AdvancedAlgos.AlgoToken.AlgoErc20Token.IntegrationTests/AdvancedAlgos.AlgoToken.AlgoErc20Token.IntegrationTests.csproj @@ -0,0 +1,23 @@ + + + + netcoreapp2.1 + true + latest + false + + + + + + + + + + + + + + + + diff --git a/labs/algo-erc20-token/test/AdvancedAlgos.AlgoToken.AlgoErc20Token.IntegrationTests/AlgoTokenV1Tests.cs b/labs/algo-erc20-token/test/AdvancedAlgos.AlgoToken.AlgoErc20Token.IntegrationTests/AlgoTokenV1Tests.cs new file mode 100644 index 000000000..78e097536 --- /dev/null +++ b/labs/algo-erc20-token/test/AdvancedAlgos.AlgoToken.AlgoErc20Token.IntegrationTests/AlgoTokenV1Tests.cs @@ -0,0 +1,73 @@ +using System; +using System.Numerics; +using System.Threading.Tasks; +using AdvancedAlgos.AlgoToken.Framework.Ethereum; +using AdvancedAlgos.AlgoToken.Framework.Ethereum.Exceptions; +using AdvancedAlgos.AlgoToken.Framework.Ethereum.IntegrationTest; +using Nethereum.Web3; +using Nethereum.Web3.Accounts; +using Xunit; + +namespace AdvancedAlgos.AlgoToken.AlgoErc20Token.IntegrationTests +{ + public class AlgoTokenV1Tests + { + private const long INITIAL_SUPPLY = 1000000000; + + [Fact] + public async Task DeployContractAndTransferTokensTest() + { + EthNetwork.UseDefaultTestNet(); + + var account1 = new Account(EthNetwork.Instance.PrefundedPrivateKey); + var account2 = EthAccountFactory.Create(); + + // Create the ERC20 token... + var contract = new AlgoTokenV1(EthNetwork.Instance.GetWeb3(account1), EthNetwork.Instance.GasPriceProvider); + await contract.DeployAsync(); + + // Ensure that the initial supply is allocated to the owner... + Assert.Equal(INITIAL_SUPPLY.Algo(), await contract.BalanceOfAsync(account1.Address)); + + // Perform a transfer... + await contract.TransferAsync(account2.Address, 2.Algo()); + + // Ensure the receiver got the tokens... + Assert.Equal(2.Algo(), await contract.BalanceOfAsync(account2.Address)); + } + + [Fact] + public async Task PausableFeatureTest() + { + EthNetwork.UseDefaultTestNet(); + + var account1 = new Account(EthNetwork.Instance.PrefundedPrivateKey); + var account2 = EthAccountFactory.Create(); + + // Create the ERC20 token... + var contract = new AlgoTokenV1(EthNetwork.Instance.GetWeb3(account1), EthNetwork.Instance.GasPriceProvider); + await contract.DeployAsync(); + + // Perform a transfer and check the result... + await contract.TransferAsync(account2.Address, 2.Algo()); + Assert.Equal(2.Algo(), await contract.BalanceOfAsync(account2.Address)); + + // Pause the contract... + await contract.PauseAsync(); + + // Ensure the contract cannot be used while is in paused state... + await Assert.ThrowsAsync( + () => contract.TransferAsync(account2.Address, 2.Algo())); + + // Ensure the balance was not modified... + Assert.Equal(2.Algo(), await contract.BalanceOfAsync(account2.Address)); + + // Unpause the contract... + await contract.UnpauseAsync(); + + // Try a new transfer and ensure it succeeded... + await contract.TransferAsync(account2.Address, 2.Algo()); + Assert.Equal(4.Algo(), await contract.BalanceOfAsync(account2.Address)); + } + } +} diff --git a/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/AdvancedAlgos.AlgoToken.AlgoTokenDistribution.csproj b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/AdvancedAlgos.AlgoToken.AlgoTokenDistribution.csproj new file mode 100644 index 000000000..e4165875b --- /dev/null +++ b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/AdvancedAlgos.AlgoToken.AlgoTokenDistribution.csproj @@ -0,0 +1,25 @@ + + + + netcoreapp2.1 + true + latest + + + + + + + + + + + + + + + + + + + diff --git a/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/AlgoFees.cs b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/AlgoFees.cs new file mode 100644 index 000000000..55797e885 --- /dev/null +++ b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/AlgoFees.cs @@ -0,0 +1,74 @@ +using System; +using System.Collections.Generic; +using System.Numerics; +using System.Text; +using System.Threading.Tasks; +using AdvancedAlgos.AlgoToken.Framework.Ethereum; +using Nethereum.Contracts; +using Nethereum.RPC.Eth.DTOs; +using Nethereum.Web3; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenDistribution +{ + public class AlgoFees : SmartContract + { + private Function _registerMiner; + private Function _unregisterMiner; + private Function _mine; + private Function _terminate; + + private Function _addSystem; + private Function _addCoreTeam; + + private Function _getMinerCount; + private Function _getMinerByIndex; + + public AlgoFees(Web3 web3, IGasPriceProvider gasPriceProvider) : base(web3, gasPriceProvider) { } + public AlgoFees(string contractAddress, Web3 web3, IGasPriceProvider gasPriceProvider) : base(contractAddress, web3, gasPriceProvider) { } + + protected override string AbiResourceName => $"SmartContracts.src.bin.{nameof(AlgoFees)}.abi"; + protected override string BinResourceName => $"SmartContracts.src.bin.{nameof(AlgoFees)}.bin"; + protected override BigInteger DeploymentGasUnits => 1400000; + + public Task DeployAsync(string tokenAddress) + => base.DeployAsync(tokenAddress); + + protected override void Initialize(Contract contractDescriptor) + { + _registerMiner = contractDescriptor.GetFunction("registerMiner"); + _unregisterMiner = contractDescriptor.GetFunction("unregisterMiner"); + _mine = contractDescriptor.GetFunction("mine"); + _terminate = contractDescriptor.GetFunction("terminate"); + + _addSystem = contractDescriptor.GetFunction("addSystem"); + _addCoreTeam = contractDescriptor.GetFunction("addCoreTeam"); + + _getMinerCount = contractDescriptor.GetFunction("getMinerCount"); + _getMinerByIndex = contractDescriptor.GetFunction("getMinerByIndex"); + } + + public Task RegisterMinerAsync(string minerAddress) => + InvokeAsync(_registerMiner, 900000, minerAddress); + + public Task UnregisterMinerAsync(string minerAddress) => + InvokeAsync(_unregisterMiner, 900000, minerAddress); + + public Task MineAsync() => + InvokeAsync(_mine, 1500000); + + public Task TerminateAsync() => + InvokeAsync(_terminate, 900000); + + public Task AddSystemAsync(string account) => + InvokeAsync(_addSystem, 900000, account); + + public Task AddCoreTeamAsync(string account) => + InvokeAsync(_addCoreTeam, 900000, account); + + public Task GetMinerCountAsync() => + _getMinerCount.CallAsync(); + + public Task GetMinerByIndexAsync(BigInteger index) => + _getMinerByIndex.CallAsync(index); + } +} diff --git a/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/AlgoMiner.cs b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/AlgoMiner.cs new file mode 100644 index 000000000..6aa9675a5 --- /dev/null +++ b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/AlgoMiner.cs @@ -0,0 +1,102 @@ +using System; +using System.Collections.Generic; +using System.Numerics; +using System.Text; +using System.Threading.Tasks; +using AdvancedAlgos.AlgoToken.Framework.Ethereum; +using Nethereum.Contracts; +using Nethereum.RPC.Eth.DTOs; +using Nethereum.Web3; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenDistribution +{ + public class AlgoMiner : SmartContract + { + private Function _activateMiner; + private Function _deactivateMiner; + private Function _migrateMiner; + private Function _pauseMining; + private Function _resumeMining; + private Function _stopAndRemoveOwnership; + private Function _resetMiner; + private Function _startMining; + private Function _stopMining; + private Function _mine; + private Function _terminate; + + private Function _addSystem; + private Function _addCoreTeam; + private Function _addSupervisor; + + public AlgoMiner(Web3 web3, IGasPriceProvider gasPriceProvider) : base(web3, gasPriceProvider) { } + public AlgoMiner(string contractAddress, Web3 web3, IGasPriceProvider gasPriceProvider) : base(contractAddress, web3, gasPriceProvider) { } + + protected override string AbiResourceName => $"SmartContracts.src.bin.{nameof(AlgoMiner)}.abi"; + protected override string BinResourceName => $"SmartContracts.src.bin.{nameof(AlgoMiner)}.bin"; + protected override BigInteger DeploymentGasUnits => 1600000; + + public Task DeployAsync(byte minerType, byte category, string minerAccountAddress, string referralAccountAddress, string tokenAddress) + => base.DeployAsync(minerType, category, minerAccountAddress, referralAccountAddress, tokenAddress); + + protected override void Initialize(Contract contractDescriptor) + { + _activateMiner = contractDescriptor.GetFunction("activateMiner"); + _deactivateMiner = contractDescriptor.GetFunction("deactivateMiner"); + _migrateMiner = contractDescriptor.GetFunction("migrateMiner"); + _pauseMining = contractDescriptor.GetFunction("pauseMining"); + _resumeMining = contractDescriptor.GetFunction("resumeMining"); + _stopAndRemoveOwnership = contractDescriptor.GetFunction("stopAndRemoveOwnership"); + _resetMiner = contractDescriptor.GetFunction("resetMiner"); + _startMining = contractDescriptor.GetFunction("startMining"); + _stopMining = contractDescriptor.GetFunction("stopMining"); + _mine = contractDescriptor.GetFunction("mine"); + _terminate = contractDescriptor.GetFunction("terminate"); + + _addSystem = contractDescriptor.GetFunction("addSystem"); + _addCoreTeam = contractDescriptor.GetFunction("addCoreTeam"); + _addSupervisor = contractDescriptor.GetFunction("addSupervisor"); + } + + public Task ActivateMinerAsync() => + InvokeAsync(_activateMiner, 900000); + + public Task DeactivateMinerAsync() => + InvokeAsync(_deactivateMiner, 900000); + + public Task MigrateMinerAsync(string newMinerAddress) => + InvokeAsync(_migrateMiner, 900000, newMinerAddress); + + public Task PauseMiningAsync() => + InvokeAsync(_pauseMining, 900000); + + public Task ResumeMiningAsync() => + InvokeAsync(_resumeMining, 900000); + + public Task StopAndRemoveOwnershipAsync() => + InvokeAsync(_stopAndRemoveOwnership, 900000); + + public Task ResetMinerAsync(string newOwnerAddress, string newReferralAddress) => + InvokeAsync(_resetMiner, 900000, newOwnerAddress, newReferralAddress); + + public Task StartMiningAsync() => + InvokeAsync(_startMining, 900000); + + public Task StopMiningAsync() => + InvokeAsync(_stopMining, 900000); + + public Task MineAsync() => + InvokeAsync(_mine, 900000); + + public Task TerminateAsync() => + InvokeAsync(_terminate, 900000); + + public Task AddSystemAsync(string account) => + InvokeAsync(_addSystem, 900000, account); + + public Task AddCoreTeamAsync(string account) => + InvokeAsync(_addCoreTeam, 900000, account); + + public Task AddSupervisorAsync(string account) => + InvokeAsync(_addSupervisor, 900000, account); + } +} diff --git a/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/AlgoPool.cs b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/AlgoPool.cs new file mode 100644 index 000000000..1446d9f58 --- /dev/null +++ b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/AlgoPool.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.Numerics; +using System.Text; +using System.Threading.Tasks; +using AdvancedAlgos.AlgoToken.Framework.Ethereum; +using Nethereum.Contracts; +using Nethereum.RPC.Eth.DTOs; +using Nethereum.Web3; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenDistribution +{ + public class AlgoPool : SmartContract + { + private Function _transferToMiner; + private Function _terminate; + + public AlgoPool(Web3 web3, IGasPriceProvider gasPriceProvider) : base(web3, gasPriceProvider) { } + public AlgoPool(string contractAddress, Web3 web3, IGasPriceProvider gasPriceProvider) : base(contractAddress, web3, gasPriceProvider) { } + + protected override string AbiResourceName => $"SmartContracts.src.bin.{nameof(AlgoPool)}.abi"; + protected override string BinResourceName => $"SmartContracts.src.bin.{nameof(AlgoPool)}.bin"; + protected override BigInteger DeploymentGasUnits => 1200000; + + public Task DeployAsync(byte poolType, string tokenAddress) + => base.DeployAsync(poolType, tokenAddress); + + protected override void Initialize(Contract contractDescriptor) + { + _transferToMiner = contractDescriptor.GetFunction("transferToMiner"); + _terminate = contractDescriptor.GetFunction("terminate"); + } + + public Task TransferToMinerAsync(string minerAddress) => + InvokeAsync(_transferToMiner, 900000, minerAddress); + + public Task TerminateAsync() => + InvokeAsync(_terminate, 900000); + } +} diff --git a/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/Algorithms/FeesDistributionAlgorithm.cs b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/Algorithms/FeesDistributionAlgorithm.cs new file mode 100644 index 000000000..6fc608b5c --- /dev/null +++ b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/Algorithms/FeesDistributionAlgorithm.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenDistribution.Algorithms +{ + public static class FeesDistributionAlgorithm + { + private static decimal[] _categoryProportions = new decimal[] + { + 1, + 10, + 20, + 30, + 40, + 50 + }; + + public static decimal[] Distribute(decimal totalAmount, long[] miners) + { + decimal totalProportion = 0; + + for (int i = 0; i < 6; i++) + { + totalProportion += _categoryProportions[i] * miners[i]; + } + + var allocationPercentage = new decimal[6]; + + for (int i = 0; i < 6; i++) + { + if (miners[i] > 0) allocationPercentage[i] = _categoryProportions[i] / totalProportion; + } + + var feePerMiner = new decimal[6]; + + for (int i = 0; i < 6; i++) + { + if (miners[i] > 0) feePerMiner[i] = Math.Round(totalAmount * allocationPercentage[i]); + } + + return feePerMiner; + } + } +} diff --git a/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/.vscode/settings.json b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/.vscode/settings.json new file mode 100644 index 000000000..9dea7e6ca --- /dev/null +++ b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/.vscode/settings.json @@ -0,0 +1,9 @@ +{ + "solidity.soliumRules": { + "indentation": "off", + "operator-whitespace": "off", + "error-reason": "off", + "linebreak-style": "off" + }, + "solidity.packageDefaultDependenciesContractsDirectory": "" +} \ No newline at end of file diff --git a/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoCommon.sol b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoCommon.sol new file mode 100644 index 000000000..8345392c8 --- /dev/null +++ b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoCommon.sol @@ -0,0 +1,28 @@ +pragma solidity 0.5.4; + +contract AlgoCommon { + + uint256 internal constant TOKEN_FACTOR = 10 ** uint256(18); + uint256 internal constant CAT_0_VALUE = 100000 * TOKEN_FACTOR; + uint256 internal constant CAT_1_VALUE = 1000000 * TOKEN_FACTOR; + uint256 internal constant CAT_2_VALUE = 2 * 1000000 * TOKEN_FACTOR; + uint256 internal constant CAT_3_VALUE = 3 * 1000000 * TOKEN_FACTOR; + uint256 internal constant CAT_4_VALUE = 4 * 1000000 * TOKEN_FACTOR; + uint256 internal constant CAT_5_VALUE = 5 * 1000000 * TOKEN_FACTOR; + + function getCapacityByCategory(uint8 category) internal pure returns (uint256) { + if(category == 0) { + return CAT_0_VALUE; + } else if(category == 1) { + return CAT_1_VALUE; + } else if(category == 2) { + return CAT_2_VALUE; + } else if(category == 3) { + return CAT_3_VALUE; + } else if(category == 4) { + return CAT_4_VALUE; + } else if(category == 5) { + return CAT_5_VALUE; + } + } +} \ No newline at end of file diff --git a/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoCoreTeamRole.sol b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoCoreTeamRole.sol new file mode 100644 index 000000000..1fdc24fa8 --- /dev/null +++ b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoCoreTeamRole.sol @@ -0,0 +1,38 @@ +pragma solidity 0.5.4; + +import "openzeppelin-solidity/contracts/access/Roles.sol"; + +contract AlgoCoreTeamRole { + using Roles for Roles.Role; + + Roles.Role private _coreTeamMembers; + + constructor () internal { + _addCoreTeam(msg.sender); + } + + modifier onlyCoreTeam() { + require(isCoreTeam(msg.sender)); + _; + } + + function isCoreTeam(address account) public view returns (bool) { + return _coreTeamMembers.has(account); + } + + function addCoreTeam(address account) public onlyCoreTeam { + _addCoreTeam(account); + } + + function renounceCoreTeam() public { + _removeCoreTeam(msg.sender); + } + + function _addCoreTeam(address account) internal { + _coreTeamMembers.add(account); + } + + function _removeCoreTeam(address account) internal { + _coreTeamMembers.remove(account); + } +} diff --git a/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoFees.sol b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoFees.sol new file mode 100644 index 000000000..893907ca8 --- /dev/null +++ b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoFees.sol @@ -0,0 +1,142 @@ +pragma solidity 0.5.4; + +import "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol"; +import "openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol"; + +import "./IAlgoMiner.sol"; +import "./ERC20TokenHolder.sol"; +import "./AlgoSystemRole.sol"; +import "./AlgoCoreTeamRole.sol"; + +contract AlgoFees is ERC20TokenHolder, AlgoSystemRole, AlgoCoreTeamRole { + using SafeERC20 for IERC20; + + uint256 private constant CAT_0_VALUE_PROPORTION = 1; + uint256 private constant CAT_1_VALUE_PROPORTION = 10; + uint256 private constant CAT_2_VALUE_PROPORTION = 20; + uint256 private constant CAT_3_VALUE_PROPORTION = 30; + uint256 private constant CAT_4_VALUE_PROPORTION = 40; + uint256 private constant CAT_5_VALUE_PROPORTION = 50; + + address[] private _miners; + mapping(address => uint256) private _minersByAddress; + + constructor(address tokenAddress) + ERC20TokenHolder(tokenAddress) + AlgoSystemRole() + AlgoCoreTeamRole() + public { + _miners.push(address(0)); // Reserved as a marker for unregistered miner. + } + + function registerMiner(address minerAddress) public notTerminated onlyCoreTeam { + require(_miners.length < 1000); + require(_minersByAddress[minerAddress] == 0); + + IAlgoMiner algoMiner = IAlgoMiner(minerAddress); + + require(algoMiner.isAlgoMiner()); + + uint8 minerCategory = algoMiner.getCategory(); + + require(minerCategory <= 5); + + _minersByAddress[minerAddress] = _miners.length; + _miners.push(minerAddress); + } + + function unregisterMiner(address minerAddress) public notTerminated onlyCoreTeam { + require(_miners.length > 1); + + if(_miners.length == 2) { + + // Just remove the only registered miner... + _miners.pop(); + delete _minersByAddress[minerAddress]; + + } else { + + if(_minersByAddress[minerAddress] != _miners.length) { + // Move the latest miner to the gap... + _miners[_minersByAddress[minerAddress]] = _miners[_miners.length - 1]; + } + + _miners.pop(); + delete _minersByAddress[minerAddress]; + } + } + + function mine() public notTerminated onlySystem { + require(_miners.length > 1); + + uint256 currentFeesBalance = _token.balanceOf(address(this)); + + require(currentFeesBalance > 0); + + // Count how many ENABLED miners we have for each category... + uint256[6] memory miners; + uint256 minerCount = _miners.length; + + for(uint256 i = 1; i < minerCount; i++) { + IAlgoMiner algoMiner = IAlgoMiner(_miners[i]); + + if(!algoMiner.isMining()) continue; + + uint8 minerCategory = algoMiner.getCategory(); + + if(minerCategory == 0) { + miners[0]++; + } else if(minerCategory == 1) { + miners[1]++; + } else if(minerCategory == 2) { + miners[2]++; + } else if(minerCategory == 3) { + miners[3]++; + } else if(minerCategory == 4) { + miners[4]++; + } else if(minerCategory == 5) { + miners[5]++; + } + } + + // Calculate the fee to pay per miner according to its category... + uint256 totalProportion = CAT_0_VALUE_PROPORTION * miners[0] + + CAT_1_VALUE_PROPORTION * miners[1] + + CAT_2_VALUE_PROPORTION * miners[2] + + CAT_3_VALUE_PROPORTION * miners[3] + + CAT_4_VALUE_PROPORTION * miners[4] + + CAT_5_VALUE_PROPORTION * miners[5]; + + uint256[6] memory feePerMiner; + + feePerMiner[0] = currentFeesBalance * CAT_0_VALUE_PROPORTION / totalProportion; + feePerMiner[1] = currentFeesBalance * CAT_1_VALUE_PROPORTION / totalProportion; + feePerMiner[2] = currentFeesBalance * CAT_2_VALUE_PROPORTION / totalProportion; + feePerMiner[3] = currentFeesBalance * CAT_3_VALUE_PROPORTION / totalProportion; + feePerMiner[4] = currentFeesBalance * CAT_4_VALUE_PROPORTION / totalProportion; + feePerMiner[5] = currentFeesBalance * CAT_5_VALUE_PROPORTION / totalProportion; + + // Transfer the fees to ENABLED miners... + for(uint256 i = 1; i < minerCount; i++) { + IAlgoMiner algoMiner = IAlgoMiner(_miners[i]); + + if(!algoMiner.isMining()) continue; + + uint8 minerCategory = algoMiner.getCategory(); + + _token.safeTransfer(algoMiner.getMiner(), feePerMiner[minerCategory]); + } + } + + function terminate() public onlyCoreTeam { + _terminate(); + } + + function getMinerCount() public view returns (uint256) { + return _miners.length - 1; + } + + function getMinerByIndex(uint256 index) public view returns (address) { + return _miners[index + 1]; + } +} \ No newline at end of file diff --git a/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoMiner.sol b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoMiner.sol new file mode 100644 index 000000000..ad0f595d7 --- /dev/null +++ b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoMiner.sol @@ -0,0 +1,206 @@ +pragma solidity 0.5.4; + +import "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol"; +import "openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol"; + +import "./IAlgoMiner.sol"; +import "./AlgoCommon.sol"; +import "./ERC20TokenHolder.sol"; +import "./AlgoSystemRole.sol"; +import "./AlgoCoreTeamRole.sol"; +import "./AlgoSupervisorRole.sol"; + +contract AlgoMiner is AlgoCommon, ERC20TokenHolder, AlgoSystemRole, AlgoCoreTeamRole, AlgoSupervisorRole, IAlgoMiner { + using SafeERC20 for IERC20; + + uint256 private constant DAYS_PER_YEAR = 365; + + enum MinerType { + PoolBased, + NonPoolBased + } + + enum MinerState { + Deactivated, + Activated, + Suspended, + Stopped + } + + MinerType private _minerType; + uint8 private _category; + address private _miner; + address private _referral; + + MinerState private _state; + bool private _mining; + uint8 private _currentYear; + uint16 private _currentDay; + uint256 private _currentYearSupply; + + constructor(MinerType minerType, uint8 category, address minerAccountAddress, address referralAccountAddress, address tokenAddress) + ERC20TokenHolder(tokenAddress) + AlgoSystemRole() + AlgoCoreTeamRole() + AlgoSupervisorRole() + public { + + require(category <= 5); + require(minerAccountAddress != address(0)); + + if(minerType == MinerType.PoolBased) { + require(referralAccountAddress != address(0)); + } + + _minerType = minerType; + _category = category; + _miner = minerAccountAddress; + _referral = referralAccountAddress; + } + + modifier onlyMiner() { + require(msg.sender == _miner); + _; + } + + function activateMiner() public notTerminated onlyCoreTeam { + require(_state == MinerState.Deactivated); + + if(_minerType == MinerType.PoolBased && _currentYearSupply == 0) { + + uint256 capacity = getCapacityByCategory(_category); + uint256 expectedBalance = capacity + capacity * 10 / 100; + + uint256 currentBalance = _token.balanceOf(address(this)); + + require(currentBalance == expectedBalance); + + _currentYearSupply = capacity / 2; + } + + _state = MinerState.Activated; + } + + function deactivateMiner() public notTerminated onlyCoreTeam { + require(_state != MinerState.Deactivated); + + _state = MinerState.Deactivated; + _mining = false; + } + + function migrateMiner(address newMinerAddress) public onlyCoreTeam { + require(_state == MinerState.Deactivated); + + _token.safeTransfer(newMinerAddress, _token.balanceOf(address(this))); + } + + function pauseMining() public notTerminated onlySupervisor { + require(_state == MinerState.Activated); + + _state = MinerState.Suspended; + } + + function resumeMining() public notTerminated onlySupervisor { + require(_state == MinerState.Suspended); + + _state = MinerState.Activated; + } + + function stopAndRemoveOwnership() public notTerminated onlySupervisor { + require(_state != MinerState.Stopped); + + _state = MinerState.Stopped; + _mining = false; + _miner = address(0); + _referral = address(0); + } + + function resetMiner(address newOwnerAddress, address newReferralAddress) public notTerminated onlySupervisor { + require(_state == MinerState.Stopped); + + _state = MinerState.Activated; + _miner = newOwnerAddress; + _referral = newReferralAddress; + } + + function startMining() public notTerminated onlyMiner { + require(_state == MinerState.Activated); + require(!_mining); + + _mining = true; + } + + function stopMining() public notTerminated onlyMiner { + require(_state == MinerState.Activated); + require(_mining); + + _mining = false; + } + + function mine() public notTerminated onlySystem { + require(_minerType == MinerType.PoolBased); + require(_state == MinerState.Activated); + require(_mining); + + if(_currentDay == 0) { + _currentYear = 1; + _currentDay = 1; + } else { + _currentDay++; + if(_currentDay == (DAYS_PER_YEAR + 1)) { + _currentYear++; + _currentDay = 1; + _currentYearSupply = _currentYearSupply / 2; + } + } + + uint256 minerTokens = _currentYearSupply / DAYS_PER_YEAR; + uint256 referralTokens = minerTokens * 10 / 100; + + require(minerTokens > 0); + require(referralTokens > 0); + + _token.safeTransfer(_miner, minerTokens); + _token.safeTransfer(_referral, referralTokens); + } + + function terminate() public onlyCoreTeam { + _terminate(); + } + + function isAlgoMiner() public pure returns (bool) { + return true; + } + + function getMinerType() public view returns (uint8) { + return uint8(_minerType); + } + + function getCategory() public view returns (uint8) { + return _category; + } + + function getMiner() public view returns (address) { + return _miner; + } + + function getReferral() public view returns (address) { + return _referral; + } + + function isMining() public view returns (bool) { + return _state == MinerState.Activated && _mining; + } + + function getCurrentYear() public view returns (uint8) { + return _currentYear; + } + + function getCurrentDay() public view returns (uint16) { + return _currentDay; + } + + function getCurrentYearSupply() public view returns (uint256) { + return _currentYearSupply; + } +} diff --git a/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoPool.sol b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoPool.sol new file mode 100644 index 000000000..7902be9ce --- /dev/null +++ b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoPool.sol @@ -0,0 +1,54 @@ +pragma solidity 0.5.4; + +import "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol"; +import "openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol"; + +import "./IAlgoMiner.sol"; +import "./AlgoCommon.sol"; +import "./ERC20TokenHolder.sol"; +import "./AlgoCoreTeamRole.sol"; + +contract AlgoPool is AlgoCommon, ERC20TokenHolder, AlgoCoreTeamRole { + using SafeERC20 for IERC20; + + enum PoolType { + MinerPool, + ReferralPool + } + + PoolType private _poolType; + mapping(address => bool) private _fundedMiners; + + constructor(PoolType poolType, address tokenAddress) + ERC20TokenHolder(tokenAddress) + AlgoCoreTeamRole() + public { + _poolType = poolType; + } + + function transferToMiner(address minerAddress) public notTerminated onlyCoreTeam { + require(!_fundedMiners[minerAddress]); + + IAlgoMiner algoMiner = IAlgoMiner(minerAddress); + + require(algoMiner.isAlgoMiner()); + + uint8 minerCategory = algoMiner.getCategory(); + + require(minerCategory <= 5); + + uint256 value = getCapacityByCategory(minerCategory); + + // For referral pools only transfer the 10% of the category capacity. + if(_poolType == PoolType.ReferralPool) { + value = value * 10 / 100; + } + + _fundedMiners[minerAddress] = true; + _token.safeTransfer(minerAddress, value); + } + + function terminate() public onlyCoreTeam { + _terminate(); + } +} diff --git a/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoSupervisorRole.sol b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoSupervisorRole.sol new file mode 100644 index 000000000..53a60e63b --- /dev/null +++ b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoSupervisorRole.sol @@ -0,0 +1,38 @@ +pragma solidity 0.5.4; + +import "openzeppelin-solidity/contracts/access/Roles.sol"; + +contract AlgoSupervisorRole { + using Roles for Roles.Role; + + Roles.Role private _supervisors; + + constructor () internal { + _addSupervisor(msg.sender); + } + + modifier onlySupervisor() { + require(isSupervisor(msg.sender)); + _; + } + + function isSupervisor(address account) public view returns (bool) { + return _supervisors.has(account); + } + + function addSupervisor(address account) public onlySupervisor { + _addSupervisor(account); + } + + function renounceSupervisor() public { + _removeSupervisor(msg.sender); + } + + function _addSupervisor(address account) internal { + _supervisors.add(account); + } + + function _removeSupervisor(address account) internal { + _supervisors.remove(account); + } +} diff --git a/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoSystemRole.sol b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoSystemRole.sol new file mode 100644 index 000000000..95cdc21e8 --- /dev/null +++ b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoSystemRole.sol @@ -0,0 +1,38 @@ +pragma solidity 0.5.4; + +import "openzeppelin-solidity/contracts/access/Roles.sol"; + +contract AlgoSystemRole { + using Roles for Roles.Role; + + Roles.Role private _systemMembers; + + constructor () internal { + _addSystem(msg.sender); + } + + modifier onlySystem() { + require(isSystem(msg.sender)); + _; + } + + function isSystem(address account) public view returns (bool) { + return _systemMembers.has(account); + } + + function addSystem(address account) public onlySystem { + _addSystem(account); + } + + function renounceSystem() public { + _removeSystem(msg.sender); + } + + function _addSystem(address account) internal { + _systemMembers.add(account); + } + + function _removeSystem(address account) internal { + _systemMembers.remove(account); + } +} diff --git a/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/ERC20TokenHolder.sol b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/ERC20TokenHolder.sol new file mode 100644 index 000000000..c24ee8c2e --- /dev/null +++ b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/ERC20TokenHolder.sol @@ -0,0 +1,24 @@ +pragma solidity 0.5.4; + +import "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol"; +import "openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol"; + +import "./Terminable.sol"; + +contract ERC20TokenHolder is Terminable { + using SafeERC20 for IERC20; + + IERC20 internal _token; + + constructor(address tokenAddress) Terminable() internal { + _token = IERC20(tokenAddress); + } + + function _terminate() internal { + uint256 currentBalance = _token.balanceOf(address(this)); + if(currentBalance > 0) { + _token.safeTransfer(_creator, currentBalance); + } + Terminable._terminate(); + } +} \ No newline at end of file diff --git a/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/IAlgoMiner.sol b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/IAlgoMiner.sol new file mode 100644 index 000000000..3129f26d6 --- /dev/null +++ b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/IAlgoMiner.sol @@ -0,0 +1,10 @@ +pragma solidity 0.5.4; + +contract IAlgoMiner { + function isAlgoMiner() public pure returns (bool); + function getMinerType() public view returns (uint8); + function getCategory() public view returns (uint8); + function getMiner() public view returns (address); + function getReferral() public view returns (address); + function isMining() public view returns (bool); +} \ No newline at end of file diff --git a/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/Terminable.sol b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/Terminable.sol new file mode 100644 index 000000000..30bfa1e64 --- /dev/null +++ b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/Terminable.sol @@ -0,0 +1,21 @@ +pragma solidity 0.5.4; + +contract Terminable { + + address internal _creator; + bool internal _terminated; + + constructor() internal { + _creator = msg.sender; + _terminated = false; + } + + modifier notTerminated() { + require(!_terminated); + _; + } + + function _terminate() internal { + _terminated = true; + } +} \ No newline at end of file diff --git a/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/bin/AlgoFees-sol-output.json b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/bin/AlgoFees-sol-output.json new file mode 100644 index 000000000..f23b82c36 --- /dev/null +++ b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/bin/AlgoFees-sol-output.json @@ -0,0 +1,16807 @@ +{ + "contracts": { + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoCoreTeamRole.sol": { + "AlgoCoreTeamRole": { + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "addCoreTeam", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "isCoreTeam", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renounceCoreTeam", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + } + ], + "devdoc": { + "methods": {} + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "gasEstimates": null, + "methodIdentifiers": { + "addCoreTeam(address)": "2e6b6849", + "isCoreTeam(address)": "608d3d3d", + "renounceCoreTeam()": "d43acc79" + } + }, + "metadata": "", + "userdoc": { + "methods": {} + } + } + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoFees.sol": { + "AlgoFees": { + "abi": [ + { + "constant": false, + "inputs": [], + "name": "terminate", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "addCoreTeam", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "minerAddress", + "type": "address" + } + ], + "name": "registerMiner", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "isSystem", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "index", + "type": "uint256" + } + ], + "name": "getMinerByIndex", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "isCoreTeam", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "addSystem", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "minerAddress", + "type": "address" + } + ], + "name": "unregisterMiner", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "mine", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getMinerCount", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renounceCoreTeam", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renounceSystem", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "name": "tokenAddress", + "type": "address" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + } + ], + "devdoc": { + "methods": {} + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "60806040523480156200001157600080fd5b5060405160208062001070833981018060405260208110156200003357600080fd5b50516000805433600160a060020a0319918216811760a060020a60ff02191690925560018054909116600160a060020a0384161790556200007d90640100000000620000d8810204565b6200009133640100000000620000f6810204565b50600480546001810182556000919091527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b018054600160a060020a0319169055620001a4565b620000f360028264010000000062000dd76200011182021704565b50565b620000f360038264010000000062000dd76200011182021704565b600160a060020a03811615156200012757600080fd5b6200013c82826401000000006200016c810204565b156200014757600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b6000600160a060020a03821615156200018457600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b610ebc80620001b46000396000f3fe608060405234801561001057600080fd5b50600436106100b85760003560e060020a9004806374be75921161007557806374be7592146101ac57806381f909f3146101d257806399f4b251146101f8578063bb52c13714610200578063d43acc791461021a578063e9d6185914610222576100b8565b80630c08bf88146100bd5780632e6b6849146100c7578063341ccfcb146100ed57806334cdcf26146101135780633d19ab131461014d578063608d3d3d14610186575b600080fd5b6100c561022a565b005b6100c5600480360360208110156100dd57600080fd5b5035600160a060020a0316610248565b6100c56004803603602081101561010357600080fd5b5035600160a060020a0316610268565b6101396004803603602081101561012957600080fd5b5035600160a060020a031661043c565b604080519115158252519081900360200190f35b61016a6004803603602081101561016357600080fd5b5035610455565b60408051600160a060020a039092168252519081900360200190f35b6101396004803603602081101561019c57600080fd5b5035600160a060020a0316610484565b6100c5600480360360208110156101c257600080fd5b5035600160a060020a0316610497565b6100c5600480360360208110156101e857600080fd5b5035600160a060020a03166104b4565b6100c5610656565b610208610ba4565b60408051918252519081900360200190f35b6100c5610bae565b6100c5610bb7565b61023333610484565b151561023e57600080fd5b610246610bc0565b565b61025133610484565b151561025c57600080fd5b61026581610c86565b50565b60005474010000000000000000000000000000000000000000900460ff161561029057600080fd5b61029933610484565b15156102a457600080fd5b6004546103e8116102b457600080fd5b600160a060020a038116600090815260056020526040902054156102d757600080fd5b600081905080600160a060020a0316631777fb4b6040518163ffffffff1660e060020a02815260040160206040518083038186803b15801561031857600080fd5b505afa15801561032c573d6000803e3d6000fd5b505050506040513d602081101561034257600080fd5b5051151561034f57600080fd5b600081600160a060020a03166380258e476040518163ffffffff1660e060020a02815260040160206040518083038186803b15801561038d57600080fd5b505afa1580156103a1573d6000803e3d6000fd5b505050506040513d60208110156103b757600080fd5b50519050600560ff821611156103cc57600080fd5b505060048054600160a060020a039092166000818152600560205260408120849055600184018355919091527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b909101805473ffffffffffffffffffffffffffffffffffffffff19169091179055565b600061044f60028363ffffffff610c9716565b92915050565b600060048260010181548110151561046957fe5b600091825260209091200154600160a060020a031692915050565b600061044f60038363ffffffff610c9716565b6104a03361043c565b15156104ab57600080fd5b61026581610cce565b60005474010000000000000000000000000000000000000000900460ff16156104dc57600080fd5b6104e533610484565b15156104f057600080fd5b6004546001106104ff57600080fd5b60045460021415610564576004805480151561051757fe5b600082815260208082208301600019908101805473ffffffffffffffffffffffffffffffffffffffff19169055909201909255600160a060020a0383168252600590526040812055610265565b600454600160a060020a038216600090815260056020526040902054146105fe5760048054600019810190811061059757fe5b6000918252602080832090910154600160a060020a03848116845260059092526040909220546004805492909316929181106105cf57fe5b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a031602179055505b6004805480151561060b57fe5b600082815260208082208301600019908101805473ffffffffffffffffffffffffffffffffffffffff19169055909201909255600160a060020a038316825260059052604081205550565b60005474010000000000000000000000000000000000000000900460ff161561067e57600080fd5b6106873361043c565b151561069257600080fd5b6004546001106106a157600080fd5b600154604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600092600160a060020a0316916370a08231916024808301926020929190829003018186803b15801561070557600080fd5b505afa158015610719573d6000803e3d6000fd5b505050506040513d602081101561072f57600080fd5b505190506000811161074057600080fd5b610748610e71565b60045460015b8181101561090157600060048281548110151561076757fe5b60009182526020918290200154604080517f19a74ab30000000000000000000000000000000000000000000000000000000081529051600160a060020a03909216935083926319a74ab392600480840193829003018186803b1580156107cc57600080fd5b505afa1580156107e0573d6000803e3d6000fd5b505050506040513d60208110156107f657600080fd5b5051151561080457506108f9565b600081600160a060020a03166380258e476040518163ffffffff1660e060020a02815260040160206040518083038186803b15801561084257600080fd5b505afa158015610856573d6000803e3d6000fd5b505050506040513d602081101561086c57600080fd5b5051905060ff8116151561088e578460005b60200201805160010190526108f6565b8060ff16600114156108a25784600161087e565b8060ff16600214156108b65784600261087e565b8060ff16600314156108ca5784600361087e565b8060ff16600414156108de5784600461087e565b8060ff16600514156108f65760a08501805160010190525b50505b60010161074e565b5060a082015160808301516060840151604085015160208601518651600a90910201601490910201601e90910201602890910201603290910201610943610e71565b818581151561094e57fe5b04815281600a860281151561095f57fe5b046020820152816014860281151561097357fe5b04604082015281601e860281151561098757fe5b046060820152816028860281151561099b57fe5b04608082015281603286028115156109af57fe5b0460a082015260015b83811015610b9c5760006004828154811015156109d157fe5b60009182526020918290200154604080517f19a74ab30000000000000000000000000000000000000000000000000000000081529051600160a060020a03909216935083926319a74ab392600480840193829003018186803b158015610a3657600080fd5b505afa158015610a4a573d6000803e3d6000fd5b505050506040513d6020811015610a6057600080fd5b50511515610a6e5750610b94565b600081600160a060020a03166380258e476040518163ffffffff1660e060020a02815260040160206040518083038186803b158015610aac57600080fd5b505afa158015610ac0573d6000803e3d6000fd5b505050506040513d6020811015610ad657600080fd5b5051604080517f302c11ca0000000000000000000000000000000000000000000000000000000081529051919250610b9191600160a060020a0385169163302c11ca916004808301926020929190829003018186803b158015610b3857600080fd5b505afa158015610b4c573d6000803e3d6000fd5b505050506040513d6020811015610b6257600080fd5b50518560ff841660068110610b7357fe5b6020020151600154600160a060020a0316919063ffffffff610cdf16565b50505b6001016109b8565b505050505050565b6004546000190190565b61024633610d7e565b61024633610d8f565b600154604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600092600160a060020a0316916370a08231916024808301926020929190829003018186803b158015610c2457600080fd5b505afa158015610c38573d6000803e3d6000fd5b505050506040513d6020811015610c4e57600080fd5b505190506000811115610c7e57600054600154610c7e91600160a060020a0391821691168363ffffffff610cdf16565b610265610da0565b61026560038263ffffffff610dd716565b6000600160a060020a0382161515610cae57600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b61026560028263ffffffff610dd716565b82600160a060020a031663a9059cbb83836040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b158015610d4257600080fd5b505af1158015610d56573d6000803e3d6000fd5b505050506040513d6020811015610d6c57600080fd5b50511515610d7957600080fd5b505050565b61026560038263ffffffff610e2516565b61026560028263ffffffff610e2516565b6000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b600160a060020a0381161515610dec57600080fd5b610df68282610c97565b15610e0057600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b600160a060020a0381161515610e3a57600080fd5b610e448282610c97565b1515610e4f57600080fd5b600160a060020a0316600090815260209190915260409020805460ff19169055565b60c060405190810160405280600690602082028038833950919291505056fea165627a7a72305820d93c57fe9a496ba0db433cb631bbbbe57a53bb63720b63023ea0e465cf5c1d200029", + "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH3 0x11 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH1 0x20 DUP1 PUSH3 0x1070 DUP4 CODECOPY DUP2 ADD DUP1 PUSH1 0x40 MSTORE PUSH1 0x20 DUP2 LT ISZERO PUSH3 0x33 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP MLOAD PUSH1 0x0 DUP1 SLOAD CALLER PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB NOT SWAP2 DUP3 AND DUP2 OR PUSH1 0xA0 PUSH1 0x2 EXP PUSH1 0xFF MUL NOT AND SWAP1 SWAP3 SSTORE PUSH1 0x1 DUP1 SLOAD SWAP1 SWAP2 AND PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP5 AND OR SWAP1 SSTORE PUSH3 0x7D SWAP1 PUSH5 0x100000000 PUSH3 0xD8 DUP2 MUL DIV JUMP JUMPDEST PUSH3 0x91 CALLER PUSH5 0x100000000 PUSH3 0xF6 DUP2 MUL DIV JUMP JUMPDEST POP PUSH1 0x4 DUP1 SLOAD PUSH1 0x1 DUP2 ADD DUP3 SSTORE PUSH1 0x0 SWAP2 SWAP1 SWAP2 MSTORE PUSH32 0x8A35ACFBC15FF81A39AE7D344FD709F28E8600B4AA8C65C6B64BFE7FE36BD19B ADD DUP1 SLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB NOT AND SWAP1 SSTORE PUSH3 0x1A4 JUMP JUMPDEST PUSH3 0xF3 PUSH1 0x2 DUP3 PUSH5 0x100000000 PUSH3 0xDD7 PUSH3 0x111 DUP3 MUL OR DIV JUMP JUMPDEST POP JUMP JUMPDEST PUSH3 0xF3 PUSH1 0x3 DUP3 PUSH5 0x100000000 PUSH3 0xDD7 PUSH3 0x111 DUP3 MUL OR DIV JUMP JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP2 AND ISZERO ISZERO PUSH3 0x127 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH3 0x13C DUP3 DUP3 PUSH5 0x100000000 PUSH3 0x16C DUP2 MUL DIV JUMP JUMPDEST ISZERO PUSH3 0x147 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP1 SLOAD PUSH1 0xFF NOT AND PUSH1 0x1 OR SWAP1 SSTORE JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP3 AND ISZERO ISZERO PUSH3 0x184 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND SWAP1 JUMP JUMPDEST PUSH2 0xEBC DUP1 PUSH3 0x1B4 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0xB8 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 PUSH1 0x2 EXP SWAP1 DIV DUP1 PUSH4 0x74BE7592 GT PUSH2 0x75 JUMPI DUP1 PUSH4 0x74BE7592 EQ PUSH2 0x1AC JUMPI DUP1 PUSH4 0x81F909F3 EQ PUSH2 0x1D2 JUMPI DUP1 PUSH4 0x99F4B251 EQ PUSH2 0x1F8 JUMPI DUP1 PUSH4 0xBB52C137 EQ PUSH2 0x200 JUMPI DUP1 PUSH4 0xD43ACC79 EQ PUSH2 0x21A JUMPI DUP1 PUSH4 0xE9D61859 EQ PUSH2 0x222 JUMPI PUSH2 0xB8 JUMP JUMPDEST DUP1 PUSH4 0xC08BF88 EQ PUSH2 0xBD JUMPI DUP1 PUSH4 0x2E6B6849 EQ PUSH2 0xC7 JUMPI DUP1 PUSH4 0x341CCFCB EQ PUSH2 0xED JUMPI DUP1 PUSH4 0x34CDCF26 EQ PUSH2 0x113 JUMPI DUP1 PUSH4 0x3D19AB13 EQ PUSH2 0x14D JUMPI DUP1 PUSH4 0x608D3D3D EQ PUSH2 0x186 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xC5 PUSH2 0x22A JUMP JUMPDEST STOP JUMPDEST PUSH2 0xC5 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0xDD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH2 0x248 JUMP JUMPDEST PUSH2 0xC5 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x103 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH2 0x268 JUMP JUMPDEST PUSH2 0x139 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x129 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH2 0x43C JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 ISZERO ISZERO DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH2 0x16A PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x163 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH2 0x455 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB SWAP1 SWAP3 AND DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH2 0x139 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x19C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH2 0x484 JUMP JUMPDEST PUSH2 0xC5 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x1C2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH2 0x497 JUMP JUMPDEST PUSH2 0xC5 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x1E8 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH2 0x4B4 JUMP JUMPDEST PUSH2 0xC5 PUSH2 0x656 JUMP JUMPDEST PUSH2 0x208 PUSH2 0xBA4 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH2 0xC5 PUSH2 0xBAE JUMP JUMPDEST PUSH2 0xC5 PUSH2 0xBB7 JUMP JUMPDEST PUSH2 0x233 CALLER PUSH2 0x484 JUMP JUMPDEST ISZERO ISZERO PUSH2 0x23E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x246 PUSH2 0xBC0 JUMP JUMPDEST JUMP JUMPDEST PUSH2 0x251 CALLER PUSH2 0x484 JUMP JUMPDEST ISZERO ISZERO PUSH2 0x25C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x265 DUP2 PUSH2 0xC86 JUMP JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH21 0x10000000000000000000000000000000000000000 SWAP1 DIV PUSH1 0xFF AND ISZERO PUSH2 0x290 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x299 CALLER PUSH2 0x484 JUMP JUMPDEST ISZERO ISZERO PUSH2 0x2A4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x4 SLOAD PUSH2 0x3E8 GT PUSH2 0x2B4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP2 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD ISZERO PUSH2 0x2D7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP DUP1 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH4 0x1777FB4B PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 PUSH1 0x2 EXP MUL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x318 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x32C JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x342 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP MLOAD ISZERO ISZERO PUSH2 0x34F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP2 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH4 0x80258E47 PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 PUSH1 0x2 EXP MUL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x38D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x3A1 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x3B7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP MLOAD SWAP1 POP PUSH1 0x5 PUSH1 0xFF DUP3 AND GT ISZERO PUSH2 0x3CC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP POP PUSH1 0x4 DUP1 SLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB SWAP1 SWAP3 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 MSTORE PUSH1 0x40 DUP2 KECCAK256 DUP5 SWAP1 SSTORE PUSH1 0x1 DUP5 ADD DUP4 SSTORE SWAP2 SWAP1 SWAP2 MSTORE PUSH32 0x8A35ACFBC15FF81A39AE7D344FD709F28E8600B4AA8C65C6B64BFE7FE36BD19B SWAP1 SWAP2 ADD DUP1 SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND SWAP1 SWAP2 OR SWAP1 SSTORE JUMP JUMPDEST PUSH1 0x0 PUSH2 0x44F PUSH1 0x2 DUP4 PUSH4 0xFFFFFFFF PUSH2 0xC97 AND JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x4 DUP3 PUSH1 0x1 ADD DUP2 SLOAD DUP2 LT ISZERO ISZERO PUSH2 0x469 JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP1 SWAP2 KECCAK256 ADD SLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x44F PUSH1 0x3 DUP4 PUSH4 0xFFFFFFFF PUSH2 0xC97 AND JUMP JUMPDEST PUSH2 0x4A0 CALLER PUSH2 0x43C JUMP JUMPDEST ISZERO ISZERO PUSH2 0x4AB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x265 DUP2 PUSH2 0xCCE JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH21 0x10000000000000000000000000000000000000000 SWAP1 DIV PUSH1 0xFF AND ISZERO PUSH2 0x4DC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x4E5 CALLER PUSH2 0x484 JUMP JUMPDEST ISZERO ISZERO PUSH2 0x4F0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x4 SLOAD PUSH1 0x1 LT PUSH2 0x4FF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x4 SLOAD PUSH1 0x2 EQ ISZERO PUSH2 0x564 JUMPI PUSH1 0x4 DUP1 SLOAD DUP1 ISZERO ISZERO PUSH2 0x517 JUMPI INVALID JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 DUP1 DUP3 KECCAK256 DUP4 ADD PUSH1 0x0 NOT SWAP1 DUP2 ADD DUP1 SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND SWAP1 SSTORE SWAP1 SWAP3 ADD SWAP1 SWAP3 SSTORE PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP4 AND DUP3 MSTORE PUSH1 0x5 SWAP1 MSTORE PUSH1 0x40 DUP2 KECCAK256 SSTORE PUSH2 0x265 JUMP JUMPDEST PUSH1 0x4 SLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP3 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x5 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD EQ PUSH2 0x5FE JUMPI PUSH1 0x4 DUP1 SLOAD PUSH1 0x0 NOT DUP2 ADD SWAP1 DUP2 LT PUSH2 0x597 JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 DUP1 DUP4 KECCAK256 SWAP1 SWAP2 ADD SLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP5 DUP2 AND DUP5 MSTORE PUSH1 0x5 SWAP1 SWAP3 MSTORE PUSH1 0x40 SWAP1 SWAP3 KECCAK256 SLOAD PUSH1 0x4 DUP1 SLOAD SWAP3 SWAP1 SWAP4 AND SWAP3 SWAP2 DUP2 LT PUSH2 0x5CF JUMPI INVALID JUMPDEST SWAP1 PUSH1 0x0 MSTORE PUSH1 0x20 PUSH1 0x0 KECCAK256 ADD PUSH1 0x0 PUSH2 0x100 EXP DUP2 SLOAD DUP2 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB MUL NOT AND SWAP1 DUP4 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND MUL OR SWAP1 SSTORE POP JUMPDEST PUSH1 0x4 DUP1 SLOAD DUP1 ISZERO ISZERO PUSH2 0x60B JUMPI INVALID JUMPDEST PUSH1 0x0 DUP3 DUP2 MSTORE PUSH1 0x20 DUP1 DUP3 KECCAK256 DUP4 ADD PUSH1 0x0 NOT SWAP1 DUP2 ADD DUP1 SLOAD PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND SWAP1 SSTORE SWAP1 SWAP3 ADD SWAP1 SWAP3 SSTORE PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP4 AND DUP3 MSTORE PUSH1 0x5 SWAP1 MSTORE PUSH1 0x40 DUP2 KECCAK256 SSTORE POP JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH21 0x10000000000000000000000000000000000000000 SWAP1 DIV PUSH1 0xFF AND ISZERO PUSH2 0x67E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x687 CALLER PUSH2 0x43C JUMP JUMPDEST ISZERO ISZERO PUSH2 0x692 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x4 SLOAD PUSH1 0x1 LT PUSH2 0x6A1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH32 0x70A0823100000000000000000000000000000000000000000000000000000000 DUP2 MSTORE ADDRESS PUSH1 0x4 DUP3 ADD MSTORE SWAP1 MLOAD PUSH1 0x0 SWAP3 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND SWAP2 PUSH4 0x70A08231 SWAP2 PUSH1 0x24 DUP1 DUP4 ADD SWAP3 PUSH1 0x20 SWAP3 SWAP2 SWAP1 DUP3 SWAP1 SUB ADD DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x705 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x719 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x72F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP MLOAD SWAP1 POP PUSH1 0x0 DUP2 GT PUSH2 0x740 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x748 PUSH2 0xE71 JUMP JUMPDEST PUSH1 0x4 SLOAD PUSH1 0x1 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x901 JUMPI PUSH1 0x0 PUSH1 0x4 DUP3 DUP2 SLOAD DUP2 LT ISZERO ISZERO PUSH2 0x767 JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP2 DUP3 SWAP1 KECCAK256 ADD SLOAD PUSH1 0x40 DUP1 MLOAD PUSH32 0x19A74AB300000000000000000000000000000000000000000000000000000000 DUP2 MSTORE SWAP1 MLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB SWAP1 SWAP3 AND SWAP4 POP DUP4 SWAP3 PUSH4 0x19A74AB3 SWAP3 PUSH1 0x4 DUP1 DUP5 ADD SWAP4 DUP3 SWAP1 SUB ADD DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x7CC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x7E0 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x7F6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP MLOAD ISZERO ISZERO PUSH2 0x804 JUMPI POP PUSH2 0x8F9 JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH4 0x80258E47 PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 PUSH1 0x2 EXP MUL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x842 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x856 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x86C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP MLOAD SWAP1 POP PUSH1 0xFF DUP2 AND ISZERO ISZERO PUSH2 0x88E JUMPI DUP5 PUSH1 0x0 JUMPDEST PUSH1 0x20 MUL ADD DUP1 MLOAD PUSH1 0x1 ADD SWAP1 MSTORE PUSH2 0x8F6 JUMP JUMPDEST DUP1 PUSH1 0xFF AND PUSH1 0x1 EQ ISZERO PUSH2 0x8A2 JUMPI DUP5 PUSH1 0x1 PUSH2 0x87E JUMP JUMPDEST DUP1 PUSH1 0xFF AND PUSH1 0x2 EQ ISZERO PUSH2 0x8B6 JUMPI DUP5 PUSH1 0x2 PUSH2 0x87E JUMP JUMPDEST DUP1 PUSH1 0xFF AND PUSH1 0x3 EQ ISZERO PUSH2 0x8CA JUMPI DUP5 PUSH1 0x3 PUSH2 0x87E JUMP JUMPDEST DUP1 PUSH1 0xFF AND PUSH1 0x4 EQ ISZERO PUSH2 0x8DE JUMPI DUP5 PUSH1 0x4 PUSH2 0x87E JUMP JUMPDEST DUP1 PUSH1 0xFF AND PUSH1 0x5 EQ ISZERO PUSH2 0x8F6 JUMPI PUSH1 0xA0 DUP6 ADD DUP1 MLOAD PUSH1 0x1 ADD SWAP1 MSTORE JUMPDEST POP POP JUMPDEST PUSH1 0x1 ADD PUSH2 0x74E JUMP JUMPDEST POP PUSH1 0xA0 DUP3 ADD MLOAD PUSH1 0x80 DUP4 ADD MLOAD PUSH1 0x60 DUP5 ADD MLOAD PUSH1 0x40 DUP6 ADD MLOAD PUSH1 0x20 DUP7 ADD MLOAD DUP7 MLOAD PUSH1 0xA SWAP1 SWAP2 MUL ADD PUSH1 0x14 SWAP1 SWAP2 MUL ADD PUSH1 0x1E SWAP1 SWAP2 MUL ADD PUSH1 0x28 SWAP1 SWAP2 MUL ADD PUSH1 0x32 SWAP1 SWAP2 MUL ADD PUSH2 0x943 PUSH2 0xE71 JUMP JUMPDEST DUP2 DUP6 DUP2 ISZERO ISZERO PUSH2 0x94E JUMPI INVALID JUMPDEST DIV DUP2 MSTORE DUP2 PUSH1 0xA DUP7 MUL DUP2 ISZERO ISZERO PUSH2 0x95F JUMPI INVALID JUMPDEST DIV PUSH1 0x20 DUP3 ADD MSTORE DUP2 PUSH1 0x14 DUP7 MUL DUP2 ISZERO ISZERO PUSH2 0x973 JUMPI INVALID JUMPDEST DIV PUSH1 0x40 DUP3 ADD MSTORE DUP2 PUSH1 0x1E DUP7 MUL DUP2 ISZERO ISZERO PUSH2 0x987 JUMPI INVALID JUMPDEST DIV PUSH1 0x60 DUP3 ADD MSTORE DUP2 PUSH1 0x28 DUP7 MUL DUP2 ISZERO ISZERO PUSH2 0x99B JUMPI INVALID JUMPDEST DIV PUSH1 0x80 DUP3 ADD MSTORE DUP2 PUSH1 0x32 DUP7 MUL DUP2 ISZERO ISZERO PUSH2 0x9AF JUMPI INVALID JUMPDEST DIV PUSH1 0xA0 DUP3 ADD MSTORE PUSH1 0x1 JUMPDEST DUP4 DUP2 LT ISZERO PUSH2 0xB9C JUMPI PUSH1 0x0 PUSH1 0x4 DUP3 DUP2 SLOAD DUP2 LT ISZERO ISZERO PUSH2 0x9D1 JUMPI INVALID JUMPDEST PUSH1 0x0 SWAP2 DUP3 MSTORE PUSH1 0x20 SWAP2 DUP3 SWAP1 KECCAK256 ADD SLOAD PUSH1 0x40 DUP1 MLOAD PUSH32 0x19A74AB300000000000000000000000000000000000000000000000000000000 DUP2 MSTORE SWAP1 MLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB SWAP1 SWAP3 AND SWAP4 POP DUP4 SWAP3 PUSH4 0x19A74AB3 SWAP3 PUSH1 0x4 DUP1 DUP5 ADD SWAP4 DUP3 SWAP1 SUB ADD DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0xA36 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0xA4A JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x20 DUP2 LT ISZERO PUSH2 0xA60 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP MLOAD ISZERO ISZERO PUSH2 0xA6E JUMPI POP PUSH2 0xB94 JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH4 0x80258E47 PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 PUSH1 0x2 EXP MUL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0xAAC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0xAC0 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x20 DUP2 LT ISZERO PUSH2 0xAD6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP MLOAD PUSH1 0x40 DUP1 MLOAD PUSH32 0x302C11CA00000000000000000000000000000000000000000000000000000000 DUP2 MSTORE SWAP1 MLOAD SWAP2 SWAP3 POP PUSH2 0xB91 SWAP2 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP6 AND SWAP2 PUSH4 0x302C11CA SWAP2 PUSH1 0x4 DUP1 DUP4 ADD SWAP3 PUSH1 0x20 SWAP3 SWAP2 SWAP1 DUP3 SWAP1 SUB ADD DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0xB38 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0xB4C JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x20 DUP2 LT ISZERO PUSH2 0xB62 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP MLOAD DUP6 PUSH1 0xFF DUP5 AND PUSH1 0x6 DUP2 LT PUSH2 0xB73 JUMPI INVALID JUMPDEST PUSH1 0x20 MUL ADD MLOAD PUSH1 0x1 SLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND SWAP2 SWAP1 PUSH4 0xFFFFFFFF PUSH2 0xCDF AND JUMP JUMPDEST POP POP JUMPDEST PUSH1 0x1 ADD PUSH2 0x9B8 JUMP JUMPDEST POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x4 SLOAD PUSH1 0x0 NOT ADD SWAP1 JUMP JUMPDEST PUSH2 0x246 CALLER PUSH2 0xD7E JUMP JUMPDEST PUSH2 0x246 CALLER PUSH2 0xD8F JUMP JUMPDEST PUSH1 0x1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH32 0x70A0823100000000000000000000000000000000000000000000000000000000 DUP2 MSTORE ADDRESS PUSH1 0x4 DUP3 ADD MSTORE SWAP1 MLOAD PUSH1 0x0 SWAP3 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND SWAP2 PUSH4 0x70A08231 SWAP2 PUSH1 0x24 DUP1 DUP4 ADD SWAP3 PUSH1 0x20 SWAP3 SWAP2 SWAP1 DUP3 SWAP1 SUB ADD DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0xC24 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0xC38 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x20 DUP2 LT ISZERO PUSH2 0xC4E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP MLOAD SWAP1 POP PUSH1 0x0 DUP2 GT ISZERO PUSH2 0xC7E JUMPI PUSH1 0x0 SLOAD PUSH1 0x1 SLOAD PUSH2 0xC7E SWAP2 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB SWAP2 DUP3 AND SWAP2 AND DUP4 PUSH4 0xFFFFFFFF PUSH2 0xCDF AND JUMP JUMPDEST PUSH2 0x265 PUSH2 0xDA0 JUMP JUMPDEST PUSH2 0x265 PUSH1 0x3 DUP3 PUSH4 0xFFFFFFFF PUSH2 0xDD7 AND JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP3 AND ISZERO ISZERO PUSH2 0xCAE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND SWAP1 JUMP JUMPDEST PUSH2 0x265 PUSH1 0x2 DUP3 PUSH4 0xFFFFFFFF PUSH2 0xDD7 AND JUMP JUMPDEST DUP3 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH4 0xA9059CBB DUP4 DUP4 PUSH1 0x40 MLOAD DUP4 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 PUSH1 0x2 EXP MUL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP4 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP3 POP POP POP PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0xD42 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0xD56 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x20 DUP2 LT ISZERO PUSH2 0xD6C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP MLOAD ISZERO ISZERO PUSH2 0xD79 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP POP POP JUMP JUMPDEST PUSH2 0x265 PUSH1 0x3 DUP3 PUSH4 0xFFFFFFFF PUSH2 0xE25 AND JUMP JUMPDEST PUSH2 0x265 PUSH1 0x2 DUP3 PUSH4 0xFFFFFFFF PUSH2 0xE25 AND JUMP JUMPDEST PUSH1 0x0 DUP1 SLOAD PUSH21 0xFF0000000000000000000000000000000000000000 NOT AND PUSH21 0x10000000000000000000000000000000000000000 OR SWAP1 SSTORE JUMP JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP2 AND ISZERO ISZERO PUSH2 0xDEC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xDF6 DUP3 DUP3 PUSH2 0xC97 JUMP JUMPDEST ISZERO PUSH2 0xE00 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP1 SLOAD PUSH1 0xFF NOT AND PUSH1 0x1 OR SWAP1 SSTORE JUMP JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP2 AND ISZERO ISZERO PUSH2 0xE3A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xE44 DUP3 DUP3 PUSH2 0xC97 JUMP JUMPDEST ISZERO ISZERO PUSH2 0xE4F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP1 SLOAD PUSH1 0xFF NOT AND SWAP1 SSTORE JUMP JUMPDEST PUSH1 0xC0 PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x6 SWAP1 PUSH1 0x20 DUP3 MUL DUP1 CODESIZE DUP4 CODECOPY POP SWAP2 SWAP3 SWAP2 POP POP JUMP INVALID LOG1 PUSH6 0x627A7A723058 KECCAK256 0xd9 EXTCODECOPY JUMPI INVALID SWAP11 0x49 PUSH12 0xA0DB433CB631BBBBE57A53BB PUSH4 0x720B6302 RETURNDATACOPY LOG0 0xe4 PUSH6 0xCF5C1D200029 ", + "sourceMap": "555:4724:1:-;;;1117:235;8:9:-1;5:2;;;30:1;27;20:12;5:2;1117:235:1;;;;;;;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1117:235:1;155:8:5;:21;;166:10;-1:-1:-1;;;;;;155:21:5;;;;;-1:-1:-1;;;;;;187:19:5;;;;-1:-1:-1;635:29:3;;;;;-1:-1:-1;;;;;635:29:3;;;;;362:22:2;;:10;;;;:22;:::i;:::-;366:24:0;379:10;366:12;;;;:24;:::i;:::-;-1:-1:-1;1272:7:1;27:10:-1;;39:1;23:18;;45:23;;1293:1:1;1272:24;;;;;;;;-1:-1:-1;;;;;;1272:24:1;;;555:4724;;798:92:2;855:27;:14;874:7;855:18;;;;;;:27;:::i;:::-;798:92;:::o;822:96:0:-;881:29;:16;902:7;881:20;;;;;;:29;:::i;259:181:6:-;-1:-1:-1;;;;;335:21:6;;;;327:30;;;;;;376:18;380:4;386:7;376:3;;;;:18;:::i;:::-;375:19;367:28;;;;;;-1:-1:-1;;;;;406:20:6;:11;:20;;;;;;;;;;;:27;;-1:-1:-1;;406:27:6;429:4;406:27;;;259:181::o;786:162::-;858:4;-1:-1:-1;;;;;882:21:6;;;;874:30;;;;;;-1:-1:-1;;;;;;921:20:6;:11;:20;;;;;;;;;;;;;;;786:162::o;555:4724:1:-;;;;;;;" + }, + "gasEstimates": { + "creation": { + "codeDepositCost": "754400", + "executionCost": "infinite", + "totalCost": "infinite" + }, + "external": { + "addCoreTeam(address)": "infinite", + "addSystem(address)": "infinite", + "getMinerByIndex(uint256)": "1058", + "getMinerCount()": "541", + "isCoreTeam(address)": "infinite", + "isSystem(address)": "infinite", + "mine()": "infinite", + "registerMiner(address)": "infinite", + "renounceCoreTeam()": "infinite", + "renounceSystem()": "infinite", + "terminate()": "infinite", + "unregisterMiner(address)": "infinite" + } + }, + "methodIdentifiers": { + "addCoreTeam(address)": "2e6b6849", + "addSystem(address)": "74be7592", + "getMinerByIndex(uint256)": "3d19ab13", + "getMinerCount()": "bb52c137", + "isCoreTeam(address)": "608d3d3d", + "isSystem(address)": "34cdcf26", + "mine()": "99f4b251", + "registerMiner(address)": "341ccfcb", + "renounceCoreTeam()": "d43acc79", + "renounceSystem()": "e9d61859", + "terminate()": "0c08bf88", + "unregisterMiner(address)": "81f909f3" + } + }, + "metadata": "{\"compiler\":{\"version\":\"0.5.4+commit.9549d8ff\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":false,\"inputs\":[],\"name\":\"terminate\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"addCoreTeam\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"minerAddress\",\"type\":\"address\"}],\"name\":\"registerMiner\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"isSystem\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getMinerByIndex\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"isCoreTeam\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"addSystem\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"minerAddress\",\"type\":\"address\"}],\"name\":\"unregisterMiner\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"mine\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getMinerCount\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceCoreTeam\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceSystem\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"tokenAddress\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoFees.sol\":\"AlgoFees\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoCoreTeamRole.sol\":{\"keccak256\":\"0x8252ea038586ac8cf89aea6810c1a75d84c2eba48d6b0ecc5f1783929de398a3\",\"urls\":[\"bzzr://3bd6a88368eeb6abb70573d16d481bc20bc22b6c0d3e60702c59c9fab4202528\"]},\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoFees.sol\":{\"keccak256\":\"0xada03dabc0c81fb1b879cfda742a7fe400938abe063e428159942358791bfa57\",\"urls\":[\"bzzr://6f74f234fe2c3b555ad1d8e34e7f2205b388aa3c2b353f2f429322879d0ed21a\"]},\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoSystemRole.sol\":{\"keccak256\":\"0x79678e2992aafe0c33260767eba0b3c95474a2f0902154841f4ac62012528e67\",\"urls\":[\"bzzr://a4efbd6113fb5941933b0e94b0135d2ea7150a538ec80b9b5288a85506337f94\"]},\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/ERC20TokenHolder.sol\":{\"keccak256\":\"0x2c964fd13fcc46f0326055bd50569f2bfb32ea7963780763d77b85ed51320205\",\"urls\":[\"bzzr://3fd83f4de7769670f420f04909921357a8ace3b9e0eb08b7c9df0ee57741d347\"]},\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/IAlgoMiner.sol\":{\"keccak256\":\"0x861339f0f02c28b332f5d8dc165127fa1a402bbbfd7c3923acca26a6139e4f2b\",\"urls\":[\"bzzr://87e5728ff1289cbcc9669fae3a5b994b3a4e0788a2673595adcac700eea8c411\"]},\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/Terminable.sol\":{\"keccak256\":\"0x8704856f4ea109e3df4805b3b3dd7d9b9026e94f80c42c6d750356d46036a530\",\"urls\":[\"bzzr://18db91d498a487cbc7085490ff2bf017849f88bb4032ea7d840bab3561c45cf4\"]},\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol\":{\"keccak256\":\"0x659ba0f9a3392cd50a8a5fafaf5dfd8c6a0878f6a4613bceff4e90dceddcd865\",\"urls\":[\"bzzr://f704341d520fbc98716541f1b3f67737f0ee6e94adf072a66acb2bd25d593c2b\"]},\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x965012d27b4262d7a41f5028cbb30c51ebd9ecd4be8fb30380aaa7a3c64fbc8b\",\"urls\":[\"bzzr://41ca38f6b0fa4b77b0feec43e422cfbec48b7eb38a41edf0b85c77e8d9a296b1\"]},\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x079c4e23ee448f529e43bfa3c4e8fb4be52cd0318ee923a276835bedf45b93d8\",\"urls\":[\"bzzr://48248e86f64407a95f241d6c5c8cfea6b4d4ebf4ebb467e5c98c8af3868fafe4\"]},\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol\":{\"keccak256\":\"0x05fcee7431cd35cd312e14e7f316a44ca3ccc5fb3b859aefc15c1a5db94add7e\",\"urls\":[\"bzzr://5ba67fb83aa7806883a335d53a27dcf1f53b75fa38dedd57893cc84633aa4d4c\"]}},\"version\":1}", + "userdoc": { + "methods": {} + } + } + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoSystemRole.sol": { + "AlgoSystemRole": { + "abi": [ + { + "constant": true, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "isSystem", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "addSystem", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renounceSystem", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + } + ], + "devdoc": { + "methods": {} + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "gasEstimates": null, + "methodIdentifiers": { + "addSystem(address)": "74be7592", + "isSystem(address)": "34cdcf26", + "renounceSystem()": "e9d61859" + } + }, + "metadata": "", + "userdoc": { + "methods": {} + } + } + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/ERC20TokenHolder.sol": { + "ERC20TokenHolder": { + "abi": [ + { + "inputs": [ + { + "name": "tokenAddress", + "type": "address" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + } + ], + "devdoc": { + "methods": {} + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "gasEstimates": null, + "methodIdentifiers": {} + }, + "metadata": "", + "userdoc": { + "methods": {} + } + } + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/IAlgoMiner.sol": { + "IAlgoMiner": { + "abi": [ + { + "constant": true, + "inputs": [], + "name": "isAlgoMiner", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "pure", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "isMining", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getMiner", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getReferral", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getMinerType", + "outputs": [ + { + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getCategory", + "outputs": [ + { + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + } + ], + "devdoc": { + "methods": {} + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "gasEstimates": null, + "methodIdentifiers": { + "getCategory()": "80258e47", + "getMiner()": "302c11ca", + "getMinerType()": "4969ae70", + "getReferral()": "329b1c92", + "isAlgoMiner()": "1777fb4b", + "isMining()": "19a74ab3" + } + }, + "metadata": "", + "userdoc": { + "methods": {} + } + } + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/Terminable.sol": { + "Terminable": { + "abi": [ + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + } + ], + "devdoc": { + "methods": {} + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "gasEstimates": null, + "methodIdentifiers": {} + }, + "metadata": "", + "userdoc": { + "methods": {} + } + } + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol": { + "Roles": { + "abi": [], + "devdoc": { + "details": "Library for managing addresses assigned to a Role.", + "methods": {}, + "title": "Roles" + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea165627a7a7230582072caac54fe9b00b8b816307b2a5ded8de356c5be6012002ca36f81b18422d8260029", + "opcodes": "PUSH1 0x4C PUSH1 0x2C PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x0 DUP2 EQ PUSH1 0x1C JUMPI PUSH1 0x1E JUMP JUMPDEST INVALID JUMPDEST POP ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG1 PUSH6 0x627A7A723058 KECCAK256 PUSH19 0xCAAC54FE9B00B8B816307B2A5DED8DE356C5BE PUSH1 0x12 STOP 0x2c LOG3 PUSH16 0x81B18422D82600290000000000000000 ", + "sourceMap": "108:842:6:-;;132:2:-1;166:7;155:9;146:7;137:37;252:7;246:14;243:1;238:23;232:4;229:33;270:1;265:20;;;;222:63;;265:20;274:9;222:63;;298:9;295:1;288:20;328:4;319:7;311:22;352:7;343;336:24" + }, + "gasEstimates": { + "creation": { + "codeDepositCost": "15200", + "executionCost": "116", + "totalCost": "15316" + }, + "internal": { + "add(struct Roles.Role storage pointer,address)": "infinite", + "has(struct Roles.Role storage pointer,address)": "infinite", + "remove(struct Roles.Role storage pointer,address)": "infinite" + } + }, + "methodIdentifiers": {} + }, + "metadata": "{\"compiler\":{\"version\":\"0.5.4+commit.9549d8ff\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Library for managing addresses assigned to a Role.\",\"methods\":{},\"title\":\"Roles\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol\":\"Roles\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol\":{\"keccak256\":\"0x659ba0f9a3392cd50a8a5fafaf5dfd8c6a0878f6a4613bceff4e90dceddcd865\",\"urls\":[\"bzzr://f704341d520fbc98716541f1b3f67737f0ee6e94adf072a66acb2bd25d593c2b\"]}},\"version\":1}", + "userdoc": { + "methods": {} + } + } + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol": { + "SafeMath": { + "abi": [], + "devdoc": { + "details": "Unsigned math operations with safety checks that revert on error", + "methods": {}, + "title": "SafeMath" + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea165627a7a72305820c8fdc9a15986ffb647c7551d6f3c5b251c8209308e82491b559a3ee6cc289f670029", + "opcodes": "PUSH1 0x4C PUSH1 0x2C PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x0 DUP2 EQ PUSH1 0x1C JUMPI PUSH1 0x1E JUMP JUMPDEST INVALID JUMPDEST POP ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG1 PUSH6 0x627A7A723058 KECCAK256 0xc8 REVERT 0xc9 LOG1 MSIZE DUP7 SELFDESTRUCT 0xb6 0x47 0xc7 SSTORE SAR PUSH16 0x3C5B251C8209308E82491B559A3EE6CC 0x28 SWAP16 PUSH8 0x29000000000000 ", + "sourceMap": "125:1726:7:-;;132:2:-1;166:7;155:9;146:7;137:37;252:7;246:14;243:1;238:23;232:4;229:33;270:1;265:20;;;;222:63;;265:20;274:9;222:63;;298:9;295:1;288:20;328:4;319:7;311:22;352:7;343;336:24" + }, + "gasEstimates": { + "creation": { + "codeDepositCost": "15200", + "executionCost": "116", + "totalCost": "15316" + }, + "internal": { + "add(uint256,uint256)": "infinite", + "div(uint256,uint256)": "infinite", + "mod(uint256,uint256)": "infinite", + "mul(uint256,uint256)": "infinite", + "sub(uint256,uint256)": "infinite" + } + }, + "methodIdentifiers": {} + }, + "metadata": "{\"compiler\":{\"version\":\"0.5.4+commit.9549d8ff\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Unsigned math operations with safety checks that revert on error\",\"methods\":{},\"title\":\"SafeMath\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol\":\"SafeMath\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x965012d27b4262d7a41f5028cbb30c51ebd9ecd4be8fb30380aaa7a3c64fbc8b\",\"urls\":[\"bzzr://41ca38f6b0fa4b77b0feec43e422cfbec48b7eb38a41edf0b85c77e8d9a296b1\"]}},\"version\":1}", + "userdoc": { + "methods": {} + } + } + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol": { + "IERC20": { + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "spender", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "from", + "type": "address" + }, + { + "name": "to", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "who", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "to", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "owner", + "type": "address" + }, + { + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "from", + "type": "address" + }, + { + "indexed": true, + "name": "to", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + } + ], + "devdoc": { + "details": "see https://github.com/ethereum/EIPs/issues/20", + "methods": {}, + "title": "ERC20 interface" + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "gasEstimates": null, + "methodIdentifiers": { + "allowance(address,address)": "dd62ed3e", + "approve(address,uint256)": "095ea7b3", + "balanceOf(address)": "70a08231", + "totalSupply()": "18160ddd", + "transfer(address,uint256)": "a9059cbb", + "transferFrom(address,address,uint256)": "23b872dd" + } + }, + "metadata": "", + "userdoc": { + "methods": {} + } + } + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol": { + "SafeERC20": { + "abi": [], + "devdoc": { + "details": "Wrappers around ERC20 operations that throw on failure. To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract, which allows you to call the safe operations as `token.safeTransfer(...)`, etc.", + "methods": {}, + "title": "SafeERC20" + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea165627a7a72305820f19c7b62e065f91bc3f26e33372ab3fae2852e0b472cd6bb775c347272d9d5120029", + "opcodes": "PUSH1 0x4C PUSH1 0x2C PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x0 DUP2 EQ PUSH1 0x1C JUMPI PUSH1 0x1E JUMP JUMPDEST INVALID JUMPDEST POP ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG1 PUSH6 0x627A7A723058 KECCAK256 CALL SWAP13 PUSH28 0x62E065F91BC3F26E33372AB3FAE2852E0B472CD6BB775C347272D9D5 SLT STOP 0x29 ", + "sourceMap": "352:1248:9:-;;132:2:-1;166:7;155:9;146:7;137:37;252:7;246:14;243:1;238:23;232:4;229:33;270:1;265:20;;;;222:63;;265:20;274:9;222:63;;298:9;295:1;288:20;328:4;319:7;311:22;352:7;343;336:24" + }, + "gasEstimates": { + "creation": { + "codeDepositCost": "15200", + "executionCost": "116", + "totalCost": "15316" + }, + "internal": { + "safeApprove(contract IERC20,address,uint256)": "infinite", + "safeDecreaseAllowance(contract IERC20,address,uint256)": "infinite", + "safeIncreaseAllowance(contract IERC20,address,uint256)": "infinite", + "safeTransfer(contract IERC20,address,uint256)": "infinite", + "safeTransferFrom(contract IERC20,address,address,uint256)": "infinite" + } + }, + "methodIdentifiers": {} + }, + "metadata": "{\"compiler\":{\"version\":\"0.5.4+commit.9549d8ff\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Wrappers around ERC20 operations that throw on failure. To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract, which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\",\"methods\":{},\"title\":\"SafeERC20\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol\":\"SafeERC20\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x965012d27b4262d7a41f5028cbb30c51ebd9ecd4be8fb30380aaa7a3c64fbc8b\",\"urls\":[\"bzzr://41ca38f6b0fa4b77b0feec43e422cfbec48b7eb38a41edf0b85c77e8d9a296b1\"]},\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x079c4e23ee448f529e43bfa3c4e8fb4be52cd0318ee923a276835bedf45b93d8\",\"urls\":[\"bzzr://48248e86f64407a95f241d6c5c8cfea6b4d4ebf4ebb467e5c98c8af3868fafe4\"]},\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol\":{\"keccak256\":\"0x05fcee7431cd35cd312e14e7f316a44ca3ccc5fb3b859aefc15c1a5db94add7e\",\"urls\":[\"bzzr://5ba67fb83aa7806883a335d53a27dcf1f53b75fa38dedd57893cc84633aa4d4c\"]}},\"version\":1}", + "userdoc": { + "methods": {} + } + } + } + }, + "sources": { + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoCoreTeamRole.sol": { + "ast": { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoCoreTeamRole.sol", + "exportedSymbols": { + "AlgoCoreTeamRole": [ + 86 + ] + }, + "id": 87, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "0.5", + ".4" + ], + "nodeType": "PragmaDirective", + "src": "0:22:0" + }, + { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol", + "file": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol", + "id": 2, + "nodeType": "ImportDirective", + "scope": 87, + "sourceUnit": 900, + "src": "26:189:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 86, + "linearizedBaseContracts": [ + 86 + ], + "name": "AlgoCoreTeamRole", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 5, + "libraryName": { + "contractScope": null, + "id": 3, + "name": "Roles", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 899, + "src": "258:5:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Roles_$899", + "typeString": "library Roles" + } + }, + "nodeType": "UsingForDirective", + "src": "252:27:0", + "typeName": { + "contractScope": null, + "id": 4, + "name": "Roles.Role", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 812, + "src": "268:10:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$812_storage_ptr", + "typeString": "struct Roles.Role" + } + } + }, + { + "constant": false, + "id": 7, + "name": "_coreTeamMembers", + "nodeType": "VariableDeclaration", + "scope": 86, + "src": "287:35:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$812_storage", + "typeString": "struct Roles.Role" + }, + "typeName": { + "contractScope": null, + "id": 6, + "name": "Roles.Role", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 812, + "src": "287:10:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$812_storage_ptr", + "typeString": "struct Roles.Role" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 15, + "nodeType": "Block", + "src": "355:43:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1256, + "src": "379:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 12, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "379:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 10, + "name": "_addCoreTeam", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 73, + "src": "366:12:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 13, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "366:24:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14, + "nodeType": "ExpressionStatement", + "src": "366:24:0" + } + ] + }, + "documentation": null, + "id": 16, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 8, + "nodeType": "ParameterList", + "parameters": [], + "src": "343:2:0" + }, + "returnParameters": { + "id": 9, + "nodeType": "ParameterList", + "parameters": [], + "src": "355:0:0" + }, + "scope": 86, + "src": "331:67:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 26, + "nodeType": "Block", + "src": "430:62:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 20, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1256, + "src": "460:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 21, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "460:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 19, + "name": "isCoreTeam", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 40, + "src": "449:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 22, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "449:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 18, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1259, + 1260 + ], + "referencedDeclaration": 1259, + "src": "441:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 23, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "441:31:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 24, + "nodeType": "ExpressionStatement", + "src": "441:31:0" + }, + { + "id": 25, + "nodeType": "PlaceholderStatement", + "src": "483:1:0" + } + ] + }, + "documentation": null, + "id": 27, + "name": "onlyCoreTeam", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 17, + "nodeType": "ParameterList", + "parameters": [], + "src": "427:2:0" + }, + "src": "406:86:0", + "visibility": "internal" + }, + { + "body": { + "id": 39, + "nodeType": "Block", + "src": "564:55:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 36, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 29, + "src": "603:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 34, + "name": "_coreTeamMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7, + "src": "582:16:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$812_storage", + "typeString": "struct Roles.Role storage ref" + } + }, + "id": 35, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "has", + "nodeType": "MemberAccess", + "referencedDeclaration": 898, + "src": "582:20:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Role_$812_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Role_$812_storage_ptr_$", + "typeString": "function (struct Roles.Role storage pointer,address) view returns (bool)" + } + }, + "id": 37, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "582:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 33, + "id": 38, + "nodeType": "Return", + "src": "575:36:0" + } + ] + }, + "documentation": null, + "id": 40, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isCoreTeam", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 30, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 29, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 40, + "src": "520:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 28, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "520:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "519:17:0" + }, + "returnParameters": { + "id": 33, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 32, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 40, + "src": "558:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 31, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "558:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "557:6:0" + }, + "scope": 86, + "src": "500:119:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 51, + "nodeType": "Block", + "src": "685:40:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 48, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 42, + "src": "709:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 47, + "name": "_addCoreTeam", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 73, + "src": "696:12:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 49, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "696:21:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 50, + "nodeType": "ExpressionStatement", + "src": "696:21:0" + } + ] + }, + "documentation": null, + "id": 52, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 45, + "modifierName": { + "argumentTypes": null, + "id": 44, + "name": "onlyCoreTeam", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27, + "src": "672:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "672:12:0" + } + ], + "name": "addCoreTeam", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 43, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 42, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 52, + "src": "648:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 41, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "648:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "647:17:0" + }, + "returnParameters": { + "id": 46, + "nodeType": "ParameterList", + "parameters": [], + "src": "685:0:0" + }, + "scope": 86, + "src": "627:98:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 60, + "nodeType": "Block", + "src": "768:46:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 56, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1256, + "src": "795:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 57, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "795:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 55, + "name": "_removeCoreTeam", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 85, + "src": "779:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 58, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "779:27:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 59, + "nodeType": "ExpressionStatement", + "src": "779:27:0" + } + ] + }, + "documentation": null, + "id": 61, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "renounceCoreTeam", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 53, + "nodeType": "ParameterList", + "parameters": [], + "src": "758:2:0" + }, + "returnParameters": { + "id": 54, + "nodeType": "ParameterList", + "parameters": [], + "src": "768:0:0" + }, + "scope": 86, + "src": "733:81:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 72, + "nodeType": "Block", + "src": "870:48:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 69, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 63, + "src": "902:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 66, + "name": "_coreTeamMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7, + "src": "881:16:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$812_storage", + "typeString": "struct Roles.Role storage ref" + } + }, + "id": 68, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 844, + "src": "881:20:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Role_$812_storage_ptr_$_t_address_$returns$__$bound_to$_t_struct$_Role_$812_storage_ptr_$", + "typeString": "function (struct Roles.Role storage pointer,address)" + } + }, + "id": 70, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "881:29:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 71, + "nodeType": "ExpressionStatement", + "src": "881:29:0" + } + ] + }, + "documentation": null, + "id": 73, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_addCoreTeam", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 64, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 63, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 73, + "src": "844:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 62, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "844:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "843:17:0" + }, + "returnParameters": { + "id": 65, + "nodeType": "ParameterList", + "parameters": [], + "src": "870:0:0" + }, + "scope": 86, + "src": "822:96:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 84, + "nodeType": "Block", + "src": "977:51:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 81, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 75, + "src": "1012:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 78, + "name": "_coreTeamMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7, + "src": "988:16:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$812_storage", + "typeString": "struct Roles.Role storage ref" + } + }, + "id": 80, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "remove", + "nodeType": "MemberAccess", + "referencedDeclaration": 875, + "src": "988:23:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Role_$812_storage_ptr_$_t_address_$returns$__$bound_to$_t_struct$_Role_$812_storage_ptr_$", + "typeString": "function (struct Roles.Role storage pointer,address)" + } + }, + "id": 82, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "988:32:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 83, + "nodeType": "ExpressionStatement", + "src": "988:32:0" + } + ] + }, + "documentation": null, + "id": 85, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_removeCoreTeam", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 76, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 75, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 85, + "src": "951:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 74, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "951:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "950:17:0" + }, + "returnParameters": { + "id": 77, + "nodeType": "ParameterList", + "parameters": [], + "src": "977:0:0" + }, + "scope": 86, + "src": "926:102:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 87, + "src": "219:812:0" + } + ], + "src": "0:1033:0" + }, + "id": 0 + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoFees.sol": { + "ast": { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoFees.sol", + "exportedSymbols": { + "AlgoFees": [ + 591 + ] + }, + "id": 592, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 88, + "literals": [ + "solidity", + "0.5", + ".4" + ], + "nodeType": "PragmaDirective", + "src": "0:22:1" + }, + { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "file": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "id": 89, + "nodeType": "ImportDirective", + "scope": 592, + "sourceUnit": 1097, + "src": "26:195:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol", + "file": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol", + "id": 90, + "nodeType": "ImportDirective", + "scope": 592, + "sourceUnit": 1242, + "src": "223:198:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/IAlgoMiner.sol", + "file": "./IAlgoMiner.sol", + "id": 91, + "nodeType": "ImportDirective", + "scope": 592, + "sourceUnit": 769, + "src": "425:26:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/ERC20TokenHolder.sol", + "file": "./ERC20TokenHolder.sol", + "id": 92, + "nodeType": "ImportDirective", + "scope": 592, + "sourceUnit": 736, + "src": "453:32:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoSystemRole.sol", + "file": "./AlgoSystemRole.sol", + "id": 93, + "nodeType": "ImportDirective", + "scope": 592, + "sourceUnit": 679, + "src": "487:30:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoCoreTeamRole.sol", + "file": "./AlgoCoreTeamRole.sol", + "id": 94, + "nodeType": "ImportDirective", + "scope": 592, + "sourceUnit": 87, + "src": "519:32:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 95, + "name": "ERC20TokenHolder", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 735, + "src": "576:16:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20TokenHolder_$735", + "typeString": "contract ERC20TokenHolder" + } + }, + "id": 96, + "nodeType": "InheritanceSpecifier", + "src": "576:16:1" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 97, + "name": "AlgoSystemRole", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 678, + "src": "594:14:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_AlgoSystemRole_$678", + "typeString": "contract AlgoSystemRole" + } + }, + "id": 98, + "nodeType": "InheritanceSpecifier", + "src": "594:14:1" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 99, + "name": "AlgoCoreTeamRole", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 86, + "src": "610:16:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_AlgoCoreTeamRole_$86", + "typeString": "contract AlgoCoreTeamRole" + } + }, + "id": 100, + "nodeType": "InheritanceSpecifier", + "src": "610:16:1" + } + ], + "contractDependencies": [ + 735, + 805, + 678, + 86 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 591, + "linearizedBaseContracts": [ + 591, + 86, + 678, + 735, + 805 + ], + "name": "AlgoFees", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 103, + "libraryName": { + "contractScope": null, + "id": 101, + "name": "SafeERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1241, + "src": "640:9:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeERC20_$1241", + "typeString": "library SafeERC20" + } + }, + "nodeType": "UsingForDirective", + "src": "634:27:1", + "typeName": { + "contractScope": null, + "id": 102, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1096, + "src": "654:6:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1096", + "typeString": "contract IERC20" + } + } + }, + { + "constant": true, + "id": 106, + "name": "CAT_0_VALUE_PROPORTION", + "nodeType": "VariableDeclaration", + "scope": 591, + "src": "669:51:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 104, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "669:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "31", + "id": 105, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "719:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 109, + "name": "CAT_1_VALUE_PROPORTION", + "nodeType": "VariableDeclaration", + "scope": 591, + "src": "727:52:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 107, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "727:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "3130", + "id": 108, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "777:2:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 112, + "name": "CAT_2_VALUE_PROPORTION", + "nodeType": "VariableDeclaration", + "scope": 591, + "src": "786:52:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 110, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "786:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "3230", + "id": 111, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "836:2:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_20_by_1", + "typeString": "int_const 20" + }, + "value": "20" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 115, + "name": "CAT_3_VALUE_PROPORTION", + "nodeType": "VariableDeclaration", + "scope": 591, + "src": "845:52:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 113, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "845:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "3330", + "id": 114, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "895:2:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_30_by_1", + "typeString": "int_const 30" + }, + "value": "30" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 118, + "name": "CAT_4_VALUE_PROPORTION", + "nodeType": "VariableDeclaration", + "scope": 591, + "src": "904:52:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 116, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "904:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "3430", + "id": 117, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "954:2:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_40_by_1", + "typeString": "int_const 40" + }, + "value": "40" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 121, + "name": "CAT_5_VALUE_PROPORTION", + "nodeType": "VariableDeclaration", + "scope": 591, + "src": "963:52:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 119, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "963:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "3530", + "id": 120, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1013:2:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_50_by_1", + "typeString": "int_const 50" + }, + "value": "50" + }, + "visibility": "private" + }, + { + "constant": false, + "id": 124, + "name": "_miners", + "nodeType": "VariableDeclaration", + "scope": 591, + "src": "1024:25:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 122, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1024:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 123, + "length": null, + "nodeType": "ArrayTypeName", + "src": "1024:9:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 128, + "name": "_minersByAddress", + "nodeType": "VariableDeclaration", + "scope": 591, + "src": "1056:52:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 127, + "keyType": { + "id": 125, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1064:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1056:27:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 126, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1075:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 148, + "nodeType": "Block", + "src": "1261:91:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 144, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1293:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 143, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1285:7:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 145, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1285:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "expression": { + "argumentTypes": null, + "id": 140, + "name": "_miners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 124, + "src": "1272:7:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 142, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1272:12:1", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) returns (uint256)" + } + }, + "id": 146, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1272:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 147, + "nodeType": "ExpressionStatement", + "src": "1272:24:1" + } + ] + }, + "documentation": null, + "id": 149, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 133, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 130, + "src": "1177:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 134, + "modifierName": { + "argumentTypes": null, + "id": 132, + "name": "ERC20TokenHolder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 735, + "src": "1160:16:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20TokenHolder_$735_$", + "typeString": "type(contract ERC20TokenHolder)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1160:30:1" + }, + { + "arguments": [], + "id": 136, + "modifierName": { + "argumentTypes": null, + "id": 135, + "name": "AlgoSystemRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 678, + "src": "1200:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AlgoSystemRole_$678_$", + "typeString": "type(contract AlgoSystemRole)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1200:16:1" + }, + { + "arguments": [], + "id": 138, + "modifierName": { + "argumentTypes": null, + "id": 137, + "name": "AlgoCoreTeamRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 86, + "src": "1226:16:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AlgoCoreTeamRole_$86_$", + "typeString": "type(contract AlgoCoreTeamRole)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1226:18:1" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 131, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 130, + "name": "tokenAddress", + "nodeType": "VariableDeclaration", + "scope": 149, + "src": "1129:20:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 129, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1129:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1128:22:1" + }, + "returnParameters": { + "id": 139, + "nodeType": "ParameterList", + "parameters": [], + "src": "1261:0:1" + }, + "scope": 591, + "src": "1117:235:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 210, + "nodeType": "Block", + "src": "1439:420:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 162, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 159, + "name": "_miners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 124, + "src": "1458:7:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 160, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1458:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31303030", + "id": 161, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1475:4:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1000_by_1", + "typeString": "int_const 1000" + }, + "value": "1000" + }, + "src": "1458:21:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 158, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1259, + 1260 + ], + "referencedDeclaration": 1259, + "src": "1450:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 163, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1450:30:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 164, + "nodeType": "ExpressionStatement", + "src": "1450:30:1" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 166, + "name": "_minersByAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 128, + "src": "1499:16:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 168, + "indexExpression": { + "argumentTypes": null, + "id": 167, + "name": "minerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 151, + "src": "1516:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1499:30:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 169, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1533:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1499:35:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 165, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1259, + 1260 + ], + "referencedDeclaration": 1259, + "src": "1491:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 171, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1491:44:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 172, + "nodeType": "ExpressionStatement", + "src": "1491:44:1" + }, + { + "assignments": [ + 174 + ], + "declarations": [ + { + "constant": false, + "id": 174, + "name": "algoMiner", + "nodeType": "VariableDeclaration", + "scope": 210, + "src": "1548:20:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IAlgoMiner_$768", + "typeString": "contract IAlgoMiner" + }, + "typeName": { + "contractScope": null, + "id": 173, + "name": "IAlgoMiner", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 768, + "src": "1548:10:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IAlgoMiner_$768", + "typeString": "contract IAlgoMiner" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 178, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 176, + "name": "minerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 151, + "src": "1582:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 175, + "name": "IAlgoMiner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 768, + "src": "1571:10:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IAlgoMiner_$768_$", + "typeString": "type(contract IAlgoMiner)" + } + }, + "id": 177, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1571:24:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IAlgoMiner_$768", + "typeString": "contract IAlgoMiner" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1548:47:1" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 180, + "name": "algoMiner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 174, + "src": "1624:9:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IAlgoMiner_$768", + "typeString": "contract IAlgoMiner" + } + }, + "id": 181, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isAlgoMiner", + "nodeType": "MemberAccess", + "referencedDeclaration": 742, + "src": "1624:21:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_pure$__$returns$_t_bool_$", + "typeString": "function () pure external returns (bool)" + } + }, + "id": 182, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1624:23:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 179, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1259, + 1260 + ], + "referencedDeclaration": 1259, + "src": "1616:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 183, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1616:32:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 184, + "nodeType": "ExpressionStatement", + "src": "1616:32:1" + }, + { + "assignments": [ + 186 + ], + "declarations": [ + { + "constant": false, + "id": 186, + "name": "minerCategory", + "nodeType": "VariableDeclaration", + "scope": 210, + "src": "1669:19:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 185, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1669:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 190, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 187, + "name": "algoMiner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 174, + "src": "1691:9:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IAlgoMiner_$768", + "typeString": "contract IAlgoMiner" + } + }, + "id": 188, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getCategory", + "nodeType": "MemberAccess", + "referencedDeclaration": 752, + "src": "1691:21:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint8_$", + "typeString": "function () view external returns (uint8)" + } + }, + "id": 189, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1691:23:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1669:45:1" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 194, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 192, + "name": "minerCategory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 186, + "src": "1735:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "35", + "id": 193, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1752:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "src": "1735:18:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 191, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1259, + 1260 + ], + "referencedDeclaration": 1259, + "src": "1727:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1727:27:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 196, + "nodeType": "ExpressionStatement", + "src": "1727:27:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 202, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 197, + "name": "_minersByAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 128, + "src": "1767:16:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 199, + "indexExpression": { + "argumentTypes": null, + "id": 198, + "name": "minerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 151, + "src": "1784:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1767:30:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 200, + "name": "_miners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 124, + "src": "1800:7:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 201, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1800:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1767:47:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 203, + "nodeType": "ExpressionStatement", + "src": "1767:47:1" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 207, + "name": "minerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 151, + "src": "1838:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 204, + "name": "_miners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 124, + "src": "1825:7:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 206, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1825:12:1", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) returns (uint256)" + } + }, + "id": 208, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1825:26:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 209, + "nodeType": "ExpressionStatement", + "src": "1825:26:1" + } + ] + }, + "documentation": null, + "id": 211, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 154, + "modifierName": { + "argumentTypes": null, + "id": 153, + "name": "notTerminated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 796, + "src": "1412:13:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1412:13:1" + }, + { + "arguments": null, + "id": 156, + "modifierName": { + "argumentTypes": null, + "id": 155, + "name": "onlyCoreTeam", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27, + "src": "1426:12:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1426:12:1" + } + ], + "name": "registerMiner", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 152, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 151, + "name": "minerAddress", + "nodeType": "VariableDeclaration", + "scope": 211, + "src": "1383:20:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 150, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1383:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1382:22:1" + }, + "returnParameters": { + "id": 157, + "nodeType": "ParameterList", + "parameters": [], + "src": "1439:0:1" + }, + "scope": 591, + "src": "1360:499:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 275, + "nodeType": "Block", + "src": "1948:593:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 224, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 221, + "name": "_miners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 124, + "src": "1967:7:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 222, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1967:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 223, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1984:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "1967:18:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 220, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1259, + 1260 + ], + "referencedDeclaration": 1259, + "src": "1959:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 225, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1959:27:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 226, + "nodeType": "ExpressionStatement", + "src": "1959:27:1" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 230, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 227, + "name": "_miners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 124, + "src": "2002:7:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 228, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2002:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 229, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2020:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "2002:19:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 273, + "nodeType": "Block", + "src": "2198:336:1", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 247, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 242, + "name": "_minersByAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 128, + "src": "2230:16:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 244, + "indexExpression": { + "argumentTypes": null, + "id": 243, + "name": "minerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 213, + "src": "2247:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2230:30:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 245, + "name": "_miners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 124, + "src": "2264:7:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 246, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2264:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2230:48:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 262, + "nodeType": "IfStatement", + "src": "2227:214:1", + "trueBody": { + "id": 261, + "nodeType": "Block", + "src": "2280:161:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 259, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 248, + "name": "_miners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 124, + "src": "2356:7:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 252, + "indexExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 249, + "name": "_minersByAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 128, + "src": "2364:16:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 251, + "indexExpression": { + "argumentTypes": null, + "id": 250, + "name": "minerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 213, + "src": "2381:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2364:30:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2356:39:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 253, + "name": "_miners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 124, + "src": "2398:7:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 258, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 257, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 254, + "name": "_miners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 124, + "src": "2406:7:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 255, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2406:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 256, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2423:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "2406:18:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2398:27:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2356:69:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 260, + "nodeType": "ExpressionStatement", + "src": "2356:69:1" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 263, + "name": "_miners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 124, + "src": "2457:7:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 265, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "pop", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2457:11:1", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypop_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 266, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2457:13:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 267, + "nodeType": "ExpressionStatement", + "src": "2457:13:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 271, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "delete", + "prefix": true, + "src": "2485:37:1", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 268, + "name": "_minersByAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 128, + "src": "2492:16:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 270, + "indexExpression": { + "argumentTypes": null, + "id": 269, + "name": "minerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 213, + "src": "2509:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2492:30:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 272, + "nodeType": "ExpressionStatement", + "src": "2485:37:1" + } + ] + }, + "id": 274, + "nodeType": "IfStatement", + "src": "1999:535:1", + "trueBody": { + "id": 241, + "nodeType": "Block", + "src": "2023:169:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 231, + "name": "_miners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 124, + "src": "2105:7:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 233, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "pop", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2105:11:1", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypop_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 234, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2105:13:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 235, + "nodeType": "ExpressionStatement", + "src": "2105:13:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 239, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "delete", + "prefix": true, + "src": "2133:37:1", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 236, + "name": "_minersByAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 128, + "src": "2140:16:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 238, + "indexExpression": { + "argumentTypes": null, + "id": 237, + "name": "minerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 213, + "src": "2157:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2140:30:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 240, + "nodeType": "ExpressionStatement", + "src": "2133:37:1" + } + ] + } + } + ] + }, + "documentation": null, + "id": 276, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 216, + "modifierName": { + "argumentTypes": null, + "id": 215, + "name": "notTerminated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 796, + "src": "1921:13:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1921:13:1" + }, + { + "arguments": null, + "id": 218, + "modifierName": { + "argumentTypes": null, + "id": 217, + "name": "onlyCoreTeam", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27, + "src": "1935:12:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1935:12:1" + } + ], + "name": "unregisterMiner", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 214, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 213, + "name": "minerAddress", + "nodeType": "VariableDeclaration", + "scope": 276, + "src": "1892:20:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 212, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1892:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1891:22:1" + }, + "returnParameters": { + "id": 219, + "nodeType": "ParameterList", + "parameters": [], + "src": "1948:0:1" + }, + "scope": 591, + "src": "1867:674:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 555, + "nodeType": "Block", + "src": "2597:2370:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 287, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 284, + "name": "_miners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 124, + "src": "2616:7:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 285, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2616:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 286, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2633:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "2616:18:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 283, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1259, + 1260 + ], + "referencedDeclaration": 1259, + "src": "2608:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 288, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2608:27:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 289, + "nodeType": "ExpressionStatement", + "src": "2608:27:1" + }, + { + "assignments": [ + 291 + ], + "declarations": [ + { + "constant": false, + "id": 291, + "name": "currentFeesBalance", + "nodeType": "VariableDeclaration", + "scope": 555, + "src": "2648:26:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 290, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2648:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 298, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 295, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1288, + "src": "2702:4:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_AlgoFees_$591", + "typeString": "contract AlgoFees" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_AlgoFees_$591", + "typeString": "contract AlgoFees" + } + ], + "id": 294, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2694:7:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 296, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2694:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 292, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 690, + "src": "2677:6:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1096", + "typeString": "contract IERC20" + } + }, + "id": 293, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1070, + "src": "2677:16:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 297, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2677:31:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2648:60:1" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 302, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 300, + "name": "currentFeesBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 291, + "src": "2723:18:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 301, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2744:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2723:22:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 299, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1259, + 1260 + ], + "referencedDeclaration": 1259, + "src": "2715:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 303, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2715:31:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 304, + "nodeType": "ExpressionStatement", + "src": "2715:31:1" + }, + { + "assignments": [ + 309 + ], + "declarations": [ + { + "constant": false, + "id": 309, + "name": "miners", + "nodeType": "VariableDeclaration", + "scope": 555, + "src": "2830:24:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$6_memory_ptr", + "typeString": "uint256[6]" + }, + "typeName": { + "baseType": { + "id": 307, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2830:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 308, + "length": { + "argumentTypes": null, + "hexValue": "36", + "id": 306, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2838:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + }, + "value": "6" + }, + "nodeType": "ArrayTypeName", + "src": "2830:10:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$6_storage_ptr", + "typeString": "uint256[6]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 310, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "2830:24:1" + }, + { + "assignments": [ + 312 + ], + "declarations": [ + { + "constant": false, + "id": 312, + "name": "minerCount", + "nodeType": "VariableDeclaration", + "scope": 555, + "src": "2865:18:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 311, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2865:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 315, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 313, + "name": "_miners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 124, + "src": "2886:7:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 314, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2886:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2865:35:1" + }, + { + "body": { + "id": 406, + "nodeType": "Block", + "src": "2953:657:1", + "statements": [ + { + "assignments": [ + 327 + ], + "declarations": [ + { + "constant": false, + "id": 327, + "name": "algoMiner", + "nodeType": "VariableDeclaration", + "scope": 406, + "src": "2968:20:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IAlgoMiner_$768", + "typeString": "contract IAlgoMiner" + }, + "typeName": { + "contractScope": null, + "id": 326, + "name": "IAlgoMiner", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 768, + "src": "2968:10:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IAlgoMiner_$768", + "typeString": "contract IAlgoMiner" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 333, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 329, + "name": "_miners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 124, + "src": "3002:7:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 331, + "indexExpression": { + "argumentTypes": null, + "id": 330, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 317, + "src": "3010:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3002:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 328, + "name": "IAlgoMiner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 768, + "src": "2991:10:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IAlgoMiner_$768_$", + "typeString": "type(contract IAlgoMiner)" + } + }, + "id": 332, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2991:22:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IAlgoMiner_$768", + "typeString": "contract IAlgoMiner" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2968:45:1" + }, + { + "condition": { + "argumentTypes": null, + "id": 337, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "3033:21:1", + "subExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 334, + "name": "algoMiner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 327, + "src": "3034:9:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IAlgoMiner_$768", + "typeString": "contract IAlgoMiner" + } + }, + "id": 335, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isMining", + "nodeType": "MemberAccess", + "referencedDeclaration": 767, + "src": "3034:18:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_bool_$", + "typeString": "function () view external returns (bool)" + } + }, + "id": 336, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3034:20:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 339, + "nodeType": "IfStatement", + "src": "3030:34:1", + "trueBody": { + "id": 338, + "nodeType": "Continue", + "src": "3056:8:1" + } + }, + { + "assignments": [ + 341 + ], + "declarations": [ + { + "constant": false, + "id": 341, + "name": "minerCategory", + "nodeType": "VariableDeclaration", + "scope": 406, + "src": "3081:19:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 340, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3081:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 345, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 342, + "name": "algoMiner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 327, + "src": "3103:9:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IAlgoMiner_$768", + "typeString": "contract IAlgoMiner" + } + }, + "id": 343, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getCategory", + "nodeType": "MemberAccess", + "referencedDeclaration": 752, + "src": "3103:21:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint8_$", + "typeString": "function () view external returns (uint8)" + } + }, + "id": 344, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3103:23:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3081:45:1" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 348, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 346, + "name": "minerCategory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 341, + "src": "3146:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 347, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3163:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3146:18:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 357, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 355, + "name": "minerCategory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 341, + "src": "3221:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 356, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3238:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "3221:18:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 366, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 364, + "name": "minerCategory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 341, + "src": "3296:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 365, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3313:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "3296:18:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 375, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 373, + "name": "minerCategory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 341, + "src": "3371:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "33", + "id": 374, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3388:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "src": "3371:18:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 384, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 382, + "name": "minerCategory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 341, + "src": "3446:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "34", + "id": 383, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3463:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "src": "3446:18:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 393, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 391, + "name": "minerCategory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 341, + "src": "3521:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "35", + "id": 392, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3538:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "src": "3521:18:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 400, + "nodeType": "IfStatement", + "src": "3518:69:1", + "trueBody": { + "id": 399, + "nodeType": "Block", + "src": "3541:46:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 397, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "3560:11:1", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 394, + "name": "miners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 309, + "src": "3560:6:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$6_memory_ptr", + "typeString": "uint256[6] memory" + } + }, + "id": 396, + "indexExpression": { + "argumentTypes": null, + "hexValue": "35", + "id": 395, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3567:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3560:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 398, + "nodeType": "ExpressionStatement", + "src": "3560:11:1" + } + ] + } + }, + "id": 401, + "nodeType": "IfStatement", + "src": "3443:144:1", + "trueBody": { + "id": 390, + "nodeType": "Block", + "src": "3466:46:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 388, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "3485:11:1", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 385, + "name": "miners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 309, + "src": "3485:6:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$6_memory_ptr", + "typeString": "uint256[6] memory" + } + }, + "id": 387, + "indexExpression": { + "argumentTypes": null, + "hexValue": "34", + "id": 386, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3492:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3485:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 389, + "nodeType": "ExpressionStatement", + "src": "3485:11:1" + } + ] + } + }, + "id": 402, + "nodeType": "IfStatement", + "src": "3368:219:1", + "trueBody": { + "id": 381, + "nodeType": "Block", + "src": "3391:46:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 379, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "3410:11:1", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 376, + "name": "miners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 309, + "src": "3410:6:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$6_memory_ptr", + "typeString": "uint256[6] memory" + } + }, + "id": 378, + "indexExpression": { + "argumentTypes": null, + "hexValue": "33", + "id": 377, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3417:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3410:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 380, + "nodeType": "ExpressionStatement", + "src": "3410:11:1" + } + ] + } + }, + "id": 403, + "nodeType": "IfStatement", + "src": "3293:294:1", + "trueBody": { + "id": 372, + "nodeType": "Block", + "src": "3316:46:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "3335:11:1", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 367, + "name": "miners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 309, + "src": "3335:6:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$6_memory_ptr", + "typeString": "uint256[6] memory" + } + }, + "id": 369, + "indexExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 368, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3342:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3335:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 371, + "nodeType": "ExpressionStatement", + "src": "3335:11:1" + } + ] + } + }, + "id": 404, + "nodeType": "IfStatement", + "src": "3218:369:1", + "trueBody": { + "id": 363, + "nodeType": "Block", + "src": "3241:46:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 361, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "3260:11:1", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 358, + "name": "miners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 309, + "src": "3260:6:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$6_memory_ptr", + "typeString": "uint256[6] memory" + } + }, + "id": 360, + "indexExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 359, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3267:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3260:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 362, + "nodeType": "ExpressionStatement", + "src": "3260:11:1" + } + ] + } + }, + "id": 405, + "nodeType": "IfStatement", + "src": "3143:444:1", + "trueBody": { + "id": 354, + "nodeType": "Block", + "src": "3166:46:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 352, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "3185:11:1", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 349, + "name": "miners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 309, + "src": "3185:6:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$6_memory_ptr", + "typeString": "uint256[6] memory" + } + }, + "id": 351, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 350, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3192:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3185:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 353, + "nodeType": "ExpressionStatement", + "src": "3185:11:1" + } + ] + } + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 320, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 317, + "src": "2932:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 321, + "name": "minerCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 312, + "src": "2936:10:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2932:14:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 407, + "initializationExpression": { + "assignments": [ + 317 + ], + "declarations": [ + { + "constant": false, + "id": 317, + "name": "i", + "nodeType": "VariableDeclaration", + "scope": 407, + "src": "2917:9:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 316, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2917:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 319, + "initialValue": { + "argumentTypes": null, + "hexValue": "31", + "id": 318, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2929:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "nodeType": "VariableDeclarationStatement", + "src": "2917:13:1" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 324, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "2948:3:1", + "subExpression": { + "argumentTypes": null, + "id": 323, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 317, + "src": "2948:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 325, + "nodeType": "ExpressionStatement", + "src": "2948:3:1" + }, + "nodeType": "ForStatement", + "src": "2913:697:1" + }, + { + "assignments": [ + 409 + ], + "declarations": [ + { + "constant": false, + "id": 409, + "name": "totalProportion", + "nodeType": "VariableDeclaration", + "scope": 555, + "src": "3698:23:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 408, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3698:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 445, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 444, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 438, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 432, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 426, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 420, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 414, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 410, + "name": "CAT_0_VALUE_PROPORTION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 106, + "src": "3724:22:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 411, + "name": "miners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 309, + "src": "3749:6:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$6_memory_ptr", + "typeString": "uint256[6] memory" + } + }, + "id": 413, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 412, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3756:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3749:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3724:34:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 419, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 415, + "name": "CAT_1_VALUE_PROPORTION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 109, + "src": "3774:22:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 416, + "name": "miners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 309, + "src": "3799:6:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$6_memory_ptr", + "typeString": "uint256[6] memory" + } + }, + "id": 418, + "indexExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 417, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3806:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3799:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3774:34:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3724:84:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 425, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 421, + "name": "CAT_2_VALUE_PROPORTION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 112, + "src": "3824:22:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 422, + "name": "miners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 309, + "src": "3849:6:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$6_memory_ptr", + "typeString": "uint256[6] memory" + } + }, + "id": 424, + "indexExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 423, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3856:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3849:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3824:34:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3724:134:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 431, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 427, + "name": "CAT_3_VALUE_PROPORTION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 115, + "src": "3874:22:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 428, + "name": "miners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 309, + "src": "3899:6:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$6_memory_ptr", + "typeString": "uint256[6] memory" + } + }, + "id": 430, + "indexExpression": { + "argumentTypes": null, + "hexValue": "33", + "id": 429, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3906:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3899:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3874:34:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3724:184:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 437, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 433, + "name": "CAT_4_VALUE_PROPORTION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 118, + "src": "3924:22:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 434, + "name": "miners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 309, + "src": "3949:6:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$6_memory_ptr", + "typeString": "uint256[6] memory" + } + }, + "id": 436, + "indexExpression": { + "argumentTypes": null, + "hexValue": "34", + "id": 435, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3956:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3949:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3924:34:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3724:234:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 443, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 439, + "name": "CAT_5_VALUE_PROPORTION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 121, + "src": "3974:22:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 440, + "name": "miners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 309, + "src": "3999:6:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$6_memory_ptr", + "typeString": "uint256[6] memory" + } + }, + "id": 442, + "indexExpression": { + "argumentTypes": null, + "hexValue": "35", + "id": 441, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4006:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3999:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3974:34:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3724:284:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3698:310:1" + }, + { + "assignments": [ + 450 + ], + "declarations": [ + { + "constant": false, + "id": 450, + "name": "feePerMiner", + "nodeType": "VariableDeclaration", + "scope": 555, + "src": "4029:29:1", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$6_memory_ptr", + "typeString": "uint256[6]" + }, + "typeName": { + "baseType": { + "id": 448, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4029:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 449, + "length": { + "argumentTypes": null, + "hexValue": "36", + "id": 447, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4037:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + }, + "value": "6" + }, + "nodeType": "ArrayTypeName", + "src": "4029:10:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$6_storage_ptr", + "typeString": "uint256[6]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 451, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "4029:29:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 452, + "name": "feePerMiner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 450, + "src": "4071:11:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$6_memory_ptr", + "typeString": "uint256[6] memory" + } + }, + "id": 454, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 453, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4083:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4071:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 459, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 457, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 455, + "name": "currentFeesBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 291, + "src": "4088:18:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 456, + "name": "CAT_0_VALUE_PROPORTION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 106, + "src": "4109:22:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4088:43:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 458, + "name": "totalProportion", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 409, + "src": "4134:15:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4088:61:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4071:78:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 461, + "nodeType": "ExpressionStatement", + "src": "4071:78:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 470, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 462, + "name": "feePerMiner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 450, + "src": "4160:11:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$6_memory_ptr", + "typeString": "uint256[6] memory" + } + }, + "id": 464, + "indexExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 463, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4172:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4160:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 469, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 467, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 465, + "name": "currentFeesBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 291, + "src": "4177:18:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 466, + "name": "CAT_1_VALUE_PROPORTION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 109, + "src": "4198:22:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4177:43:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 468, + "name": "totalProportion", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 409, + "src": "4223:15:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4177:61:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4160:78:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 471, + "nodeType": "ExpressionStatement", + "src": "4160:78:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 480, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 472, + "name": "feePerMiner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 450, + "src": "4249:11:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$6_memory_ptr", + "typeString": "uint256[6] memory" + } + }, + "id": 474, + "indexExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 473, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4261:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4249:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 479, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 477, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 475, + "name": "currentFeesBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 291, + "src": "4266:18:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 476, + "name": "CAT_2_VALUE_PROPORTION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 112, + "src": "4287:22:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4266:43:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 478, + "name": "totalProportion", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 409, + "src": "4312:15:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4266:61:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4249:78:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 481, + "nodeType": "ExpressionStatement", + "src": "4249:78:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 490, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 482, + "name": "feePerMiner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 450, + "src": "4338:11:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$6_memory_ptr", + "typeString": "uint256[6] memory" + } + }, + "id": 484, + "indexExpression": { + "argumentTypes": null, + "hexValue": "33", + "id": 483, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4350:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4338:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 489, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 487, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 485, + "name": "currentFeesBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 291, + "src": "4355:18:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 486, + "name": "CAT_3_VALUE_PROPORTION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 115, + "src": "4376:22:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4355:43:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 488, + "name": "totalProportion", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 409, + "src": "4401:15:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4355:61:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4338:78:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 491, + "nodeType": "ExpressionStatement", + "src": "4338:78:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 500, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 492, + "name": "feePerMiner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 450, + "src": "4427:11:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$6_memory_ptr", + "typeString": "uint256[6] memory" + } + }, + "id": 494, + "indexExpression": { + "argumentTypes": null, + "hexValue": "34", + "id": 493, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4439:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4427:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 499, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 497, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 495, + "name": "currentFeesBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 291, + "src": "4444:18:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 496, + "name": "CAT_4_VALUE_PROPORTION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 118, + "src": "4465:22:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4444:43:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 498, + "name": "totalProportion", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 409, + "src": "4490:15:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4444:61:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4427:78:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 501, + "nodeType": "ExpressionStatement", + "src": "4427:78:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 510, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 502, + "name": "feePerMiner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 450, + "src": "4516:11:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$6_memory_ptr", + "typeString": "uint256[6] memory" + } + }, + "id": 504, + "indexExpression": { + "argumentTypes": null, + "hexValue": "35", + "id": 503, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4528:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4516:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 509, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 507, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 505, + "name": "currentFeesBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 291, + "src": "4533:18:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 506, + "name": "CAT_5_VALUE_PROPORTION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 121, + "src": "4554:22:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4533:43:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 508, + "name": "totalProportion", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 409, + "src": "4579:15:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4533:61:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4516:78:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 511, + "nodeType": "ExpressionStatement", + "src": "4516:78:1" + }, + { + "body": { + "id": 553, + "nodeType": "Block", + "src": "4698:262:1", + "statements": [ + { + "assignments": [ + 523 + ], + "declarations": [ + { + "constant": false, + "id": 523, + "name": "algoMiner", + "nodeType": "VariableDeclaration", + "scope": 553, + "src": "4713:20:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IAlgoMiner_$768", + "typeString": "contract IAlgoMiner" + }, + "typeName": { + "contractScope": null, + "id": 522, + "name": "IAlgoMiner", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 768, + "src": "4713:10:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IAlgoMiner_$768", + "typeString": "contract IAlgoMiner" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 529, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 525, + "name": "_miners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 124, + "src": "4747:7:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 527, + "indexExpression": { + "argumentTypes": null, + "id": 526, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 513, + "src": "4755:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4747:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 524, + "name": "IAlgoMiner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 768, + "src": "4736:10:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IAlgoMiner_$768_$", + "typeString": "type(contract IAlgoMiner)" + } + }, + "id": 528, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4736:22:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IAlgoMiner_$768", + "typeString": "contract IAlgoMiner" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4713:45:1" + }, + { + "condition": { + "argumentTypes": null, + "id": 533, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "4778:21:1", + "subExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 530, + "name": "algoMiner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 523, + "src": "4779:9:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IAlgoMiner_$768", + "typeString": "contract IAlgoMiner" + } + }, + "id": 531, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isMining", + "nodeType": "MemberAccess", + "referencedDeclaration": 767, + "src": "4779:18:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_bool_$", + "typeString": "function () view external returns (bool)" + } + }, + "id": 532, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4779:20:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 535, + "nodeType": "IfStatement", + "src": "4775:34:1", + "trueBody": { + "id": 534, + "nodeType": "Continue", + "src": "4801:8:1" + } + }, + { + "assignments": [ + 537 + ], + "declarations": [ + { + "constant": false, + "id": 537, + "name": "minerCategory", + "nodeType": "VariableDeclaration", + "scope": 553, + "src": "4826:19:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 536, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "4826:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 541, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 538, + "name": "algoMiner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 523, + "src": "4848:9:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IAlgoMiner_$768", + "typeString": "contract IAlgoMiner" + } + }, + "id": 539, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getCategory", + "nodeType": "MemberAccess", + "referencedDeclaration": 752, + "src": "4848:21:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint8_$", + "typeString": "function () view external returns (uint8)" + } + }, + "id": 540, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4848:23:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4826:45:1" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 545, + "name": "algoMiner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 523, + "src": "4899:9:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IAlgoMiner_$768", + "typeString": "contract IAlgoMiner" + } + }, + "id": 546, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getMiner", + "nodeType": "MemberAccess", + "referencedDeclaration": 757, + "src": "4899:18:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", + "typeString": "function () view external returns (address)" + } + }, + "id": 547, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4899:20:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 548, + "name": "feePerMiner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 450, + "src": "4921:11:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$6_memory_ptr", + "typeString": "uint256[6] memory" + } + }, + "id": 550, + "indexExpression": { + "argumentTypes": null, + "id": 549, + "name": "minerCategory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 537, + "src": "4933:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4921:26:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 542, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 690, + "src": "4879:6:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1096", + "typeString": "contract IERC20" + } + }, + "id": 544, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeTransfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 1121, + "src": "4879:19:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$1096_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$1096_$", + "typeString": "function (contract IERC20,address,uint256)" + } + }, + "id": 551, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4879:69:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 552, + "nodeType": "ExpressionStatement", + "src": "4879:69:1" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 518, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 516, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 513, + "src": "4677:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 517, + "name": "minerCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 312, + "src": "4681:10:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4677:14:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 554, + "initializationExpression": { + "assignments": [ + 513 + ], + "declarations": [ + { + "constant": false, + "id": 513, + "name": "i", + "nodeType": "VariableDeclaration", + "scope": 554, + "src": "4662:9:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 512, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4662:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 515, + "initialValue": { + "argumentTypes": null, + "hexValue": "31", + "id": 514, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4674:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "nodeType": "VariableDeclarationStatement", + "src": "4662:13:1" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 520, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "4693:3:1", + "subExpression": { + "argumentTypes": null, + "id": 519, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 513, + "src": "4693:1:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 521, + "nodeType": "ExpressionStatement", + "src": "4693:3:1" + }, + "nodeType": "ForStatement", + "src": "4658:302:1" + } + ] + }, + "documentation": null, + "id": 556, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 279, + "modifierName": { + "argumentTypes": null, + "id": 278, + "name": "notTerminated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 796, + "src": "2572:13:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2572:13:1" + }, + { + "arguments": null, + "id": 281, + "modifierName": { + "argumentTypes": null, + "id": 280, + "name": "onlySystem", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 619, + "src": "2586:10:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2586:10:1" + } + ], + "name": "mine", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 277, + "nodeType": "ParameterList", + "parameters": [], + "src": "2562:2:1" + }, + "returnParameters": { + "id": 282, + "nodeType": "ParameterList", + "parameters": [], + "src": "2597:0:1" + }, + "scope": 591, + "src": "2549:2418:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 564, + "nodeType": "Block", + "src": "5016:31:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 561, + "name": "_terminate", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 734 + ], + "referencedDeclaration": 734, + "src": "5027:10:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 562, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5027:12:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 563, + "nodeType": "ExpressionStatement", + "src": "5027:12:1" + } + ] + }, + "documentation": null, + "id": 565, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 559, + "modifierName": { + "argumentTypes": null, + "id": 558, + "name": "onlyCoreTeam", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27, + "src": "5003:12:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5003:12:1" + } + ], + "name": "terminate", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 557, + "nodeType": "ParameterList", + "parameters": [], + "src": "4993:2:1" + }, + "returnParameters": { + "id": 560, + "nodeType": "ParameterList", + "parameters": [], + "src": "5016:0:1" + }, + "scope": 591, + "src": "4975:72:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 575, + "nodeType": "Block", + "src": "5110:44:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 573, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 570, + "name": "_miners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 124, + "src": "5128:7:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 571, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5128:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 572, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5145:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "5128:18:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 569, + "id": 574, + "nodeType": "Return", + "src": "5121:25:1" + } + ] + }, + "documentation": null, + "id": 576, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getMinerCount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 566, + "nodeType": "ParameterList", + "parameters": [], + "src": "5077:2:1" + }, + "returnParameters": { + "id": 569, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 568, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 576, + "src": "5101:7:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 567, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5101:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5100:9:1" + }, + "scope": 591, + "src": "5055:99:1", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 589, + "nodeType": "Block", + "src": "5232:44:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 583, + "name": "_miners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 124, + "src": "5250:7:1", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 587, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 586, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 584, + "name": "index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 578, + "src": "5258:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 585, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5266:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "5258:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5250:18:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 582, + "id": 588, + "nodeType": "Return", + "src": "5243:25:1" + } + ] + }, + "documentation": null, + "id": 590, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getMinerByIndex", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 579, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 578, + "name": "index", + "nodeType": "VariableDeclaration", + "scope": 590, + "src": "5187:13:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 577, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5187:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5186:15:1" + }, + "returnParameters": { + "id": 582, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 581, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 590, + "src": "5223:7:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 580, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5223:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5222:9:1" + }, + "scope": 591, + "src": "5162:114:1", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 592, + "src": "555:4724:1" + } + ], + "src": "0:5279:1" + }, + "id": 1 + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoSystemRole.sol": { + "ast": { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoSystemRole.sol", + "exportedSymbols": { + "AlgoSystemRole": [ + 678 + ] + }, + "id": 679, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 593, + "literals": [ + "solidity", + "0.5", + ".4" + ], + "nodeType": "PragmaDirective", + "src": "0:22:2" + }, + { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol", + "file": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol", + "id": 594, + "nodeType": "ImportDirective", + "scope": 679, + "sourceUnit": 900, + "src": "26:189:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 678, + "linearizedBaseContracts": [ + 678 + ], + "name": "AlgoSystemRole", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 597, + "libraryName": { + "contractScope": null, + "id": 595, + "name": "Roles", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 899, + "src": "256:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Roles_$899", + "typeString": "library Roles" + } + }, + "nodeType": "UsingForDirective", + "src": "250:27:2", + "typeName": { + "contractScope": null, + "id": 596, + "name": "Roles.Role", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 812, + "src": "266:10:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$812_storage_ptr", + "typeString": "struct Roles.Role" + } + } + }, + { + "constant": false, + "id": 599, + "name": "_systemMembers", + "nodeType": "VariableDeclaration", + "scope": 678, + "src": "285:33:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$812_storage", + "typeString": "struct Roles.Role" + }, + "typeName": { + "contractScope": null, + "id": 598, + "name": "Roles.Role", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 812, + "src": "285:10:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$812_storage_ptr", + "typeString": "struct Roles.Role" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 607, + "nodeType": "Block", + "src": "351:41:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 603, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1256, + "src": "373:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 604, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "373:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 602, + "name": "_addSystem", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 665, + "src": "362:10:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 605, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "362:22:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 606, + "nodeType": "ExpressionStatement", + "src": "362:22:2" + } + ] + }, + "documentation": null, + "id": 608, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 600, + "nodeType": "ParameterList", + "parameters": [], + "src": "339:2:2" + }, + "returnParameters": { + "id": 601, + "nodeType": "ParameterList", + "parameters": [], + "src": "351:0:2" + }, + "scope": 678, + "src": "327:65:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 618, + "nodeType": "Block", + "src": "422:60:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 612, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1256, + "src": "450:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 613, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "450:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 611, + "name": "isSystem", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 632, + "src": "441:8:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 614, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "441:20:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 610, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1259, + 1260 + ], + "referencedDeclaration": 1259, + "src": "433:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 615, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "433:29:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 616, + "nodeType": "ExpressionStatement", + "src": "433:29:2" + }, + { + "id": 617, + "nodeType": "PlaceholderStatement", + "src": "473:1:2" + } + ] + }, + "documentation": null, + "id": 619, + "name": "onlySystem", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 609, + "nodeType": "ParameterList", + "parameters": [], + "src": "419:2:2" + }, + "src": "400:82:2", + "visibility": "internal" + }, + { + "body": { + "id": 631, + "nodeType": "Block", + "src": "552:53:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 628, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 621, + "src": "589:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 626, + "name": "_systemMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 599, + "src": "570:14:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$812_storage", + "typeString": "struct Roles.Role storage ref" + } + }, + "id": 627, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "has", + "nodeType": "MemberAccess", + "referencedDeclaration": 898, + "src": "570:18:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Role_$812_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Role_$812_storage_ptr_$", + "typeString": "function (struct Roles.Role storage pointer,address) view returns (bool)" + } + }, + "id": 629, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "570:27:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 625, + "id": 630, + "nodeType": "Return", + "src": "563:34:2" + } + ] + }, + "documentation": null, + "id": 632, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isSystem", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 622, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 621, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 632, + "src": "508:15:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 620, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "508:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "507:17:2" + }, + "returnParameters": { + "id": 625, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 624, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 632, + "src": "546:4:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 623, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "546:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "545:6:2" + }, + "scope": 678, + "src": "490:115:2", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 643, + "nodeType": "Block", + "src": "667:38:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 640, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 634, + "src": "689:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 639, + "name": "_addSystem", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 665, + "src": "678:10:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 641, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "678:19:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 642, + "nodeType": "ExpressionStatement", + "src": "678:19:2" + } + ] + }, + "documentation": null, + "id": 644, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 637, + "modifierName": { + "argumentTypes": null, + "id": 636, + "name": "onlySystem", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 619, + "src": "656:10:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "656:10:2" + } + ], + "name": "addSystem", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 635, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 634, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 644, + "src": "632:15:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 633, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "632:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "631:17:2" + }, + "returnParameters": { + "id": 638, + "nodeType": "ParameterList", + "parameters": [], + "src": "667:0:2" + }, + "scope": 678, + "src": "613:92:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 652, + "nodeType": "Block", + "src": "746:44:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 648, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1256, + "src": "771:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 649, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "771:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 647, + "name": "_removeSystem", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 677, + "src": "757:13:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 650, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "757:25:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 651, + "nodeType": "ExpressionStatement", + "src": "757:25:2" + } + ] + }, + "documentation": null, + "id": 653, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "renounceSystem", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 645, + "nodeType": "ParameterList", + "parameters": [], + "src": "736:2:2" + }, + "returnParameters": { + "id": 646, + "nodeType": "ParameterList", + "parameters": [], + "src": "746:0:2" + }, + "scope": 678, + "src": "713:77:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 664, + "nodeType": "Block", + "src": "844:46:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 661, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 655, + "src": "874:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 658, + "name": "_systemMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 599, + "src": "855:14:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$812_storage", + "typeString": "struct Roles.Role storage ref" + } + }, + "id": 660, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 844, + "src": "855:18:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Role_$812_storage_ptr_$_t_address_$returns$__$bound_to$_t_struct$_Role_$812_storage_ptr_$", + "typeString": "function (struct Roles.Role storage pointer,address)" + } + }, + "id": 662, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "855:27:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 663, + "nodeType": "ExpressionStatement", + "src": "855:27:2" + } + ] + }, + "documentation": null, + "id": 665, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_addSystem", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 656, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 655, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 665, + "src": "818:15:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 654, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "818:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "817:17:2" + }, + "returnParameters": { + "id": 657, + "nodeType": "ParameterList", + "parameters": [], + "src": "844:0:2" + }, + "scope": 678, + "src": "798:92:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 676, + "nodeType": "Block", + "src": "947:49:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 673, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 667, + "src": "980:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 670, + "name": "_systemMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 599, + "src": "958:14:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$812_storage", + "typeString": "struct Roles.Role storage ref" + } + }, + "id": 672, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "remove", + "nodeType": "MemberAccess", + "referencedDeclaration": 875, + "src": "958:21:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Role_$812_storage_ptr_$_t_address_$returns$__$bound_to$_t_struct$_Role_$812_storage_ptr_$", + "typeString": "function (struct Roles.Role storage pointer,address)" + } + }, + "id": 674, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "958:30:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 675, + "nodeType": "ExpressionStatement", + "src": "958:30:2" + } + ] + }, + "documentation": null, + "id": 677, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_removeSystem", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 668, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 667, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 677, + "src": "921:15:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 666, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "921:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "920:17:2" + }, + "returnParameters": { + "id": 669, + "nodeType": "ParameterList", + "parameters": [], + "src": "947:0:2" + }, + "scope": 678, + "src": "898:98:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 679, + "src": "219:780:2" + } + ], + "src": "0:1001:2" + }, + "id": 2 + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/ERC20TokenHolder.sol": { + "ast": { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/ERC20TokenHolder.sol", + "exportedSymbols": { + "ERC20TokenHolder": [ + 735 + ] + }, + "id": 736, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 680, + "literals": [ + "solidity", + "0.5", + ".4" + ], + "nodeType": "PragmaDirective", + "src": "0:22:3" + }, + { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "file": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "id": 681, + "nodeType": "ImportDirective", + "scope": 736, + "sourceUnit": 1097, + "src": "26:195:3", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol", + "file": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol", + "id": 682, + "nodeType": "ImportDirective", + "scope": 736, + "sourceUnit": 1242, + "src": "223:198:3", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/Terminable.sol", + "file": "./Terminable.sol", + "id": 683, + "nodeType": "ImportDirective", + "scope": 736, + "sourceUnit": 806, + "src": "425:26:3", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 684, + "name": "Terminable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 805, + "src": "484:10:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Terminable_$805", + "typeString": "contract Terminable" + } + }, + "id": 685, + "nodeType": "InheritanceSpecifier", + "src": "484:10:3" + } + ], + "contractDependencies": [ + 805 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 735, + "linearizedBaseContracts": [ + 735, + 805 + ], + "name": "ERC20TokenHolder", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 688, + "libraryName": { + "contractScope": null, + "id": 686, + "name": "SafeERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1241, + "src": "508:9:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeERC20_$1241", + "typeString": "library SafeERC20" + } + }, + "nodeType": "UsingForDirective", + "src": "502:27:3", + "typeName": { + "contractScope": null, + "id": 687, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1096, + "src": "522:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1096", + "typeString": "contract IERC20" + } + } + }, + { + "constant": false, + "id": 690, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 735, + "src": "537:22:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1096", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 689, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1096, + "src": "537:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1096", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + }, + { + "body": { + "id": 703, + "nodeType": "Block", + "src": "624:48:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 701, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 697, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 690, + "src": "635:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1096", + "typeString": "contract IERC20" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 699, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 692, + "src": "651:12:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 698, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1096, + "src": "644:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$1096_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 700, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "644:20:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1096", + "typeString": "contract IERC20" + } + }, + "src": "635:29:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1096", + "typeString": "contract IERC20" + } + }, + "id": 702, + "nodeType": "ExpressionStatement", + "src": "635:29:3" + } + ] + }, + "documentation": null, + "id": 704, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [], + "id": 695, + "modifierName": { + "argumentTypes": null, + "id": 694, + "name": "Terminable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 805, + "src": "602:10:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Terminable_$805_$", + "typeString": "type(contract Terminable)" + } + }, + "nodeType": "ModifierInvocation", + "src": "602:12:3" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 693, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 692, + "name": "tokenAddress", + "nodeType": "VariableDeclaration", + "scope": 704, + "src": "580:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 691, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "580:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "579:22:3" + }, + "returnParameters": { + "id": 696, + "nodeType": "ParameterList", + "parameters": [], + "src": "624:0:3" + }, + "scope": 735, + "src": "568:104:3", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 733, + "nodeType": "Block", + "src": "711:214:3", + "statements": [ + { + "assignments": [ + 708 + ], + "declarations": [ + { + "constant": false, + "id": 708, + "name": "currentBalance", + "nodeType": "VariableDeclaration", + "scope": 733, + "src": "722:22:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 707, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "722:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 715, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 712, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1284, + "src": "772:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20TokenHolder_$735", + "typeString": "contract ERC20TokenHolder" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ERC20TokenHolder_$735", + "typeString": "contract ERC20TokenHolder" + } + ], + "id": 711, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "764:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 713, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "764:13:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 709, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 690, + "src": "747:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1096", + "typeString": "contract IERC20" + } + }, + "id": 710, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1070, + "src": "747:16:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 714, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "747:31:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "722:56:3" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 718, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 716, + "name": "currentBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 708, + "src": "792:14:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 717, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "809:1:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "792:18:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 727, + "nodeType": "IfStatement", + "src": "789:95:3", + "trueBody": { + "id": 726, + "nodeType": "Block", + "src": "812:72:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 722, + "name": "_creator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 772, + "src": "847:8:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 723, + "name": "currentBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 708, + "src": "857:14:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 719, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 690, + "src": "827:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1096", + "typeString": "contract IERC20" + } + }, + "id": 721, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeTransfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 1121, + "src": "827:19:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$1096_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$1096_$", + "typeString": "function (contract IERC20,address,uint256)" + } + }, + "id": 724, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "827:45:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 725, + "nodeType": "ExpressionStatement", + "src": "827:45:3" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 728, + "name": "Terminable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 805, + "src": "894:10:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Terminable_$805_$", + "typeString": "type(contract Terminable)" + } + }, + "id": 730, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "_terminate", + "nodeType": "MemberAccess", + "referencedDeclaration": 804, + "src": "894:21:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 731, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "894:23:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 732, + "nodeType": "ExpressionStatement", + "src": "894:23:3" + } + ] + }, + "documentation": null, + "id": 734, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_terminate", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 705, + "nodeType": "ParameterList", + "parameters": [], + "src": "699:2:3" + }, + "returnParameters": { + "id": 706, + "nodeType": "ParameterList", + "parameters": [], + "src": "711:0:3" + }, + "scope": 735, + "src": "680:245:3", + "stateMutability": "nonpayable", + "superFunction": 804, + "visibility": "internal" + } + ], + "scope": 736, + "src": "455:473:3" + } + ], + "src": "0:928:3" + }, + "id": 3 + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/IAlgoMiner.sol": { + "ast": { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/IAlgoMiner.sol", + "exportedSymbols": { + "IAlgoMiner": [ + 768 + ] + }, + "id": 769, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 737, + "literals": [ + "solidity", + "0.5", + ".4" + ], + "nodeType": "PragmaDirective", + "src": "0:22:4" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": false, + "id": 768, + "linearizedBaseContracts": [ + 768 + ], + "name": "IAlgoMiner", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "id": 742, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "isAlgoMiner", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 738, + "nodeType": "ParameterList", + "parameters": [], + "src": "73:2:4" + }, + "returnParameters": { + "id": 741, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 740, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 742, + "src": "97:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 739, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "97:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "96:6:4" + }, + "scope": 768, + "src": "53:50:4", + "stateMutability": "pure", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 747, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getMinerType", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 743, + "nodeType": "ParameterList", + "parameters": [], + "src": "130:2:4" + }, + "returnParameters": { + "id": 746, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 745, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 747, + "src": "154:5:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 744, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "154:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "153:7:4" + }, + "scope": 768, + "src": "109:52:4", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 752, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getCategory", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 748, + "nodeType": "ParameterList", + "parameters": [], + "src": "187:2:4" + }, + "returnParameters": { + "id": 751, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 750, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 752, + "src": "211:5:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 749, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "211:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "210:7:4" + }, + "scope": 768, + "src": "167:51:4", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 757, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getMiner", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 753, + "nodeType": "ParameterList", + "parameters": [], + "src": "241:2:4" + }, + "returnParameters": { + "id": 756, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 755, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 757, + "src": "265:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 754, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "265:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "264:9:4" + }, + "scope": 768, + "src": "224:50:4", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 762, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getReferral", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 758, + "nodeType": "ParameterList", + "parameters": [], + "src": "300:2:4" + }, + "returnParameters": { + "id": 761, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 760, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 762, + "src": "324:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 759, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "324:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "323:9:4" + }, + "scope": 768, + "src": "280:53:4", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 767, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "isMining", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 763, + "nodeType": "ParameterList", + "parameters": [], + "src": "356:2:4" + }, + "returnParameters": { + "id": 766, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 765, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 767, + "src": "380:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 764, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "380:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "379:6:4" + }, + "scope": 768, + "src": "339:47:4", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 769, + "src": "26:363:4" + } + ], + "src": "0:389:4" + }, + "id": 4 + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/Terminable.sol": { + "ast": { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/Terminable.sol", + "exportedSymbols": { + "Terminable": [ + 805 + ] + }, + "id": 806, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 770, + "literals": [ + "solidity", + "0.5", + ".4" + ], + "nodeType": "PragmaDirective", + "src": "0:22:5" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 805, + "linearizedBaseContracts": [ + 805 + ], + "name": "Terminable", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 772, + "name": "_creator", + "nodeType": "VariableDeclaration", + "scope": 805, + "src": "55:25:5", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 771, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "55:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 774, + "name": "_terminated", + "nodeType": "VariableDeclaration", + "scope": 805, + "src": "87:25:5", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 773, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "87:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "body": { + "id": 786, + "nodeType": "Block", + "src": "144:70:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 780, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 777, + "name": "_creator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 772, + "src": "155:8:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 778, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1256, + "src": "166:3:5", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 779, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "166:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "155:21:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 781, + "nodeType": "ExpressionStatement", + "src": "155:21:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 784, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 782, + "name": "_terminated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 774, + "src": "187:11:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 783, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "201:5:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "187:19:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 785, + "nodeType": "ExpressionStatement", + "src": "187:19:5" + } + ] + }, + "documentation": null, + "id": 787, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 775, + "nodeType": "ParameterList", + "parameters": [], + "src": "132:2:5" + }, + "returnParameters": { + "id": 776, + "nodeType": "ParameterList", + "parameters": [], + "src": "144:0:5" + }, + "scope": 805, + "src": "121:93:5", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 795, + "nodeType": "Block", + "src": "247:52:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 791, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "266:12:5", + "subExpression": { + "argumentTypes": null, + "id": 790, + "name": "_terminated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 774, + "src": "267:11:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 789, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1259, + 1260 + ], + "referencedDeclaration": 1259, + "src": "258:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 792, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "258:21:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 793, + "nodeType": "ExpressionStatement", + "src": "258:21:5" + }, + { + "id": 794, + "nodeType": "PlaceholderStatement", + "src": "290:1:5" + } + ] + }, + "documentation": null, + "id": 796, + "name": "notTerminated", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 788, + "nodeType": "ParameterList", + "parameters": [], + "src": "244:2:5" + }, + "src": "222:77:5", + "visibility": "internal" + }, + { + "body": { + "id": 803, + "nodeType": "Block", + "src": "338:37:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 801, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 799, + "name": "_terminated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 774, + "src": "349:11:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 800, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "363:4:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "349:18:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 802, + "nodeType": "ExpressionStatement", + "src": "349:18:5" + } + ] + }, + "documentation": null, + "id": 804, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_terminate", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 797, + "nodeType": "ParameterList", + "parameters": [], + "src": "326:2:5" + }, + "returnParameters": { + "id": 798, + "nodeType": "ParameterList", + "parameters": [], + "src": "338:0:5" + }, + "scope": 805, + "src": "307:68:5", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 806, + "src": "26:352:5" + } + ], + "src": "0:378:5" + }, + "id": 5 + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol": { + "ast": { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol", + "exportedSymbols": { + "Roles": [ + 899 + ] + }, + "id": 900, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 807, + "literals": [ + "solidity", + "^", + "0.5", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "0:23:6" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": "@title Roles\n@dev Library for managing addresses assigned to a Role.", + "fullyImplemented": true, + "id": 899, + "linearizedBaseContracts": [ + 899 + ], + "name": "Roles", + "nodeType": "ContractDefinition", + "nodes": [ + { + "canonicalName": "Roles.Role", + "id": 812, + "members": [ + { + "constant": false, + "id": 811, + "name": "bearer", + "nodeType": "VariableDeclaration", + "scope": 812, + "src": "150:32:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "typeName": { + "id": 810, + "keyType": { + "id": 808, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "159:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "150:25:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "valueType": { + "id": 809, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "170:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Role", + "nodeType": "StructDefinition", + "scope": 899, + "src": "128:61:6", + "visibility": "public" + }, + { + "body": { + "id": 843, + "nodeType": "Block", + "src": "317:123:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 824, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 820, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 816, + "src": "335:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 822, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "354:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 821, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "346:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 823, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "346:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "335:21:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 819, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1259, + 1260 + ], + "referencedDeclaration": 1259, + "src": "327:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 825, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "327:30:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 826, + "nodeType": "ExpressionStatement", + "src": "327:30:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 832, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "375:19:6", + "subExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 829, + "name": "role", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "380:4:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$812_storage_ptr", + "typeString": "struct Roles.Role storage pointer" + } + }, + { + "argumentTypes": null, + "id": 830, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 816, + "src": "386:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Role_$812_storage_ptr", + "typeString": "struct Roles.Role storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 828, + "name": "has", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 898, + "src": "376:3:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Role_$812_storage_ptr_$_t_address_$returns$_t_bool_$", + "typeString": "function (struct Roles.Role storage pointer,address) view returns (bool)" + } + }, + "id": 831, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "376:18:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 827, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1259, + 1260 + ], + "referencedDeclaration": 1259, + "src": "367:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 833, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "367:28:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 834, + "nodeType": "ExpressionStatement", + "src": "367:28:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 835, + "name": "role", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "406:4:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$812_storage_ptr", + "typeString": "struct Roles.Role storage pointer" + } + }, + "id": 838, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "bearer", + "nodeType": "MemberAccess", + "referencedDeclaration": 811, + "src": "406:11:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 839, + "indexExpression": { + "argumentTypes": null, + "id": 837, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 816, + "src": "418:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "406:20:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 840, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "429:4:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "406:27:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 842, + "nodeType": "ExpressionStatement", + "src": "406:27:6" + } + ] + }, + "documentation": "@dev give an account access to this role", + "id": 844, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "add", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 817, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 814, + "name": "role", + "nodeType": "VariableDeclaration", + "scope": 844, + "src": "272:17:6", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$812_storage_ptr", + "typeString": "struct Roles.Role" + }, + "typeName": { + "contractScope": null, + "id": 813, + "name": "Role", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 812, + "src": "272:4:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$812_storage_ptr", + "typeString": "struct Roles.Role" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 816, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 844, + "src": "291:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 815, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "291:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "271:36:6" + }, + "returnParameters": { + "id": 818, + "nodeType": "ParameterList", + "parameters": [], + "src": "317:0:6" + }, + "scope": 899, + "src": "259:181:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 874, + "nodeType": "Block", + "src": "575:123:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 856, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 852, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 848, + "src": "593:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 854, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "612:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 853, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "604:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 855, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "604:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "593:21:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 851, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1259, + 1260 + ], + "referencedDeclaration": 1259, + "src": "585:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "585:30:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 858, + "nodeType": "ExpressionStatement", + "src": "585:30:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 861, + "name": "role", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 846, + "src": "637:4:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$812_storage_ptr", + "typeString": "struct Roles.Role storage pointer" + } + }, + { + "argumentTypes": null, + "id": 862, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 848, + "src": "643:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Role_$812_storage_ptr", + "typeString": "struct Roles.Role storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 860, + "name": "has", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 898, + "src": "633:3:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Role_$812_storage_ptr_$_t_address_$returns$_t_bool_$", + "typeString": "function (struct Roles.Role storage pointer,address) view returns (bool)" + } + }, + "id": 863, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "633:18:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 859, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1259, + 1260 + ], + "referencedDeclaration": 1259, + "src": "625:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 864, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "625:27:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 865, + "nodeType": "ExpressionStatement", + "src": "625:27:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 872, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 866, + "name": "role", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 846, + "src": "663:4:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$812_storage_ptr", + "typeString": "struct Roles.Role storage pointer" + } + }, + "id": 869, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "bearer", + "nodeType": "MemberAccess", + "referencedDeclaration": 811, + "src": "663:11:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 870, + "indexExpression": { + "argumentTypes": null, + "id": 868, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 848, + "src": "675:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "663:20:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 871, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "686:5:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "663:28:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 873, + "nodeType": "ExpressionStatement", + "src": "663:28:6" + } + ] + }, + "documentation": "@dev remove an account's access to this role", + "id": 875, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "remove", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 849, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 846, + "name": "role", + "nodeType": "VariableDeclaration", + "scope": 875, + "src": "530:17:6", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$812_storage_ptr", + "typeString": "struct Roles.Role" + }, + "typeName": { + "contractScope": null, + "id": 845, + "name": "Role", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 812, + "src": "530:4:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$812_storage_ptr", + "typeString": "struct Roles.Role" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 848, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 875, + "src": "549:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 847, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "549:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "529:36:6" + }, + "returnParameters": { + "id": 850, + "nodeType": "ParameterList", + "parameters": [], + "src": "575:0:6" + }, + "scope": 899, + "src": "514:184:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 897, + "nodeType": "Block", + "src": "864:84:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 889, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 885, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 879, + "src": "882:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 887, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "901:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 886, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "893:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 888, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "893:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "882:21:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 884, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1259, + 1260 + ], + "referencedDeclaration": 1259, + "src": "874:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 890, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "874:30:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 891, + "nodeType": "ExpressionStatement", + "src": "874:30:6" + }, + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 892, + "name": "role", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 877, + "src": "921:4:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$812_storage_ptr", + "typeString": "struct Roles.Role storage pointer" + } + }, + "id": 893, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "bearer", + "nodeType": "MemberAccess", + "referencedDeclaration": 811, + "src": "921:11:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 895, + "indexExpression": { + "argumentTypes": null, + "id": 894, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 879, + "src": "933:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "921:20:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 883, + "id": 896, + "nodeType": "Return", + "src": "914:27:6" + } + ] + }, + "documentation": "@dev check if an account has this role\n@return bool", + "id": 898, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "has", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 880, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 877, + "name": "role", + "nodeType": "VariableDeclaration", + "scope": 898, + "src": "799:17:6", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$812_storage_ptr", + "typeString": "struct Roles.Role" + }, + "typeName": { + "contractScope": null, + "id": 876, + "name": "Role", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 812, + "src": "799:4:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$812_storage_ptr", + "typeString": "struct Roles.Role" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 879, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 898, + "src": "818:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 878, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "818:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "798:36:6" + }, + "returnParameters": { + "id": 883, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 882, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 898, + "src": "858:4:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 881, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "858:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "857:6:6" + }, + "scope": 899, + "src": "786:162:6", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 900, + "src": "108:842:6" + } + ], + "src": "0:951:6" + }, + "id": 6 + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol": { + "ast": { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol", + "exportedSymbols": { + "SafeMath": [ + 1027 + ] + }, + "id": 1028, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 901, + "literals": [ + "solidity", + "^", + "0.5", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "0:23:7" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": "@title SafeMath\n@dev Unsigned math operations with safety checks that revert on error", + "fullyImplemented": true, + "id": 1027, + "linearizedBaseContracts": [ + 1027 + ], + "name": "SafeMath", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 933, + "nodeType": "Block", + "src": "296:354:7", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 912, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 910, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 903, + "src": "527:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 911, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "532:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "527:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 916, + "nodeType": "IfStatement", + "src": "523:45:7", + "trueBody": { + "id": 915, + "nodeType": "Block", + "src": "535:33:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "30", + "id": 913, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "556:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "functionReturnParameters": 909, + "id": 914, + "nodeType": "Return", + "src": "549:8:7" + } + ] + } + }, + { + "assignments": [ + 918 + ], + "declarations": [ + { + "constant": false, + "id": 918, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 933, + "src": "578:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 917, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "578:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 922, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 921, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 919, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 903, + "src": "590:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 920, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 905, + "src": "594:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "590:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "578:17:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 928, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 926, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 924, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "613:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 925, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 903, + "src": "617:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "613:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 927, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 905, + "src": "622:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "613:10:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 923, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1259, + 1260 + ], + "referencedDeclaration": 1259, + "src": "605:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 929, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "605:19:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 930, + "nodeType": "ExpressionStatement", + "src": "605:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 931, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 918, + "src": "642:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 909, + "id": 932, + "nodeType": "Return", + "src": "635:8:7" + } + ] + }, + "documentation": "@dev Multiplies two unsigned integers, reverts on overflow.", + "id": 934, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "mul", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 906, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 903, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 934, + "src": "242:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 902, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "242:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 905, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 934, + "src": "253:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 904, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "253:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "241:22:7" + }, + "returnParameters": { + "id": 909, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 908, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 934, + "src": "287:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 907, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "287:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "286:9:7" + }, + "scope": 1027, + "src": "229:421:7", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 957, + "nodeType": "Block", + "src": "845:229:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 946, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 944, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 938, + "src": "929:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 945, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "933:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "929:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 943, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1259, + 1260 + ], + "referencedDeclaration": 1259, + "src": "921:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 947, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "921:14:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 948, + "nodeType": "ExpressionStatement", + "src": "921:14:7" + }, + { + "assignments": [ + 950 + ], + "declarations": [ + { + "constant": false, + "id": 950, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 957, + "src": "945:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 949, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "945:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 954, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 953, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 951, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 936, + "src": "957:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 952, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 938, + "src": "961:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "957:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "945:17:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 955, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 950, + "src": "1066:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 942, + "id": 956, + "nodeType": "Return", + "src": "1059:8:7" + } + ] + }, + "documentation": "@dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero.", + "id": 958, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "div", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 939, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 936, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 958, + "src": "791:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 935, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "791:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 938, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 958, + "src": "802:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 937, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "802:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "790:22:7" + }, + "returnParameters": { + "id": 942, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 941, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 958, + "src": "836:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 940, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "836:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "835:9:7" + }, + "scope": 1027, + "src": "778:296:7", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 981, + "nodeType": "Block", + "src": "1272:78:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 970, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 968, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 962, + "src": "1290:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 969, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 960, + "src": "1295:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1290:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 967, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1259, + 1260 + ], + "referencedDeclaration": 1259, + "src": "1282:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 971, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1282:15:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 972, + "nodeType": "ExpressionStatement", + "src": "1282:15:7" + }, + { + "assignments": [ + 974 + ], + "declarations": [ + { + "constant": false, + "id": 974, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 981, + "src": "1307:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 973, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1307:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 978, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 977, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 975, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 960, + "src": "1319:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 976, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 962, + "src": "1323:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1319:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1307:17:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 979, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 974, + "src": "1342:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 966, + "id": 980, + "nodeType": "Return", + "src": "1335:8:7" + } + ] + }, + "documentation": "@dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend).", + "id": 982, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "sub", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 963, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 960, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 982, + "src": "1218:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 959, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1218:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 962, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 982, + "src": "1229:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 961, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1229:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1217:22:7" + }, + "returnParameters": { + "id": 966, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 965, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 982, + "src": "1263:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 964, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1263:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1262:9:7" + }, + "scope": 1027, + "src": "1205:145:7", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1005, + "nodeType": "Block", + "src": "1498:78:7", + "statements": [ + { + "assignments": [ + 992 + ], + "declarations": [ + { + "constant": false, + "id": 992, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 1005, + "src": "1508:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 991, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1508:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 996, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 995, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 993, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 984, + "src": "1520:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 994, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 986, + "src": "1524:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1520:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1508:17:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1000, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 998, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 992, + "src": "1543:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 999, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 984, + "src": "1548:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1543:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 997, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1259, + 1260 + ], + "referencedDeclaration": 1259, + "src": "1535:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1001, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1535:15:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1002, + "nodeType": "ExpressionStatement", + "src": "1535:15:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 1003, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 992, + "src": "1568:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 990, + "id": 1004, + "nodeType": "Return", + "src": "1561:8:7" + } + ] + }, + "documentation": "@dev Adds two unsigned integers, reverts on overflow.", + "id": 1006, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "add", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 987, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 984, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1006, + "src": "1444:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 983, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1444:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 986, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1006, + "src": "1455:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 985, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1455:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1443:22:7" + }, + "returnParameters": { + "id": 990, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 989, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1006, + "src": "1489:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 988, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1489:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1488:9:7" + }, + "scope": 1027, + "src": "1431:145:7", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1025, + "nodeType": "Block", + "src": "1795:54:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1018, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1016, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1010, + "src": "1813:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1017, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1818:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1813:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1015, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1259, + 1260 + ], + "referencedDeclaration": 1259, + "src": "1805:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1019, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1805:15:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1020, + "nodeType": "ExpressionStatement", + "src": "1805:15:7" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1023, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1021, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1008, + "src": "1837:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "%", + "rightExpression": { + "argumentTypes": null, + "id": 1022, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1010, + "src": "1841:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1837:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1014, + "id": 1024, + "nodeType": "Return", + "src": "1830:12:7" + } + ] + }, + "documentation": "@dev Divides two unsigned integers and returns the remainder (unsigned integer modulo),\nreverts when dividing by zero.", + "id": 1026, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "mod", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1011, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1008, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1026, + "src": "1741:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1007, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1741:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1010, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1026, + "src": "1752:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1009, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1752:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1740:22:7" + }, + "returnParameters": { + "id": 1014, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1013, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1026, + "src": "1786:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1012, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1786:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1785:9:7" + }, + "scope": 1027, + "src": "1728:121:7", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 1028, + "src": "125:1726:7" + } + ], + "src": "0:1852:7" + }, + "id": 7 + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol": { + "ast": { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "exportedSymbols": { + "IERC20": [ + 1096 + ] + }, + "id": 1097, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1029, + "literals": [ + "solidity", + "^", + "0.5", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "0:23:8" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "interface", + "documentation": "@title ERC20 interface\n@dev see https://github.com/ethereum/EIPs/issues/20", + "fullyImplemented": false, + "id": 1096, + "linearizedBaseContracts": [ + 1096 + ], + "name": "IERC20", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "id": 1038, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1034, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1031, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1038, + "src": "155:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1030, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "155:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1033, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1038, + "src": "167:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1032, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "167:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "154:27:8" + }, + "returnParameters": { + "id": 1037, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1036, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1038, + "src": "200:4:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1035, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "200:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "199:6:8" + }, + "scope": 1096, + "src": "137:69:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 1047, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1043, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1040, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1047, + "src": "229:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1039, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "229:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1042, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1047, + "src": "246:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1041, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "246:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "228:32:8" + }, + "returnParameters": { + "id": 1046, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1045, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1047, + "src": "279:4:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1044, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "279:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "278:6:8" + }, + "scope": 1096, + "src": "212:73:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 1058, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1054, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1049, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 1058, + "src": "313:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1048, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "313:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1051, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1058, + "src": "327:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1050, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "327:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1053, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1058, + "src": "339:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1052, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "339:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "312:41:8" + }, + "returnParameters": { + "id": 1057, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1056, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1058, + "src": "372:4:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1055, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "372:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "371:6:8" + }, + "scope": 1096, + "src": "291:87:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 1063, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "totalSupply", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1059, + "nodeType": "ParameterList", + "parameters": [], + "src": "404:2:8" + }, + "returnParameters": { + "id": 1062, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1061, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1063, + "src": "430:7:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1060, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "430:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "429:9:8" + }, + "scope": 1096, + "src": "384:55:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 1070, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "balanceOf", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1066, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1065, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 1070, + "src": "464:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1064, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "464:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "463:13:8" + }, + "returnParameters": { + "id": 1069, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1068, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1070, + "src": "500:7:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1067, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "500:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "499:9:8" + }, + "scope": 1096, + "src": "445:64:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 1079, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "allowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1075, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1072, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 1079, + "src": "534:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1071, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "534:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1074, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1079, + "src": "549:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1073, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "549:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "533:32:8" + }, + "returnParameters": { + "id": 1078, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1077, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1079, + "src": "589:7:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1076, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "589:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "588:9:8" + }, + "scope": 1096, + "src": "515:83:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "anonymous": false, + "documentation": null, + "id": 1087, + "name": "Transfer", + "nodeType": "EventDefinition", + "parameters": { + "id": 1086, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1081, + "indexed": true, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 1087, + "src": "619:20:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1080, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "619:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1083, + "indexed": true, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1087, + "src": "641:18:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1082, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "641:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1085, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1087, + "src": "661:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1084, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "661:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "618:57:8" + }, + "src": "604:72:8" + }, + { + "anonymous": false, + "documentation": null, + "id": 1095, + "name": "Approval", + "nodeType": "EventDefinition", + "parameters": { + "id": 1094, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1089, + "indexed": true, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 1095, + "src": "697:21:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1088, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "697:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1091, + "indexed": true, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1095, + "src": "720:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1090, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "720:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1093, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1095, + "src": "745:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1092, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "745:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "696:63:8" + }, + "src": "682:78:8" + } + ], + "scope": 1097, + "src": "114:648:8" + } + ], + "src": "0:763:8" + }, + "id": 8 + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol": { + "ast": { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol", + "exportedSymbols": { + "SafeERC20": [ + 1241 + ] + }, + "id": 1242, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1098, + "literals": [ + "solidity", + "^", + "0.5", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "0:23:9" + }, + { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "file": "./IERC20.sol", + "id": 1099, + "nodeType": "ImportDirective", + "scope": 1242, + "sourceUnit": 1097, + "src": "25:22:9", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol", + "file": "../../math/SafeMath.sol", + "id": 1100, + "nodeType": "ImportDirective", + "scope": 1242, + "sourceUnit": 1028, + "src": "48:33:9", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": "@title SafeERC20\n@dev Wrappers around ERC20 operations that throw on failure.\nTo use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\nwhich allows you to call the safe operations as `token.safeTransfer(...)`, etc.", + "fullyImplemented": true, + "id": 1241, + "linearizedBaseContracts": [ + 1241 + ], + "name": "SafeERC20", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 1103, + "libraryName": { + "contractScope": null, + "id": 1101, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1027, + "src": "382:8:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$1027", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "376:27:9", + "typeName": { + "id": 1102, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "395:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "body": { + "id": 1120, + "nodeType": "Block", + "src": "481:51:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1115, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1107, + "src": "514:2:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1116, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1109, + "src": "518:5:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1113, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1105, + "src": "499:5:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1096", + "typeString": "contract IERC20" + } + }, + "id": 1114, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 1038, + "src": "499:14:9", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 1117, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "499:25:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1112, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1259, + 1260 + ], + "referencedDeclaration": 1259, + "src": "491:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1118, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "491:34:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1119, + "nodeType": "ExpressionStatement", + "src": "491:34:9" + } + ] + }, + "documentation": null, + "id": 1121, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeTransfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1110, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1105, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 1121, + "src": "431:12:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1096", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 1104, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1096, + "src": "431:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1096", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1107, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1121, + "src": "445:10:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1106, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "445:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1109, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1121, + "src": "457:13:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1108, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "457:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "430:41:9" + }, + "returnParameters": { + "id": 1111, + "nodeType": "ParameterList", + "parameters": [], + "src": "481:0:9" + }, + "scope": 1241, + "src": "409:123:9", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1141, + "nodeType": "Block", + "src": "628:61:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1135, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1125, + "src": "665:4:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1136, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1127, + "src": "671:2:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1137, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1129, + "src": "675:5:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1133, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1123, + "src": "646:5:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1096", + "typeString": "contract IERC20" + } + }, + "id": 1134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 1058, + "src": "646:18:9", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,address,uint256) external returns (bool)" + } + }, + "id": 1138, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "646:35:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1132, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1259, + 1260 + ], + "referencedDeclaration": 1259, + "src": "638:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1139, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "638:44:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1140, + "nodeType": "ExpressionStatement", + "src": "638:44:9" + } + ] + }, + "documentation": null, + "id": 1142, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeTransferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1130, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1123, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 1142, + "src": "564:12:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1096", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 1122, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1096, + "src": "564:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1096", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1125, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 1142, + "src": "578:12:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1124, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "578:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1127, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1142, + "src": "592:10:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1126, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "592:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1129, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1142, + "src": "604:13:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1128, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "604:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "563:55:9" + }, + "returnParameters": { + "id": 1131, + "nodeType": "ParameterList", + "parameters": [], + "src": "628:0:9" + }, + "scope": 1241, + "src": "538:151:9", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1177, + "nodeType": "Block", + "src": "771:353:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1166, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1154, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1152, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1148, + "src": "1007:5:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1153, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1016:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1007:10:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 1155, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "1006:12:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1164, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1159, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1278, + "src": "1047:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeERC20_$1241", + "typeString": "library SafeERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_SafeERC20_$1241", + "typeString": "library SafeERC20" + } + ], + "id": 1158, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1039:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1160, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1039:13:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1161, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1146, + "src": "1054:7:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1156, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1144, + "src": "1023:5:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1096", + "typeString": "contract IERC20" + } + }, + "id": 1157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "allowance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1079, + "src": "1023:15:9", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", + "typeString": "function (address,address) view external returns (uint256)" + } + }, + "id": 1162, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1023:39:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1163, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1066:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1023:44:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 1165, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "1022:46:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1006:62:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1151, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1259, + 1260 + ], + "referencedDeclaration": 1259, + "src": "998:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1167, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "998:71:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1168, + "nodeType": "ExpressionStatement", + "src": "998:71:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1172, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1146, + "src": "1101:7:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1173, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1148, + "src": "1110:5:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1170, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1144, + "src": "1087:5:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1096", + "typeString": "contract IERC20" + } + }, + "id": 1171, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "approve", + "nodeType": "MemberAccess", + "referencedDeclaration": 1047, + "src": "1087:13:9", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 1174, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1087:29:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1169, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1259, + 1260 + ], + "referencedDeclaration": 1259, + "src": "1079:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1175, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1079:38:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1176, + "nodeType": "ExpressionStatement", + "src": "1079:38:9" + } + ] + }, + "documentation": null, + "id": 1178, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeApprove", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1149, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1144, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 1178, + "src": "716:12:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1096", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 1143, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1096, + "src": "716:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1096", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1146, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1178, + "src": "730:15:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1145, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "730:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1148, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1178, + "src": "747:13:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1147, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "747:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "715:46:9" + }, + "returnParameters": { + "id": 1150, + "nodeType": "ParameterList", + "parameters": [], + "src": "771:0:9" + }, + "scope": 1241, + "src": "695:429:9", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1208, + "nodeType": "Block", + "src": "1216:145:9", + "statements": [ + { + "assignments": [ + 1188 + ], + "declarations": [ + { + "constant": false, + "id": 1188, + "name": "newAllowance", + "nodeType": "VariableDeclaration", + "scope": 1208, + "src": "1226:20:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1187, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1226:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1199, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1197, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1184, + "src": "1293:5:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1192, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1278, + "src": "1273:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeERC20_$1241", + "typeString": "library SafeERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_SafeERC20_$1241", + "typeString": "library SafeERC20" + } + ], + "id": 1191, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1265:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1193, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1265:13:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1194, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1182, + "src": "1280:7:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1189, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1180, + "src": "1249:5:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1096", + "typeString": "contract IERC20" + } + }, + "id": 1190, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "allowance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1079, + "src": "1249:15:9", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", + "typeString": "function (address,address) view external returns (uint256)" + } + }, + "id": 1195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1249:39:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1196, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1006, + "src": "1249:43:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1198, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1249:50:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1226:73:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1203, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1182, + "src": "1331:7:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1204, + "name": "newAllowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1188, + "src": "1340:12:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1201, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1180, + "src": "1317:5:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1096", + "typeString": "contract IERC20" + } + }, + "id": 1202, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "approve", + "nodeType": "MemberAccess", + "referencedDeclaration": 1047, + "src": "1317:13:9", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 1205, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1317:36:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1200, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1259, + 1260 + ], + "referencedDeclaration": 1259, + "src": "1309:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1206, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1309:45:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1207, + "nodeType": "ExpressionStatement", + "src": "1309:45:9" + } + ] + }, + "documentation": null, + "id": 1209, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeIncreaseAllowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1185, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1180, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 1209, + "src": "1161:12:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1096", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 1179, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1096, + "src": "1161:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1096", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1182, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1209, + "src": "1175:15:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1181, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1175:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1184, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1209, + "src": "1192:13:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1183, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1192:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1160:46:9" + }, + "returnParameters": { + "id": 1186, + "nodeType": "ParameterList", + "parameters": [], + "src": "1216:0:9" + }, + "scope": 1241, + "src": "1130:231:9", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1239, + "nodeType": "Block", + "src": "1453:145:9", + "statements": [ + { + "assignments": [ + 1219 + ], + "declarations": [ + { + "constant": false, + "id": 1219, + "name": "newAllowance", + "nodeType": "VariableDeclaration", + "scope": 1239, + "src": "1463:20:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1218, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1463:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1230, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1228, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1215, + "src": "1530:5:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1223, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1278, + "src": "1510:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeERC20_$1241", + "typeString": "library SafeERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_SafeERC20_$1241", + "typeString": "library SafeERC20" + } + ], + "id": 1222, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1502:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1224, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1502:13:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1225, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1213, + "src": "1517:7:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1220, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1211, + "src": "1486:5:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1096", + "typeString": "contract IERC20" + } + }, + "id": 1221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "allowance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1079, + "src": "1486:15:9", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", + "typeString": "function (address,address) view external returns (uint256)" + } + }, + "id": 1226, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1486:39:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1227, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 982, + "src": "1486:43:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1229, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1486:50:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1463:73:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1234, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1213, + "src": "1568:7:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1235, + "name": "newAllowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1219, + "src": "1577:12:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1232, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1211, + "src": "1554:5:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1096", + "typeString": "contract IERC20" + } + }, + "id": 1233, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "approve", + "nodeType": "MemberAccess", + "referencedDeclaration": 1047, + "src": "1554:13:9", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 1236, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1554:36:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1231, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1259, + 1260 + ], + "referencedDeclaration": 1259, + "src": "1546:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1237, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1546:45:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1238, + "nodeType": "ExpressionStatement", + "src": "1546:45:9" + } + ] + }, + "documentation": null, + "id": 1240, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeDecreaseAllowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1216, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1211, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 1240, + "src": "1398:12:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1096", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 1210, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1096, + "src": "1398:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1096", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1213, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1240, + "src": "1412:15:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1212, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1412:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1215, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1240, + "src": "1429:13:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1214, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1429:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1397:46:9" + }, + "returnParameters": { + "id": 1217, + "nodeType": "ParameterList", + "parameters": [], + "src": "1453:0:9" + }, + "scope": 1241, + "src": "1367:231:9", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 1242, + "src": "352:1248:9" + } + ], + "src": "0:1601:9" + }, + "id": 9 + } + } +} \ No newline at end of file diff --git a/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/bin/AlgoFees.abi b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/bin/AlgoFees.abi new file mode 100644 index 000000000..e289ecc82 --- /dev/null +++ b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/bin/AlgoFees.abi @@ -0,0 +1 @@ +[{"constant":false,"inputs":[],"name":"terminate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"account","type":"address"}],"name":"addCoreTeam","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"minerAddress","type":"address"}],"name":"registerMiner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"account","type":"address"}],"name":"isSystem","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"index","type":"uint256"}],"name":"getMinerByIndex","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"account","type":"address"}],"name":"isCoreTeam","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"account","type":"address"}],"name":"addSystem","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"minerAddress","type":"address"}],"name":"unregisterMiner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"mine","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getMinerCount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceCoreTeam","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"renounceSystem","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"tokenAddress","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"}] \ No newline at end of file diff --git a/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/bin/AlgoFees.bin b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/bin/AlgoFees.bin new file mode 100644 index 000000000..a8c7ceb3e --- /dev/null +++ b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/bin/AlgoFees.bin @@ -0,0 +1 @@ +60806040523480156200001157600080fd5b5060405160208062001070833981018060405260208110156200003357600080fd5b50516000805433600160a060020a0319918216811760a060020a60ff02191690925560018054909116600160a060020a0384161790556200007d90640100000000620000d8810204565b6200009133640100000000620000f6810204565b50600480546001810182556000919091527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b018054600160a060020a0319169055620001a4565b620000f360028264010000000062000dd76200011182021704565b50565b620000f360038264010000000062000dd76200011182021704565b600160a060020a03811615156200012757600080fd5b6200013c82826401000000006200016c810204565b156200014757600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b6000600160a060020a03821615156200018457600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b610ebc80620001b46000396000f3fe608060405234801561001057600080fd5b50600436106100b85760003560e060020a9004806374be75921161007557806374be7592146101ac57806381f909f3146101d257806399f4b251146101f8578063bb52c13714610200578063d43acc791461021a578063e9d6185914610222576100b8565b80630c08bf88146100bd5780632e6b6849146100c7578063341ccfcb146100ed57806334cdcf26146101135780633d19ab131461014d578063608d3d3d14610186575b600080fd5b6100c561022a565b005b6100c5600480360360208110156100dd57600080fd5b5035600160a060020a0316610248565b6100c56004803603602081101561010357600080fd5b5035600160a060020a0316610268565b6101396004803603602081101561012957600080fd5b5035600160a060020a031661043c565b604080519115158252519081900360200190f35b61016a6004803603602081101561016357600080fd5b5035610455565b60408051600160a060020a039092168252519081900360200190f35b6101396004803603602081101561019c57600080fd5b5035600160a060020a0316610484565b6100c5600480360360208110156101c257600080fd5b5035600160a060020a0316610497565b6100c5600480360360208110156101e857600080fd5b5035600160a060020a03166104b4565b6100c5610656565b610208610ba4565b60408051918252519081900360200190f35b6100c5610bae565b6100c5610bb7565b61023333610484565b151561023e57600080fd5b610246610bc0565b565b61025133610484565b151561025c57600080fd5b61026581610c86565b50565b60005474010000000000000000000000000000000000000000900460ff161561029057600080fd5b61029933610484565b15156102a457600080fd5b6004546103e8116102b457600080fd5b600160a060020a038116600090815260056020526040902054156102d757600080fd5b600081905080600160a060020a0316631777fb4b6040518163ffffffff1660e060020a02815260040160206040518083038186803b15801561031857600080fd5b505afa15801561032c573d6000803e3d6000fd5b505050506040513d602081101561034257600080fd5b5051151561034f57600080fd5b600081600160a060020a03166380258e476040518163ffffffff1660e060020a02815260040160206040518083038186803b15801561038d57600080fd5b505afa1580156103a1573d6000803e3d6000fd5b505050506040513d60208110156103b757600080fd5b50519050600560ff821611156103cc57600080fd5b505060048054600160a060020a039092166000818152600560205260408120849055600184018355919091527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b909101805473ffffffffffffffffffffffffffffffffffffffff19169091179055565b600061044f60028363ffffffff610c9716565b92915050565b600060048260010181548110151561046957fe5b600091825260209091200154600160a060020a031692915050565b600061044f60038363ffffffff610c9716565b6104a03361043c565b15156104ab57600080fd5b61026581610cce565b60005474010000000000000000000000000000000000000000900460ff16156104dc57600080fd5b6104e533610484565b15156104f057600080fd5b6004546001106104ff57600080fd5b60045460021415610564576004805480151561051757fe5b600082815260208082208301600019908101805473ffffffffffffffffffffffffffffffffffffffff19169055909201909255600160a060020a0383168252600590526040812055610265565b600454600160a060020a038216600090815260056020526040902054146105fe5760048054600019810190811061059757fe5b6000918252602080832090910154600160a060020a03848116845260059092526040909220546004805492909316929181106105cf57fe5b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a031602179055505b6004805480151561060b57fe5b600082815260208082208301600019908101805473ffffffffffffffffffffffffffffffffffffffff19169055909201909255600160a060020a038316825260059052604081205550565b60005474010000000000000000000000000000000000000000900460ff161561067e57600080fd5b6106873361043c565b151561069257600080fd5b6004546001106106a157600080fd5b600154604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600092600160a060020a0316916370a08231916024808301926020929190829003018186803b15801561070557600080fd5b505afa158015610719573d6000803e3d6000fd5b505050506040513d602081101561072f57600080fd5b505190506000811161074057600080fd5b610748610e71565b60045460015b8181101561090157600060048281548110151561076757fe5b60009182526020918290200154604080517f19a74ab30000000000000000000000000000000000000000000000000000000081529051600160a060020a03909216935083926319a74ab392600480840193829003018186803b1580156107cc57600080fd5b505afa1580156107e0573d6000803e3d6000fd5b505050506040513d60208110156107f657600080fd5b5051151561080457506108f9565b600081600160a060020a03166380258e476040518163ffffffff1660e060020a02815260040160206040518083038186803b15801561084257600080fd5b505afa158015610856573d6000803e3d6000fd5b505050506040513d602081101561086c57600080fd5b5051905060ff8116151561088e578460005b60200201805160010190526108f6565b8060ff16600114156108a25784600161087e565b8060ff16600214156108b65784600261087e565b8060ff16600314156108ca5784600361087e565b8060ff16600414156108de5784600461087e565b8060ff16600514156108f65760a08501805160010190525b50505b60010161074e565b5060a082015160808301516060840151604085015160208601518651600a90910201601490910201601e90910201602890910201603290910201610943610e71565b818581151561094e57fe5b04815281600a860281151561095f57fe5b046020820152816014860281151561097357fe5b04604082015281601e860281151561098757fe5b046060820152816028860281151561099b57fe5b04608082015281603286028115156109af57fe5b0460a082015260015b83811015610b9c5760006004828154811015156109d157fe5b60009182526020918290200154604080517f19a74ab30000000000000000000000000000000000000000000000000000000081529051600160a060020a03909216935083926319a74ab392600480840193829003018186803b158015610a3657600080fd5b505afa158015610a4a573d6000803e3d6000fd5b505050506040513d6020811015610a6057600080fd5b50511515610a6e5750610b94565b600081600160a060020a03166380258e476040518163ffffffff1660e060020a02815260040160206040518083038186803b158015610aac57600080fd5b505afa158015610ac0573d6000803e3d6000fd5b505050506040513d6020811015610ad657600080fd5b5051604080517f302c11ca0000000000000000000000000000000000000000000000000000000081529051919250610b9191600160a060020a0385169163302c11ca916004808301926020929190829003018186803b158015610b3857600080fd5b505afa158015610b4c573d6000803e3d6000fd5b505050506040513d6020811015610b6257600080fd5b50518560ff841660068110610b7357fe5b6020020151600154600160a060020a0316919063ffffffff610cdf16565b50505b6001016109b8565b505050505050565b6004546000190190565b61024633610d7e565b61024633610d8f565b600154604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600092600160a060020a0316916370a08231916024808301926020929190829003018186803b158015610c2457600080fd5b505afa158015610c38573d6000803e3d6000fd5b505050506040513d6020811015610c4e57600080fd5b505190506000811115610c7e57600054600154610c7e91600160a060020a0391821691168363ffffffff610cdf16565b610265610da0565b61026560038263ffffffff610dd716565b6000600160a060020a0382161515610cae57600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b61026560028263ffffffff610dd716565b82600160a060020a031663a9059cbb83836040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b158015610d4257600080fd5b505af1158015610d56573d6000803e3d6000fd5b505050506040513d6020811015610d6c57600080fd5b50511515610d7957600080fd5b505050565b61026560038263ffffffff610e2516565b61026560028263ffffffff610e2516565b6000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b600160a060020a0381161515610dec57600080fd5b610df68282610c97565b15610e0057600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b600160a060020a0381161515610e3a57600080fd5b610e448282610c97565b1515610e4f57600080fd5b600160a060020a0316600090815260209190915260409020805460ff19169055565b60c060405190810160405280600690602082028038833950919291505056fea165627a7a72305820d93c57fe9a496ba0db433cb631bbbbe57a53bb63720b63023ea0e465cf5c1d200029 \ No newline at end of file diff --git a/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/bin/AlgoFees.json b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/bin/AlgoFees.json new file mode 100644 index 000000000..124576278 --- /dev/null +++ b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/bin/AlgoFees.json @@ -0,0 +1,214 @@ +{ + "abi": [ + { + "constant": false, + "inputs": [], + "name": "terminate", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "addCoreTeam", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "minerAddress", + "type": "address" + } + ], + "name": "registerMiner", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "isSystem", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "index", + "type": "uint256" + } + ], + "name": "getMinerByIndex", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "isCoreTeam", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "addSystem", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "minerAddress", + "type": "address" + } + ], + "name": "unregisterMiner", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "mine", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getMinerCount", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renounceCoreTeam", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renounceSystem", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "name": "tokenAddress", + "type": "address" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + } + ], + "bytecode": "60806040523480156200001157600080fd5b5060405160208062001070833981018060405260208110156200003357600080fd5b50516000805433600160a060020a0319918216811760a060020a60ff02191690925560018054909116600160a060020a0384161790556200007d90640100000000620000d8810204565b6200009133640100000000620000f6810204565b50600480546001810182556000919091527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b018054600160a060020a0319169055620001a4565b620000f360028264010000000062000dd76200011182021704565b50565b620000f360038264010000000062000dd76200011182021704565b600160a060020a03811615156200012757600080fd5b6200013c82826401000000006200016c810204565b156200014757600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b6000600160a060020a03821615156200018457600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b610ebc80620001b46000396000f3fe608060405234801561001057600080fd5b50600436106100b85760003560e060020a9004806374be75921161007557806374be7592146101ac57806381f909f3146101d257806399f4b251146101f8578063bb52c13714610200578063d43acc791461021a578063e9d6185914610222576100b8565b80630c08bf88146100bd5780632e6b6849146100c7578063341ccfcb146100ed57806334cdcf26146101135780633d19ab131461014d578063608d3d3d14610186575b600080fd5b6100c561022a565b005b6100c5600480360360208110156100dd57600080fd5b5035600160a060020a0316610248565b6100c56004803603602081101561010357600080fd5b5035600160a060020a0316610268565b6101396004803603602081101561012957600080fd5b5035600160a060020a031661043c565b604080519115158252519081900360200190f35b61016a6004803603602081101561016357600080fd5b5035610455565b60408051600160a060020a039092168252519081900360200190f35b6101396004803603602081101561019c57600080fd5b5035600160a060020a0316610484565b6100c5600480360360208110156101c257600080fd5b5035600160a060020a0316610497565b6100c5600480360360208110156101e857600080fd5b5035600160a060020a03166104b4565b6100c5610656565b610208610ba4565b60408051918252519081900360200190f35b6100c5610bae565b6100c5610bb7565b61023333610484565b151561023e57600080fd5b610246610bc0565b565b61025133610484565b151561025c57600080fd5b61026581610c86565b50565b60005474010000000000000000000000000000000000000000900460ff161561029057600080fd5b61029933610484565b15156102a457600080fd5b6004546103e8116102b457600080fd5b600160a060020a038116600090815260056020526040902054156102d757600080fd5b600081905080600160a060020a0316631777fb4b6040518163ffffffff1660e060020a02815260040160206040518083038186803b15801561031857600080fd5b505afa15801561032c573d6000803e3d6000fd5b505050506040513d602081101561034257600080fd5b5051151561034f57600080fd5b600081600160a060020a03166380258e476040518163ffffffff1660e060020a02815260040160206040518083038186803b15801561038d57600080fd5b505afa1580156103a1573d6000803e3d6000fd5b505050506040513d60208110156103b757600080fd5b50519050600560ff821611156103cc57600080fd5b505060048054600160a060020a039092166000818152600560205260408120849055600184018355919091527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b909101805473ffffffffffffffffffffffffffffffffffffffff19169091179055565b600061044f60028363ffffffff610c9716565b92915050565b600060048260010181548110151561046957fe5b600091825260209091200154600160a060020a031692915050565b600061044f60038363ffffffff610c9716565b6104a03361043c565b15156104ab57600080fd5b61026581610cce565b60005474010000000000000000000000000000000000000000900460ff16156104dc57600080fd5b6104e533610484565b15156104f057600080fd5b6004546001106104ff57600080fd5b60045460021415610564576004805480151561051757fe5b600082815260208082208301600019908101805473ffffffffffffffffffffffffffffffffffffffff19169055909201909255600160a060020a0383168252600590526040812055610265565b600454600160a060020a038216600090815260056020526040902054146105fe5760048054600019810190811061059757fe5b6000918252602080832090910154600160a060020a03848116845260059092526040909220546004805492909316929181106105cf57fe5b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a031602179055505b6004805480151561060b57fe5b600082815260208082208301600019908101805473ffffffffffffffffffffffffffffffffffffffff19169055909201909255600160a060020a038316825260059052604081205550565b60005474010000000000000000000000000000000000000000900460ff161561067e57600080fd5b6106873361043c565b151561069257600080fd5b6004546001106106a157600080fd5b600154604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600092600160a060020a0316916370a08231916024808301926020929190829003018186803b15801561070557600080fd5b505afa158015610719573d6000803e3d6000fd5b505050506040513d602081101561072f57600080fd5b505190506000811161074057600080fd5b610748610e71565b60045460015b8181101561090157600060048281548110151561076757fe5b60009182526020918290200154604080517f19a74ab30000000000000000000000000000000000000000000000000000000081529051600160a060020a03909216935083926319a74ab392600480840193829003018186803b1580156107cc57600080fd5b505afa1580156107e0573d6000803e3d6000fd5b505050506040513d60208110156107f657600080fd5b5051151561080457506108f9565b600081600160a060020a03166380258e476040518163ffffffff1660e060020a02815260040160206040518083038186803b15801561084257600080fd5b505afa158015610856573d6000803e3d6000fd5b505050506040513d602081101561086c57600080fd5b5051905060ff8116151561088e578460005b60200201805160010190526108f6565b8060ff16600114156108a25784600161087e565b8060ff16600214156108b65784600261087e565b8060ff16600314156108ca5784600361087e565b8060ff16600414156108de5784600461087e565b8060ff16600514156108f65760a08501805160010190525b50505b60010161074e565b5060a082015160808301516060840151604085015160208601518651600a90910201601490910201601e90910201602890910201603290910201610943610e71565b818581151561094e57fe5b04815281600a860281151561095f57fe5b046020820152816014860281151561097357fe5b04604082015281601e860281151561098757fe5b046060820152816028860281151561099b57fe5b04608082015281603286028115156109af57fe5b0460a082015260015b83811015610b9c5760006004828154811015156109d157fe5b60009182526020918290200154604080517f19a74ab30000000000000000000000000000000000000000000000000000000081529051600160a060020a03909216935083926319a74ab392600480840193829003018186803b158015610a3657600080fd5b505afa158015610a4a573d6000803e3d6000fd5b505050506040513d6020811015610a6057600080fd5b50511515610a6e5750610b94565b600081600160a060020a03166380258e476040518163ffffffff1660e060020a02815260040160206040518083038186803b158015610aac57600080fd5b505afa158015610ac0573d6000803e3d6000fd5b505050506040513d6020811015610ad657600080fd5b5051604080517f302c11ca0000000000000000000000000000000000000000000000000000000081529051919250610b9191600160a060020a0385169163302c11ca916004808301926020929190829003018186803b158015610b3857600080fd5b505afa158015610b4c573d6000803e3d6000fd5b505050506040513d6020811015610b6257600080fd5b50518560ff841660068110610b7357fe5b6020020151600154600160a060020a0316919063ffffffff610cdf16565b50505b6001016109b8565b505050505050565b6004546000190190565b61024633610d7e565b61024633610d8f565b600154604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600092600160a060020a0316916370a08231916024808301926020929190829003018186803b158015610c2457600080fd5b505afa158015610c38573d6000803e3d6000fd5b505050506040513d6020811015610c4e57600080fd5b505190506000811115610c7e57600054600154610c7e91600160a060020a0391821691168363ffffffff610cdf16565b610265610da0565b61026560038263ffffffff610dd716565b6000600160a060020a0382161515610cae57600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b61026560028263ffffffff610dd716565b82600160a060020a031663a9059cbb83836040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b158015610d4257600080fd5b505af1158015610d56573d6000803e3d6000fd5b505050506040513d6020811015610d6c57600080fd5b50511515610d7957600080fd5b505050565b61026560038263ffffffff610e2516565b61026560028263ffffffff610e2516565b6000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b600160a060020a0381161515610dec57600080fd5b610df68282610c97565b15610e0057600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b600160a060020a0381161515610e3a57600080fd5b610e448282610c97565b1515610e4f57600080fd5b600160a060020a0316600090815260209190915260409020805460ff19169055565b60c060405190810160405280600690602082028038833950919291505056fea165627a7a72305820d93c57fe9a496ba0db433cb631bbbbe57a53bb63720b63023ea0e465cf5c1d200029", + "functionHashes": { + "addCoreTeam(address)": "2e6b6849", + "addSystem(address)": "74be7592", + "getMinerByIndex(uint256)": "3d19ab13", + "getMinerCount()": "bb52c137", + "isCoreTeam(address)": "608d3d3d", + "isSystem(address)": "34cdcf26", + "mine()": "99f4b251", + "registerMiner(address)": "341ccfcb", + "renounceCoreTeam()": "d43acc79", + "renounceSystem()": "e9d61859", + "terminate()": "0c08bf88", + "unregisterMiner(address)": "81f909f3" + }, + "gasEstimates": { + "creation": { + "codeDepositCost": "754400", + "executionCost": "infinite", + "totalCost": "infinite" + }, + "external": { + "addCoreTeam(address)": "infinite", + "addSystem(address)": "infinite", + "getMinerByIndex(uint256)": "1058", + "getMinerCount()": "541", + "isCoreTeam(address)": "infinite", + "isSystem(address)": "infinite", + "mine()": "infinite", + "registerMiner(address)": "infinite", + "renounceCoreTeam()": "infinite", + "renounceSystem()": "infinite", + "terminate()": "infinite", + "unregisterMiner(address)": "infinite" + } + } +} \ No newline at end of file diff --git a/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/bin/AlgoMiner-sol-output.json b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/bin/AlgoMiner-sol-output.json new file mode 100644 index 000000000..e8c434ff2 --- /dev/null +++ b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/bin/AlgoMiner-sol-output.json @@ -0,0 +1,20333 @@ +{ + "contracts": { + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoCommon.sol": { + "AlgoCommon": { + "abi": [], + "devdoc": { + "methods": {} + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "6080604052348015600f57600080fd5b50603580601d6000396000f3fe6080604052600080fdfea165627a7a72305820c142737f5004f0e270be8e9321f75139c2de559ee56245828f39cd6b8e6ac07b0029", + "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH1 0xF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x35 DUP1 PUSH1 0x1D PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG1 PUSH6 0x627A7A723058 KECCAK256 0xc1 TIMESTAMP PUSH20 0x7F5004F0E270BE8E9321F75139C2DE559EE56245 DUP3 DUP16 CODECOPY 0xcd PUSH12 0x8E6AC07B0029000000000000 ", + "sourceMap": "26:1033:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;26:1033:0;;;;;;;" + }, + "gasEstimates": { + "creation": { + "codeDepositCost": "10600", + "executionCost": "66", + "totalCost": "10666" + }, + "internal": { + "getCapacityByCategory(uint8)": "infinite" + } + }, + "methodIdentifiers": {} + }, + "metadata": "{\"compiler\":{\"version\":\"0.5.4+commit.9549d8ff\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoCommon.sol\":\"AlgoCommon\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoCommon.sol\":{\"keccak256\":\"0x014debd2c96ba7aba7faef24eac1f1a5d46791b55ae55fbd51d7945bf21277e0\",\"urls\":[\"bzzr://b8d1cffc7f1bfdc8c911d90b785cf9c2723b24bd162d7cfd730e127f56932fe9\"]}},\"version\":1}", + "userdoc": { + "methods": {} + } + } + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoCoreTeamRole.sol": { + "AlgoCoreTeamRole": { + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "addCoreTeam", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "isCoreTeam", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renounceCoreTeam", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + } + ], + "devdoc": { + "methods": {} + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "gasEstimates": null, + "methodIdentifiers": { + "addCoreTeam(address)": "2e6b6849", + "isCoreTeam(address)": "608d3d3d", + "renounceCoreTeam()": "d43acc79" + } + }, + "metadata": "", + "userdoc": { + "methods": {} + } + } + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoMiner.sol": { + "AlgoMiner": { + "abi": [ + { + "constant": false, + "inputs": [], + "name": "terminate", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "pauseMining", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "isAlgoMiner", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "pure", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "isMining", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "startMining", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "newMinerAddress", + "type": "address" + } + ], + "name": "migrateMiner", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "addSupervisor", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "addCoreTeam", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getMiner", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getReferral", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "isSystem", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "stopAndRemoveOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getCurrentDay", + "outputs": [ + { + "name": "", + "type": "uint16" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "resumeMining", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getMinerType", + "outputs": [ + { + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "isCoreTeam", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "addSystem", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getCategory", + "outputs": [ + { + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "isSupervisor", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "newOwnerAddress", + "type": "address" + }, + { + "name": "newReferralAddress", + "type": "address" + } + ], + "name": "resetMiner", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "mine", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "deactivateMiner", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "activateMiner", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renounceSupervisor", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getCurrentYearSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getCurrentYear", + "outputs": [ + { + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renounceCoreTeam", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "stopMining", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renounceSystem", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "name": "minerType", + "type": "uint8" + }, + { + "name": "category", + "type": "uint8" + }, + { + "name": "minerAccountAddress", + "type": "address" + }, + { + "name": "referralAccountAddress", + "type": "address" + }, + { + "name": "tokenAddress", + "type": "address" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + } + ], + "devdoc": { + "methods": {} + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "60806040523480156200001157600080fd5b5060405160a08062001458833981018060405260a08110156200003357600080fd5b5080516020820151604083015160608401516080909401516000805433600160a060020a0319918216811760a060020a60ff02191690925560018054909116600160a060020a038416179055939492939192916200009a906401000000006200018e810204565b620000ae33640100000000620001ac810204565b620000c233640100000000620001c7810204565b600560ff85161115620000d457600080fd5b600160a060020a0383161515620000ea57600080fd5b6000856001811115620000f957fe5b14156200011657600160a060020a03821615156200011657600080fd5b6005805486919060ff1916600183818111156200012f57fe5b0217905550506005805461ff00191661010060ff9590951694909402939093176201000060b060020a03191662010000600160a060020a03938416021790925560068054600160a060020a031916929091169190911790555062000275565b620001a96002826401000000006200110d620001e282021704565b50565b620001a96003826401000000006200110d620001e282021704565b620001a96004826401000000006200110d620001e282021704565b600160a060020a0381161515620001f857600080fd5b6200020d82826401000000006200023d810204565b156200021857600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b6000600160a060020a03821615156200025557600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b6111d380620002856000396000f3fe608060405234801561001057600080fd5b50600436106101ec576000357c0100000000000000000000000000000000000000000000000000000000900480634969ae70116101215780639e614ca0116100bf578063ce41607a1161008e578063ce41607a14610422578063d43acc791461042a578063da40867914610432578063e9d618591461043a576101ec565b80639e614ca0146103f0578063b2a32cd5146103f8578063be95249414610400578063cdfd0f6414610408576101ec565b806380258e47116100fb57806380258e471461038c57806381a24459146103945780638329138f146103ba57806399f4b251146103e8576101ec565b80634969ae7014610322578063608d3d3d1461034057806374be759214610366576101ec565b80632e6b68491161018e57806334cdcf261161016857806334cdcf26146102cd578063363aa6c7146102f35780633e6968b6146102fb578063427534a41461031a576101ec565b80632e6b68491461027b578063302c11ca146102a1578063329b1c92146102c5576101ec565b806319a74ab3116101ca57806319a74ab31461021f57806321b79d9814610227578063231d4e2a1461022f57806329d10b6e14610255576101ec565b80630c08bf88146101f1578063162f986d146101fb5780631777fb4b14610203575b600080fd5b6101f9610442565b005b6101f9610460565b61020b6104cf565b604080519115158252519081900360200190f35b61020b6104d4565b6101f961050b565b6101f96004803603602081101561024557600080fd5b5035600160a060020a03166105a1565b6101f96004803603602081101561026b57600080fd5b5035600160a060020a031661068b565b6101f96004803603602081101561029157600080fd5b5035600160a060020a03166106a8565b6102a96106c5565b60408051600160a060020a039092168252519081900360200190f35b6102a96106da565b61020b600480360360208110156102e357600080fd5b5035600160a060020a03166106e9565b6101f9610704565b6103036107b5565b6040805161ffff9092168252519081900360200190f35b6101f96107c6565b61032a610832565b6040805160ff9092168252519081900360200190f35b61020b6004803603602081101561035657600080fd5b5035600160a060020a0316610846565b6101f96004803603602081101561037c57600080fd5b5035600160a060020a0316610859565b61032a610876565b61020b600480360360208110156103aa57600080fd5b5035600160a060020a0316610884565b6101f9600480360360408110156103d057600080fd5b50600160a060020a0381358116916020013516610897565b6101f961094a565b6101f9610b86565b6101f9610bf7565b6101f9610d53565b610410610d5c565b60408051918252519081900360200190f35b61032a610d62565b6101f9610d85565b6101f9610d8e565b6101f9610e1f565b61044b33610846565b151561045657600080fd5b61045e610e28565b565b60005460a060020a900460ff161561047757600080fd5b61048033610884565b151561048b57600080fd5b600160065460a060020a900460ff1660038111156104a557fe5b146104af57600080fd5b600680546002919060a060020a60ff02191660a060020a835b0217905550565b600190565b6000600160065460a060020a900460ff1660038111156104f057fe5b148015610506575060065460a860020a900460ff165b905090565b60005460a060020a900460ff161561052257600080fd5b600554620100009004600160a060020a0316331461053f57600080fd5b600160065460a060020a900460ff16600381111561055957fe5b1461056357600080fd5b60065460a860020a900460ff161561057a57600080fd5b6006805475ff000000000000000000000000000000000000000000191660a860020a179055565b6105aa33610846565b15156105b557600080fd5b600060065460a060020a900460ff1660038111156105cf57fe5b146105d957600080fd5b600154604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051610688928492600160a060020a03909116916370a0823191602480820192602092909190829003018186803b15801561064357600080fd5b505afa158015610657573d6000803e3d6000fd5b505050506040513d602081101561066d57600080fd5b5051600154600160a060020a0316919063ffffffff610eee16565b50565b61069433610884565b151561069f57600080fd5b61068881610fa6565b6106b133610846565b15156106bc57600080fd5b61068881610fb7565b600554620100009004600160a060020a031690565b600654600160a060020a031690565b60006106fc60028363ffffffff610fc816565b90505b919050565b60005460a060020a900460ff161561071b57600080fd5b61072433610884565b151561072f57600080fd5b600360065460a060020a900460ff16600381111561074957fe5b141561075457600080fd5b600680546005805475ffffffffffffffffffffffffffffffffffffffff00001916905560a060020a60ff021916740300000000000000000000000000000000000000001775ff00ffffffffffffffffffffffffffffffffffffffff19169055565b60065460b860020a900461ffff1690565b60005460a060020a900460ff16156107dd57600080fd5b6107e633610884565b15156107f157600080fd5b600260065460a060020a900460ff16600381111561080b57fe5b1461081557600080fd5b600680546001919060a060020a60ff02191660a060020a836104c8565b60055460009060ff16600181111561050657fe5b60006106fc60038363ffffffff610fc816565b610862336106e9565b151561086d57600080fd5b61068881610fff565b600554610100900460ff1690565b60006106fc60048363ffffffff610fc816565b60005460a060020a900460ff16156108ae57600080fd5b6108b733610884565b15156108c257600080fd5b600360065460a060020a900460ff1660038111156108dc57fe5b146108e657600080fd5b600680546005805475ffffffffffffffffffffffffffffffffffffffff0000191662010000600160a060020a039687160217905560a060020a60ff02191660a060020a1773ffffffffffffffffffffffffffffffffffffffff191691909216179055565b60005460a060020a900460ff161561096157600080fd5b61096a336106e9565b151561097557600080fd5b600060055460ff16600181111561098857fe5b1461099257600080fd5b600160065460a060020a900460ff1660038111156109ac57fe5b146109b657600080fd5b60065460a860020a900460ff1615156109ce57600080fd5b60065460b860020a900461ffff161515610a44576006805478ffff00000000000000000000000000000000000000000000001976ff0000000000000000000000000000000000000000000019909116760100000000000000000000000000000000000000000000171660b860020a179055610b0c565b60068054600161ffff60b860020a8084048216929092018116820278ffff00000000000000000000000000000000000000000000001990931692909217928390559091041661016e1415610b0c576006805478ffff000000000000000000000000000000000000000000000019600160ff760100000000000000000000000000000000000000000000808504821692909201160276ff0000000000000000000000000000000000000000000019909216919091171660b860020a179055600754600290046007555b60075461016d90046064600a82020460008211610b2857600080fd5b60008111610b3557600080fd5b600554600154610b5f91600160a060020a039182169162010000909104168463ffffffff610eee16565b600654600154610b8291600160a060020a0391821691168363ffffffff610eee16565b5050565b60005460a060020a900460ff1615610b9d57600080fd5b610ba633610846565b1515610bb157600080fd5b600060065460a060020a900460ff166003811115610bcb57fe5b1415610bd657600080fd5b6006805475ffff000000000000000000000000000000000000000019169055565b60005460a060020a900460ff1615610c0e57600080fd5b610c1733610846565b1515610c2257600080fd5b600060065460a060020a900460ff166003811115610c3c57fe5b14610c4657600080fd5b600060055460ff166001811115610c5957fe5b148015610c665750600754155b1561081557600554600090610c8290610100900460ff16611010565b600154604080517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290519293506064600a850204840192600092600160a060020a0316916370a08231916024808301926020929190829003018186803b158015610cf357600080fd5b505afa158015610d07573d6000803e3d6000fd5b505050506040513d6020811015610d1d57600080fd5b50519050818114610d2d57600080fd5b600283046007555050600680546001925060a060020a60ff02191660a060020a836104c8565b61045e336110c2565b60075490565b600654760100000000000000000000000000000000000000000000900460ff1690565b61045e336110d3565b60005460a060020a900460ff1615610da557600080fd5b600554620100009004600160a060020a03163314610dc257600080fd5b600160065460a060020a900460ff166003811115610ddc57fe5b14610de657600080fd5b60065460a860020a900460ff161515610dfe57600080fd5b6006805475ff00000000000000000000000000000000000000000019169055565b61045e336110e4565b600154604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600092600160a060020a0316916370a08231916024808301926020929190829003018186803b158015610e8c57600080fd5b505afa158015610ea0573d6000803e3d6000fd5b505050506040513d6020811015610eb657600080fd5b505190506000811115610ee657600054600154610ee691600160a060020a0391821691168363ffffffff610eee16565b6106886110f5565b82600160a060020a031663a9059cbb83836040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b158015610f6a57600080fd5b505af1158015610f7e573d6000803e3d6000fd5b505050506040513d6020811015610f9457600080fd5b50511515610fa157600080fd5b505050565b61068860048263ffffffff61110d16565b61068860038263ffffffff61110d16565b6000600160a060020a0382161515610fdf57600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b61068860028263ffffffff61110d16565b600060ff8216151561102d575069152d02c7e14af68000006106ff565b8160ff166001141561104a575069d3c21bcecceda10000006106ff565b8160ff166002141561106857506a01a784379d99db420000006106ff565b8160ff166003141561108657506a027b46536c66c8e30000006106ff565b8160ff16600414156110a457506a034f086f3b33b6840000006106ff565b8160ff16600514156106ff57506a0422ca8b0a00a4250000006106ff565b61068860048263ffffffff61115b16565b61068860038263ffffffff61115b16565b61068860028263ffffffff61115b16565b6000805460a060020a60ff02191660a060020a179055565b600160a060020a038116151561112257600080fd5b61112c8282610fc8565b1561113657600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b600160a060020a038116151561117057600080fd5b61117a8282610fc8565b151561118557600080fd5b600160a060020a0316600090815260209190915260409020805460ff1916905556fea165627a7a72305820a2a7d81c4bf237d833a792f3dd14af3f88c7c6e7d320648513595fcbe01959490029", + "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH3 0x11 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH1 0xA0 DUP1 PUSH3 0x1458 DUP4 CODECOPY DUP2 ADD DUP1 PUSH1 0x40 MSTORE PUSH1 0xA0 DUP2 LT ISZERO PUSH3 0x33 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP DUP1 MLOAD PUSH1 0x20 DUP3 ADD MLOAD PUSH1 0x40 DUP4 ADD MLOAD PUSH1 0x60 DUP5 ADD MLOAD PUSH1 0x80 SWAP1 SWAP5 ADD MLOAD PUSH1 0x0 DUP1 SLOAD CALLER PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB NOT SWAP2 DUP3 AND DUP2 OR PUSH1 0xA0 PUSH1 0x2 EXP PUSH1 0xFF MUL NOT AND SWAP1 SWAP3 SSTORE PUSH1 0x1 DUP1 SLOAD SWAP1 SWAP2 AND PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP5 AND OR SWAP1 SSTORE SWAP4 SWAP5 SWAP3 SWAP4 SWAP2 SWAP3 SWAP2 PUSH3 0x9A SWAP1 PUSH5 0x100000000 PUSH3 0x18E DUP2 MUL DIV JUMP JUMPDEST PUSH3 0xAE CALLER PUSH5 0x100000000 PUSH3 0x1AC DUP2 MUL DIV JUMP JUMPDEST PUSH3 0xC2 CALLER PUSH5 0x100000000 PUSH3 0x1C7 DUP2 MUL DIV JUMP JUMPDEST PUSH1 0x5 PUSH1 0xFF DUP6 AND GT ISZERO PUSH3 0xD4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP4 AND ISZERO ISZERO PUSH3 0xEA JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP6 PUSH1 0x1 DUP2 GT ISZERO PUSH3 0xF9 JUMPI INVALID JUMPDEST EQ ISZERO PUSH3 0x116 JUMPI PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP3 AND ISZERO ISZERO PUSH3 0x116 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x5 DUP1 SLOAD DUP7 SWAP2 SWAP1 PUSH1 0xFF NOT AND PUSH1 0x1 DUP4 DUP2 DUP2 GT ISZERO PUSH3 0x12F JUMPI INVALID JUMPDEST MUL OR SWAP1 SSTORE POP POP PUSH1 0x5 DUP1 SLOAD PUSH2 0xFF00 NOT AND PUSH2 0x100 PUSH1 0xFF SWAP6 SWAP1 SWAP6 AND SWAP5 SWAP1 SWAP5 MUL SWAP4 SWAP1 SWAP4 OR PUSH3 0x10000 PUSH1 0xB0 PUSH1 0x2 EXP SUB NOT AND PUSH3 0x10000 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB SWAP4 DUP5 AND MUL OR SWAP1 SWAP3 SSTORE PUSH1 0x6 DUP1 SLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB NOT AND SWAP3 SWAP1 SWAP2 AND SWAP2 SWAP1 SWAP2 OR SWAP1 SSTORE POP PUSH3 0x275 JUMP JUMPDEST PUSH3 0x1A9 PUSH1 0x2 DUP3 PUSH5 0x100000000 PUSH3 0x110D PUSH3 0x1E2 DUP3 MUL OR DIV JUMP JUMPDEST POP JUMP JUMPDEST PUSH3 0x1A9 PUSH1 0x3 DUP3 PUSH5 0x100000000 PUSH3 0x110D PUSH3 0x1E2 DUP3 MUL OR DIV JUMP JUMPDEST PUSH3 0x1A9 PUSH1 0x4 DUP3 PUSH5 0x100000000 PUSH3 0x110D PUSH3 0x1E2 DUP3 MUL OR DIV JUMP JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP2 AND ISZERO ISZERO PUSH3 0x1F8 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH3 0x20D DUP3 DUP3 PUSH5 0x100000000 PUSH3 0x23D DUP2 MUL DIV JUMP JUMPDEST ISZERO PUSH3 0x218 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP1 SLOAD PUSH1 0xFF NOT AND PUSH1 0x1 OR SWAP1 SSTORE JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP3 AND ISZERO ISZERO PUSH3 0x255 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND SWAP1 JUMP JUMPDEST PUSH2 0x11D3 DUP1 PUSH3 0x285 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x1EC JUMPI PUSH1 0x0 CALLDATALOAD PUSH29 0x100000000000000000000000000000000000000000000000000000000 SWAP1 DIV DUP1 PUSH4 0x4969AE70 GT PUSH2 0x121 JUMPI DUP1 PUSH4 0x9E614CA0 GT PUSH2 0xBF JUMPI DUP1 PUSH4 0xCE41607A GT PUSH2 0x8E JUMPI DUP1 PUSH4 0xCE41607A EQ PUSH2 0x422 JUMPI DUP1 PUSH4 0xD43ACC79 EQ PUSH2 0x42A JUMPI DUP1 PUSH4 0xDA408679 EQ PUSH2 0x432 JUMPI DUP1 PUSH4 0xE9D61859 EQ PUSH2 0x43A JUMPI PUSH2 0x1EC JUMP JUMPDEST DUP1 PUSH4 0x9E614CA0 EQ PUSH2 0x3F0 JUMPI DUP1 PUSH4 0xB2A32CD5 EQ PUSH2 0x3F8 JUMPI DUP1 PUSH4 0xBE952494 EQ PUSH2 0x400 JUMPI DUP1 PUSH4 0xCDFD0F64 EQ PUSH2 0x408 JUMPI PUSH2 0x1EC JUMP JUMPDEST DUP1 PUSH4 0x80258E47 GT PUSH2 0xFB JUMPI DUP1 PUSH4 0x80258E47 EQ PUSH2 0x38C JUMPI DUP1 PUSH4 0x81A24459 EQ PUSH2 0x394 JUMPI DUP1 PUSH4 0x8329138F EQ PUSH2 0x3BA JUMPI DUP1 PUSH4 0x99F4B251 EQ PUSH2 0x3E8 JUMPI PUSH2 0x1EC JUMP JUMPDEST DUP1 PUSH4 0x4969AE70 EQ PUSH2 0x322 JUMPI DUP1 PUSH4 0x608D3D3D EQ PUSH2 0x340 JUMPI DUP1 PUSH4 0x74BE7592 EQ PUSH2 0x366 JUMPI PUSH2 0x1EC JUMP JUMPDEST DUP1 PUSH4 0x2E6B6849 GT PUSH2 0x18E JUMPI DUP1 PUSH4 0x34CDCF26 GT PUSH2 0x168 JUMPI DUP1 PUSH4 0x34CDCF26 EQ PUSH2 0x2CD JUMPI DUP1 PUSH4 0x363AA6C7 EQ PUSH2 0x2F3 JUMPI DUP1 PUSH4 0x3E6968B6 EQ PUSH2 0x2FB JUMPI DUP1 PUSH4 0x427534A4 EQ PUSH2 0x31A JUMPI PUSH2 0x1EC JUMP JUMPDEST DUP1 PUSH4 0x2E6B6849 EQ PUSH2 0x27B JUMPI DUP1 PUSH4 0x302C11CA EQ PUSH2 0x2A1 JUMPI DUP1 PUSH4 0x329B1C92 EQ PUSH2 0x2C5 JUMPI PUSH2 0x1EC JUMP JUMPDEST DUP1 PUSH4 0x19A74AB3 GT PUSH2 0x1CA JUMPI DUP1 PUSH4 0x19A74AB3 EQ PUSH2 0x21F JUMPI DUP1 PUSH4 0x21B79D98 EQ PUSH2 0x227 JUMPI DUP1 PUSH4 0x231D4E2A EQ PUSH2 0x22F JUMPI DUP1 PUSH4 0x29D10B6E EQ PUSH2 0x255 JUMPI PUSH2 0x1EC JUMP JUMPDEST DUP1 PUSH4 0xC08BF88 EQ PUSH2 0x1F1 JUMPI DUP1 PUSH4 0x162F986D EQ PUSH2 0x1FB JUMPI DUP1 PUSH4 0x1777FB4B EQ PUSH2 0x203 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x1F9 PUSH2 0x442 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x1F9 PUSH2 0x460 JUMP JUMPDEST PUSH2 0x20B PUSH2 0x4CF JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 ISZERO ISZERO DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH2 0x20B PUSH2 0x4D4 JUMP JUMPDEST PUSH2 0x1F9 PUSH2 0x50B JUMP JUMPDEST PUSH2 0x1F9 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x245 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH2 0x5A1 JUMP JUMPDEST PUSH2 0x1F9 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x26B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH2 0x68B JUMP JUMPDEST PUSH2 0x1F9 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x291 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH2 0x6A8 JUMP JUMPDEST PUSH2 0x2A9 PUSH2 0x6C5 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB SWAP1 SWAP3 AND DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH2 0x2A9 PUSH2 0x6DA JUMP JUMPDEST PUSH2 0x20B PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x2E3 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH2 0x6E9 JUMP JUMPDEST PUSH2 0x1F9 PUSH2 0x704 JUMP JUMPDEST PUSH2 0x303 PUSH2 0x7B5 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH2 0xFFFF SWAP1 SWAP3 AND DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH2 0x1F9 PUSH2 0x7C6 JUMP JUMPDEST PUSH2 0x32A PUSH2 0x832 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0xFF SWAP1 SWAP3 AND DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH2 0x20B PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x356 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH2 0x846 JUMP JUMPDEST PUSH2 0x1F9 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x37C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH2 0x859 JUMP JUMPDEST PUSH2 0x32A PUSH2 0x876 JUMP JUMPDEST PUSH2 0x20B PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x3AA JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH2 0x884 JUMP JUMPDEST PUSH2 0x1F9 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x3D0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP2 CALLDATALOAD DUP2 AND SWAP2 PUSH1 0x20 ADD CALLDATALOAD AND PUSH2 0x897 JUMP JUMPDEST PUSH2 0x1F9 PUSH2 0x94A JUMP JUMPDEST PUSH2 0x1F9 PUSH2 0xB86 JUMP JUMPDEST PUSH2 0x1F9 PUSH2 0xBF7 JUMP JUMPDEST PUSH2 0x1F9 PUSH2 0xD53 JUMP JUMPDEST PUSH2 0x410 PUSH2 0xD5C JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH2 0x32A PUSH2 0xD62 JUMP JUMPDEST PUSH2 0x1F9 PUSH2 0xD85 JUMP JUMPDEST PUSH2 0x1F9 PUSH2 0xD8E JUMP JUMPDEST PUSH2 0x1F9 PUSH2 0xE1F JUMP JUMPDEST PUSH2 0x44B CALLER PUSH2 0x846 JUMP JUMPDEST ISZERO ISZERO PUSH2 0x456 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x45E PUSH2 0xE28 JUMP JUMPDEST JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH1 0xA0 PUSH1 0x2 EXP SWAP1 DIV PUSH1 0xFF AND ISZERO PUSH2 0x477 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x480 CALLER PUSH2 0x884 JUMP JUMPDEST ISZERO ISZERO PUSH2 0x48B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x6 SLOAD PUSH1 0xA0 PUSH1 0x2 EXP SWAP1 DIV PUSH1 0xFF AND PUSH1 0x3 DUP2 GT ISZERO PUSH2 0x4A5 JUMPI INVALID JUMPDEST EQ PUSH2 0x4AF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x6 DUP1 SLOAD PUSH1 0x2 SWAP2 SWAP1 PUSH1 0xA0 PUSH1 0x2 EXP PUSH1 0xFF MUL NOT AND PUSH1 0xA0 PUSH1 0x2 EXP DUP4 JUMPDEST MUL OR SWAP1 SSTORE POP JUMP JUMPDEST PUSH1 0x1 SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 PUSH1 0x6 SLOAD PUSH1 0xA0 PUSH1 0x2 EXP SWAP1 DIV PUSH1 0xFF AND PUSH1 0x3 DUP2 GT ISZERO PUSH2 0x4F0 JUMPI INVALID JUMPDEST EQ DUP1 ISZERO PUSH2 0x506 JUMPI POP PUSH1 0x6 SLOAD PUSH1 0xA8 PUSH1 0x2 EXP SWAP1 DIV PUSH1 0xFF AND JUMPDEST SWAP1 POP SWAP1 JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH1 0xA0 PUSH1 0x2 EXP SWAP1 DIV PUSH1 0xFF AND ISZERO PUSH2 0x522 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x5 SLOAD PUSH3 0x10000 SWAP1 DIV PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND CALLER EQ PUSH2 0x53F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x6 SLOAD PUSH1 0xA0 PUSH1 0x2 EXP SWAP1 DIV PUSH1 0xFF AND PUSH1 0x3 DUP2 GT ISZERO PUSH2 0x559 JUMPI INVALID JUMPDEST EQ PUSH2 0x563 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x6 SLOAD PUSH1 0xA8 PUSH1 0x2 EXP SWAP1 DIV PUSH1 0xFF AND ISZERO PUSH2 0x57A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x6 DUP1 SLOAD PUSH22 0xFF000000000000000000000000000000000000000000 NOT AND PUSH1 0xA8 PUSH1 0x2 EXP OR SWAP1 SSTORE JUMP JUMPDEST PUSH2 0x5AA CALLER PUSH2 0x846 JUMP JUMPDEST ISZERO ISZERO PUSH2 0x5B5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x6 SLOAD PUSH1 0xA0 PUSH1 0x2 EXP SWAP1 DIV PUSH1 0xFF AND PUSH1 0x3 DUP2 GT ISZERO PUSH2 0x5CF JUMPI INVALID JUMPDEST EQ PUSH2 0x5D9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH32 0x70A0823100000000000000000000000000000000000000000000000000000000 DUP2 MSTORE ADDRESS PUSH1 0x4 DUP3 ADD MSTORE SWAP1 MLOAD PUSH2 0x688 SWAP3 DUP5 SWAP3 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB SWAP1 SWAP2 AND SWAP2 PUSH4 0x70A08231 SWAP2 PUSH1 0x24 DUP1 DUP3 ADD SWAP3 PUSH1 0x20 SWAP3 SWAP1 SWAP2 SWAP1 DUP3 SWAP1 SUB ADD DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x643 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x657 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x66D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP MLOAD PUSH1 0x1 SLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND SWAP2 SWAP1 PUSH4 0xFFFFFFFF PUSH2 0xEEE AND JUMP JUMPDEST POP JUMP JUMPDEST PUSH2 0x694 CALLER PUSH2 0x884 JUMP JUMPDEST ISZERO ISZERO PUSH2 0x69F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x688 DUP2 PUSH2 0xFA6 JUMP JUMPDEST PUSH2 0x6B1 CALLER PUSH2 0x846 JUMP JUMPDEST ISZERO ISZERO PUSH2 0x6BC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x688 DUP2 PUSH2 0xFB7 JUMP JUMPDEST PUSH1 0x5 SLOAD PUSH3 0x10000 SWAP1 DIV PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND SWAP1 JUMP JUMPDEST PUSH1 0x6 SLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x6FC PUSH1 0x2 DUP4 PUSH4 0xFFFFFFFF PUSH2 0xFC8 AND JUMP JUMPDEST SWAP1 POP JUMPDEST SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH1 0xA0 PUSH1 0x2 EXP SWAP1 DIV PUSH1 0xFF AND ISZERO PUSH2 0x71B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x724 CALLER PUSH2 0x884 JUMP JUMPDEST ISZERO ISZERO PUSH2 0x72F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x3 PUSH1 0x6 SLOAD PUSH1 0xA0 PUSH1 0x2 EXP SWAP1 DIV PUSH1 0xFF AND PUSH1 0x3 DUP2 GT ISZERO PUSH2 0x749 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x754 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x6 DUP1 SLOAD PUSH1 0x5 DUP1 SLOAD PUSH22 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000 NOT AND SWAP1 SSTORE PUSH1 0xA0 PUSH1 0x2 EXP PUSH1 0xFF MUL NOT AND PUSH21 0x30000000000000000000000000000000000000000 OR PUSH22 0xFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND SWAP1 SSTORE JUMP JUMPDEST PUSH1 0x6 SLOAD PUSH1 0xB8 PUSH1 0x2 EXP SWAP1 DIV PUSH2 0xFFFF AND SWAP1 JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH1 0xA0 PUSH1 0x2 EXP SWAP1 DIV PUSH1 0xFF AND ISZERO PUSH2 0x7DD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x7E6 CALLER PUSH2 0x884 JUMP JUMPDEST ISZERO ISZERO PUSH2 0x7F1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x2 PUSH1 0x6 SLOAD PUSH1 0xA0 PUSH1 0x2 EXP SWAP1 DIV PUSH1 0xFF AND PUSH1 0x3 DUP2 GT ISZERO PUSH2 0x80B JUMPI INVALID JUMPDEST EQ PUSH2 0x815 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x6 DUP1 SLOAD PUSH1 0x1 SWAP2 SWAP1 PUSH1 0xA0 PUSH1 0x2 EXP PUSH1 0xFF MUL NOT AND PUSH1 0xA0 PUSH1 0x2 EXP DUP4 PUSH2 0x4C8 JUMP JUMPDEST PUSH1 0x5 SLOAD PUSH1 0x0 SWAP1 PUSH1 0xFF AND PUSH1 0x1 DUP2 GT ISZERO PUSH2 0x506 JUMPI INVALID JUMPDEST PUSH1 0x0 PUSH2 0x6FC PUSH1 0x3 DUP4 PUSH4 0xFFFFFFFF PUSH2 0xFC8 AND JUMP JUMPDEST PUSH2 0x862 CALLER PUSH2 0x6E9 JUMP JUMPDEST ISZERO ISZERO PUSH2 0x86D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x688 DUP2 PUSH2 0xFFF JUMP JUMPDEST PUSH1 0x5 SLOAD PUSH2 0x100 SWAP1 DIV PUSH1 0xFF AND SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x6FC PUSH1 0x4 DUP4 PUSH4 0xFFFFFFFF PUSH2 0xFC8 AND JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH1 0xA0 PUSH1 0x2 EXP SWAP1 DIV PUSH1 0xFF AND ISZERO PUSH2 0x8AE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x8B7 CALLER PUSH2 0x884 JUMP JUMPDEST ISZERO ISZERO PUSH2 0x8C2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x3 PUSH1 0x6 SLOAD PUSH1 0xA0 PUSH1 0x2 EXP SWAP1 DIV PUSH1 0xFF AND PUSH1 0x3 DUP2 GT ISZERO PUSH2 0x8DC JUMPI INVALID JUMPDEST EQ PUSH2 0x8E6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x6 DUP1 SLOAD PUSH1 0x5 DUP1 SLOAD PUSH22 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000 NOT AND PUSH3 0x10000 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB SWAP7 DUP8 AND MUL OR SWAP1 SSTORE PUSH1 0xA0 PUSH1 0x2 EXP PUSH1 0xFF MUL NOT AND PUSH1 0xA0 PUSH1 0x2 EXP OR PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF NOT AND SWAP2 SWAP1 SWAP3 AND OR SWAP1 SSTORE JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH1 0xA0 PUSH1 0x2 EXP SWAP1 DIV PUSH1 0xFF AND ISZERO PUSH2 0x961 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x96A CALLER PUSH2 0x6E9 JUMP JUMPDEST ISZERO ISZERO PUSH2 0x975 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x5 SLOAD PUSH1 0xFF AND PUSH1 0x1 DUP2 GT ISZERO PUSH2 0x988 JUMPI INVALID JUMPDEST EQ PUSH2 0x992 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x6 SLOAD PUSH1 0xA0 PUSH1 0x2 EXP SWAP1 DIV PUSH1 0xFF AND PUSH1 0x3 DUP2 GT ISZERO PUSH2 0x9AC JUMPI INVALID JUMPDEST EQ PUSH2 0x9B6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x6 SLOAD PUSH1 0xA8 PUSH1 0x2 EXP SWAP1 DIV PUSH1 0xFF AND ISZERO ISZERO PUSH2 0x9CE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x6 SLOAD PUSH1 0xB8 PUSH1 0x2 EXP SWAP1 DIV PUSH2 0xFFFF AND ISZERO ISZERO PUSH2 0xA44 JUMPI PUSH1 0x6 DUP1 SLOAD PUSH25 0xFFFF0000000000000000000000000000000000000000000000 NOT PUSH23 0xFF00000000000000000000000000000000000000000000 NOT SWAP1 SWAP2 AND PUSH23 0x100000000000000000000000000000000000000000000 OR AND PUSH1 0xB8 PUSH1 0x2 EXP OR SWAP1 SSTORE PUSH2 0xB0C JUMP JUMPDEST PUSH1 0x6 DUP1 SLOAD PUSH1 0x1 PUSH2 0xFFFF PUSH1 0xB8 PUSH1 0x2 EXP DUP1 DUP5 DIV DUP3 AND SWAP3 SWAP1 SWAP3 ADD DUP2 AND DUP3 MUL PUSH25 0xFFFF0000000000000000000000000000000000000000000000 NOT SWAP1 SWAP4 AND SWAP3 SWAP1 SWAP3 OR SWAP3 DUP4 SWAP1 SSTORE SWAP1 SWAP2 DIV AND PUSH2 0x16E EQ ISZERO PUSH2 0xB0C JUMPI PUSH1 0x6 DUP1 SLOAD PUSH25 0xFFFF0000000000000000000000000000000000000000000000 NOT PUSH1 0x1 PUSH1 0xFF PUSH23 0x100000000000000000000000000000000000000000000 DUP1 DUP6 DIV DUP3 AND SWAP3 SWAP1 SWAP3 ADD AND MUL PUSH23 0xFF00000000000000000000000000000000000000000000 NOT SWAP1 SWAP3 AND SWAP2 SWAP1 SWAP2 OR AND PUSH1 0xB8 PUSH1 0x2 EXP OR SWAP1 SSTORE PUSH1 0x7 SLOAD PUSH1 0x2 SWAP1 DIV PUSH1 0x7 SSTORE JUMPDEST PUSH1 0x7 SLOAD PUSH2 0x16D SWAP1 DIV PUSH1 0x64 PUSH1 0xA DUP3 MUL DIV PUSH1 0x0 DUP3 GT PUSH2 0xB28 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP2 GT PUSH2 0xB35 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x5 SLOAD PUSH1 0x1 SLOAD PUSH2 0xB5F SWAP2 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB SWAP2 DUP3 AND SWAP2 PUSH3 0x10000 SWAP1 SWAP2 DIV AND DUP5 PUSH4 0xFFFFFFFF PUSH2 0xEEE AND JUMP JUMPDEST PUSH1 0x6 SLOAD PUSH1 0x1 SLOAD PUSH2 0xB82 SWAP2 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB SWAP2 DUP3 AND SWAP2 AND DUP4 PUSH4 0xFFFFFFFF PUSH2 0xEEE AND JUMP JUMPDEST POP POP JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH1 0xA0 PUSH1 0x2 EXP SWAP1 DIV PUSH1 0xFF AND ISZERO PUSH2 0xB9D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xBA6 CALLER PUSH2 0x846 JUMP JUMPDEST ISZERO ISZERO PUSH2 0xBB1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x6 SLOAD PUSH1 0xA0 PUSH1 0x2 EXP SWAP1 DIV PUSH1 0xFF AND PUSH1 0x3 DUP2 GT ISZERO PUSH2 0xBCB JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0xBD6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x6 DUP1 SLOAD PUSH22 0xFFFF0000000000000000000000000000000000000000 NOT AND SWAP1 SSTORE JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH1 0xA0 PUSH1 0x2 EXP SWAP1 DIV PUSH1 0xFF AND ISZERO PUSH2 0xC0E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xC17 CALLER PUSH2 0x846 JUMP JUMPDEST ISZERO ISZERO PUSH2 0xC22 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x6 SLOAD PUSH1 0xA0 PUSH1 0x2 EXP SWAP1 DIV PUSH1 0xFF AND PUSH1 0x3 DUP2 GT ISZERO PUSH2 0xC3C JUMPI INVALID JUMPDEST EQ PUSH2 0xC46 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x5 SLOAD PUSH1 0xFF AND PUSH1 0x1 DUP2 GT ISZERO PUSH2 0xC59 JUMPI INVALID JUMPDEST EQ DUP1 ISZERO PUSH2 0xC66 JUMPI POP PUSH1 0x7 SLOAD ISZERO JUMPDEST ISZERO PUSH2 0x815 JUMPI PUSH1 0x5 SLOAD PUSH1 0x0 SWAP1 PUSH2 0xC82 SWAP1 PUSH2 0x100 SWAP1 DIV PUSH1 0xFF AND PUSH2 0x1010 JUMP JUMPDEST PUSH1 0x1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH32 0x70A0823100000000000000000000000000000000000000000000000000000000 DUP2 MSTORE ADDRESS PUSH1 0x4 DUP3 ADD MSTORE SWAP1 MLOAD SWAP3 SWAP4 POP PUSH1 0x64 PUSH1 0xA DUP6 MUL DIV DUP5 ADD SWAP3 PUSH1 0x0 SWAP3 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND SWAP2 PUSH4 0x70A08231 SWAP2 PUSH1 0x24 DUP1 DUP4 ADD SWAP3 PUSH1 0x20 SWAP3 SWAP2 SWAP1 DUP3 SWAP1 SUB ADD DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0xCF3 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0xD07 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x20 DUP2 LT ISZERO PUSH2 0xD1D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP MLOAD SWAP1 POP DUP2 DUP2 EQ PUSH2 0xD2D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x2 DUP4 DIV PUSH1 0x7 SSTORE POP POP PUSH1 0x6 DUP1 SLOAD PUSH1 0x1 SWAP3 POP PUSH1 0xA0 PUSH1 0x2 EXP PUSH1 0xFF MUL NOT AND PUSH1 0xA0 PUSH1 0x2 EXP DUP4 PUSH2 0x4C8 JUMP JUMPDEST PUSH2 0x45E CALLER PUSH2 0x10C2 JUMP JUMPDEST PUSH1 0x7 SLOAD SWAP1 JUMP JUMPDEST PUSH1 0x6 SLOAD PUSH23 0x100000000000000000000000000000000000000000000 SWAP1 DIV PUSH1 0xFF AND SWAP1 JUMP JUMPDEST PUSH2 0x45E CALLER PUSH2 0x10D3 JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH1 0xA0 PUSH1 0x2 EXP SWAP1 DIV PUSH1 0xFF AND ISZERO PUSH2 0xDA5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x5 SLOAD PUSH3 0x10000 SWAP1 DIV PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND CALLER EQ PUSH2 0xDC2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x6 SLOAD PUSH1 0xA0 PUSH1 0x2 EXP SWAP1 DIV PUSH1 0xFF AND PUSH1 0x3 DUP2 GT ISZERO PUSH2 0xDDC JUMPI INVALID JUMPDEST EQ PUSH2 0xDE6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x6 SLOAD PUSH1 0xA8 PUSH1 0x2 EXP SWAP1 DIV PUSH1 0xFF AND ISZERO ISZERO PUSH2 0xDFE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x6 DUP1 SLOAD PUSH22 0xFF000000000000000000000000000000000000000000 NOT AND SWAP1 SSTORE JUMP JUMPDEST PUSH2 0x45E CALLER PUSH2 0x10E4 JUMP JUMPDEST PUSH1 0x1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH32 0x70A0823100000000000000000000000000000000000000000000000000000000 DUP2 MSTORE ADDRESS PUSH1 0x4 DUP3 ADD MSTORE SWAP1 MLOAD PUSH1 0x0 SWAP3 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND SWAP2 PUSH4 0x70A08231 SWAP2 PUSH1 0x24 DUP1 DUP4 ADD SWAP3 PUSH1 0x20 SWAP3 SWAP2 SWAP1 DUP3 SWAP1 SUB ADD DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0xE8C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0xEA0 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x20 DUP2 LT ISZERO PUSH2 0xEB6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP MLOAD SWAP1 POP PUSH1 0x0 DUP2 GT ISZERO PUSH2 0xEE6 JUMPI PUSH1 0x0 SLOAD PUSH1 0x1 SLOAD PUSH2 0xEE6 SWAP2 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB SWAP2 DUP3 AND SWAP2 AND DUP4 PUSH4 0xFFFFFFFF PUSH2 0xEEE AND JUMP JUMPDEST PUSH2 0x688 PUSH2 0x10F5 JUMP JUMPDEST DUP3 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH4 0xA9059CBB DUP4 DUP4 PUSH1 0x40 MLOAD DUP4 PUSH4 0xFFFFFFFF AND PUSH29 0x100000000000000000000000000000000000000000000000000000000 MUL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP4 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP3 POP POP POP PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0xF6A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0xF7E JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x20 DUP2 LT ISZERO PUSH2 0xF94 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP MLOAD ISZERO ISZERO PUSH2 0xFA1 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP POP POP JUMP JUMPDEST PUSH2 0x688 PUSH1 0x4 DUP3 PUSH4 0xFFFFFFFF PUSH2 0x110D AND JUMP JUMPDEST PUSH2 0x688 PUSH1 0x3 DUP3 PUSH4 0xFFFFFFFF PUSH2 0x110D AND JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP3 AND ISZERO ISZERO PUSH2 0xFDF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND SWAP1 JUMP JUMPDEST PUSH2 0x688 PUSH1 0x2 DUP3 PUSH4 0xFFFFFFFF PUSH2 0x110D AND JUMP JUMPDEST PUSH1 0x0 PUSH1 0xFF DUP3 AND ISZERO ISZERO PUSH2 0x102D JUMPI POP PUSH10 0x152D02C7E14AF6800000 PUSH2 0x6FF JUMP JUMPDEST DUP2 PUSH1 0xFF AND PUSH1 0x1 EQ ISZERO PUSH2 0x104A JUMPI POP PUSH10 0xD3C21BCECCEDA1000000 PUSH2 0x6FF JUMP JUMPDEST DUP2 PUSH1 0xFF AND PUSH1 0x2 EQ ISZERO PUSH2 0x1068 JUMPI POP PUSH11 0x1A784379D99DB42000000 PUSH2 0x6FF JUMP JUMPDEST DUP2 PUSH1 0xFF AND PUSH1 0x3 EQ ISZERO PUSH2 0x1086 JUMPI POP PUSH11 0x27B46536C66C8E3000000 PUSH2 0x6FF JUMP JUMPDEST DUP2 PUSH1 0xFF AND PUSH1 0x4 EQ ISZERO PUSH2 0x10A4 JUMPI POP PUSH11 0x34F086F3B33B684000000 PUSH2 0x6FF JUMP JUMPDEST DUP2 PUSH1 0xFF AND PUSH1 0x5 EQ ISZERO PUSH2 0x6FF JUMPI POP PUSH11 0x422CA8B0A00A425000000 PUSH2 0x6FF JUMP JUMPDEST PUSH2 0x688 PUSH1 0x4 DUP3 PUSH4 0xFFFFFFFF PUSH2 0x115B AND JUMP JUMPDEST PUSH2 0x688 PUSH1 0x3 DUP3 PUSH4 0xFFFFFFFF PUSH2 0x115B AND JUMP JUMPDEST PUSH2 0x688 PUSH1 0x2 DUP3 PUSH4 0xFFFFFFFF PUSH2 0x115B AND JUMP JUMPDEST PUSH1 0x0 DUP1 SLOAD PUSH1 0xA0 PUSH1 0x2 EXP PUSH1 0xFF MUL NOT AND PUSH1 0xA0 PUSH1 0x2 EXP OR SWAP1 SSTORE JUMP JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP2 AND ISZERO ISZERO PUSH2 0x1122 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x112C DUP3 DUP3 PUSH2 0xFC8 JUMP JUMPDEST ISZERO PUSH2 0x1136 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP1 SLOAD PUSH1 0xFF NOT AND PUSH1 0x1 OR SWAP1 SSTORE JUMP JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP2 AND ISZERO ISZERO PUSH2 0x1170 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x117A DUP3 DUP3 PUSH2 0xFC8 JUMP JUMPDEST ISZERO ISZERO PUSH2 0x1185 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP1 SLOAD PUSH1 0xFF NOT AND SWAP1 SSTORE JUMP INVALID LOG1 PUSH6 0x627A7A723058 KECCAK256 LOG2 0xa7 0xd8 SHR 0x4b CALLCODE CALLDATACOPY 0xd8 CALLER 0xa7 SWAP3 RETURN 0xdd EQ 0xaf EXTCODEHASH DUP9 0xc7 0xc6 0xe7 0xd3 KECCAK256 PUSH5 0x8513595FCB 0xe0 NOT MSIZE 0x49 STOP 0x29 ", + "sourceMap": "619:5550:2:-;;;1311:647;8:9:-1;5:2;;;30:1;27;20:12;5:2;1311:647:2;;;;;;;;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;1311:647:2;;;;;;;;;;;;;;;;;;;155:8:7;:21;;166:10;-1:-1:-1;;;;;;155:21:7;;;;;-1:-1:-1;;;;;;187:19:7;;;;-1:-1:-1;635:29:5;;;;;-1:-1:-1;;;;;635:29:5;;;;;1311:647:2;;;;;;;362:22:4;;:10;;;;:22;:::i;:::-;366:24:1;379:10;366:12;;;;:24;:::i;:::-;364:26:3;379:10;364:14;;;;:26;:::i;:::-;1624:1:2;1612:13;;;;;1604:22;;;;;;-1:-1:-1;;;;;1645:33:2;;;;1637:42;;;;;;1708:19;1695:9;:32;;;;;;;;;1692:109;;;-1:-1:-1;;;;;1752:36:2;;;;1744:45;;;;;;1813:10;:22;;1826:9;;1813:10;-1:-1:-1;;1813:22:2;;1826:9;1813:22;;;;;;;;;;;;-1:-1:-1;;1846:9:2;:20;;-1:-1:-1;;1846:20:2;;;;;;;;;;;;;;;-1:-1:-1;;;;;;1877:28:2;;-1:-1:-1;;;;;1877:28:2;;;;;;;;1916:9;:34;;-1:-1:-1;;;;;;1916:34:2;;;;;;;;;;;-1:-1:-1;619:5550:2;;798:92:4;855:27;:14;874:7;855:18;;;;;;:27;:::i;:::-;798:92;:::o;822:96:1:-;881:29;:16;902:7;881:20;;;;;;:29;:::i;834:94:3:-;895:25;:12;912:7;895:16;;;;;;:25;:::i;259:181:8:-;-1:-1:-1;;;;;335:21:8;;;;327:30;;;;;;376:18;380:4;386:7;376:3;;;;:18;:::i;:::-;375:19;367:28;;;;;;-1:-1:-1;;;;;406:20:8;:11;:20;;;;;;;;;;;:27;;-1:-1:-1;;406:27:8;429:4;406:27;;;259:181::o;786:162::-;858:4;-1:-1:-1;;;;;882:21:8;;;;874:30;;;;;;-1:-1:-1;;;;;;921:20:8;:11;:20;;;;;;;;;;;;;;;786:162::o;619:5550:2:-;;;;;;;" + }, + "gasEstimates": { + "creation": { + "codeDepositCost": "912600", + "executionCost": "infinite", + "totalCost": "infinite" + }, + "external": { + "activateMiner()": "infinite", + "addCoreTeam(address)": "infinite", + "addSupervisor(address)": "infinite", + "addSystem(address)": "infinite", + "deactivateMiner()": "infinite", + "getCategory()": "474", + "getCurrentDay()": "581", + "getCurrentYear()": "473", + "getCurrentYearSupply()": "514", + "getMiner()": "635", + "getMinerType()": "501", + "getReferral()": "646", + "isAlgoMiner()": "300", + "isCoreTeam(address)": "infinite", + "isMining()": "880", + "isSupervisor(address)": "infinite", + "isSystem(address)": "infinite", + "migrateMiner(address)": "infinite", + "mine()": "infinite", + "pauseMining()": "infinite", + "renounceCoreTeam()": "infinite", + "renounceSupervisor()": "infinite", + "renounceSystem()": "infinite", + "resetMiner(address,address)": "infinite", + "resumeMining()": "infinite", + "startMining()": "21741", + "stopAndRemoveOwnership()": "infinite", + "stopMining()": "21695", + "terminate()": "infinite" + } + }, + "methodIdentifiers": { + "activateMiner()": "b2a32cd5", + "addCoreTeam(address)": "2e6b6849", + "addSupervisor(address)": "29d10b6e", + "addSystem(address)": "74be7592", + "deactivateMiner()": "9e614ca0", + "getCategory()": "80258e47", + "getCurrentDay()": "3e6968b6", + "getCurrentYear()": "ce41607a", + "getCurrentYearSupply()": "cdfd0f64", + "getMiner()": "302c11ca", + "getMinerType()": "4969ae70", + "getReferral()": "329b1c92", + "isAlgoMiner()": "1777fb4b", + "isCoreTeam(address)": "608d3d3d", + "isMining()": "19a74ab3", + "isSupervisor(address)": "81a24459", + "isSystem(address)": "34cdcf26", + "migrateMiner(address)": "231d4e2a", + "mine()": "99f4b251", + "pauseMining()": "162f986d", + "renounceCoreTeam()": "d43acc79", + "renounceSupervisor()": "be952494", + "renounceSystem()": "e9d61859", + "resetMiner(address,address)": "8329138f", + "resumeMining()": "427534a4", + "startMining()": "21b79d98", + "stopAndRemoveOwnership()": "363aa6c7", + "stopMining()": "da408679", + "terminate()": "0c08bf88" + } + }, + "metadata": "{\"compiler\":{\"version\":\"0.5.4+commit.9549d8ff\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":false,\"inputs\":[],\"name\":\"terminate\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"pauseMining\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isAlgoMiner\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isMining\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"startMining\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newMinerAddress\",\"type\":\"address\"}],\"name\":\"migrateMiner\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"addSupervisor\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"addCoreTeam\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getMiner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getReferral\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"isSystem\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"stopAndRemoveOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getCurrentDay\",\"outputs\":[{\"name\":\"\",\"type\":\"uint16\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"resumeMining\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getMinerType\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"isCoreTeam\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"addSystem\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getCategory\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"isSupervisor\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newOwnerAddress\",\"type\":\"address\"},{\"name\":\"newReferralAddress\",\"type\":\"address\"}],\"name\":\"resetMiner\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"mine\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"deactivateMiner\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"activateMiner\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceSupervisor\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getCurrentYearSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getCurrentYear\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceCoreTeam\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"stopMining\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceSystem\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"minerType\",\"type\":\"uint8\"},{\"name\":\"category\",\"type\":\"uint8\"},{\"name\":\"minerAccountAddress\",\"type\":\"address\"},{\"name\":\"referralAccountAddress\",\"type\":\"address\"},{\"name\":\"tokenAddress\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoMiner.sol\":\"AlgoMiner\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoCommon.sol\":{\"keccak256\":\"0x014debd2c96ba7aba7faef24eac1f1a5d46791b55ae55fbd51d7945bf21277e0\",\"urls\":[\"bzzr://b8d1cffc7f1bfdc8c911d90b785cf9c2723b24bd162d7cfd730e127f56932fe9\"]},\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoCoreTeamRole.sol\":{\"keccak256\":\"0x8252ea038586ac8cf89aea6810c1a75d84c2eba48d6b0ecc5f1783929de398a3\",\"urls\":[\"bzzr://3bd6a88368eeb6abb70573d16d481bc20bc22b6c0d3e60702c59c9fab4202528\"]},\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoMiner.sol\":{\"keccak256\":\"0xc2380a89ad6323344dd00f02f264f851dd49453de18e3dab8ed7cc13a1ee31db\",\"urls\":[\"bzzr://dcf790081bceacc3be474c4957629b5973332da040d44cf7969d80005b9671f1\"]},\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoSupervisorRole.sol\":{\"keccak256\":\"0xfe4e8871ec41a8a704bda1fb30939151f4efa4e8cfbf705b9a1c1c5eeee87af2\",\"urls\":[\"bzzr://03d0c6d4c57474c1d775e0829e5b097d5ecb7e6732c010cf39f2575f4df45b2d\"]},\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoSystemRole.sol\":{\"keccak256\":\"0x79678e2992aafe0c33260767eba0b3c95474a2f0902154841f4ac62012528e67\",\"urls\":[\"bzzr://a4efbd6113fb5941933b0e94b0135d2ea7150a538ec80b9b5288a85506337f94\"]},\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/ERC20TokenHolder.sol\":{\"keccak256\":\"0x2c964fd13fcc46f0326055bd50569f2bfb32ea7963780763d77b85ed51320205\",\"urls\":[\"bzzr://3fd83f4de7769670f420f04909921357a8ace3b9e0eb08b7c9df0ee57741d347\"]},\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/IAlgoMiner.sol\":{\"keccak256\":\"0x861339f0f02c28b332f5d8dc165127fa1a402bbbfd7c3923acca26a6139e4f2b\",\"urls\":[\"bzzr://87e5728ff1289cbcc9669fae3a5b994b3a4e0788a2673595adcac700eea8c411\"]},\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/Terminable.sol\":{\"keccak256\":\"0x8704856f4ea109e3df4805b3b3dd7d9b9026e94f80c42c6d750356d46036a530\",\"urls\":[\"bzzr://18db91d498a487cbc7085490ff2bf017849f88bb4032ea7d840bab3561c45cf4\"]},\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol\":{\"keccak256\":\"0x659ba0f9a3392cd50a8a5fafaf5dfd8c6a0878f6a4613bceff4e90dceddcd865\",\"urls\":[\"bzzr://f704341d520fbc98716541f1b3f67737f0ee6e94adf072a66acb2bd25d593c2b\"]},\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x965012d27b4262d7a41f5028cbb30c51ebd9ecd4be8fb30380aaa7a3c64fbc8b\",\"urls\":[\"bzzr://41ca38f6b0fa4b77b0feec43e422cfbec48b7eb38a41edf0b85c77e8d9a296b1\"]},\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x079c4e23ee448f529e43bfa3c4e8fb4be52cd0318ee923a276835bedf45b93d8\",\"urls\":[\"bzzr://48248e86f64407a95f241d6c5c8cfea6b4d4ebf4ebb467e5c98c8af3868fafe4\"]},\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol\":{\"keccak256\":\"0x05fcee7431cd35cd312e14e7f316a44ca3ccc5fb3b859aefc15c1a5db94add7e\",\"urls\":[\"bzzr://5ba67fb83aa7806883a335d53a27dcf1f53b75fa38dedd57893cc84633aa4d4c\"]}},\"version\":1}", + "userdoc": { + "methods": {} + } + } + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoSupervisorRole.sol": { + "AlgoSupervisorRole": { + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "addSupervisor", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "isSupervisor", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renounceSupervisor", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + } + ], + "devdoc": { + "methods": {} + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "gasEstimates": null, + "methodIdentifiers": { + "addSupervisor(address)": "29d10b6e", + "isSupervisor(address)": "81a24459", + "renounceSupervisor()": "be952494" + } + }, + "metadata": "", + "userdoc": { + "methods": {} + } + } + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoSystemRole.sol": { + "AlgoSystemRole": { + "abi": [ + { + "constant": true, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "isSystem", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "addSystem", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renounceSystem", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + } + ], + "devdoc": { + "methods": {} + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "gasEstimates": null, + "methodIdentifiers": { + "addSystem(address)": "74be7592", + "isSystem(address)": "34cdcf26", + "renounceSystem()": "e9d61859" + } + }, + "metadata": "", + "userdoc": { + "methods": {} + } + } + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/ERC20TokenHolder.sol": { + "ERC20TokenHolder": { + "abi": [ + { + "inputs": [ + { + "name": "tokenAddress", + "type": "address" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + } + ], + "devdoc": { + "methods": {} + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "gasEstimates": null, + "methodIdentifiers": {} + }, + "metadata": "", + "userdoc": { + "methods": {} + } + } + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/IAlgoMiner.sol": { + "IAlgoMiner": { + "abi": [ + { + "constant": true, + "inputs": [], + "name": "isAlgoMiner", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "pure", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "isMining", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getMiner", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getReferral", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getMinerType", + "outputs": [ + { + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getCategory", + "outputs": [ + { + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + } + ], + "devdoc": { + "methods": {} + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "gasEstimates": null, + "methodIdentifiers": { + "getCategory()": "80258e47", + "getMiner()": "302c11ca", + "getMinerType()": "4969ae70", + "getReferral()": "329b1c92", + "isAlgoMiner()": "1777fb4b", + "isMining()": "19a74ab3" + } + }, + "metadata": "", + "userdoc": { + "methods": {} + } + } + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/Terminable.sol": { + "Terminable": { + "abi": [ + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + } + ], + "devdoc": { + "methods": {} + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "gasEstimates": null, + "methodIdentifiers": {} + }, + "metadata": "", + "userdoc": { + "methods": {} + } + } + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol": { + "Roles": { + "abi": [], + "devdoc": { + "details": "Library for managing addresses assigned to a Role.", + "methods": {}, + "title": "Roles" + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea165627a7a7230582072caac54fe9b00b8b816307b2a5ded8de356c5be6012002ca36f81b18422d8260029", + "opcodes": "PUSH1 0x4C PUSH1 0x2C PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x0 DUP2 EQ PUSH1 0x1C JUMPI PUSH1 0x1E JUMP JUMPDEST INVALID JUMPDEST POP ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG1 PUSH6 0x627A7A723058 KECCAK256 PUSH19 0xCAAC54FE9B00B8B816307B2A5DED8DE356C5BE PUSH1 0x12 STOP 0x2c LOG3 PUSH16 0x81B18422D82600290000000000000000 ", + "sourceMap": "108:842:8:-;;132:2:-1;166:7;155:9;146:7;137:37;252:7;246:14;243:1;238:23;232:4;229:33;270:1;265:20;;;;222:63;;265:20;274:9;222:63;;298:9;295:1;288:20;328:4;319:7;311:22;352:7;343;336:24" + }, + "gasEstimates": { + "creation": { + "codeDepositCost": "15200", + "executionCost": "116", + "totalCost": "15316" + }, + "internal": { + "add(struct Roles.Role storage pointer,address)": "infinite", + "has(struct Roles.Role storage pointer,address)": "infinite", + "remove(struct Roles.Role storage pointer,address)": "infinite" + } + }, + "methodIdentifiers": {} + }, + "metadata": "{\"compiler\":{\"version\":\"0.5.4+commit.9549d8ff\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Library for managing addresses assigned to a Role.\",\"methods\":{},\"title\":\"Roles\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol\":\"Roles\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol\":{\"keccak256\":\"0x659ba0f9a3392cd50a8a5fafaf5dfd8c6a0878f6a4613bceff4e90dceddcd865\",\"urls\":[\"bzzr://f704341d520fbc98716541f1b3f67737f0ee6e94adf072a66acb2bd25d593c2b\"]}},\"version\":1}", + "userdoc": { + "methods": {} + } + } + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol": { + "SafeMath": { + "abi": [], + "devdoc": { + "details": "Unsigned math operations with safety checks that revert on error", + "methods": {}, + "title": "SafeMath" + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea165627a7a72305820c8fdc9a15986ffb647c7551d6f3c5b251c8209308e82491b559a3ee6cc289f670029", + "opcodes": "PUSH1 0x4C PUSH1 0x2C PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x0 DUP2 EQ PUSH1 0x1C JUMPI PUSH1 0x1E JUMP JUMPDEST INVALID JUMPDEST POP ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG1 PUSH6 0x627A7A723058 KECCAK256 0xc8 REVERT 0xc9 LOG1 MSIZE DUP7 SELFDESTRUCT 0xb6 0x47 0xc7 SSTORE SAR PUSH16 0x3C5B251C8209308E82491B559A3EE6CC 0x28 SWAP16 PUSH8 0x29000000000000 ", + "sourceMap": "125:1726:9:-;;132:2:-1;166:7;155:9;146:7;137:37;252:7;246:14;243:1;238:23;232:4;229:33;270:1;265:20;;;;222:63;;265:20;274:9;222:63;;298:9;295:1;288:20;328:4;319:7;311:22;352:7;343;336:24" + }, + "gasEstimates": { + "creation": { + "codeDepositCost": "15200", + "executionCost": "116", + "totalCost": "15316" + }, + "internal": { + "add(uint256,uint256)": "infinite", + "div(uint256,uint256)": "infinite", + "mod(uint256,uint256)": "infinite", + "mul(uint256,uint256)": "infinite", + "sub(uint256,uint256)": "infinite" + } + }, + "methodIdentifiers": {} + }, + "metadata": "{\"compiler\":{\"version\":\"0.5.4+commit.9549d8ff\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Unsigned math operations with safety checks that revert on error\",\"methods\":{},\"title\":\"SafeMath\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol\":\"SafeMath\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x965012d27b4262d7a41f5028cbb30c51ebd9ecd4be8fb30380aaa7a3c64fbc8b\",\"urls\":[\"bzzr://41ca38f6b0fa4b77b0feec43e422cfbec48b7eb38a41edf0b85c77e8d9a296b1\"]}},\"version\":1}", + "userdoc": { + "methods": {} + } + } + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol": { + "IERC20": { + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "spender", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "from", + "type": "address" + }, + { + "name": "to", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "who", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "to", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "owner", + "type": "address" + }, + { + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "from", + "type": "address" + }, + { + "indexed": true, + "name": "to", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + } + ], + "devdoc": { + "details": "see https://github.com/ethereum/EIPs/issues/20", + "methods": {}, + "title": "ERC20 interface" + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "gasEstimates": null, + "methodIdentifiers": { + "allowance(address,address)": "dd62ed3e", + "approve(address,uint256)": "095ea7b3", + "balanceOf(address)": "70a08231", + "totalSupply()": "18160ddd", + "transfer(address,uint256)": "a9059cbb", + "transferFrom(address,address,uint256)": "23b872dd" + } + }, + "metadata": "", + "userdoc": { + "methods": {} + } + } + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol": { + "SafeERC20": { + "abi": [], + "devdoc": { + "details": "Wrappers around ERC20 operations that throw on failure. To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract, which allows you to call the safe operations as `token.safeTransfer(...)`, etc.", + "methods": {}, + "title": "SafeERC20" + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea165627a7a72305820f19c7b62e065f91bc3f26e33372ab3fae2852e0b472cd6bb775c347272d9d5120029", + "opcodes": "PUSH1 0x4C PUSH1 0x2C PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x0 DUP2 EQ PUSH1 0x1C JUMPI PUSH1 0x1E JUMP JUMPDEST INVALID JUMPDEST POP ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG1 PUSH6 0x627A7A723058 KECCAK256 CALL SWAP13 PUSH28 0x62E065F91BC3F26E33372AB3FAE2852E0B472CD6BB775C347272D9D5 SLT STOP 0x29 ", + "sourceMap": "352:1248:11:-;;132:2:-1;166:7;155:9;146:7;137:37;252:7;246:14;243:1;238:23;232:4;229:33;270:1;265:20;;;;222:63;;265:20;274:9;222:63;;298:9;295:1;288:20;328:4;319:7;311:22;352:7;343;336:24" + }, + "gasEstimates": { + "creation": { + "codeDepositCost": "15200", + "executionCost": "116", + "totalCost": "15316" + }, + "internal": { + "safeApprove(contract IERC20,address,uint256)": "infinite", + "safeDecreaseAllowance(contract IERC20,address,uint256)": "infinite", + "safeIncreaseAllowance(contract IERC20,address,uint256)": "infinite", + "safeTransfer(contract IERC20,address,uint256)": "infinite", + "safeTransferFrom(contract IERC20,address,address,uint256)": "infinite" + } + }, + "methodIdentifiers": {} + }, + "metadata": "{\"compiler\":{\"version\":\"0.5.4+commit.9549d8ff\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Wrappers around ERC20 operations that throw on failure. To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract, which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\",\"methods\":{},\"title\":\"SafeERC20\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol\":\"SafeERC20\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x965012d27b4262d7a41f5028cbb30c51ebd9ecd4be8fb30380aaa7a3c64fbc8b\",\"urls\":[\"bzzr://41ca38f6b0fa4b77b0feec43e422cfbec48b7eb38a41edf0b85c77e8d9a296b1\"]},\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x079c4e23ee448f529e43bfa3c4e8fb4be52cd0318ee923a276835bedf45b93d8\",\"urls\":[\"bzzr://48248e86f64407a95f241d6c5c8cfea6b4d4ebf4ebb467e5c98c8af3868fafe4\"]},\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol\":{\"keccak256\":\"0x05fcee7431cd35cd312e14e7f316a44ca3ccc5fb3b859aefc15c1a5db94add7e\",\"urls\":[\"bzzr://5ba67fb83aa7806883a335d53a27dcf1f53b75fa38dedd57893cc84633aa4d4c\"]}},\"version\":1}", + "userdoc": { + "methods": {} + } + } + } + }, + "sources": { + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoCommon.sol": { + "ast": { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoCommon.sol", + "exportedSymbols": { + "AlgoCommon": [ + 97 + ] + }, + "id": 98, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "0.5", + ".4" + ], + "nodeType": "PragmaDirective", + "src": "0:22:0" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 97, + "linearizedBaseContracts": [ + 97 + ], + "name": "AlgoCommon", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": true, + "id": 8, + "name": "TOKEN_FACTOR", + "nodeType": "VariableDeclaration", + "scope": 97, + "src": "55:58:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "55:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 3, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "96:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "3138", + "id": 5, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "110:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_18_by_1", + "typeString": "int_const 18" + }, + "value": "18" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_18_by_1", + "typeString": "int_const 18" + } + ], + "id": 4, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "102:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": "uint256" + }, + "id": 6, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "102:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "96:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 13, + "name": "CAT_0_VALUE", + "nodeType": "VariableDeclaration", + "scope": 97, + "src": "120:61:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "120:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 12, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "313030303030", + "id": 10, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "160:6:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_100000_by_1", + "typeString": "int_const 100000" + }, + "value": "100000" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 11, + "name": "TOKEN_FACTOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "169:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "160:21:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 18, + "name": "CAT_1_VALUE", + "nodeType": "VariableDeclaration", + "scope": 97, + "src": "188:62:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "188:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 17, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "31303030303030", + "id": 15, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "228:7:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000_by_1", + "typeString": "int_const 1000000" + }, + "value": "1000000" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 16, + "name": "TOKEN_FACTOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "238:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "228:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 25, + "name": "CAT_2_VALUE", + "nodeType": "VariableDeclaration", + "scope": 97, + "src": "257:66:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "257:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 24, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_rational_2000000_by_1", + "typeString": "int_const 2000000" + }, + "id": 22, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 20, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "297:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31303030303030", + "id": 21, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "301:7:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000_by_1", + "typeString": "int_const 1000000" + }, + "value": "1000000" + }, + "src": "297:11:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_2000000_by_1", + "typeString": "int_const 2000000" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 23, + "name": "TOKEN_FACTOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "311:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "297:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 32, + "name": "CAT_3_VALUE", + "nodeType": "VariableDeclaration", + "scope": 97, + "src": "330:66:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 26, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "330:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 31, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_rational_3000000_by_1", + "typeString": "int_const 3000000" + }, + "id": 29, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "33", + "id": 27, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "370:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31303030303030", + "id": 28, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "374:7:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000_by_1", + "typeString": "int_const 1000000" + }, + "value": "1000000" + }, + "src": "370:11:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_3000000_by_1", + "typeString": "int_const 3000000" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 30, + "name": "TOKEN_FACTOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "384:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "370:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 39, + "name": "CAT_4_VALUE", + "nodeType": "VariableDeclaration", + "scope": 97, + "src": "403:66:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 33, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "403:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 38, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_rational_4000000_by_1", + "typeString": "int_const 4000000" + }, + "id": 36, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "34", + "id": 34, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "443:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31303030303030", + "id": 35, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "447:7:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000_by_1", + "typeString": "int_const 1000000" + }, + "value": "1000000" + }, + "src": "443:11:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_4000000_by_1", + "typeString": "int_const 4000000" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 37, + "name": "TOKEN_FACTOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "457:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "443:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 46, + "name": "CAT_5_VALUE", + "nodeType": "VariableDeclaration", + "scope": 97, + "src": "476:66:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 40, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "476:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 45, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_rational_5000000_by_1", + "typeString": "int_const 5000000" + }, + "id": 43, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "35", + "id": 41, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "516:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31303030303030", + "id": 42, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "520:7:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000_by_1", + "typeString": "int_const 1000000" + }, + "value": "1000000" + }, + "src": "516:11:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_5000000_by_1", + "typeString": "int_const 5000000" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 44, + "name": "TOKEN_FACTOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "530:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "516:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "body": { + "id": 95, + "nodeType": "Block", + "src": "630:426:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 55, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 53, + "name": "category", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48, + "src": "644:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 54, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "656:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "644:13:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 61, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 59, + "name": "category", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48, + "src": "713:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 60, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "725:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "713:13:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 67, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 65, + "name": "category", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48, + "src": "782:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 66, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "794:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "782:13:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 73, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 71, + "name": "category", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48, + "src": "851:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "33", + "id": 72, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "863:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "src": "851:13:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 79, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 77, + "name": "category", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48, + "src": "920:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "34", + "id": 78, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "932:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "src": "920:13:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 85, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 83, + "name": "category", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48, + "src": "989:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "35", + "id": 84, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1001:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "src": "989:13:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 89, + "nodeType": "IfStatement", + "src": "986:63:0", + "trueBody": { + "id": 88, + "nodeType": "Block", + "src": "1004:45:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 86, + "name": "CAT_5_VALUE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46, + "src": "1026:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 52, + "id": 87, + "nodeType": "Return", + "src": "1019:18:0" + } + ] + } + }, + "id": 90, + "nodeType": "IfStatement", + "src": "917:132:0", + "trueBody": { + "id": 82, + "nodeType": "Block", + "src": "935:45:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 80, + "name": "CAT_4_VALUE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 39, + "src": "957:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 52, + "id": 81, + "nodeType": "Return", + "src": "950:18:0" + } + ] + } + }, + "id": 91, + "nodeType": "IfStatement", + "src": "848:201:0", + "trueBody": { + "id": 76, + "nodeType": "Block", + "src": "866:45:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 74, + "name": "CAT_3_VALUE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 32, + "src": "888:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 52, + "id": 75, + "nodeType": "Return", + "src": "881:18:0" + } + ] + } + }, + "id": 92, + "nodeType": "IfStatement", + "src": "779:270:0", + "trueBody": { + "id": 70, + "nodeType": "Block", + "src": "797:45:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 68, + "name": "CAT_2_VALUE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 25, + "src": "819:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 52, + "id": 69, + "nodeType": "Return", + "src": "812:18:0" + } + ] + } + }, + "id": 93, + "nodeType": "IfStatement", + "src": "710:339:0", + "trueBody": { + "id": 64, + "nodeType": "Block", + "src": "728:45:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 62, + "name": "CAT_1_VALUE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18, + "src": "750:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 52, + "id": 63, + "nodeType": "Return", + "src": "743:18:0" + } + ] + } + }, + "id": 94, + "nodeType": "IfStatement", + "src": "641:408:0", + "trueBody": { + "id": 58, + "nodeType": "Block", + "src": "659:45:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 56, + "name": "CAT_0_VALUE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13, + "src": "681:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 52, + "id": 57, + "nodeType": "Return", + "src": "674:18:0" + } + ] + } + } + ] + }, + "documentation": null, + "id": 96, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCapacityByCategory", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 49, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 48, + "name": "category", + "nodeType": "VariableDeclaration", + "scope": 96, + "src": "582:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 47, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "582:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "581:16:0" + }, + "returnParameters": { + "id": 52, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 51, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 96, + "src": "621:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 50, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "621:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "620:9:0" + }, + "scope": 97, + "src": "551:505:0", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 98, + "src": "26:1033:0" + } + ], + "src": "0:1059:0" + }, + "id": 0 + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoCoreTeamRole.sol": { + "ast": { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoCoreTeamRole.sol", + "exportedSymbols": { + "AlgoCoreTeamRole": [ + 184 + ] + }, + "id": 185, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 99, + "literals": [ + "solidity", + "0.5", + ".4" + ], + "nodeType": "PragmaDirective", + "src": "0:22:1" + }, + { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol", + "file": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol", + "id": 100, + "nodeType": "ImportDirective", + "scope": 185, + "sourceUnit": 1178, + "src": "26:189:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 184, + "linearizedBaseContracts": [ + 184 + ], + "name": "AlgoCoreTeamRole", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 103, + "libraryName": { + "contractScope": null, + "id": 101, + "name": "Roles", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1177, + "src": "258:5:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Roles_$1177", + "typeString": "library Roles" + } + }, + "nodeType": "UsingForDirective", + "src": "252:27:1", + "typeName": { + "contractScope": null, + "id": 102, + "name": "Roles.Role", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1090, + "src": "268:10:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$1090_storage_ptr", + "typeString": "struct Roles.Role" + } + } + }, + { + "constant": false, + "id": 105, + "name": "_coreTeamMembers", + "nodeType": "VariableDeclaration", + "scope": 184, + "src": "287:35:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$1090_storage", + "typeString": "struct Roles.Role" + }, + "typeName": { + "contractScope": null, + "id": 104, + "name": "Roles.Role", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1090, + "src": "287:10:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$1090_storage_ptr", + "typeString": "struct Roles.Role" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 113, + "nodeType": "Block", + "src": "355:43:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 109, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1534, + "src": "379:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 110, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "379:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 108, + "name": "_addCoreTeam", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 171, + "src": "366:12:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 111, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "366:24:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 112, + "nodeType": "ExpressionStatement", + "src": "366:24:1" + } + ] + }, + "documentation": null, + "id": 114, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 106, + "nodeType": "ParameterList", + "parameters": [], + "src": "343:2:1" + }, + "returnParameters": { + "id": 107, + "nodeType": "ParameterList", + "parameters": [], + "src": "355:0:1" + }, + "scope": 184, + "src": "331:67:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 124, + "nodeType": "Block", + "src": "430:62:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 118, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1534, + "src": "460:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "460:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 117, + "name": "isCoreTeam", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 138, + "src": "449:10:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 120, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "449:22:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 116, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1537, + 1538 + ], + "referencedDeclaration": 1537, + "src": "441:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 121, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "441:31:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 122, + "nodeType": "ExpressionStatement", + "src": "441:31:1" + }, + { + "id": 123, + "nodeType": "PlaceholderStatement", + "src": "483:1:1" + } + ] + }, + "documentation": null, + "id": 125, + "name": "onlyCoreTeam", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 115, + "nodeType": "ParameterList", + "parameters": [], + "src": "427:2:1" + }, + "src": "406:86:1", + "visibility": "internal" + }, + { + "body": { + "id": 137, + "nodeType": "Block", + "src": "564:55:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 134, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 127, + "src": "603:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 132, + "name": "_coreTeamMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 105, + "src": "582:16:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$1090_storage", + "typeString": "struct Roles.Role storage ref" + } + }, + "id": 133, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "has", + "nodeType": "MemberAccess", + "referencedDeclaration": 1176, + "src": "582:20:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Role_$1090_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Role_$1090_storage_ptr_$", + "typeString": "function (struct Roles.Role storage pointer,address) view returns (bool)" + } + }, + "id": 135, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "582:29:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 131, + "id": 136, + "nodeType": "Return", + "src": "575:36:1" + } + ] + }, + "documentation": null, + "id": 138, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isCoreTeam", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 128, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 127, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 138, + "src": "520:15:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 126, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "520:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "519:17:1" + }, + "returnParameters": { + "id": 131, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 130, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 138, + "src": "558:4:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 129, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "558:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "557:6:1" + }, + "scope": 184, + "src": "500:119:1", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 149, + "nodeType": "Block", + "src": "685:40:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 146, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 140, + "src": "709:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 145, + "name": "_addCoreTeam", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 171, + "src": "696:12:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 147, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "696:21:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 148, + "nodeType": "ExpressionStatement", + "src": "696:21:1" + } + ] + }, + "documentation": null, + "id": 150, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 143, + "modifierName": { + "argumentTypes": null, + "id": 142, + "name": "onlyCoreTeam", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 125, + "src": "672:12:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "672:12:1" + } + ], + "name": "addCoreTeam", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 141, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 140, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 150, + "src": "648:15:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 139, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "648:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "647:17:1" + }, + "returnParameters": { + "id": 144, + "nodeType": "ParameterList", + "parameters": [], + "src": "685:0:1" + }, + "scope": 184, + "src": "627:98:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 158, + "nodeType": "Block", + "src": "768:46:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 154, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1534, + "src": "795:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 155, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "795:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 153, + "name": "_removeCoreTeam", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 183, + "src": "779:15:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 156, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "779:27:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 157, + "nodeType": "ExpressionStatement", + "src": "779:27:1" + } + ] + }, + "documentation": null, + "id": 159, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "renounceCoreTeam", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 151, + "nodeType": "ParameterList", + "parameters": [], + "src": "758:2:1" + }, + "returnParameters": { + "id": 152, + "nodeType": "ParameterList", + "parameters": [], + "src": "768:0:1" + }, + "scope": 184, + "src": "733:81:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 170, + "nodeType": "Block", + "src": "870:48:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 167, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 161, + "src": "902:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 164, + "name": "_coreTeamMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 105, + "src": "881:16:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$1090_storage", + "typeString": "struct Roles.Role storage ref" + } + }, + "id": 166, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1122, + "src": "881:20:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Role_$1090_storage_ptr_$_t_address_$returns$__$bound_to$_t_struct$_Role_$1090_storage_ptr_$", + "typeString": "function (struct Roles.Role storage pointer,address)" + } + }, + "id": 168, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "881:29:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 169, + "nodeType": "ExpressionStatement", + "src": "881:29:1" + } + ] + }, + "documentation": null, + "id": 171, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_addCoreTeam", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 162, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 161, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 171, + "src": "844:15:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 160, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "844:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "843:17:1" + }, + "returnParameters": { + "id": 163, + "nodeType": "ParameterList", + "parameters": [], + "src": "870:0:1" + }, + "scope": 184, + "src": "822:96:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 182, + "nodeType": "Block", + "src": "977:51:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 179, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 173, + "src": "1012:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 176, + "name": "_coreTeamMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 105, + "src": "988:16:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$1090_storage", + "typeString": "struct Roles.Role storage ref" + } + }, + "id": 178, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "remove", + "nodeType": "MemberAccess", + "referencedDeclaration": 1153, + "src": "988:23:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Role_$1090_storage_ptr_$_t_address_$returns$__$bound_to$_t_struct$_Role_$1090_storage_ptr_$", + "typeString": "function (struct Roles.Role storage pointer,address)" + } + }, + "id": 180, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "988:32:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 181, + "nodeType": "ExpressionStatement", + "src": "988:32:1" + } + ] + }, + "documentation": null, + "id": 183, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_removeCoreTeam", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 174, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 173, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 183, + "src": "951:15:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 172, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "951:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "950:17:1" + }, + "returnParameters": { + "id": 175, + "nodeType": "ParameterList", + "parameters": [], + "src": "977:0:1" + }, + "scope": 184, + "src": "926:102:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 185, + "src": "219:812:1" + } + ], + "src": "0:1033:1" + }, + "id": 1 + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoMiner.sol": { + "ast": { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoMiner.sol", + "exportedSymbols": { + "AlgoMiner": [ + 782 + ] + }, + "id": 783, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 186, + "literals": [ + "solidity", + "0.5", + ".4" + ], + "nodeType": "PragmaDirective", + "src": "0:22:2" + }, + { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "file": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "id": 187, + "nodeType": "ImportDirective", + "scope": 783, + "sourceUnit": 1375, + "src": "26:195:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol", + "file": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol", + "id": 188, + "nodeType": "ImportDirective", + "scope": 783, + "sourceUnit": 1520, + "src": "223:198:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/IAlgoMiner.sol", + "file": "./IAlgoMiner.sol", + "id": 189, + "nodeType": "ImportDirective", + "scope": 783, + "sourceUnit": 1047, + "src": "425:26:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoCommon.sol", + "file": "./AlgoCommon.sol", + "id": 190, + "nodeType": "ImportDirective", + "scope": 783, + "sourceUnit": 98, + "src": "453:26:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/ERC20TokenHolder.sol", + "file": "./ERC20TokenHolder.sol", + "id": 191, + "nodeType": "ImportDirective", + "scope": 783, + "sourceUnit": 1014, + "src": "481:32:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoSystemRole.sol", + "file": "./AlgoSystemRole.sol", + "id": 192, + "nodeType": "ImportDirective", + "scope": 783, + "sourceUnit": 957, + "src": "515:30:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoCoreTeamRole.sol", + "file": "./AlgoCoreTeamRole.sol", + "id": 193, + "nodeType": "ImportDirective", + "scope": 783, + "sourceUnit": 185, + "src": "547:32:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoSupervisorRole.sol", + "file": "./AlgoSupervisorRole.sol", + "id": 194, + "nodeType": "ImportDirective", + "scope": 783, + "sourceUnit": 870, + "src": "581:34:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 195, + "name": "AlgoCommon", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 97, + "src": "641:10:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_AlgoCommon_$97", + "typeString": "contract AlgoCommon" + } + }, + "id": 196, + "nodeType": "InheritanceSpecifier", + "src": "641:10:2" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 197, + "name": "ERC20TokenHolder", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1013, + "src": "653:16:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20TokenHolder_$1013", + "typeString": "contract ERC20TokenHolder" + } + }, + "id": 198, + "nodeType": "InheritanceSpecifier", + "src": "653:16:2" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 199, + "name": "AlgoSystemRole", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 956, + "src": "671:14:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_AlgoSystemRole_$956", + "typeString": "contract AlgoSystemRole" + } + }, + "id": 200, + "nodeType": "InheritanceSpecifier", + "src": "671:14:2" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 201, + "name": "AlgoCoreTeamRole", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 184, + "src": "687:16:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_AlgoCoreTeamRole_$184", + "typeString": "contract AlgoCoreTeamRole" + } + }, + "id": 202, + "nodeType": "InheritanceSpecifier", + "src": "687:16:2" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 203, + "name": "AlgoSupervisorRole", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 869, + "src": "705:18:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_AlgoSupervisorRole_$869", + "typeString": "contract AlgoSupervisorRole" + } + }, + "id": 204, + "nodeType": "InheritanceSpecifier", + "src": "705:18:2" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 205, + "name": "IAlgoMiner", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1046, + "src": "725:10:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IAlgoMiner_$1046", + "typeString": "contract IAlgoMiner" + } + }, + "id": 206, + "nodeType": "InheritanceSpecifier", + "src": "725:10:2" + } + ], + "contractDependencies": [ + 1013, + 1046, + 1083, + 869, + 97, + 184, + 956 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 782, + "linearizedBaseContracts": [ + 782, + 1046, + 869, + 184, + 956, + 1013, + 1083, + 97 + ], + "name": "AlgoMiner", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 209, + "libraryName": { + "contractScope": null, + "id": 207, + "name": "SafeERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1519, + "src": "749:9:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeERC20_$1519", + "typeString": "library SafeERC20" + } + }, + "nodeType": "UsingForDirective", + "src": "743:27:2", + "typeName": { + "contractScope": null, + "id": 208, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1374, + "src": "763:6:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1374", + "typeString": "contract IERC20" + } + } + }, + { + "constant": true, + "id": 212, + "name": "DAYS_PER_YEAR", + "nodeType": "VariableDeclaration", + "scope": 782, + "src": "778:44:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 210, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "778:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "333635", + "id": 211, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "819:3:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_365_by_1", + "typeString": "int_const 365" + }, + "value": "365" + }, + "visibility": "private" + }, + { + "canonicalName": "AlgoMiner.MinerType", + "id": 215, + "members": [ + { + "id": 213, + "name": "PoolBased", + "nodeType": "EnumValue", + "src": "857:9:2" + }, + { + "id": 214, + "name": "NonPoolBased", + "nodeType": "EnumValue", + "src": "877:12:2" + } + ], + "name": "MinerType", + "nodeType": "EnumDefinition", + "src": "831:65:2" + }, + { + "canonicalName": "AlgoMiner.MinerState", + "id": 220, + "members": [ + { + "id": 216, + "name": "Deactivated", + "nodeType": "EnumValue", + "src": "931:11:2" + }, + { + "id": 217, + "name": "Activated", + "nodeType": "EnumValue", + "src": "953:9:2" + }, + { + "id": 218, + "name": "Suspended", + "nodeType": "EnumValue", + "src": "973:9:2" + }, + { + "id": 219, + "name": "Stopped", + "nodeType": "EnumValue", + "src": "993:7:2" + } + ], + "name": "MinerState", + "nodeType": "EnumDefinition", + "src": "904:103:2" + }, + { + "constant": false, + "id": 222, + "name": "_minerType", + "nodeType": "VariableDeclaration", + "scope": 782, + "src": "1015:28:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerType_$215", + "typeString": "enum AlgoMiner.MinerType" + }, + "typeName": { + "contractScope": null, + "id": 221, + "name": "MinerType", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 215, + "src": "1015:9:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerType_$215", + "typeString": "enum AlgoMiner.MinerType" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 224, + "name": "_category", + "nodeType": "VariableDeclaration", + "scope": 782, + "src": "1050:23:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 223, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1050:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 226, + "name": "_miner", + "nodeType": "VariableDeclaration", + "scope": 782, + "src": "1080:22:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 225, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1080:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 228, + "name": "_referral", + "nodeType": "VariableDeclaration", + "scope": 782, + "src": "1109:25:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 227, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1109:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 230, + "name": "_state", + "nodeType": "VariableDeclaration", + "scope": 782, + "src": "1143:25:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$220", + "typeString": "enum AlgoMiner.MinerState" + }, + "typeName": { + "contractScope": null, + "id": 229, + "name": "MinerState", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 220, + "src": "1143:10:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$220", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 232, + "name": "_mining", + "nodeType": "VariableDeclaration", + "scope": 782, + "src": "1175:20:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 231, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1175:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 234, + "name": "_currentYear", + "nodeType": "VariableDeclaration", + "scope": 782, + "src": "1202:26:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 233, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1202:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 236, + "name": "_currentDay", + "nodeType": "VariableDeclaration", + "scope": 782, + "src": "1235:26:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 235, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "1235:6:2", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 238, + "name": "_currentYearSupply", + "nodeType": "VariableDeclaration", + "scope": 782, + "src": "1268:34:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 237, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1268:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 304, + "nodeType": "Block", + "src": "1583:375:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 263, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 261, + "name": "category", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 242, + "src": "1612:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "35", + "id": 262, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1624:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "src": "1612:13:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 260, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1537, + 1538 + ], + "referencedDeclaration": 1537, + "src": "1604:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 264, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1604:22:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 265, + "nodeType": "ExpressionStatement", + "src": "1604:22:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 271, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 267, + "name": "minerAccountAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 244, + "src": "1645:19:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 269, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1676:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 268, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1668:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 270, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1668:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "1645:33:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 266, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1537, + 1538 + ], + "referencedDeclaration": 1537, + "src": "1637:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 272, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1637:42:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 273, + "nodeType": "ExpressionStatement", + "src": "1637:42:2" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_enum$_MinerType_$215", + "typeString": "enum AlgoMiner.MinerType" + }, + "id": 277, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 274, + "name": "minerType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 240, + "src": "1695:9:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerType_$215", + "typeString": "enum AlgoMiner.MinerType" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 275, + "name": "MinerType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 215, + "src": "1708:9:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_MinerType_$215_$", + "typeString": "type(enum AlgoMiner.MinerType)" + } + }, + "id": 276, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "PoolBased", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1708:19:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerType_$215", + "typeString": "enum AlgoMiner.MinerType" + } + }, + "src": "1695:32:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 287, + "nodeType": "IfStatement", + "src": "1692:109:2", + "trueBody": { + "id": 286, + "nodeType": "Block", + "src": "1729:72:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 283, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 279, + "name": "referralAccountAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 246, + "src": "1752:22:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 281, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1786:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 280, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1778:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 282, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1778:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "1752:36:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 278, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1537, + 1538 + ], + "referencedDeclaration": 1537, + "src": "1744:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 284, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1744:45:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 285, + "nodeType": "ExpressionStatement", + "src": "1744:45:2" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "id": 290, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 288, + "name": "_minerType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 222, + "src": "1813:10:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerType_$215", + "typeString": "enum AlgoMiner.MinerType" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 289, + "name": "minerType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 240, + "src": "1826:9:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerType_$215", + "typeString": "enum AlgoMiner.MinerType" + } + }, + "src": "1813:22:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerType_$215", + "typeString": "enum AlgoMiner.MinerType" + } + }, + "id": 291, + "nodeType": "ExpressionStatement", + "src": "1813:22:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 294, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 292, + "name": "_category", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 224, + "src": "1846:9:2", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 293, + "name": "category", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 242, + "src": "1858:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "1846:20:2", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 295, + "nodeType": "ExpressionStatement", + "src": "1846:20:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 296, + "name": "_miner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 226, + "src": "1877:6:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 297, + "name": "minerAccountAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 244, + "src": "1886:19:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1877:28:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 299, + "nodeType": "ExpressionStatement", + "src": "1877:28:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 302, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 300, + "name": "_referral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 228, + "src": "1916:9:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 301, + "name": "referralAccountAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 246, + "src": "1928:22:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1916:34:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 303, + "nodeType": "ExpressionStatement", + "src": "1916:34:2" + } + ] + }, + "documentation": null, + "id": 305, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 251, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 248, + "src": "1469:12:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 252, + "modifierName": { + "argumentTypes": null, + "id": 250, + "name": "ERC20TokenHolder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1013, + "src": "1452:16:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20TokenHolder_$1013_$", + "typeString": "type(contract ERC20TokenHolder)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1452:30:2" + }, + { + "arguments": [], + "id": 254, + "modifierName": { + "argumentTypes": null, + "id": 253, + "name": "AlgoSystemRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 956, + "src": "1492:14:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AlgoSystemRole_$956_$", + "typeString": "type(contract AlgoSystemRole)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1492:16:2" + }, + { + "arguments": [], + "id": 256, + "modifierName": { + "argumentTypes": null, + "id": 255, + "name": "AlgoCoreTeamRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "1518:16:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AlgoCoreTeamRole_$184_$", + "typeString": "type(contract AlgoCoreTeamRole)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1518:18:2" + }, + { + "arguments": [], + "id": 258, + "modifierName": { + "argumentTypes": null, + "id": 257, + "name": "AlgoSupervisorRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 869, + "src": "1546:18:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AlgoSupervisorRole_$869_$", + "typeString": "type(contract AlgoSupervisorRole)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1546:20:2" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 249, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 240, + "name": "minerType", + "nodeType": "VariableDeclaration", + "scope": 305, + "src": "1323:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerType_$215", + "typeString": "enum AlgoMiner.MinerType" + }, + "typeName": { + "contractScope": null, + "id": 239, + "name": "MinerType", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 215, + "src": "1323:9:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerType_$215", + "typeString": "enum AlgoMiner.MinerType" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 242, + "name": "category", + "nodeType": "VariableDeclaration", + "scope": 305, + "src": "1344:14:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 241, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1344:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 244, + "name": "minerAccountAddress", + "nodeType": "VariableDeclaration", + "scope": 305, + "src": "1360:27:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 243, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1360:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 246, + "name": "referralAccountAddress", + "nodeType": "VariableDeclaration", + "scope": 305, + "src": "1389:30:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 245, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1389:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 248, + "name": "tokenAddress", + "nodeType": "VariableDeclaration", + "scope": 305, + "src": "1421:20:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 247, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1421:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1322:120:2" + }, + "returnParameters": { + "id": 259, + "nodeType": "ParameterList", + "parameters": [], + "src": "1583:0:2" + }, + "scope": 782, + "src": "1311:647:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 315, + "nodeType": "Block", + "src": "1987:60:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 311, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 308, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1534, + "src": "2006:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 309, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2006:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 310, + "name": "_miner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 226, + "src": "2020:6:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2006:20:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 307, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1537, + 1538 + ], + "referencedDeclaration": 1537, + "src": "1998:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 312, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1998:29:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 313, + "nodeType": "ExpressionStatement", + "src": "1998:29:2" + }, + { + "id": 314, + "nodeType": "PlaceholderStatement", + "src": "2038:1:2" + } + ] + }, + "documentation": null, + "id": 316, + "name": "onlyMiner", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 306, + "nodeType": "ParameterList", + "parameters": [], + "src": "1984:2:2" + }, + "src": "1966:81:2", + "visibility": "internal" + }, + { + "body": { + "id": 382, + "nodeType": "Block", + "src": "2118:512:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_enum$_MinerState_$220", + "typeString": "enum AlgoMiner.MinerState" + }, + "id": 327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 324, + "name": "_state", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 230, + "src": "2137:6:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$220", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 325, + "name": "MinerState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 220, + "src": "2147:10:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_MinerState_$220_$", + "typeString": "type(enum AlgoMiner.MinerState)" + } + }, + "id": 326, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Deactivated", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2147:22:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$220", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "src": "2137:32:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 323, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1537, + 1538 + ], + "referencedDeclaration": 1537, + "src": "2129:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 328, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2129:41:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 329, + "nodeType": "ExpressionStatement", + "src": "2129:41:2" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 337, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_enum$_MinerType_$215", + "typeString": "enum AlgoMiner.MinerType" + }, + "id": 333, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 330, + "name": "_minerType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 222, + "src": "2186:10:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerType_$215", + "typeString": "enum AlgoMiner.MinerType" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 331, + "name": "MinerType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 215, + "src": "2200:9:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_MinerType_$215_$", + "typeString": "type(enum AlgoMiner.MinerType)" + } + }, + "id": 332, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "PoolBased", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2200:19:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerType_$215", + "typeString": "enum AlgoMiner.MinerType" + } + }, + "src": "2186:33:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 336, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 334, + "name": "_currentYearSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 238, + "src": "2223:18:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 335, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2245:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2223:23:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2186:60:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 376, + "nodeType": "IfStatement", + "src": "2183:398:2", + "trueBody": { + "id": 375, + "nodeType": "Block", + "src": "2248:333:2", + "statements": [ + { + "assignments": [ + 339 + ], + "declarations": [ + { + "constant": false, + "id": 339, + "name": "capacity", + "nodeType": "VariableDeclaration", + "scope": 375, + "src": "2265:16:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 338, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2265:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 343, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 341, + "name": "_category", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 224, + "src": "2306:9:2", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 340, + "name": "getCapacityByCategory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 96, + "src": "2284:21:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_uint256_$", + "typeString": "function (uint8) pure returns (uint256)" + } + }, + "id": 342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2284:32:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2265:51:2" + }, + { + "assignments": [ + 345 + ], + "declarations": [ + { + "constant": false, + "id": 345, + "name": "expectedBalance", + "nodeType": "VariableDeclaration", + "scope": 375, + "src": "2331:23:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 344, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2331:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 353, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 352, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 346, + "name": "capacity", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 339, + "src": "2357:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 351, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 349, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 347, + "name": "capacity", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 339, + "src": "2368:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 348, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2379:2:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "src": "2368:13:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "313030", + "id": 350, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2384:3:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_100_by_1", + "typeString": "int_const 100" + }, + "value": "100" + }, + "src": "2368:19:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2357:30:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2331:56:2" + }, + { + "assignments": [ + 355 + ], + "declarations": [ + { + "constant": false, + "id": 355, + "name": "currentBalance", + "nodeType": "VariableDeclaration", + "scope": 375, + "src": "2404:22:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 354, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2404:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 362, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 359, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1570, + "src": "2454:4:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_AlgoMiner_$782", + "typeString": "contract AlgoMiner" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_AlgoMiner_$782", + "typeString": "contract AlgoMiner" + } + ], + "id": 358, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2446:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2446:13:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 356, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 968, + "src": "2429:6:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1374", + "typeString": "contract IERC20" + } + }, + "id": 357, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1348, + "src": "2429:16:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 361, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2429:31:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2404:56:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 366, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 364, + "name": "currentBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 355, + "src": "2485:14:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 365, + "name": "expectedBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 345, + "src": "2503:15:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2485:33:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 363, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1537, + 1538 + ], + "referencedDeclaration": 1537, + "src": "2477:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2477:42:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 368, + "nodeType": "ExpressionStatement", + "src": "2477:42:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 373, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 369, + "name": "_currentYearSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 238, + "src": "2536:18:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 372, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 370, + "name": "capacity", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 339, + "src": "2557:8:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 371, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2568:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "2557:12:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2536:33:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 374, + "nodeType": "ExpressionStatement", + "src": "2536:33:2" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "id": 380, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 377, + "name": "_state", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 230, + "src": "2593:6:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$220", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 378, + "name": "MinerState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 220, + "src": "2602:10:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_MinerState_$220_$", + "typeString": "type(enum AlgoMiner.MinerState)" + } + }, + "id": 379, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Activated", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2602:20:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$220", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "src": "2593:29:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$220", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "id": 381, + "nodeType": "ExpressionStatement", + "src": "2593:29:2" + } + ] + }, + "documentation": null, + "id": 383, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 319, + "modifierName": { + "argumentTypes": null, + "id": 318, + "name": "notTerminated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1074, + "src": "2091:13:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2091:13:2" + }, + { + "arguments": null, + "id": 321, + "modifierName": { + "argumentTypes": null, + "id": 320, + "name": "onlyCoreTeam", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 125, + "src": "2105:12:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2105:12:2" + } + ], + "name": "activateMiner", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 317, + "nodeType": "ParameterList", + "parameters": [], + "src": "2081:2:2" + }, + "returnParameters": { + "id": 322, + "nodeType": "ParameterList", + "parameters": [], + "src": "2118:0:2" + }, + "scope": 782, + "src": "2059:571:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 406, + "nodeType": "Block", + "src": "2699:138:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_enum$_MinerState_$220", + "typeString": "enum AlgoMiner.MinerState" + }, + "id": 394, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 391, + "name": "_state", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 230, + "src": "2718:6:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$220", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 392, + "name": "MinerState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 220, + "src": "2728:10:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_MinerState_$220_$", + "typeString": "type(enum AlgoMiner.MinerState)" + } + }, + "id": 393, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Deactivated", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2728:22:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$220", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "src": "2718:32:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 390, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1537, + 1538 + ], + "referencedDeclaration": 1537, + "src": "2710:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 395, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2710:41:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 396, + "nodeType": "ExpressionStatement", + "src": "2710:41:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 400, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 397, + "name": "_state", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 230, + "src": "2772:6:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$220", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 398, + "name": "MinerState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 220, + "src": "2781:10:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_MinerState_$220_$", + "typeString": "type(enum AlgoMiner.MinerState)" + } + }, + "id": 399, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Deactivated", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2781:22:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$220", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "src": "2772:31:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$220", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "id": 401, + "nodeType": "ExpressionStatement", + "src": "2772:31:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 404, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 402, + "name": "_mining", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 232, + "src": "2814:7:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 403, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2824:5:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "2814:15:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 405, + "nodeType": "ExpressionStatement", + "src": "2814:15:2" + } + ] + }, + "documentation": null, + "id": 407, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 386, + "modifierName": { + "argumentTypes": null, + "id": 385, + "name": "notTerminated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1074, + "src": "2672:13:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2672:13:2" + }, + { + "arguments": null, + "id": 388, + "modifierName": { + "argumentTypes": null, + "id": 387, + "name": "onlyCoreTeam", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 125, + "src": "2686:12:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2686:12:2" + } + ], + "name": "deactivateMiner", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 384, + "nodeType": "ParameterList", + "parameters": [], + "src": "2662:2:2" + }, + "returnParameters": { + "id": 389, + "nodeType": "ParameterList", + "parameters": [], + "src": "2699:0:2" + }, + "scope": 782, + "src": "2638:199:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 433, + "nodeType": "Block", + "src": "2912:142:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_enum$_MinerState_$220", + "typeString": "enum AlgoMiner.MinerState" + }, + "id": 418, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 415, + "name": "_state", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 230, + "src": "2931:6:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$220", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 416, + "name": "MinerState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 220, + "src": "2941:10:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_MinerState_$220_$", + "typeString": "type(enum AlgoMiner.MinerState)" + } + }, + "id": 417, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Deactivated", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2941:22:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$220", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "src": "2931:32:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 414, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1537, + 1538 + ], + "referencedDeclaration": 1537, + "src": "2923:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 419, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2923:41:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 420, + "nodeType": "ExpressionStatement", + "src": "2923:41:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 424, + "name": "newMinerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 409, + "src": "2997:15:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 428, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1570, + "src": "3039:4:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_AlgoMiner_$782", + "typeString": "contract AlgoMiner" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_AlgoMiner_$782", + "typeString": "contract AlgoMiner" + } + ], + "id": 427, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3031:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 429, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3031:13:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 425, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 968, + "src": "3014:6:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1374", + "typeString": "contract IERC20" + } + }, + "id": 426, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1348, + "src": "3014:16:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 430, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3014:31:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 421, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 968, + "src": "2977:6:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1374", + "typeString": "contract IERC20" + } + }, + "id": 423, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeTransfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 1399, + "src": "2977:19:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$1374_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$1374_$", + "typeString": "function (contract IERC20,address,uint256)" + } + }, + "id": 431, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2977:69:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 432, + "nodeType": "ExpressionStatement", + "src": "2977:69:2" + } + ] + }, + "documentation": null, + "id": 434, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 412, + "modifierName": { + "argumentTypes": null, + "id": 411, + "name": "onlyCoreTeam", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 125, + "src": "2899:12:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2899:12:2" + } + ], + "name": "migrateMiner", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 410, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 409, + "name": "newMinerAddress", + "nodeType": "VariableDeclaration", + "scope": 434, + "src": "2867:23:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 408, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2867:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2866:25:2" + }, + "returnParameters": { + "id": 413, + "nodeType": "ParameterList", + "parameters": [], + "src": "2912:0:2" + }, + "scope": 782, + "src": "2845:209:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 453, + "nodeType": "Block", + "src": "3121:108:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_enum$_MinerState_$220", + "typeString": "enum AlgoMiner.MinerState" + }, + "id": 445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 442, + "name": "_state", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 230, + "src": "3140:6:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$220", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 443, + "name": "MinerState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 220, + "src": "3150:10:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_MinerState_$220_$", + "typeString": "type(enum AlgoMiner.MinerState)" + } + }, + "id": 444, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Activated", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3150:20:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$220", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "src": "3140:30:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 441, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1537, + 1538 + ], + "referencedDeclaration": 1537, + "src": "3132:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 446, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3132:39:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 447, + "nodeType": "ExpressionStatement", + "src": "3132:39:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 451, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 448, + "name": "_state", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 230, + "src": "3192:6:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$220", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 449, + "name": "MinerState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 220, + "src": "3201:10:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_MinerState_$220_$", + "typeString": "type(enum AlgoMiner.MinerState)" + } + }, + "id": 450, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Suspended", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3201:20:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$220", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "src": "3192:29:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$220", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "id": 452, + "nodeType": "ExpressionStatement", + "src": "3192:29:2" + } + ] + }, + "documentation": null, + "id": 454, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 437, + "modifierName": { + "argumentTypes": null, + "id": 436, + "name": "notTerminated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1074, + "src": "3092:13:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3092:13:2" + }, + { + "arguments": null, + "id": 439, + "modifierName": { + "argumentTypes": null, + "id": 438, + "name": "onlySupervisor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 810, + "src": "3106:14:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3106:14:2" + } + ], + "name": "pauseMining", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 435, + "nodeType": "ParameterList", + "parameters": [], + "src": "3082:2:2" + }, + "returnParameters": { + "id": 440, + "nodeType": "ParameterList", + "parameters": [], + "src": "3121:0:2" + }, + "scope": 782, + "src": "3062:167:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 473, + "nodeType": "Block", + "src": "3297:100:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_enum$_MinerState_$220", + "typeString": "enum AlgoMiner.MinerState" + }, + "id": 465, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 462, + "name": "_state", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 230, + "src": "3316:6:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$220", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 463, + "name": "MinerState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 220, + "src": "3326:10:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_MinerState_$220_$", + "typeString": "type(enum AlgoMiner.MinerState)" + } + }, + "id": 464, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Suspended", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3326:20:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$220", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "src": "3316:30:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 461, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1537, + 1538 + ], + "referencedDeclaration": 1537, + "src": "3308:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 466, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3308:39:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 467, + "nodeType": "ExpressionStatement", + "src": "3308:39:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 471, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 468, + "name": "_state", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 230, + "src": "3360:6:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$220", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 469, + "name": "MinerState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 220, + "src": "3369:10:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_MinerState_$220_$", + "typeString": "type(enum AlgoMiner.MinerState)" + } + }, + "id": 470, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Activated", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3369:20:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$220", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "src": "3360:29:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$220", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "id": 472, + "nodeType": "ExpressionStatement", + "src": "3360:29:2" + } + ] + }, + "documentation": null, + "id": 474, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 457, + "modifierName": { + "argumentTypes": null, + "id": 456, + "name": "notTerminated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1074, + "src": "3268:13:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3268:13:2" + }, + { + "arguments": null, + "id": 459, + "modifierName": { + "argumentTypes": null, + "id": 458, + "name": "onlySupervisor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 810, + "src": "3282:14:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3282:14:2" + } + ], + "name": "resumeMining", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 455, + "nodeType": "ParameterList", + "parameters": [], + "src": "3258:2:2" + }, + "returnParameters": { + "id": 460, + "nodeType": "ParameterList", + "parameters": [], + "src": "3297:0:2" + }, + "scope": 782, + "src": "3237:160:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 509, + "nodeType": "Block", + "src": "3475:193:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_enum$_MinerState_$220", + "typeString": "enum AlgoMiner.MinerState" + }, + "id": 485, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 482, + "name": "_state", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 230, + "src": "3494:6:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$220", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 483, + "name": "MinerState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 220, + "src": "3504:10:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_MinerState_$220_$", + "typeString": "type(enum AlgoMiner.MinerState)" + } + }, + "id": 484, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Stopped", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3504:18:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$220", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "src": "3494:28:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 481, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1537, + 1538 + ], + "referencedDeclaration": 1537, + "src": "3486:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 486, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3486:37:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 487, + "nodeType": "ExpressionStatement", + "src": "3486:37:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 491, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 488, + "name": "_state", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 230, + "src": "3544:6:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$220", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 489, + "name": "MinerState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 220, + "src": "3553:10:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_MinerState_$220_$", + "typeString": "type(enum AlgoMiner.MinerState)" + } + }, + "id": 490, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Stopped", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3553:18:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$220", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "src": "3544:27:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$220", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "id": 492, + "nodeType": "ExpressionStatement", + "src": "3544:27:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 495, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 493, + "name": "_mining", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 232, + "src": "3582:7:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 494, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3592:5:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "3582:15:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 496, + "nodeType": "ExpressionStatement", + "src": "3582:15:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 501, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 497, + "name": "_miner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 226, + "src": "3608:6:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 499, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3625:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 498, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3617:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 500, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3617:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "3608:19:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 502, + "nodeType": "ExpressionStatement", + "src": "3608:19:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 507, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 503, + "name": "_referral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 228, + "src": "3638:9:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 505, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3658:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 504, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3650:7:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 506, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3650:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "3638:22:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 508, + "nodeType": "ExpressionStatement", + "src": "3638:22:2" + } + ] + }, + "documentation": null, + "id": 510, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 477, + "modifierName": { + "argumentTypes": null, + "id": 476, + "name": "notTerminated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1074, + "src": "3446:13:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3446:13:2" + }, + { + "arguments": null, + "id": 479, + "modifierName": { + "argumentTypes": null, + "id": 478, + "name": "onlySupervisor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 810, + "src": "3460:14:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3460:14:2" + } + ], + "name": "stopAndRemoveOwnership", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 475, + "nodeType": "ParameterList", + "parameters": [], + "src": "3436:2:2" + }, + "returnParameters": { + "id": 480, + "nodeType": "ParameterList", + "parameters": [], + "src": "3475:0:2" + }, + "scope": 782, + "src": "3405:263:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 541, + "nodeType": "Block", + "src": "3785:174:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_enum$_MinerState_$220", + "typeString": "enum AlgoMiner.MinerState" + }, + "id": 525, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 522, + "name": "_state", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 230, + "src": "3804:6:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$220", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 523, + "name": "MinerState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 220, + "src": "3814:10:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_MinerState_$220_$", + "typeString": "type(enum AlgoMiner.MinerState)" + } + }, + "id": 524, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Stopped", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3814:18:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$220", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "src": "3804:28:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 521, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1537, + 1538 + ], + "referencedDeclaration": 1537, + "src": "3796:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 526, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3796:37:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 527, + "nodeType": "ExpressionStatement", + "src": "3796:37:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 531, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 528, + "name": "_state", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 230, + "src": "3846:6:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$220", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 529, + "name": "MinerState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 220, + "src": "3855:10:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_MinerState_$220_$", + "typeString": "type(enum AlgoMiner.MinerState)" + } + }, + "id": 530, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Activated", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3855:20:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$220", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "src": "3846:29:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$220", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "id": 532, + "nodeType": "ExpressionStatement", + "src": "3846:29:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 535, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 533, + "name": "_miner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 226, + "src": "3886:6:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 534, + "name": "newOwnerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 512, + "src": "3895:15:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3886:24:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 536, + "nodeType": "ExpressionStatement", + "src": "3886:24:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 539, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 537, + "name": "_referral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 228, + "src": "3921:9:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 538, + "name": "newReferralAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 514, + "src": "3933:18:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3921:30:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 540, + "nodeType": "ExpressionStatement", + "src": "3921:30:2" + } + ] + }, + "documentation": null, + "id": 542, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 517, + "modifierName": { + "argumentTypes": null, + "id": 516, + "name": "notTerminated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1074, + "src": "3756:13:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3756:13:2" + }, + { + "arguments": null, + "id": 519, + "modifierName": { + "argumentTypes": null, + "id": 518, + "name": "onlySupervisor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 810, + "src": "3770:14:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3770:14:2" + } + ], + "name": "resetMiner", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 515, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 512, + "name": "newOwnerAddress", + "nodeType": "VariableDeclaration", + "scope": 542, + "src": "3696:23:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 511, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3696:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 514, + "name": "newReferralAddress", + "nodeType": "VariableDeclaration", + "scope": 542, + "src": "3721:26:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 513, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3721:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3695:53:2" + }, + "returnParameters": { + "id": 520, + "nodeType": "ParameterList", + "parameters": [], + "src": "3785:0:2" + }, + "scope": 782, + "src": "3676:283:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 565, + "nodeType": "Block", + "src": "4021:121:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_enum$_MinerState_$220", + "typeString": "enum AlgoMiner.MinerState" + }, + "id": 553, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 550, + "name": "_state", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 230, + "src": "4040:6:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$220", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 551, + "name": "MinerState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 220, + "src": "4050:10:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_MinerState_$220_$", + "typeString": "type(enum AlgoMiner.MinerState)" + } + }, + "id": 552, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Activated", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4050:20:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$220", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "src": "4040:30:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 549, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1537, + 1538 + ], + "referencedDeclaration": 1537, + "src": "4032:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 554, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4032:39:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 555, + "nodeType": "ExpressionStatement", + "src": "4032:39:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 558, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "4090:8:2", + "subExpression": { + "argumentTypes": null, + "id": 557, + "name": "_mining", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 232, + "src": "4091:7:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 556, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1537, + 1538 + ], + "referencedDeclaration": 1537, + "src": "4082:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 559, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4082:17:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 560, + "nodeType": "ExpressionStatement", + "src": "4082:17:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 563, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 561, + "name": "_mining", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 232, + "src": "4120:7:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 562, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4130:4:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "4120:14:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 564, + "nodeType": "ExpressionStatement", + "src": "4120:14:2" + } + ] + }, + "documentation": null, + "id": 566, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 545, + "modifierName": { + "argumentTypes": null, + "id": 544, + "name": "notTerminated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1074, + "src": "3997:13:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3997:13:2" + }, + { + "arguments": null, + "id": 547, + "modifierName": { + "argumentTypes": null, + "id": 546, + "name": "onlyMiner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 316, + "src": "4011:9:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4011:9:2" + } + ], + "name": "startMining", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 543, + "nodeType": "ParameterList", + "parameters": [], + "src": "3987:2:2" + }, + "returnParameters": { + "id": 548, + "nodeType": "ParameterList", + "parameters": [], + "src": "4021:0:2" + }, + "scope": 782, + "src": "3967:175:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 588, + "nodeType": "Block", + "src": "4203:121:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_enum$_MinerState_$220", + "typeString": "enum AlgoMiner.MinerState" + }, + "id": 577, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 574, + "name": "_state", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 230, + "src": "4222:6:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$220", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 575, + "name": "MinerState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 220, + "src": "4232:10:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_MinerState_$220_$", + "typeString": "type(enum AlgoMiner.MinerState)" + } + }, + "id": 576, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Activated", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4232:20:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$220", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "src": "4222:30:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 573, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1537, + 1538 + ], + "referencedDeclaration": 1537, + "src": "4214:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 578, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4214:39:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 579, + "nodeType": "ExpressionStatement", + "src": "4214:39:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 581, + "name": "_mining", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 232, + "src": "4272:7:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 580, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1537, + 1538 + ], + "referencedDeclaration": 1537, + "src": "4264:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 582, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4264:16:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 583, + "nodeType": "ExpressionStatement", + "src": "4264:16:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 586, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 584, + "name": "_mining", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 232, + "src": "4301:7:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 585, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4311:5:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "4301:15:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 587, + "nodeType": "ExpressionStatement", + "src": "4301:15:2" + } + ] + }, + "documentation": null, + "id": 589, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 569, + "modifierName": { + "argumentTypes": null, + "id": 568, + "name": "notTerminated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1074, + "src": "4179:13:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4179:13:2" + }, + { + "arguments": null, + "id": 571, + "modifierName": { + "argumentTypes": null, + "id": 570, + "name": "onlyMiner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 316, + "src": "4193:9:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4193:9:2" + } + ], + "name": "stopMining", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 567, + "nodeType": "ParameterList", + "parameters": [], + "src": "4169:2:2" + }, + "returnParameters": { + "id": 572, + "nodeType": "ParameterList", + "parameters": [], + "src": "4203:0:2" + }, + "scope": 782, + "src": "4150:174:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 692, + "nodeType": "Block", + "src": "4380:800:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_enum$_MinerType_$215", + "typeString": "enum AlgoMiner.MinerType" + }, + "id": 600, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 597, + "name": "_minerType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 222, + "src": "4399:10:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerType_$215", + "typeString": "enum AlgoMiner.MinerType" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 598, + "name": "MinerType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 215, + "src": "4413:9:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_MinerType_$215_$", + "typeString": "type(enum AlgoMiner.MinerType)" + } + }, + "id": 599, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "PoolBased", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4413:19:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerType_$215", + "typeString": "enum AlgoMiner.MinerType" + } + }, + "src": "4399:33:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 596, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1537, + 1538 + ], + "referencedDeclaration": 1537, + "src": "4391:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 601, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4391:42:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 602, + "nodeType": "ExpressionStatement", + "src": "4391:42:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_enum$_MinerState_$220", + "typeString": "enum AlgoMiner.MinerState" + }, + "id": 607, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 604, + "name": "_state", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 230, + "src": "4452:6:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$220", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 605, + "name": "MinerState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 220, + "src": "4462:10:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_MinerState_$220_$", + "typeString": "type(enum AlgoMiner.MinerState)" + } + }, + "id": 606, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Activated", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4462:20:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$220", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "src": "4452:30:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 603, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1537, + 1538 + ], + "referencedDeclaration": 1537, + "src": "4444:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 608, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4444:39:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 609, + "nodeType": "ExpressionStatement", + "src": "4444:39:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 611, + "name": "_mining", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 232, + "src": "4502:7:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 610, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1537, + 1538 + ], + "referencedDeclaration": 1537, + "src": "4494:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 612, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4494:16:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 613, + "nodeType": "ExpressionStatement", + "src": "4494:16:2" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "id": 616, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 614, + "name": "_currentDay", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 236, + "src": "4526:11:2", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 615, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4541:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "4526:16:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 650, + "nodeType": "Block", + "src": "4623:238:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 627, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "4638:13:2", + "subExpression": { + "argumentTypes": null, + "id": 626, + "name": "_currentDay", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 236, + "src": "4638:11:2", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "id": 628, + "nodeType": "ExpressionStatement", + "src": "4638:13:2" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 634, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 629, + "name": "_currentDay", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 236, + "src": "4669:11:2", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 632, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 630, + "name": "DAYS_PER_YEAR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 212, + "src": "4685:13:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 631, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4701:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "4685:17:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 633, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "4684:19:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4669:34:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 649, + "nodeType": "IfStatement", + "src": "4666:184:2", + "trueBody": { + "id": 648, + "nodeType": "Block", + "src": "4705:145:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 636, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "4724:14:2", + "subExpression": { + "argumentTypes": null, + "id": 635, + "name": "_currentYear", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 234, + "src": "4724:12:2", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 637, + "nodeType": "ExpressionStatement", + "src": "4724:14:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 640, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 638, + "name": "_currentDay", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 236, + "src": "4757:11:2", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "31", + "id": 639, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4771:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "4757:15:2", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "id": 641, + "nodeType": "ExpressionStatement", + "src": "4757:15:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 646, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 642, + "name": "_currentYearSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 238, + "src": "4791:18:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 645, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 643, + "name": "_currentYearSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 238, + "src": "4812:18:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 644, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4833:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "4812:22:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4791:43:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 647, + "nodeType": "ExpressionStatement", + "src": "4791:43:2" + } + ] + } + } + ] + }, + "id": 651, + "nodeType": "IfStatement", + "src": "4523:338:2", + "trueBody": { + "id": 625, + "nodeType": "Block", + "src": "4544:73:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 619, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 617, + "name": "_currentYear", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 234, + "src": "4559:12:2", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "31", + "id": 618, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4574:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "4559:16:2", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 620, + "nodeType": "ExpressionStatement", + "src": "4559:16:2" + }, + { + "expression": { + "argumentTypes": null, + "id": 623, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 621, + "name": "_currentDay", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 236, + "src": "4590:11:2", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "31", + "id": 622, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4604:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "4590:15:2", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "id": 624, + "nodeType": "ExpressionStatement", + "src": "4590:15:2" + } + ] + } + }, + { + "assignments": [ + 653 + ], + "declarations": [ + { + "constant": false, + "id": 653, + "name": "minerTokens", + "nodeType": "VariableDeclaration", + "scope": 692, + "src": "4873:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 652, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4873:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 657, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 656, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 654, + "name": "_currentYearSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 238, + "src": "4895:18:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 655, + "name": "DAYS_PER_YEAR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 212, + "src": "4916:13:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4895:34:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4873:56:2" + }, + { + "assignments": [ + 659 + ], + "declarations": [ + { + "constant": false, + "id": 659, + "name": "referralTokens", + "nodeType": "VariableDeclaration", + "scope": 692, + "src": "4940:22:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 658, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4940:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 665, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 664, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 662, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 660, + "name": "minerTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 653, + "src": "4965:11:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 661, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4979:2:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "src": "4965:16:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "313030", + "id": 663, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4984:3:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_100_by_1", + "typeString": "int_const 100" + }, + "value": "100" + }, + "src": "4965:22:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4940:47:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 669, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 667, + "name": "minerTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 653, + "src": "5008:11:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 668, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5022:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "5008:15:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 666, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1537, + 1538 + ], + "referencedDeclaration": 1537, + "src": "5000:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 670, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5000:24:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 671, + "nodeType": "ExpressionStatement", + "src": "5000:24:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 675, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 673, + "name": "referralTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 659, + "src": "5043:14:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 674, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5060:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "5043:18:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 672, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1537, + 1538 + ], + "referencedDeclaration": 1537, + "src": "5035:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 676, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5035:27:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 677, + "nodeType": "ExpressionStatement", + "src": "5035:27:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 681, + "name": "_miner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 226, + "src": "5095:6:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 682, + "name": "minerTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 653, + "src": "5103:11:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 678, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 968, + "src": "5075:6:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1374", + "typeString": "contract IERC20" + } + }, + "id": 680, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeTransfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 1399, + "src": "5075:19:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$1374_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$1374_$", + "typeString": "function (contract IERC20,address,uint256)" + } + }, + "id": 683, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5075:40:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 684, + "nodeType": "ExpressionStatement", + "src": "5075:40:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 688, + "name": "_referral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 228, + "src": "5146:9:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 689, + "name": "referralTokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 659, + "src": "5157:14:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 685, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 968, + "src": "5126:6:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1374", + "typeString": "contract IERC20" + } + }, + "id": 687, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeTransfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 1399, + "src": "5126:19:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$1374_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$1374_$", + "typeString": "function (contract IERC20,address,uint256)" + } + }, + "id": 690, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5126:46:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 691, + "nodeType": "ExpressionStatement", + "src": "5126:46:2" + } + ] + }, + "documentation": null, + "id": 693, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 592, + "modifierName": { + "argumentTypes": null, + "id": 591, + "name": "notTerminated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1074, + "src": "4355:13:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4355:13:2" + }, + { + "arguments": null, + "id": 594, + "modifierName": { + "argumentTypes": null, + "id": 593, + "name": "onlySystem", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 897, + "src": "4369:10:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4369:10:2" + } + ], + "name": "mine", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 590, + "nodeType": "ParameterList", + "parameters": [], + "src": "4345:2:2" + }, + "returnParameters": { + "id": 595, + "nodeType": "ParameterList", + "parameters": [], + "src": "4380:0:2" + }, + "scope": 782, + "src": "4332:848:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 701, + "nodeType": "Block", + "src": "5229:31:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 698, + "name": "_terminate", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1012 + ], + "referencedDeclaration": 1012, + "src": "5240:10:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 699, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5240:12:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 700, + "nodeType": "ExpressionStatement", + "src": "5240:12:2" + } + ] + }, + "documentation": null, + "id": 702, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 696, + "modifierName": { + "argumentTypes": null, + "id": 695, + "name": "onlyCoreTeam", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 125, + "src": "5216:12:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5216:12:2" + } + ], + "name": "terminate", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 694, + "nodeType": "ParameterList", + "parameters": [], + "src": "5206:2:2" + }, + "returnParameters": { + "id": 697, + "nodeType": "ParameterList", + "parameters": [], + "src": "5229:0:2" + }, + "scope": 782, + "src": "5188:72:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 709, + "nodeType": "Block", + "src": "5318:30:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 707, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5336:4:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 706, + "id": 708, + "nodeType": "Return", + "src": "5329:11:2" + } + ] + }, + "documentation": null, + "id": 710, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isAlgoMiner", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 703, + "nodeType": "ParameterList", + "parameters": [], + "src": "5288:2:2" + }, + "returnParameters": { + "id": 706, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 705, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 710, + "src": "5312:4:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 704, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5312:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5311:6:2" + }, + "scope": 782, + "src": "5268:80:2", + "stateMutability": "pure", + "superFunction": 1020, + "visibility": "public" + }, + { + "body": { + "id": 719, + "nodeType": "Block", + "src": "5408:43:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 716, + "name": "_minerType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 222, + "src": "5432:10:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerType_$215", + "typeString": "enum AlgoMiner.MinerType" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_enum$_MinerType_$215", + "typeString": "enum AlgoMiner.MinerType" + } + ], + "id": 715, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5426:5:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint8_$", + "typeString": "type(uint8)" + }, + "typeName": "uint8" + }, + "id": 717, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5426:17:2", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "functionReturnParameters": 714, + "id": 718, + "nodeType": "Return", + "src": "5419:24:2" + } + ] + }, + "documentation": null, + "id": 720, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getMinerType", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 711, + "nodeType": "ParameterList", + "parameters": [], + "src": "5377:2:2" + }, + "returnParameters": { + "id": 714, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 713, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 720, + "src": "5401:5:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 712, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "5401:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5400:7:2" + }, + "scope": 782, + "src": "5356:95:2", + "stateMutability": "view", + "superFunction": 1025, + "visibility": "public" + }, + { + "body": { + "id": 727, + "nodeType": "Block", + "src": "5510:35:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 725, + "name": "_category", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 224, + "src": "5528:9:2", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "functionReturnParameters": 724, + "id": 726, + "nodeType": "Return", + "src": "5521:16:2" + } + ] + }, + "documentation": null, + "id": 728, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCategory", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 721, + "nodeType": "ParameterList", + "parameters": [], + "src": "5479:2:2" + }, + "returnParameters": { + "id": 724, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 723, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 728, + "src": "5503:5:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 722, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "5503:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5502:7:2" + }, + "scope": 782, + "src": "5459:86:2", + "stateMutability": "view", + "superFunction": 1030, + "visibility": "public" + }, + { + "body": { + "id": 735, + "nodeType": "Block", + "src": "5603:32:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 733, + "name": "_miner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 226, + "src": "5621:6:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 732, + "id": 734, + "nodeType": "Return", + "src": "5614:13:2" + } + ] + }, + "documentation": null, + "id": 736, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getMiner", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 729, + "nodeType": "ParameterList", + "parameters": [], + "src": "5570:2:2" + }, + "returnParameters": { + "id": 732, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 731, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 736, + "src": "5594:7:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 730, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5594:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5593:9:2" + }, + "scope": 782, + "src": "5553:82:2", + "stateMutability": "view", + "superFunction": 1035, + "visibility": "public" + }, + { + "body": { + "id": 743, + "nodeType": "Block", + "src": "5696:35:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 741, + "name": "_referral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 228, + "src": "5714:9:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 740, + "id": 742, + "nodeType": "Return", + "src": "5707:16:2" + } + ] + }, + "documentation": null, + "id": 744, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReferral", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 737, + "nodeType": "ParameterList", + "parameters": [], + "src": "5663:2:2" + }, + "returnParameters": { + "id": 740, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 739, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 744, + "src": "5687:7:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 738, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5687:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5686:9:2" + }, + "scope": 782, + "src": "5643:88:2", + "stateMutability": "view", + "superFunction": 1040, + "visibility": "public" + }, + { + "body": { + "id": 756, + "nodeType": "Block", + "src": "5786:67:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 754, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_enum$_MinerState_$220", + "typeString": "enum AlgoMiner.MinerState" + }, + "id": 752, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 749, + "name": "_state", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 230, + "src": "5804:6:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$220", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 750, + "name": "MinerState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 220, + "src": "5814:10:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_MinerState_$220_$", + "typeString": "type(enum AlgoMiner.MinerState)" + } + }, + "id": 751, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Activated", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5814:20:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$220", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "src": "5804:30:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "id": 753, + "name": "_mining", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 232, + "src": "5838:7:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5804:41:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 748, + "id": 755, + "nodeType": "Return", + "src": "5797:48:2" + } + ] + }, + "documentation": null, + "id": 757, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isMining", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 745, + "nodeType": "ParameterList", + "parameters": [], + "src": "5756:2:2" + }, + "returnParameters": { + "id": 748, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 747, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 757, + "src": "5780:4:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 746, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5780:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5779:6:2" + }, + "scope": 782, + "src": "5739:114:2", + "stateMutability": "view", + "superFunction": 1045, + "visibility": "public" + }, + { + "body": { + "id": 764, + "nodeType": "Block", + "src": "5915:38:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 762, + "name": "_currentYear", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 234, + "src": "5933:12:2", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "functionReturnParameters": 761, + "id": 763, + "nodeType": "Return", + "src": "5926:19:2" + } + ] + }, + "documentation": null, + "id": 765, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCurrentYear", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 758, + "nodeType": "ParameterList", + "parameters": [], + "src": "5884:2:2" + }, + "returnParameters": { + "id": 761, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 760, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 765, + "src": "5908:5:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 759, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "5908:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5907:7:2" + }, + "scope": 782, + "src": "5861:92:2", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 772, + "nodeType": "Block", + "src": "6015:37:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 770, + "name": "_currentDay", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 236, + "src": "6033:11:2", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "functionReturnParameters": 769, + "id": 771, + "nodeType": "Return", + "src": "6026:18:2" + } + ] + }, + "documentation": null, + "id": 773, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCurrentDay", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 766, + "nodeType": "ParameterList", + "parameters": [], + "src": "5983:2:2" + }, + "returnParameters": { + "id": 769, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 768, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 773, + "src": "6007:6:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 767, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "6007:6:2", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6006:8:2" + }, + "scope": 782, + "src": "5961:91:2", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 780, + "nodeType": "Block", + "src": "6122:44:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 778, + "name": "_currentYearSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 238, + "src": "6140:18:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 777, + "id": 779, + "nodeType": "Return", + "src": "6133:25:2" + } + ] + }, + "documentation": null, + "id": 781, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCurrentYearSupply", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 774, + "nodeType": "ParameterList", + "parameters": [], + "src": "6089:2:2" + }, + "returnParameters": { + "id": 777, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 776, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 781, + "src": "6113:7:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 775, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6113:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6112:9:2" + }, + "scope": 782, + "src": "6060:106:2", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 783, + "src": "619:5550:2" + } + ], + "src": "0:6171:2" + }, + "id": 2 + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoSupervisorRole.sol": { + "ast": { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoSupervisorRole.sol", + "exportedSymbols": { + "AlgoSupervisorRole": [ + 869 + ] + }, + "id": 870, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 784, + "literals": [ + "solidity", + "0.5", + ".4" + ], + "nodeType": "PragmaDirective", + "src": "0:22:3" + }, + { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol", + "file": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol", + "id": 785, + "nodeType": "ImportDirective", + "scope": 870, + "sourceUnit": 1178, + "src": "26:189:3", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 869, + "linearizedBaseContracts": [ + 869 + ], + "name": "AlgoSupervisorRole", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 788, + "libraryName": { + "contractScope": null, + "id": 786, + "name": "Roles", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1177, + "src": "260:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Roles_$1177", + "typeString": "library Roles" + } + }, + "nodeType": "UsingForDirective", + "src": "254:27:3", + "typeName": { + "contractScope": null, + "id": 787, + "name": "Roles.Role", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1090, + "src": "270:10:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$1090_storage_ptr", + "typeString": "struct Roles.Role" + } + } + }, + { + "constant": false, + "id": 790, + "name": "_supervisors", + "nodeType": "VariableDeclaration", + "scope": 869, + "src": "289:31:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$1090_storage", + "typeString": "struct Roles.Role" + }, + "typeName": { + "contractScope": null, + "id": 789, + "name": "Roles.Role", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1090, + "src": "289:10:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$1090_storage_ptr", + "typeString": "struct Roles.Role" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 798, + "nodeType": "Block", + "src": "353:45:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 794, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1534, + "src": "379:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 795, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "379:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 793, + "name": "_addSupervisor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 856, + "src": "364:14:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 796, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "364:26:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 797, + "nodeType": "ExpressionStatement", + "src": "364:26:3" + } + ] + }, + "documentation": null, + "id": 799, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 791, + "nodeType": "ParameterList", + "parameters": [], + "src": "341:2:3" + }, + "returnParameters": { + "id": 792, + "nodeType": "ParameterList", + "parameters": [], + "src": "353:0:3" + }, + "scope": 869, + "src": "329:69:3", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 809, + "nodeType": "Block", + "src": "432:64:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 803, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1534, + "src": "464:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 804, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "464:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 802, + "name": "isSupervisor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 823, + "src": "451:12:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 805, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "451:24:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 801, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1537, + 1538 + ], + "referencedDeclaration": 1537, + "src": "443:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 806, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "443:33:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 807, + "nodeType": "ExpressionStatement", + "src": "443:33:3" + }, + { + "id": 808, + "nodeType": "PlaceholderStatement", + "src": "487:1:3" + } + ] + }, + "documentation": null, + "id": 810, + "name": "onlySupervisor", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 800, + "nodeType": "ParameterList", + "parameters": [], + "src": "429:2:3" + }, + "src": "406:90:3", + "visibility": "internal" + }, + { + "body": { + "id": 822, + "nodeType": "Block", + "src": "570:51:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 819, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 812, + "src": "605:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 817, + "name": "_supervisors", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 790, + "src": "588:12:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$1090_storage", + "typeString": "struct Roles.Role storage ref" + } + }, + "id": 818, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "has", + "nodeType": "MemberAccess", + "referencedDeclaration": 1176, + "src": "588:16:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Role_$1090_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Role_$1090_storage_ptr_$", + "typeString": "function (struct Roles.Role storage pointer,address) view returns (bool)" + } + }, + "id": 820, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "588:25:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 816, + "id": 821, + "nodeType": "Return", + "src": "581:32:3" + } + ] + }, + "documentation": null, + "id": 823, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isSupervisor", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 813, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 812, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 823, + "src": "526:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 811, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "526:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "525:17:3" + }, + "returnParameters": { + "id": 816, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 815, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 823, + "src": "564:4:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 814, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "564:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "563:6:3" + }, + "scope": 869, + "src": "504:117:3", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 834, + "nodeType": "Block", + "src": "691:42:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 831, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 825, + "src": "717:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 830, + "name": "_addSupervisor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 856, + "src": "702:14:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 832, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "702:23:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 833, + "nodeType": "ExpressionStatement", + "src": "702:23:3" + } + ] + }, + "documentation": null, + "id": 835, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 828, + "modifierName": { + "argumentTypes": null, + "id": 827, + "name": "onlySupervisor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 810, + "src": "676:14:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "676:14:3" + } + ], + "name": "addSupervisor", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 826, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 825, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 835, + "src": "652:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 824, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "652:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "651:17:3" + }, + "returnParameters": { + "id": 829, + "nodeType": "ParameterList", + "parameters": [], + "src": "691:0:3" + }, + "scope": 869, + "src": "629:104:3", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 843, + "nodeType": "Block", + "src": "778:48:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 839, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1534, + "src": "807:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 840, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "807:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 838, + "name": "_removeSupervisor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 868, + "src": "789:17:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "789:29:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 842, + "nodeType": "ExpressionStatement", + "src": "789:29:3" + } + ] + }, + "documentation": null, + "id": 844, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "renounceSupervisor", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 836, + "nodeType": "ParameterList", + "parameters": [], + "src": "768:2:3" + }, + "returnParameters": { + "id": 837, + "nodeType": "ParameterList", + "parameters": [], + "src": "778:0:3" + }, + "scope": 869, + "src": "741:85:3", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 855, + "nodeType": "Block", + "src": "884:44:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 852, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 846, + "src": "912:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 849, + "name": "_supervisors", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 790, + "src": "895:12:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$1090_storage", + "typeString": "struct Roles.Role storage ref" + } + }, + "id": 851, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1122, + "src": "895:16:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Role_$1090_storage_ptr_$_t_address_$returns$__$bound_to$_t_struct$_Role_$1090_storage_ptr_$", + "typeString": "function (struct Roles.Role storage pointer,address)" + } + }, + "id": 853, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "895:25:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 854, + "nodeType": "ExpressionStatement", + "src": "895:25:3" + } + ] + }, + "documentation": null, + "id": 856, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_addSupervisor", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 847, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 846, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 856, + "src": "858:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 845, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "858:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "857:17:3" + }, + "returnParameters": { + "id": 848, + "nodeType": "ParameterList", + "parameters": [], + "src": "884:0:3" + }, + "scope": 869, + "src": "834:94:3", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 867, + "nodeType": "Block", + "src": "989:47:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 864, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 858, + "src": "1020:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 861, + "name": "_supervisors", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 790, + "src": "1000:12:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$1090_storage", + "typeString": "struct Roles.Role storage ref" + } + }, + "id": 863, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "remove", + "nodeType": "MemberAccess", + "referencedDeclaration": 1153, + "src": "1000:19:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Role_$1090_storage_ptr_$_t_address_$returns$__$bound_to$_t_struct$_Role_$1090_storage_ptr_$", + "typeString": "function (struct Roles.Role storage pointer,address)" + } + }, + "id": 865, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1000:28:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 866, + "nodeType": "ExpressionStatement", + "src": "1000:28:3" + } + ] + }, + "documentation": null, + "id": 868, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_removeSupervisor", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 859, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 858, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 868, + "src": "963:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 857, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "963:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "962:17:3" + }, + "returnParameters": { + "id": 860, + "nodeType": "ParameterList", + "parameters": [], + "src": "989:0:3" + }, + "scope": 869, + "src": "936:100:3", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 870, + "src": "219:820:3" + } + ], + "src": "0:1041:3" + }, + "id": 3 + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoSystemRole.sol": { + "ast": { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoSystemRole.sol", + "exportedSymbols": { + "AlgoSystemRole": [ + 956 + ] + }, + "id": 957, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 871, + "literals": [ + "solidity", + "0.5", + ".4" + ], + "nodeType": "PragmaDirective", + "src": "0:22:4" + }, + { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol", + "file": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol", + "id": 872, + "nodeType": "ImportDirective", + "scope": 957, + "sourceUnit": 1178, + "src": "26:189:4", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 956, + "linearizedBaseContracts": [ + 956 + ], + "name": "AlgoSystemRole", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 875, + "libraryName": { + "contractScope": null, + "id": 873, + "name": "Roles", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1177, + "src": "256:5:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Roles_$1177", + "typeString": "library Roles" + } + }, + "nodeType": "UsingForDirective", + "src": "250:27:4", + "typeName": { + "contractScope": null, + "id": 874, + "name": "Roles.Role", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1090, + "src": "266:10:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$1090_storage_ptr", + "typeString": "struct Roles.Role" + } + } + }, + { + "constant": false, + "id": 877, + "name": "_systemMembers", + "nodeType": "VariableDeclaration", + "scope": 956, + "src": "285:33:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$1090_storage", + "typeString": "struct Roles.Role" + }, + "typeName": { + "contractScope": null, + "id": 876, + "name": "Roles.Role", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1090, + "src": "285:10:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$1090_storage_ptr", + "typeString": "struct Roles.Role" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 885, + "nodeType": "Block", + "src": "351:41:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 881, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1534, + "src": "373:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 882, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "373:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 880, + "name": "_addSystem", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 943, + "src": "362:10:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 883, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "362:22:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 884, + "nodeType": "ExpressionStatement", + "src": "362:22:4" + } + ] + }, + "documentation": null, + "id": 886, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 878, + "nodeType": "ParameterList", + "parameters": [], + "src": "339:2:4" + }, + "returnParameters": { + "id": 879, + "nodeType": "ParameterList", + "parameters": [], + "src": "351:0:4" + }, + "scope": 956, + "src": "327:65:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 896, + "nodeType": "Block", + "src": "422:60:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 890, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1534, + "src": "450:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 891, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "450:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 889, + "name": "isSystem", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 910, + "src": "441:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 892, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "441:20:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 888, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1537, + 1538 + ], + "referencedDeclaration": 1537, + "src": "433:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "433:29:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 894, + "nodeType": "ExpressionStatement", + "src": "433:29:4" + }, + { + "id": 895, + "nodeType": "PlaceholderStatement", + "src": "473:1:4" + } + ] + }, + "documentation": null, + "id": 897, + "name": "onlySystem", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 887, + "nodeType": "ParameterList", + "parameters": [], + "src": "419:2:4" + }, + "src": "400:82:4", + "visibility": "internal" + }, + { + "body": { + "id": 909, + "nodeType": "Block", + "src": "552:53:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 906, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 899, + "src": "589:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 904, + "name": "_systemMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 877, + "src": "570:14:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$1090_storage", + "typeString": "struct Roles.Role storage ref" + } + }, + "id": 905, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "has", + "nodeType": "MemberAccess", + "referencedDeclaration": 1176, + "src": "570:18:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Role_$1090_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Role_$1090_storage_ptr_$", + "typeString": "function (struct Roles.Role storage pointer,address) view returns (bool)" + } + }, + "id": 907, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "570:27:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 903, + "id": 908, + "nodeType": "Return", + "src": "563:34:4" + } + ] + }, + "documentation": null, + "id": 910, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isSystem", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 900, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 899, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 910, + "src": "508:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 898, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "508:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "507:17:4" + }, + "returnParameters": { + "id": 903, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 902, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 910, + "src": "546:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 901, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "546:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "545:6:4" + }, + "scope": 956, + "src": "490:115:4", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 921, + "nodeType": "Block", + "src": "667:38:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 918, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 912, + "src": "689:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 917, + "name": "_addSystem", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 943, + "src": "678:10:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 919, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "678:19:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 920, + "nodeType": "ExpressionStatement", + "src": "678:19:4" + } + ] + }, + "documentation": null, + "id": 922, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 915, + "modifierName": { + "argumentTypes": null, + "id": 914, + "name": "onlySystem", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 897, + "src": "656:10:4", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "656:10:4" + } + ], + "name": "addSystem", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 913, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 912, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 922, + "src": "632:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 911, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "632:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "631:17:4" + }, + "returnParameters": { + "id": 916, + "nodeType": "ParameterList", + "parameters": [], + "src": "667:0:4" + }, + "scope": 956, + "src": "613:92:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 930, + "nodeType": "Block", + "src": "746:44:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 926, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1534, + "src": "771:3:4", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 927, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "771:10:4", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 925, + "name": "_removeSystem", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 955, + "src": "757:13:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 928, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "757:25:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 929, + "nodeType": "ExpressionStatement", + "src": "757:25:4" + } + ] + }, + "documentation": null, + "id": 931, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "renounceSystem", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 923, + "nodeType": "ParameterList", + "parameters": [], + "src": "736:2:4" + }, + "returnParameters": { + "id": 924, + "nodeType": "ParameterList", + "parameters": [], + "src": "746:0:4" + }, + "scope": 956, + "src": "713:77:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 942, + "nodeType": "Block", + "src": "844:46:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 939, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 933, + "src": "874:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 936, + "name": "_systemMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 877, + "src": "855:14:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$1090_storage", + "typeString": "struct Roles.Role storage ref" + } + }, + "id": 938, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1122, + "src": "855:18:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Role_$1090_storage_ptr_$_t_address_$returns$__$bound_to$_t_struct$_Role_$1090_storage_ptr_$", + "typeString": "function (struct Roles.Role storage pointer,address)" + } + }, + "id": 940, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "855:27:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 941, + "nodeType": "ExpressionStatement", + "src": "855:27:4" + } + ] + }, + "documentation": null, + "id": 943, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_addSystem", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 934, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 933, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 943, + "src": "818:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 932, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "818:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "817:17:4" + }, + "returnParameters": { + "id": 935, + "nodeType": "ParameterList", + "parameters": [], + "src": "844:0:4" + }, + "scope": 956, + "src": "798:92:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 954, + "nodeType": "Block", + "src": "947:49:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 951, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 945, + "src": "980:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 948, + "name": "_systemMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 877, + "src": "958:14:4", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$1090_storage", + "typeString": "struct Roles.Role storage ref" + } + }, + "id": 950, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "remove", + "nodeType": "MemberAccess", + "referencedDeclaration": 1153, + "src": "958:21:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Role_$1090_storage_ptr_$_t_address_$returns$__$bound_to$_t_struct$_Role_$1090_storage_ptr_$", + "typeString": "function (struct Roles.Role storage pointer,address)" + } + }, + "id": 952, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "958:30:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 953, + "nodeType": "ExpressionStatement", + "src": "958:30:4" + } + ] + }, + "documentation": null, + "id": 955, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_removeSystem", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 946, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 945, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 955, + "src": "921:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 944, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "921:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "920:17:4" + }, + "returnParameters": { + "id": 947, + "nodeType": "ParameterList", + "parameters": [], + "src": "947:0:4" + }, + "scope": 956, + "src": "898:98:4", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 957, + "src": "219:780:4" + } + ], + "src": "0:1001:4" + }, + "id": 4 + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/ERC20TokenHolder.sol": { + "ast": { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/ERC20TokenHolder.sol", + "exportedSymbols": { + "ERC20TokenHolder": [ + 1013 + ] + }, + "id": 1014, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 958, + "literals": [ + "solidity", + "0.5", + ".4" + ], + "nodeType": "PragmaDirective", + "src": "0:22:5" + }, + { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "file": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "id": 959, + "nodeType": "ImportDirective", + "scope": 1014, + "sourceUnit": 1375, + "src": "26:195:5", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol", + "file": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol", + "id": 960, + "nodeType": "ImportDirective", + "scope": 1014, + "sourceUnit": 1520, + "src": "223:198:5", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/Terminable.sol", + "file": "./Terminable.sol", + "id": 961, + "nodeType": "ImportDirective", + "scope": 1014, + "sourceUnit": 1084, + "src": "425:26:5", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 962, + "name": "Terminable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1083, + "src": "484:10:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Terminable_$1083", + "typeString": "contract Terminable" + } + }, + "id": 963, + "nodeType": "InheritanceSpecifier", + "src": "484:10:5" + } + ], + "contractDependencies": [ + 1083 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 1013, + "linearizedBaseContracts": [ + 1013, + 1083 + ], + "name": "ERC20TokenHolder", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 966, + "libraryName": { + "contractScope": null, + "id": 964, + "name": "SafeERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1519, + "src": "508:9:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeERC20_$1519", + "typeString": "library SafeERC20" + } + }, + "nodeType": "UsingForDirective", + "src": "502:27:5", + "typeName": { + "contractScope": null, + "id": 965, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1374, + "src": "522:6:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1374", + "typeString": "contract IERC20" + } + } + }, + { + "constant": false, + "id": 968, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 1013, + "src": "537:22:5", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1374", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 967, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1374, + "src": "537:6:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1374", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + }, + { + "body": { + "id": 981, + "nodeType": "Block", + "src": "624:48:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 979, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 975, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 968, + "src": "635:6:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1374", + "typeString": "contract IERC20" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 977, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 970, + "src": "651:12:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 976, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1374, + "src": "644:6:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$1374_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 978, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "644:20:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1374", + "typeString": "contract IERC20" + } + }, + "src": "635:29:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1374", + "typeString": "contract IERC20" + } + }, + "id": 980, + "nodeType": "ExpressionStatement", + "src": "635:29:5" + } + ] + }, + "documentation": null, + "id": 982, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [], + "id": 973, + "modifierName": { + "argumentTypes": null, + "id": 972, + "name": "Terminable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1083, + "src": "602:10:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Terminable_$1083_$", + "typeString": "type(contract Terminable)" + } + }, + "nodeType": "ModifierInvocation", + "src": "602:12:5" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 971, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 970, + "name": "tokenAddress", + "nodeType": "VariableDeclaration", + "scope": 982, + "src": "580:20:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 969, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "580:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "579:22:5" + }, + "returnParameters": { + "id": 974, + "nodeType": "ParameterList", + "parameters": [], + "src": "624:0:5" + }, + "scope": 1013, + "src": "568:104:5", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1011, + "nodeType": "Block", + "src": "711:214:5", + "statements": [ + { + "assignments": [ + 986 + ], + "declarations": [ + { + "constant": false, + "id": 986, + "name": "currentBalance", + "nodeType": "VariableDeclaration", + "scope": 1011, + "src": "722:22:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 985, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "722:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 993, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 990, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1564, + "src": "772:4:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20TokenHolder_$1013", + "typeString": "contract ERC20TokenHolder" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ERC20TokenHolder_$1013", + "typeString": "contract ERC20TokenHolder" + } + ], + "id": 989, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "764:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 991, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "764:13:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 987, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 968, + "src": "747:6:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1374", + "typeString": "contract IERC20" + } + }, + "id": 988, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1348, + "src": "747:16:5", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 992, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "747:31:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "722:56:5" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 996, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 994, + "name": "currentBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 986, + "src": "792:14:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 995, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "809:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "792:18:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1005, + "nodeType": "IfStatement", + "src": "789:95:5", + "trueBody": { + "id": 1004, + "nodeType": "Block", + "src": "812:72:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1000, + "name": "_creator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1050, + "src": "847:8:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1001, + "name": "currentBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 986, + "src": "857:14:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 997, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 968, + "src": "827:6:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1374", + "typeString": "contract IERC20" + } + }, + "id": 999, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeTransfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 1399, + "src": "827:19:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$1374_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$1374_$", + "typeString": "function (contract IERC20,address,uint256)" + } + }, + "id": 1002, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "827:45:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1003, + "nodeType": "ExpressionStatement", + "src": "827:45:5" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 1006, + "name": "Terminable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1083, + "src": "894:10:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Terminable_$1083_$", + "typeString": "type(contract Terminable)" + } + }, + "id": 1008, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "_terminate", + "nodeType": "MemberAccess", + "referencedDeclaration": 1082, + "src": "894:21:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 1009, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "894:23:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1010, + "nodeType": "ExpressionStatement", + "src": "894:23:5" + } + ] + }, + "documentation": null, + "id": 1012, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_terminate", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 983, + "nodeType": "ParameterList", + "parameters": [], + "src": "699:2:5" + }, + "returnParameters": { + "id": 984, + "nodeType": "ParameterList", + "parameters": [], + "src": "711:0:5" + }, + "scope": 1013, + "src": "680:245:5", + "stateMutability": "nonpayable", + "superFunction": 1082, + "visibility": "internal" + } + ], + "scope": 1014, + "src": "455:473:5" + } + ], + "src": "0:928:5" + }, + "id": 5 + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/IAlgoMiner.sol": { + "ast": { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/IAlgoMiner.sol", + "exportedSymbols": { + "IAlgoMiner": [ + 1046 + ] + }, + "id": 1047, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1015, + "literals": [ + "solidity", + "0.5", + ".4" + ], + "nodeType": "PragmaDirective", + "src": "0:22:6" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": false, + "id": 1046, + "linearizedBaseContracts": [ + 1046 + ], + "name": "IAlgoMiner", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "id": 1020, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "isAlgoMiner", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1016, + "nodeType": "ParameterList", + "parameters": [], + "src": "73:2:6" + }, + "returnParameters": { + "id": 1019, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1018, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1020, + "src": "97:4:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1017, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "97:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "96:6:6" + }, + "scope": 1046, + "src": "53:50:6", + "stateMutability": "pure", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 1025, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getMinerType", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1021, + "nodeType": "ParameterList", + "parameters": [], + "src": "130:2:6" + }, + "returnParameters": { + "id": 1024, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1023, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1025, + "src": "154:5:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 1022, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "154:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "153:7:6" + }, + "scope": 1046, + "src": "109:52:6", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 1030, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getCategory", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1026, + "nodeType": "ParameterList", + "parameters": [], + "src": "187:2:6" + }, + "returnParameters": { + "id": 1029, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1028, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1030, + "src": "211:5:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 1027, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "211:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "210:7:6" + }, + "scope": 1046, + "src": "167:51:6", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 1035, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getMiner", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1031, + "nodeType": "ParameterList", + "parameters": [], + "src": "241:2:6" + }, + "returnParameters": { + "id": 1034, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1033, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1035, + "src": "265:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1032, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "265:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "264:9:6" + }, + "scope": 1046, + "src": "224:50:6", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 1040, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getReferral", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1036, + "nodeType": "ParameterList", + "parameters": [], + "src": "300:2:6" + }, + "returnParameters": { + "id": 1039, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1038, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1040, + "src": "324:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1037, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "324:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "323:9:6" + }, + "scope": 1046, + "src": "280:53:6", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 1045, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "isMining", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1041, + "nodeType": "ParameterList", + "parameters": [], + "src": "356:2:6" + }, + "returnParameters": { + "id": 1044, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1043, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1045, + "src": "380:4:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1042, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "380:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "379:6:6" + }, + "scope": 1046, + "src": "339:47:6", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 1047, + "src": "26:363:6" + } + ], + "src": "0:389:6" + }, + "id": 6 + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/Terminable.sol": { + "ast": { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/Terminable.sol", + "exportedSymbols": { + "Terminable": [ + 1083 + ] + }, + "id": 1084, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1048, + "literals": [ + "solidity", + "0.5", + ".4" + ], + "nodeType": "PragmaDirective", + "src": "0:22:7" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 1083, + "linearizedBaseContracts": [ + 1083 + ], + "name": "Terminable", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 1050, + "name": "_creator", + "nodeType": "VariableDeclaration", + "scope": 1083, + "src": "55:25:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1049, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "55:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1052, + "name": "_terminated", + "nodeType": "VariableDeclaration", + "scope": 1083, + "src": "87:25:7", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1051, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "87:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "body": { + "id": 1064, + "nodeType": "Block", + "src": "144:70:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1058, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1055, + "name": "_creator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1050, + "src": "155:8:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1056, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1534, + "src": "166:3:7", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1057, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "166:10:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "155:21:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1059, + "nodeType": "ExpressionStatement", + "src": "155:21:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 1062, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1060, + "name": "_terminated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1052, + "src": "187:11:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 1061, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "201:5:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "187:19:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1063, + "nodeType": "ExpressionStatement", + "src": "187:19:7" + } + ] + }, + "documentation": null, + "id": 1065, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1053, + "nodeType": "ParameterList", + "parameters": [], + "src": "132:2:7" + }, + "returnParameters": { + "id": 1054, + "nodeType": "ParameterList", + "parameters": [], + "src": "144:0:7" + }, + "scope": 1083, + "src": "121:93:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1073, + "nodeType": "Block", + "src": "247:52:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1069, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "266:12:7", + "subExpression": { + "argumentTypes": null, + "id": 1068, + "name": "_terminated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1052, + "src": "267:11:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1067, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1537, + 1538 + ], + "referencedDeclaration": 1537, + "src": "258:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1070, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "258:21:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1071, + "nodeType": "ExpressionStatement", + "src": "258:21:7" + }, + { + "id": 1072, + "nodeType": "PlaceholderStatement", + "src": "290:1:7" + } + ] + }, + "documentation": null, + "id": 1074, + "name": "notTerminated", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 1066, + "nodeType": "ParameterList", + "parameters": [], + "src": "244:2:7" + }, + "src": "222:77:7", + "visibility": "internal" + }, + { + "body": { + "id": 1081, + "nodeType": "Block", + "src": "338:37:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1079, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1077, + "name": "_terminated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1052, + "src": "349:11:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1078, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "363:4:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "349:18:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1080, + "nodeType": "ExpressionStatement", + "src": "349:18:7" + } + ] + }, + "documentation": null, + "id": 1082, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_terminate", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1075, + "nodeType": "ParameterList", + "parameters": [], + "src": "326:2:7" + }, + "returnParameters": { + "id": 1076, + "nodeType": "ParameterList", + "parameters": [], + "src": "338:0:7" + }, + "scope": 1083, + "src": "307:68:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 1084, + "src": "26:352:7" + } + ], + "src": "0:378:7" + }, + "id": 7 + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol": { + "ast": { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol", + "exportedSymbols": { + "Roles": [ + 1177 + ] + }, + "id": 1178, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1085, + "literals": [ + "solidity", + "^", + "0.5", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "0:23:8" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": "@title Roles\n@dev Library for managing addresses assigned to a Role.", + "fullyImplemented": true, + "id": 1177, + "linearizedBaseContracts": [ + 1177 + ], + "name": "Roles", + "nodeType": "ContractDefinition", + "nodes": [ + { + "canonicalName": "Roles.Role", + "id": 1090, + "members": [ + { + "constant": false, + "id": 1089, + "name": "bearer", + "nodeType": "VariableDeclaration", + "scope": 1090, + "src": "150:32:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "typeName": { + "id": 1088, + "keyType": { + "id": 1086, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "159:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "150:25:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "valueType": { + "id": 1087, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "170:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Role", + "nodeType": "StructDefinition", + "scope": 1177, + "src": "128:61:8", + "visibility": "public" + }, + { + "body": { + "id": 1121, + "nodeType": "Block", + "src": "317:123:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1102, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1098, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1094, + "src": "335:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1100, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "354:1:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1099, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "346:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1101, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "346:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "335:21:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1097, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1537, + 1538 + ], + "referencedDeclaration": 1537, + "src": "327:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1103, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "327:30:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1104, + "nodeType": "ExpressionStatement", + "src": "327:30:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1110, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "375:19:8", + "subExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1107, + "name": "role", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1092, + "src": "380:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$1090_storage_ptr", + "typeString": "struct Roles.Role storage pointer" + } + }, + { + "argumentTypes": null, + "id": 1108, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1094, + "src": "386:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Role_$1090_storage_ptr", + "typeString": "struct Roles.Role storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1106, + "name": "has", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1176, + "src": "376:3:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Role_$1090_storage_ptr_$_t_address_$returns$_t_bool_$", + "typeString": "function (struct Roles.Role storage pointer,address) view returns (bool)" + } + }, + "id": 1109, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "376:18:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1105, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1537, + 1538 + ], + "referencedDeclaration": 1537, + "src": "367:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1111, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "367:28:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1112, + "nodeType": "ExpressionStatement", + "src": "367:28:8" + }, + { + "expression": { + "argumentTypes": null, + "id": 1119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1113, + "name": "role", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1092, + "src": "406:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$1090_storage_ptr", + "typeString": "struct Roles.Role storage pointer" + } + }, + "id": 1116, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "bearer", + "nodeType": "MemberAccess", + "referencedDeclaration": 1089, + "src": "406:11:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 1117, + "indexExpression": { + "argumentTypes": null, + "id": 1115, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1094, + "src": "418:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "406:20:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 1118, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "429:4:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "406:27:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1120, + "nodeType": "ExpressionStatement", + "src": "406:27:8" + } + ] + }, + "documentation": "@dev give an account access to this role", + "id": 1122, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "add", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1095, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1092, + "name": "role", + "nodeType": "VariableDeclaration", + "scope": 1122, + "src": "272:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$1090_storage_ptr", + "typeString": "struct Roles.Role" + }, + "typeName": { + "contractScope": null, + "id": 1091, + "name": "Role", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1090, + "src": "272:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$1090_storage_ptr", + "typeString": "struct Roles.Role" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1094, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 1122, + "src": "291:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1093, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "291:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "271:36:8" + }, + "returnParameters": { + "id": 1096, + "nodeType": "ParameterList", + "parameters": [], + "src": "317:0:8" + }, + "scope": 1177, + "src": "259:181:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1152, + "nodeType": "Block", + "src": "575:123:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1130, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1126, + "src": "593:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1132, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "612:1:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1131, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "604:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1133, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "604:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "593:21:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1129, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1537, + 1538 + ], + "referencedDeclaration": 1537, + "src": "585:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1135, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "585:30:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1136, + "nodeType": "ExpressionStatement", + "src": "585:30:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1139, + "name": "role", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1124, + "src": "637:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$1090_storage_ptr", + "typeString": "struct Roles.Role storage pointer" + } + }, + { + "argumentTypes": null, + "id": 1140, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1126, + "src": "643:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Role_$1090_storage_ptr", + "typeString": "struct Roles.Role storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1138, + "name": "has", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1176, + "src": "633:3:8", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Role_$1090_storage_ptr_$_t_address_$returns$_t_bool_$", + "typeString": "function (struct Roles.Role storage pointer,address) view returns (bool)" + } + }, + "id": 1141, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "633:18:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1137, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1537, + 1538 + ], + "referencedDeclaration": 1537, + "src": "625:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1142, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "625:27:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1143, + "nodeType": "ExpressionStatement", + "src": "625:27:8" + }, + { + "expression": { + "argumentTypes": null, + "id": 1150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1144, + "name": "role", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1124, + "src": "663:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$1090_storage_ptr", + "typeString": "struct Roles.Role storage pointer" + } + }, + "id": 1147, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "bearer", + "nodeType": "MemberAccess", + "referencedDeclaration": 1089, + "src": "663:11:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 1148, + "indexExpression": { + "argumentTypes": null, + "id": 1146, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1126, + "src": "675:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "663:20:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 1149, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "686:5:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "663:28:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 1151, + "nodeType": "ExpressionStatement", + "src": "663:28:8" + } + ] + }, + "documentation": "@dev remove an account's access to this role", + "id": 1153, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "remove", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1127, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1124, + "name": "role", + "nodeType": "VariableDeclaration", + "scope": 1153, + "src": "530:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$1090_storage_ptr", + "typeString": "struct Roles.Role" + }, + "typeName": { + "contractScope": null, + "id": 1123, + "name": "Role", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1090, + "src": "530:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$1090_storage_ptr", + "typeString": "struct Roles.Role" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1126, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 1153, + "src": "549:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1125, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "549:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "529:36:8" + }, + "returnParameters": { + "id": 1128, + "nodeType": "ParameterList", + "parameters": [], + "src": "575:0:8" + }, + "scope": 1177, + "src": "514:184:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1175, + "nodeType": "Block", + "src": "864:84:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1167, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1163, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1157, + "src": "882:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1165, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "901:1:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1164, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "893:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1166, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "893:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "882:21:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1162, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1537, + 1538 + ], + "referencedDeclaration": 1537, + "src": "874:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1168, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "874:30:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1169, + "nodeType": "ExpressionStatement", + "src": "874:30:8" + }, + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1170, + "name": "role", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1155, + "src": "921:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$1090_storage_ptr", + "typeString": "struct Roles.Role storage pointer" + } + }, + "id": 1171, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "bearer", + "nodeType": "MemberAccess", + "referencedDeclaration": 1089, + "src": "921:11:8", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 1173, + "indexExpression": { + "argumentTypes": null, + "id": 1172, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1157, + "src": "933:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "921:20:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1161, + "id": 1174, + "nodeType": "Return", + "src": "914:27:8" + } + ] + }, + "documentation": "@dev check if an account has this role\n@return bool", + "id": 1176, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "has", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1158, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1155, + "name": "role", + "nodeType": "VariableDeclaration", + "scope": 1176, + "src": "799:17:8", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$1090_storage_ptr", + "typeString": "struct Roles.Role" + }, + "typeName": { + "contractScope": null, + "id": 1154, + "name": "Role", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1090, + "src": "799:4:8", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$1090_storage_ptr", + "typeString": "struct Roles.Role" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1157, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 1176, + "src": "818:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1156, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "818:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "798:36:8" + }, + "returnParameters": { + "id": 1161, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1160, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1176, + "src": "858:4:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1159, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "858:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "857:6:8" + }, + "scope": 1177, + "src": "786:162:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 1178, + "src": "108:842:8" + } + ], + "src": "0:951:8" + }, + "id": 8 + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol": { + "ast": { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol", + "exportedSymbols": { + "SafeMath": [ + 1305 + ] + }, + "id": 1306, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1179, + "literals": [ + "solidity", + "^", + "0.5", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "0:23:9" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": "@title SafeMath\n@dev Unsigned math operations with safety checks that revert on error", + "fullyImplemented": true, + "id": 1305, + "linearizedBaseContracts": [ + 1305 + ], + "name": "SafeMath", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 1211, + "nodeType": "Block", + "src": "296:354:9", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1190, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1188, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1181, + "src": "527:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1189, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "532:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "527:6:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1194, + "nodeType": "IfStatement", + "src": "523:45:9", + "trueBody": { + "id": 1193, + "nodeType": "Block", + "src": "535:33:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1191, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "556:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "functionReturnParameters": 1187, + "id": 1192, + "nodeType": "Return", + "src": "549:8:9" + } + ] + } + }, + { + "assignments": [ + 1196 + ], + "declarations": [ + { + "constant": false, + "id": 1196, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 1211, + "src": "578:9:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1195, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "578:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1200, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1199, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1197, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1181, + "src": "590:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 1198, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1183, + "src": "594:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "590:5:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "578:17:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1206, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1204, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1202, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1196, + "src": "613:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 1203, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1181, + "src": "617:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "613:5:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 1205, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1183, + "src": "622:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "613:10:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1201, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1537, + 1538 + ], + "referencedDeclaration": 1537, + "src": "605:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "605:19:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1208, + "nodeType": "ExpressionStatement", + "src": "605:19:9" + }, + { + "expression": { + "argumentTypes": null, + "id": 1209, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1196, + "src": "642:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1187, + "id": 1210, + "nodeType": "Return", + "src": "635:8:9" + } + ] + }, + "documentation": "@dev Multiplies two unsigned integers, reverts on overflow.", + "id": 1212, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "mul", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1184, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1181, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1212, + "src": "242:9:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1180, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "242:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1183, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1212, + "src": "253:9:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1182, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "253:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "241:22:9" + }, + "returnParameters": { + "id": 1187, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1186, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1212, + "src": "287:7:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1185, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "287:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "286:9:9" + }, + "scope": 1305, + "src": "229:421:9", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1235, + "nodeType": "Block", + "src": "845:229:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1224, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1222, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1216, + "src": "929:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1223, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "933:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "929:5:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1221, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1537, + 1538 + ], + "referencedDeclaration": 1537, + "src": "921:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1225, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "921:14:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1226, + "nodeType": "ExpressionStatement", + "src": "921:14:9" + }, + { + "assignments": [ + 1228 + ], + "declarations": [ + { + "constant": false, + "id": 1228, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 1235, + "src": "945:9:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1227, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "945:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1232, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1231, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1229, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1214, + "src": "957:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 1230, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1216, + "src": "961:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "957:5:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "945:17:9" + }, + { + "expression": { + "argumentTypes": null, + "id": 1233, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1228, + "src": "1066:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1220, + "id": 1234, + "nodeType": "Return", + "src": "1059:8:9" + } + ] + }, + "documentation": "@dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero.", + "id": 1236, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "div", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1217, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1214, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1236, + "src": "791:9:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1213, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "791:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1216, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1236, + "src": "802:9:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1215, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "802:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "790:22:9" + }, + "returnParameters": { + "id": 1220, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1219, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1236, + "src": "836:7:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1218, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "836:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "835:9:9" + }, + "scope": 1305, + "src": "778:296:9", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1259, + "nodeType": "Block", + "src": "1272:78:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1248, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1246, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1240, + "src": "1290:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 1247, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1238, + "src": "1295:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1290:6:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1245, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1537, + 1538 + ], + "referencedDeclaration": 1537, + "src": "1282:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1249, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1282:15:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1250, + "nodeType": "ExpressionStatement", + "src": "1282:15:9" + }, + { + "assignments": [ + 1252 + ], + "declarations": [ + { + "constant": false, + "id": 1252, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 1259, + "src": "1307:9:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1251, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1307:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1256, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1255, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1253, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1238, + "src": "1319:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 1254, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1240, + "src": "1323:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1319:5:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1307:17:9" + }, + { + "expression": { + "argumentTypes": null, + "id": 1257, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1252, + "src": "1342:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1244, + "id": 1258, + "nodeType": "Return", + "src": "1335:8:9" + } + ] + }, + "documentation": "@dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend).", + "id": 1260, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "sub", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1241, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1238, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1260, + "src": "1218:9:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1237, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1218:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1240, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1260, + "src": "1229:9:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1239, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1229:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1217:22:9" + }, + "returnParameters": { + "id": 1244, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1243, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1260, + "src": "1263:7:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1242, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1263:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1262:9:9" + }, + "scope": 1305, + "src": "1205:145:9", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1283, + "nodeType": "Block", + "src": "1498:78:9", + "statements": [ + { + "assignments": [ + 1270 + ], + "declarations": [ + { + "constant": false, + "id": 1270, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 1283, + "src": "1508:9:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1269, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1508:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1274, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1273, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1271, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1262, + "src": "1520:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 1272, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1264, + "src": "1524:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1520:5:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1508:17:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1278, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1276, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1270, + "src": "1543:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 1277, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1262, + "src": "1548:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1543:6:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1275, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1537, + 1538 + ], + "referencedDeclaration": 1537, + "src": "1535:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1279, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1535:15:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1280, + "nodeType": "ExpressionStatement", + "src": "1535:15:9" + }, + { + "expression": { + "argumentTypes": null, + "id": 1281, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1270, + "src": "1568:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1268, + "id": 1282, + "nodeType": "Return", + "src": "1561:8:9" + } + ] + }, + "documentation": "@dev Adds two unsigned integers, reverts on overflow.", + "id": 1284, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "add", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1265, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1262, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1284, + "src": "1444:9:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1261, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1444:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1264, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1284, + "src": "1455:9:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1263, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1455:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1443:22:9" + }, + "returnParameters": { + "id": 1268, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1267, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1284, + "src": "1489:7:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1266, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1489:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1488:9:9" + }, + "scope": 1305, + "src": "1431:145:9", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1303, + "nodeType": "Block", + "src": "1795:54:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1296, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1294, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1288, + "src": "1813:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1295, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1818:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1813:6:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1293, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1537, + 1538 + ], + "referencedDeclaration": 1537, + "src": "1805:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1297, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1805:15:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1298, + "nodeType": "ExpressionStatement", + "src": "1805:15:9" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1301, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1299, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1286, + "src": "1837:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "%", + "rightExpression": { + "argumentTypes": null, + "id": 1300, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1288, + "src": "1841:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1837:5:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1292, + "id": 1302, + "nodeType": "Return", + "src": "1830:12:9" + } + ] + }, + "documentation": "@dev Divides two unsigned integers and returns the remainder (unsigned integer modulo),\nreverts when dividing by zero.", + "id": 1304, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "mod", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1289, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1286, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1304, + "src": "1741:9:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1285, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1741:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1288, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1304, + "src": "1752:9:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1287, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1752:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1740:22:9" + }, + "returnParameters": { + "id": 1292, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1291, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1304, + "src": "1786:7:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1290, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1786:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1785:9:9" + }, + "scope": 1305, + "src": "1728:121:9", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 1306, + "src": "125:1726:9" + } + ], + "src": "0:1852:9" + }, + "id": 9 + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol": { + "ast": { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "exportedSymbols": { + "IERC20": [ + 1374 + ] + }, + "id": 1375, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1307, + "literals": [ + "solidity", + "^", + "0.5", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "0:23:10" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "interface", + "documentation": "@title ERC20 interface\n@dev see https://github.com/ethereum/EIPs/issues/20", + "fullyImplemented": false, + "id": 1374, + "linearizedBaseContracts": [ + 1374 + ], + "name": "IERC20", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "id": 1316, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1312, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1309, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1316, + "src": "155:10:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1308, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "155:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1311, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1316, + "src": "167:13:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1310, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "167:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "154:27:10" + }, + "returnParameters": { + "id": 1315, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1314, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1316, + "src": "200:4:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1313, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "200:4:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "199:6:10" + }, + "scope": 1374, + "src": "137:69:10", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 1325, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1321, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1318, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1325, + "src": "229:15:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1317, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "229:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1320, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1325, + "src": "246:13:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1319, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "246:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "228:32:10" + }, + "returnParameters": { + "id": 1324, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1323, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1325, + "src": "279:4:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1322, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "279:4:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "278:6:10" + }, + "scope": 1374, + "src": "212:73:10", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 1336, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1332, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1327, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 1336, + "src": "313:12:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1326, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "313:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1329, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1336, + "src": "327:10:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1328, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "327:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1331, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1336, + "src": "339:13:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1330, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "339:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "312:41:10" + }, + "returnParameters": { + "id": 1335, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1334, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1336, + "src": "372:4:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1333, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "372:4:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "371:6:10" + }, + "scope": 1374, + "src": "291:87:10", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 1341, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "totalSupply", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1337, + "nodeType": "ParameterList", + "parameters": [], + "src": "404:2:10" + }, + "returnParameters": { + "id": 1340, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1339, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1341, + "src": "430:7:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1338, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "430:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "429:9:10" + }, + "scope": 1374, + "src": "384:55:10", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 1348, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "balanceOf", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1344, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1343, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 1348, + "src": "464:11:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1342, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "464:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "463:13:10" + }, + "returnParameters": { + "id": 1347, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1346, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1348, + "src": "500:7:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1345, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "500:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "499:9:10" + }, + "scope": 1374, + "src": "445:64:10", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 1357, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "allowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1353, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1350, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 1357, + "src": "534:13:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1349, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "534:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1352, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1357, + "src": "549:15:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1351, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "549:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "533:32:10" + }, + "returnParameters": { + "id": 1356, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1355, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1357, + "src": "589:7:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1354, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "589:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "588:9:10" + }, + "scope": 1374, + "src": "515:83:10", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "anonymous": false, + "documentation": null, + "id": 1365, + "name": "Transfer", + "nodeType": "EventDefinition", + "parameters": { + "id": 1364, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1359, + "indexed": true, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 1365, + "src": "619:20:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1358, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "619:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1361, + "indexed": true, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1365, + "src": "641:18:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1360, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "641:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1363, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1365, + "src": "661:13:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1362, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "661:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "618:57:10" + }, + "src": "604:72:10" + }, + { + "anonymous": false, + "documentation": null, + "id": 1373, + "name": "Approval", + "nodeType": "EventDefinition", + "parameters": { + "id": 1372, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1367, + "indexed": true, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 1373, + "src": "697:21:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1366, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "697:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1369, + "indexed": true, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1373, + "src": "720:23:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1368, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "720:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1371, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1373, + "src": "745:13:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1370, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "745:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "696:63:10" + }, + "src": "682:78:10" + } + ], + "scope": 1375, + "src": "114:648:10" + } + ], + "src": "0:763:10" + }, + "id": 10 + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol": { + "ast": { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol", + "exportedSymbols": { + "SafeERC20": [ + 1519 + ] + }, + "id": 1520, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1376, + "literals": [ + "solidity", + "^", + "0.5", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "0:23:11" + }, + { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "file": "./IERC20.sol", + "id": 1377, + "nodeType": "ImportDirective", + "scope": 1520, + "sourceUnit": 1375, + "src": "25:22:11", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol", + "file": "../../math/SafeMath.sol", + "id": 1378, + "nodeType": "ImportDirective", + "scope": 1520, + "sourceUnit": 1306, + "src": "48:33:11", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": "@title SafeERC20\n@dev Wrappers around ERC20 operations that throw on failure.\nTo use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\nwhich allows you to call the safe operations as `token.safeTransfer(...)`, etc.", + "fullyImplemented": true, + "id": 1519, + "linearizedBaseContracts": [ + 1519 + ], + "name": "SafeERC20", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 1381, + "libraryName": { + "contractScope": null, + "id": 1379, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1305, + "src": "382:8:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$1305", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "376:27:11", + "typeName": { + "id": 1380, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "395:7:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "body": { + "id": 1398, + "nodeType": "Block", + "src": "481:51:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1393, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1385, + "src": "514:2:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1394, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1387, + "src": "518:5:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1391, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1383, + "src": "499:5:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1374", + "typeString": "contract IERC20" + } + }, + "id": 1392, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 1316, + "src": "499:14:11", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 1395, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "499:25:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1390, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1537, + 1538 + ], + "referencedDeclaration": 1537, + "src": "491:7:11", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1396, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "491:34:11", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1397, + "nodeType": "ExpressionStatement", + "src": "491:34:11" + } + ] + }, + "documentation": null, + "id": 1399, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeTransfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1388, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1383, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 1399, + "src": "431:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1374", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 1382, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1374, + "src": "431:6:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1374", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1385, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1399, + "src": "445:10:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1384, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "445:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1387, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1399, + "src": "457:13:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1386, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "457:7:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "430:41:11" + }, + "returnParameters": { + "id": 1389, + "nodeType": "ParameterList", + "parameters": [], + "src": "481:0:11" + }, + "scope": 1519, + "src": "409:123:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1419, + "nodeType": "Block", + "src": "628:61:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1413, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1403, + "src": "665:4:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1414, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1405, + "src": "671:2:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1415, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1407, + "src": "675:5:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1411, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1401, + "src": "646:5:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1374", + "typeString": "contract IERC20" + } + }, + "id": 1412, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 1336, + "src": "646:18:11", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,address,uint256) external returns (bool)" + } + }, + "id": 1416, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "646:35:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1410, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1537, + 1538 + ], + "referencedDeclaration": 1537, + "src": "638:7:11", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1417, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "638:44:11", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1418, + "nodeType": "ExpressionStatement", + "src": "638:44:11" + } + ] + }, + "documentation": null, + "id": 1420, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeTransferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1408, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1401, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 1420, + "src": "564:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1374", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 1400, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1374, + "src": "564:6:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1374", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1403, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 1420, + "src": "578:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1402, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "578:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1405, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1420, + "src": "592:10:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1404, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "592:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1407, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1420, + "src": "604:13:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1406, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "604:7:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "563:55:11" + }, + "returnParameters": { + "id": 1409, + "nodeType": "ParameterList", + "parameters": [], + "src": "628:0:11" + }, + "scope": 1519, + "src": "538:151:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1455, + "nodeType": "Block", + "src": "771:353:11", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1444, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1432, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1430, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1426, + "src": "1007:5:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1431, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1016:1:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1007:10:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 1433, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "1006:12:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1442, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1437, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1558, + "src": "1047:4:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeERC20_$1519", + "typeString": "library SafeERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_SafeERC20_$1519", + "typeString": "library SafeERC20" + } + ], + "id": 1436, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1039:7:11", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1438, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1039:13:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1439, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1424, + "src": "1054:7:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1434, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1422, + "src": "1023:5:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1374", + "typeString": "contract IERC20" + } + }, + "id": 1435, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "allowance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1357, + "src": "1023:15:11", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", + "typeString": "function (address,address) view external returns (uint256)" + } + }, + "id": 1440, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1023:39:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1441, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1066:1:11", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1023:44:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 1443, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "1022:46:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1006:62:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1429, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1537, + 1538 + ], + "referencedDeclaration": 1537, + "src": "998:7:11", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "998:71:11", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1446, + "nodeType": "ExpressionStatement", + "src": "998:71:11" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1450, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1424, + "src": "1101:7:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1451, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1426, + "src": "1110:5:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1448, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1422, + "src": "1087:5:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1374", + "typeString": "contract IERC20" + } + }, + "id": 1449, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "approve", + "nodeType": "MemberAccess", + "referencedDeclaration": 1325, + "src": "1087:13:11", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 1452, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1087:29:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1447, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1537, + 1538 + ], + "referencedDeclaration": 1537, + "src": "1079:7:11", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1453, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1079:38:11", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1454, + "nodeType": "ExpressionStatement", + "src": "1079:38:11" + } + ] + }, + "documentation": null, + "id": 1456, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeApprove", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1427, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1422, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 1456, + "src": "716:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1374", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 1421, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1374, + "src": "716:6:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1374", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1424, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1456, + "src": "730:15:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1423, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "730:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1426, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1456, + "src": "747:13:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1425, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "747:7:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "715:46:11" + }, + "returnParameters": { + "id": 1428, + "nodeType": "ParameterList", + "parameters": [], + "src": "771:0:11" + }, + "scope": 1519, + "src": "695:429:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1486, + "nodeType": "Block", + "src": "1216:145:11", + "statements": [ + { + "assignments": [ + 1466 + ], + "declarations": [ + { + "constant": false, + "id": 1466, + "name": "newAllowance", + "nodeType": "VariableDeclaration", + "scope": 1486, + "src": "1226:20:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1465, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1226:7:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1477, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1475, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1462, + "src": "1293:5:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1470, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1558, + "src": "1273:4:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeERC20_$1519", + "typeString": "library SafeERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_SafeERC20_$1519", + "typeString": "library SafeERC20" + } + ], + "id": 1469, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1265:7:11", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1471, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1265:13:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1472, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1460, + "src": "1280:7:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1467, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1458, + "src": "1249:5:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1374", + "typeString": "contract IERC20" + } + }, + "id": 1468, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "allowance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1357, + "src": "1249:15:11", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", + "typeString": "function (address,address) view external returns (uint256)" + } + }, + "id": 1473, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1249:39:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1474, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1284, + "src": "1249:43:11", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1476, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1249:50:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1226:73:11" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1481, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1460, + "src": "1331:7:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1482, + "name": "newAllowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1466, + "src": "1340:12:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1479, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1458, + "src": "1317:5:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1374", + "typeString": "contract IERC20" + } + }, + "id": 1480, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "approve", + "nodeType": "MemberAccess", + "referencedDeclaration": 1325, + "src": "1317:13:11", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 1483, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1317:36:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1478, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1537, + 1538 + ], + "referencedDeclaration": 1537, + "src": "1309:7:11", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1484, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1309:45:11", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1485, + "nodeType": "ExpressionStatement", + "src": "1309:45:11" + } + ] + }, + "documentation": null, + "id": 1487, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeIncreaseAllowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1463, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1458, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 1487, + "src": "1161:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1374", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 1457, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1374, + "src": "1161:6:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1374", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1460, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1487, + "src": "1175:15:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1459, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1175:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1462, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1487, + "src": "1192:13:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1461, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1192:7:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1160:46:11" + }, + "returnParameters": { + "id": 1464, + "nodeType": "ParameterList", + "parameters": [], + "src": "1216:0:11" + }, + "scope": 1519, + "src": "1130:231:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1517, + "nodeType": "Block", + "src": "1453:145:11", + "statements": [ + { + "assignments": [ + 1497 + ], + "declarations": [ + { + "constant": false, + "id": 1497, + "name": "newAllowance", + "nodeType": "VariableDeclaration", + "scope": 1517, + "src": "1463:20:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1496, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1463:7:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1508, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1506, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1493, + "src": "1530:5:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1501, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1558, + "src": "1510:4:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeERC20_$1519", + "typeString": "library SafeERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_SafeERC20_$1519", + "typeString": "library SafeERC20" + } + ], + "id": 1500, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1502:7:11", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1502, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1502:13:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1503, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1491, + "src": "1517:7:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1498, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1489, + "src": "1486:5:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1374", + "typeString": "contract IERC20" + } + }, + "id": 1499, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "allowance", + "nodeType": "MemberAccess", + "referencedDeclaration": 1357, + "src": "1486:15:11", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", + "typeString": "function (address,address) view external returns (uint256)" + } + }, + "id": 1504, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1486:39:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1505, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1260, + "src": "1486:43:11", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1507, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1486:50:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1463:73:11" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1512, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1491, + "src": "1568:7:11", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1513, + "name": "newAllowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1497, + "src": "1577:12:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1510, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1489, + "src": "1554:5:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1374", + "typeString": "contract IERC20" + } + }, + "id": 1511, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "approve", + "nodeType": "MemberAccess", + "referencedDeclaration": 1325, + "src": "1554:13:11", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 1514, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1554:36:11", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1509, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1537, + 1538 + ], + "referencedDeclaration": 1537, + "src": "1546:7:11", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1515, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1546:45:11", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1516, + "nodeType": "ExpressionStatement", + "src": "1546:45:11" + } + ] + }, + "documentation": null, + "id": 1518, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeDecreaseAllowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1494, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1489, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 1518, + "src": "1398:12:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1374", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 1488, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1374, + "src": "1398:6:11", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1374", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1491, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1518, + "src": "1412:15:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1490, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1412:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1493, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1518, + "src": "1429:13:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1492, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1429:7:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1397:46:11" + }, + "returnParameters": { + "id": 1495, + "nodeType": "ParameterList", + "parameters": [], + "src": "1453:0:11" + }, + "scope": 1519, + "src": "1367:231:11", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 1520, + "src": "352:1248:11" + } + ], + "src": "0:1601:11" + }, + "id": 11 + } + } +} \ No newline at end of file diff --git a/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/bin/AlgoMiner.abi b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/bin/AlgoMiner.abi new file mode 100644 index 000000000..8f3d1e3d2 --- /dev/null +++ b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/bin/AlgoMiner.abi @@ -0,0 +1 @@ +[{"constant":false,"inputs":[],"name":"terminate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"pauseMining","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"isAlgoMiner","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"isMining","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"startMining","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newMinerAddress","type":"address"}],"name":"migrateMiner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"account","type":"address"}],"name":"addSupervisor","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"account","type":"address"}],"name":"addCoreTeam","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getMiner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getReferral","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"account","type":"address"}],"name":"isSystem","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"stopAndRemoveOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getCurrentDay","outputs":[{"name":"","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"resumeMining","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getMinerType","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"account","type":"address"}],"name":"isCoreTeam","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"account","type":"address"}],"name":"addSystem","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getCategory","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"account","type":"address"}],"name":"isSupervisor","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwnerAddress","type":"address"},{"name":"newReferralAddress","type":"address"}],"name":"resetMiner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"mine","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"deactivateMiner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"activateMiner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"renounceSupervisor","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getCurrentYearSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getCurrentYear","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceCoreTeam","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"stopMining","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"renounceSystem","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"minerType","type":"uint8"},{"name":"category","type":"uint8"},{"name":"minerAccountAddress","type":"address"},{"name":"referralAccountAddress","type":"address"},{"name":"tokenAddress","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"}] \ No newline at end of file diff --git a/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/bin/AlgoMiner.bin b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/bin/AlgoMiner.bin new file mode 100644 index 000000000..e60d416fa --- /dev/null +++ b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/bin/AlgoMiner.bin @@ -0,0 +1 @@ +60806040523480156200001157600080fd5b5060405160a08062001458833981018060405260a08110156200003357600080fd5b5080516020820151604083015160608401516080909401516000805433600160a060020a0319918216811760a060020a60ff02191690925560018054909116600160a060020a038416179055939492939192916200009a906401000000006200018e810204565b620000ae33640100000000620001ac810204565b620000c233640100000000620001c7810204565b600560ff85161115620000d457600080fd5b600160a060020a0383161515620000ea57600080fd5b6000856001811115620000f957fe5b14156200011657600160a060020a03821615156200011657600080fd5b6005805486919060ff1916600183818111156200012f57fe5b0217905550506005805461ff00191661010060ff9590951694909402939093176201000060b060020a03191662010000600160a060020a03938416021790925560068054600160a060020a031916929091169190911790555062000275565b620001a96002826401000000006200110d620001e282021704565b50565b620001a96003826401000000006200110d620001e282021704565b620001a96004826401000000006200110d620001e282021704565b600160a060020a0381161515620001f857600080fd5b6200020d82826401000000006200023d810204565b156200021857600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b6000600160a060020a03821615156200025557600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b6111d380620002856000396000f3fe608060405234801561001057600080fd5b50600436106101ec576000357c0100000000000000000000000000000000000000000000000000000000900480634969ae70116101215780639e614ca0116100bf578063ce41607a1161008e578063ce41607a14610422578063d43acc791461042a578063da40867914610432578063e9d618591461043a576101ec565b80639e614ca0146103f0578063b2a32cd5146103f8578063be95249414610400578063cdfd0f6414610408576101ec565b806380258e47116100fb57806380258e471461038c57806381a24459146103945780638329138f146103ba57806399f4b251146103e8576101ec565b80634969ae7014610322578063608d3d3d1461034057806374be759214610366576101ec565b80632e6b68491161018e57806334cdcf261161016857806334cdcf26146102cd578063363aa6c7146102f35780633e6968b6146102fb578063427534a41461031a576101ec565b80632e6b68491461027b578063302c11ca146102a1578063329b1c92146102c5576101ec565b806319a74ab3116101ca57806319a74ab31461021f57806321b79d9814610227578063231d4e2a1461022f57806329d10b6e14610255576101ec565b80630c08bf88146101f1578063162f986d146101fb5780631777fb4b14610203575b600080fd5b6101f9610442565b005b6101f9610460565b61020b6104cf565b604080519115158252519081900360200190f35b61020b6104d4565b6101f961050b565b6101f96004803603602081101561024557600080fd5b5035600160a060020a03166105a1565b6101f96004803603602081101561026b57600080fd5b5035600160a060020a031661068b565b6101f96004803603602081101561029157600080fd5b5035600160a060020a03166106a8565b6102a96106c5565b60408051600160a060020a039092168252519081900360200190f35b6102a96106da565b61020b600480360360208110156102e357600080fd5b5035600160a060020a03166106e9565b6101f9610704565b6103036107b5565b6040805161ffff9092168252519081900360200190f35b6101f96107c6565b61032a610832565b6040805160ff9092168252519081900360200190f35b61020b6004803603602081101561035657600080fd5b5035600160a060020a0316610846565b6101f96004803603602081101561037c57600080fd5b5035600160a060020a0316610859565b61032a610876565b61020b600480360360208110156103aa57600080fd5b5035600160a060020a0316610884565b6101f9600480360360408110156103d057600080fd5b50600160a060020a0381358116916020013516610897565b6101f961094a565b6101f9610b86565b6101f9610bf7565b6101f9610d53565b610410610d5c565b60408051918252519081900360200190f35b61032a610d62565b6101f9610d85565b6101f9610d8e565b6101f9610e1f565b61044b33610846565b151561045657600080fd5b61045e610e28565b565b60005460a060020a900460ff161561047757600080fd5b61048033610884565b151561048b57600080fd5b600160065460a060020a900460ff1660038111156104a557fe5b146104af57600080fd5b600680546002919060a060020a60ff02191660a060020a835b0217905550565b600190565b6000600160065460a060020a900460ff1660038111156104f057fe5b148015610506575060065460a860020a900460ff165b905090565b60005460a060020a900460ff161561052257600080fd5b600554620100009004600160a060020a0316331461053f57600080fd5b600160065460a060020a900460ff16600381111561055957fe5b1461056357600080fd5b60065460a860020a900460ff161561057a57600080fd5b6006805475ff000000000000000000000000000000000000000000191660a860020a179055565b6105aa33610846565b15156105b557600080fd5b600060065460a060020a900460ff1660038111156105cf57fe5b146105d957600080fd5b600154604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051610688928492600160a060020a03909116916370a0823191602480820192602092909190829003018186803b15801561064357600080fd5b505afa158015610657573d6000803e3d6000fd5b505050506040513d602081101561066d57600080fd5b5051600154600160a060020a0316919063ffffffff610eee16565b50565b61069433610884565b151561069f57600080fd5b61068881610fa6565b6106b133610846565b15156106bc57600080fd5b61068881610fb7565b600554620100009004600160a060020a031690565b600654600160a060020a031690565b60006106fc60028363ffffffff610fc816565b90505b919050565b60005460a060020a900460ff161561071b57600080fd5b61072433610884565b151561072f57600080fd5b600360065460a060020a900460ff16600381111561074957fe5b141561075457600080fd5b600680546005805475ffffffffffffffffffffffffffffffffffffffff00001916905560a060020a60ff021916740300000000000000000000000000000000000000001775ff00ffffffffffffffffffffffffffffffffffffffff19169055565b60065460b860020a900461ffff1690565b60005460a060020a900460ff16156107dd57600080fd5b6107e633610884565b15156107f157600080fd5b600260065460a060020a900460ff16600381111561080b57fe5b1461081557600080fd5b600680546001919060a060020a60ff02191660a060020a836104c8565b60055460009060ff16600181111561050657fe5b60006106fc60038363ffffffff610fc816565b610862336106e9565b151561086d57600080fd5b61068881610fff565b600554610100900460ff1690565b60006106fc60048363ffffffff610fc816565b60005460a060020a900460ff16156108ae57600080fd5b6108b733610884565b15156108c257600080fd5b600360065460a060020a900460ff1660038111156108dc57fe5b146108e657600080fd5b600680546005805475ffffffffffffffffffffffffffffffffffffffff0000191662010000600160a060020a039687160217905560a060020a60ff02191660a060020a1773ffffffffffffffffffffffffffffffffffffffff191691909216179055565b60005460a060020a900460ff161561096157600080fd5b61096a336106e9565b151561097557600080fd5b600060055460ff16600181111561098857fe5b1461099257600080fd5b600160065460a060020a900460ff1660038111156109ac57fe5b146109b657600080fd5b60065460a860020a900460ff1615156109ce57600080fd5b60065460b860020a900461ffff161515610a44576006805478ffff00000000000000000000000000000000000000000000001976ff0000000000000000000000000000000000000000000019909116760100000000000000000000000000000000000000000000171660b860020a179055610b0c565b60068054600161ffff60b860020a8084048216929092018116820278ffff00000000000000000000000000000000000000000000001990931692909217928390559091041661016e1415610b0c576006805478ffff000000000000000000000000000000000000000000000019600160ff760100000000000000000000000000000000000000000000808504821692909201160276ff0000000000000000000000000000000000000000000019909216919091171660b860020a179055600754600290046007555b60075461016d90046064600a82020460008211610b2857600080fd5b60008111610b3557600080fd5b600554600154610b5f91600160a060020a039182169162010000909104168463ffffffff610eee16565b600654600154610b8291600160a060020a0391821691168363ffffffff610eee16565b5050565b60005460a060020a900460ff1615610b9d57600080fd5b610ba633610846565b1515610bb157600080fd5b600060065460a060020a900460ff166003811115610bcb57fe5b1415610bd657600080fd5b6006805475ffff000000000000000000000000000000000000000019169055565b60005460a060020a900460ff1615610c0e57600080fd5b610c1733610846565b1515610c2257600080fd5b600060065460a060020a900460ff166003811115610c3c57fe5b14610c4657600080fd5b600060055460ff166001811115610c5957fe5b148015610c665750600754155b1561081557600554600090610c8290610100900460ff16611010565b600154604080517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290519293506064600a850204840192600092600160a060020a0316916370a08231916024808301926020929190829003018186803b158015610cf357600080fd5b505afa158015610d07573d6000803e3d6000fd5b505050506040513d6020811015610d1d57600080fd5b50519050818114610d2d57600080fd5b600283046007555050600680546001925060a060020a60ff02191660a060020a836104c8565b61045e336110c2565b60075490565b600654760100000000000000000000000000000000000000000000900460ff1690565b61045e336110d3565b60005460a060020a900460ff1615610da557600080fd5b600554620100009004600160a060020a03163314610dc257600080fd5b600160065460a060020a900460ff166003811115610ddc57fe5b14610de657600080fd5b60065460a860020a900460ff161515610dfe57600080fd5b6006805475ff00000000000000000000000000000000000000000019169055565b61045e336110e4565b600154604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600092600160a060020a0316916370a08231916024808301926020929190829003018186803b158015610e8c57600080fd5b505afa158015610ea0573d6000803e3d6000fd5b505050506040513d6020811015610eb657600080fd5b505190506000811115610ee657600054600154610ee691600160a060020a0391821691168363ffffffff610eee16565b6106886110f5565b82600160a060020a031663a9059cbb83836040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b158015610f6a57600080fd5b505af1158015610f7e573d6000803e3d6000fd5b505050506040513d6020811015610f9457600080fd5b50511515610fa157600080fd5b505050565b61068860048263ffffffff61110d16565b61068860038263ffffffff61110d16565b6000600160a060020a0382161515610fdf57600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b61068860028263ffffffff61110d16565b600060ff8216151561102d575069152d02c7e14af68000006106ff565b8160ff166001141561104a575069d3c21bcecceda10000006106ff565b8160ff166002141561106857506a01a784379d99db420000006106ff565b8160ff166003141561108657506a027b46536c66c8e30000006106ff565b8160ff16600414156110a457506a034f086f3b33b6840000006106ff565b8160ff16600514156106ff57506a0422ca8b0a00a4250000006106ff565b61068860048263ffffffff61115b16565b61068860038263ffffffff61115b16565b61068860028263ffffffff61115b16565b6000805460a060020a60ff02191660a060020a179055565b600160a060020a038116151561112257600080fd5b61112c8282610fc8565b1561113657600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b600160a060020a038116151561117057600080fd5b61117a8282610fc8565b151561118557600080fd5b600160a060020a0316600090815260209190915260409020805460ff1916905556fea165627a7a72305820a2a7d81c4bf237d833a792f3dd14af3f88c7c6e7d320648513595fcbe01959490029 \ No newline at end of file diff --git a/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/bin/AlgoMiner.json b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/bin/AlgoMiner.json new file mode 100644 index 000000000..cff6704e3 --- /dev/null +++ b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/bin/AlgoMiner.json @@ -0,0 +1,466 @@ +{ + "abi": [ + { + "constant": false, + "inputs": [], + "name": "terminate", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "pauseMining", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "isAlgoMiner", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "pure", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "isMining", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "startMining", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "newMinerAddress", + "type": "address" + } + ], + "name": "migrateMiner", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "addSupervisor", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "addCoreTeam", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getMiner", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getReferral", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "isSystem", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "stopAndRemoveOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getCurrentDay", + "outputs": [ + { + "name": "", + "type": "uint16" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "resumeMining", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getMinerType", + "outputs": [ + { + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "isCoreTeam", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "addSystem", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getCategory", + "outputs": [ + { + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "isSupervisor", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "newOwnerAddress", + "type": "address" + }, + { + "name": "newReferralAddress", + "type": "address" + } + ], + "name": "resetMiner", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "mine", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "deactivateMiner", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "activateMiner", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renounceSupervisor", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getCurrentYearSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getCurrentYear", + "outputs": [ + { + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renounceCoreTeam", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "stopMining", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renounceSystem", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "name": "minerType", + "type": "uint8" + }, + { + "name": "category", + "type": "uint8" + }, + { + "name": "minerAccountAddress", + "type": "address" + }, + { + "name": "referralAccountAddress", + "type": "address" + }, + { + "name": "tokenAddress", + "type": "address" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + } + ], + "bytecode": "60806040523480156200001157600080fd5b5060405160a08062001458833981018060405260a08110156200003357600080fd5b5080516020820151604083015160608401516080909401516000805433600160a060020a0319918216811760a060020a60ff02191690925560018054909116600160a060020a038416179055939492939192916200009a906401000000006200018e810204565b620000ae33640100000000620001ac810204565b620000c233640100000000620001c7810204565b600560ff85161115620000d457600080fd5b600160a060020a0383161515620000ea57600080fd5b6000856001811115620000f957fe5b14156200011657600160a060020a03821615156200011657600080fd5b6005805486919060ff1916600183818111156200012f57fe5b0217905550506005805461ff00191661010060ff9590951694909402939093176201000060b060020a03191662010000600160a060020a03938416021790925560068054600160a060020a031916929091169190911790555062000275565b620001a96002826401000000006200110d620001e282021704565b50565b620001a96003826401000000006200110d620001e282021704565b620001a96004826401000000006200110d620001e282021704565b600160a060020a0381161515620001f857600080fd5b6200020d82826401000000006200023d810204565b156200021857600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b6000600160a060020a03821615156200025557600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b6111d380620002856000396000f3fe608060405234801561001057600080fd5b50600436106101ec576000357c0100000000000000000000000000000000000000000000000000000000900480634969ae70116101215780639e614ca0116100bf578063ce41607a1161008e578063ce41607a14610422578063d43acc791461042a578063da40867914610432578063e9d618591461043a576101ec565b80639e614ca0146103f0578063b2a32cd5146103f8578063be95249414610400578063cdfd0f6414610408576101ec565b806380258e47116100fb57806380258e471461038c57806381a24459146103945780638329138f146103ba57806399f4b251146103e8576101ec565b80634969ae7014610322578063608d3d3d1461034057806374be759214610366576101ec565b80632e6b68491161018e57806334cdcf261161016857806334cdcf26146102cd578063363aa6c7146102f35780633e6968b6146102fb578063427534a41461031a576101ec565b80632e6b68491461027b578063302c11ca146102a1578063329b1c92146102c5576101ec565b806319a74ab3116101ca57806319a74ab31461021f57806321b79d9814610227578063231d4e2a1461022f57806329d10b6e14610255576101ec565b80630c08bf88146101f1578063162f986d146101fb5780631777fb4b14610203575b600080fd5b6101f9610442565b005b6101f9610460565b61020b6104cf565b604080519115158252519081900360200190f35b61020b6104d4565b6101f961050b565b6101f96004803603602081101561024557600080fd5b5035600160a060020a03166105a1565b6101f96004803603602081101561026b57600080fd5b5035600160a060020a031661068b565b6101f96004803603602081101561029157600080fd5b5035600160a060020a03166106a8565b6102a96106c5565b60408051600160a060020a039092168252519081900360200190f35b6102a96106da565b61020b600480360360208110156102e357600080fd5b5035600160a060020a03166106e9565b6101f9610704565b6103036107b5565b6040805161ffff9092168252519081900360200190f35b6101f96107c6565b61032a610832565b6040805160ff9092168252519081900360200190f35b61020b6004803603602081101561035657600080fd5b5035600160a060020a0316610846565b6101f96004803603602081101561037c57600080fd5b5035600160a060020a0316610859565b61032a610876565b61020b600480360360208110156103aa57600080fd5b5035600160a060020a0316610884565b6101f9600480360360408110156103d057600080fd5b50600160a060020a0381358116916020013516610897565b6101f961094a565b6101f9610b86565b6101f9610bf7565b6101f9610d53565b610410610d5c565b60408051918252519081900360200190f35b61032a610d62565b6101f9610d85565b6101f9610d8e565b6101f9610e1f565b61044b33610846565b151561045657600080fd5b61045e610e28565b565b60005460a060020a900460ff161561047757600080fd5b61048033610884565b151561048b57600080fd5b600160065460a060020a900460ff1660038111156104a557fe5b146104af57600080fd5b600680546002919060a060020a60ff02191660a060020a835b0217905550565b600190565b6000600160065460a060020a900460ff1660038111156104f057fe5b148015610506575060065460a860020a900460ff165b905090565b60005460a060020a900460ff161561052257600080fd5b600554620100009004600160a060020a0316331461053f57600080fd5b600160065460a060020a900460ff16600381111561055957fe5b1461056357600080fd5b60065460a860020a900460ff161561057a57600080fd5b6006805475ff000000000000000000000000000000000000000000191660a860020a179055565b6105aa33610846565b15156105b557600080fd5b600060065460a060020a900460ff1660038111156105cf57fe5b146105d957600080fd5b600154604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051610688928492600160a060020a03909116916370a0823191602480820192602092909190829003018186803b15801561064357600080fd5b505afa158015610657573d6000803e3d6000fd5b505050506040513d602081101561066d57600080fd5b5051600154600160a060020a0316919063ffffffff610eee16565b50565b61069433610884565b151561069f57600080fd5b61068881610fa6565b6106b133610846565b15156106bc57600080fd5b61068881610fb7565b600554620100009004600160a060020a031690565b600654600160a060020a031690565b60006106fc60028363ffffffff610fc816565b90505b919050565b60005460a060020a900460ff161561071b57600080fd5b61072433610884565b151561072f57600080fd5b600360065460a060020a900460ff16600381111561074957fe5b141561075457600080fd5b600680546005805475ffffffffffffffffffffffffffffffffffffffff00001916905560a060020a60ff021916740300000000000000000000000000000000000000001775ff00ffffffffffffffffffffffffffffffffffffffff19169055565b60065460b860020a900461ffff1690565b60005460a060020a900460ff16156107dd57600080fd5b6107e633610884565b15156107f157600080fd5b600260065460a060020a900460ff16600381111561080b57fe5b1461081557600080fd5b600680546001919060a060020a60ff02191660a060020a836104c8565b60055460009060ff16600181111561050657fe5b60006106fc60038363ffffffff610fc816565b610862336106e9565b151561086d57600080fd5b61068881610fff565b600554610100900460ff1690565b60006106fc60048363ffffffff610fc816565b60005460a060020a900460ff16156108ae57600080fd5b6108b733610884565b15156108c257600080fd5b600360065460a060020a900460ff1660038111156108dc57fe5b146108e657600080fd5b600680546005805475ffffffffffffffffffffffffffffffffffffffff0000191662010000600160a060020a039687160217905560a060020a60ff02191660a060020a1773ffffffffffffffffffffffffffffffffffffffff191691909216179055565b60005460a060020a900460ff161561096157600080fd5b61096a336106e9565b151561097557600080fd5b600060055460ff16600181111561098857fe5b1461099257600080fd5b600160065460a060020a900460ff1660038111156109ac57fe5b146109b657600080fd5b60065460a860020a900460ff1615156109ce57600080fd5b60065460b860020a900461ffff161515610a44576006805478ffff00000000000000000000000000000000000000000000001976ff0000000000000000000000000000000000000000000019909116760100000000000000000000000000000000000000000000171660b860020a179055610b0c565b60068054600161ffff60b860020a8084048216929092018116820278ffff00000000000000000000000000000000000000000000001990931692909217928390559091041661016e1415610b0c576006805478ffff000000000000000000000000000000000000000000000019600160ff760100000000000000000000000000000000000000000000808504821692909201160276ff0000000000000000000000000000000000000000000019909216919091171660b860020a179055600754600290046007555b60075461016d90046064600a82020460008211610b2857600080fd5b60008111610b3557600080fd5b600554600154610b5f91600160a060020a039182169162010000909104168463ffffffff610eee16565b600654600154610b8291600160a060020a0391821691168363ffffffff610eee16565b5050565b60005460a060020a900460ff1615610b9d57600080fd5b610ba633610846565b1515610bb157600080fd5b600060065460a060020a900460ff166003811115610bcb57fe5b1415610bd657600080fd5b6006805475ffff000000000000000000000000000000000000000019169055565b60005460a060020a900460ff1615610c0e57600080fd5b610c1733610846565b1515610c2257600080fd5b600060065460a060020a900460ff166003811115610c3c57fe5b14610c4657600080fd5b600060055460ff166001811115610c5957fe5b148015610c665750600754155b1561081557600554600090610c8290610100900460ff16611010565b600154604080517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290519293506064600a850204840192600092600160a060020a0316916370a08231916024808301926020929190829003018186803b158015610cf357600080fd5b505afa158015610d07573d6000803e3d6000fd5b505050506040513d6020811015610d1d57600080fd5b50519050818114610d2d57600080fd5b600283046007555050600680546001925060a060020a60ff02191660a060020a836104c8565b61045e336110c2565b60075490565b600654760100000000000000000000000000000000000000000000900460ff1690565b61045e336110d3565b60005460a060020a900460ff1615610da557600080fd5b600554620100009004600160a060020a03163314610dc257600080fd5b600160065460a060020a900460ff166003811115610ddc57fe5b14610de657600080fd5b60065460a860020a900460ff161515610dfe57600080fd5b6006805475ff00000000000000000000000000000000000000000019169055565b61045e336110e4565b600154604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600092600160a060020a0316916370a08231916024808301926020929190829003018186803b158015610e8c57600080fd5b505afa158015610ea0573d6000803e3d6000fd5b505050506040513d6020811015610eb657600080fd5b505190506000811115610ee657600054600154610ee691600160a060020a0391821691168363ffffffff610eee16565b6106886110f5565b82600160a060020a031663a9059cbb83836040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b158015610f6a57600080fd5b505af1158015610f7e573d6000803e3d6000fd5b505050506040513d6020811015610f9457600080fd5b50511515610fa157600080fd5b505050565b61068860048263ffffffff61110d16565b61068860038263ffffffff61110d16565b6000600160a060020a0382161515610fdf57600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b61068860028263ffffffff61110d16565b600060ff8216151561102d575069152d02c7e14af68000006106ff565b8160ff166001141561104a575069d3c21bcecceda10000006106ff565b8160ff166002141561106857506a01a784379d99db420000006106ff565b8160ff166003141561108657506a027b46536c66c8e30000006106ff565b8160ff16600414156110a457506a034f086f3b33b6840000006106ff565b8160ff16600514156106ff57506a0422ca8b0a00a4250000006106ff565b61068860048263ffffffff61115b16565b61068860038263ffffffff61115b16565b61068860028263ffffffff61115b16565b6000805460a060020a60ff02191660a060020a179055565b600160a060020a038116151561112257600080fd5b61112c8282610fc8565b1561113657600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b600160a060020a038116151561117057600080fd5b61117a8282610fc8565b151561118557600080fd5b600160a060020a0316600090815260209190915260409020805460ff1916905556fea165627a7a72305820a2a7d81c4bf237d833a792f3dd14af3f88c7c6e7d320648513595fcbe01959490029", + "functionHashes": { + "activateMiner()": "b2a32cd5", + "addCoreTeam(address)": "2e6b6849", + "addSupervisor(address)": "29d10b6e", + "addSystem(address)": "74be7592", + "deactivateMiner()": "9e614ca0", + "getCategory()": "80258e47", + "getCurrentDay()": "3e6968b6", + "getCurrentYear()": "ce41607a", + "getCurrentYearSupply()": "cdfd0f64", + "getMiner()": "302c11ca", + "getMinerType()": "4969ae70", + "getReferral()": "329b1c92", + "isAlgoMiner()": "1777fb4b", + "isCoreTeam(address)": "608d3d3d", + "isMining()": "19a74ab3", + "isSupervisor(address)": "81a24459", + "isSystem(address)": "34cdcf26", + "migrateMiner(address)": "231d4e2a", + "mine()": "99f4b251", + "pauseMining()": "162f986d", + "renounceCoreTeam()": "d43acc79", + "renounceSupervisor()": "be952494", + "renounceSystem()": "e9d61859", + "resetMiner(address,address)": "8329138f", + "resumeMining()": "427534a4", + "startMining()": "21b79d98", + "stopAndRemoveOwnership()": "363aa6c7", + "stopMining()": "da408679", + "terminate()": "0c08bf88" + }, + "gasEstimates": { + "creation": { + "codeDepositCost": "912600", + "executionCost": "infinite", + "totalCost": "infinite" + }, + "external": { + "activateMiner()": "infinite", + "addCoreTeam(address)": "infinite", + "addSupervisor(address)": "infinite", + "addSystem(address)": "infinite", + "deactivateMiner()": "infinite", + "getCategory()": "474", + "getCurrentDay()": "581", + "getCurrentYear()": "473", + "getCurrentYearSupply()": "514", + "getMiner()": "635", + "getMinerType()": "501", + "getReferral()": "646", + "isAlgoMiner()": "300", + "isCoreTeam(address)": "infinite", + "isMining()": "880", + "isSupervisor(address)": "infinite", + "isSystem(address)": "infinite", + "migrateMiner(address)": "infinite", + "mine()": "infinite", + "pauseMining()": "infinite", + "renounceCoreTeam()": "infinite", + "renounceSupervisor()": "infinite", + "renounceSystem()": "infinite", + "resetMiner(address,address)": "infinite", + "resumeMining()": "infinite", + "startMining()": "21741", + "stopAndRemoveOwnership()": "infinite", + "stopMining()": "21695", + "terminate()": "infinite" + } + } +} \ No newline at end of file diff --git a/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/bin/AlgoPool-sol-output.json b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/bin/AlgoPool-sol-output.json new file mode 100644 index 000000000..ae00e7b9d --- /dev/null +++ b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/bin/AlgoPool-sol-output.json @@ -0,0 +1,11930 @@ +{ + "contracts": { + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoCommon.sol": { + "AlgoCommon": { + "abi": [], + "devdoc": { + "methods": {} + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "6080604052348015600f57600080fd5b50603580601d6000396000f3fe6080604052600080fdfea165627a7a72305820c142737f5004f0e270be8e9321f75139c2de559ee56245828f39cd6b8e6ac07b0029", + "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH1 0xF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x35 DUP1 PUSH1 0x1D PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG1 PUSH6 0x627A7A723058 KECCAK256 0xc1 TIMESTAMP PUSH20 0x7F5004F0E270BE8E9321F75139C2DE559EE56245 DUP3 DUP16 CODECOPY 0xcd PUSH12 0x8E6AC07B0029000000000000 ", + "sourceMap": "26:1033:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;26:1033:0;;;;;;;" + }, + "gasEstimates": { + "creation": { + "codeDepositCost": "10600", + "executionCost": "66", + "totalCost": "10666" + }, + "internal": { + "getCapacityByCategory(uint8)": "infinite" + } + }, + "methodIdentifiers": {} + }, + "metadata": "{\"compiler\":{\"version\":\"0.5.4+commit.9549d8ff\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoCommon.sol\":\"AlgoCommon\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoCommon.sol\":{\"keccak256\":\"0x014debd2c96ba7aba7faef24eac1f1a5d46791b55ae55fbd51d7945bf21277e0\",\"urls\":[\"bzzr://b8d1cffc7f1bfdc8c911d90b785cf9c2723b24bd162d7cfd730e127f56932fe9\"]}},\"version\":1}", + "userdoc": { + "methods": {} + } + } + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoCoreTeamRole.sol": { + "AlgoCoreTeamRole": { + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "addCoreTeam", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "isCoreTeam", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renounceCoreTeam", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + } + ], + "devdoc": { + "methods": {} + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "gasEstimates": null, + "methodIdentifiers": { + "addCoreTeam(address)": "2e6b6849", + "isCoreTeam(address)": "608d3d3d", + "renounceCoreTeam()": "d43acc79" + } + }, + "metadata": "", + "userdoc": { + "methods": {} + } + } + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoPool.sol": { + "AlgoPool": { + "abi": [ + { + "constant": false, + "inputs": [], + "name": "terminate", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "addCoreTeam", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "isCoreTeam", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renounceCoreTeam", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "minerAddress", + "type": "address" + } + ], + "name": "transferToMiner", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "name": "poolType", + "type": "uint8" + }, + { + "name": "tokenAddress", + "type": "address" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + } + ], + "devdoc": { + "methods": {} + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "608060405234801561001057600080fd5b506040516040806107e88339810180604052604081101561003057600080fd5b5080516020909101516000805433600160a060020a0319918216811760a060020a60ff02191690925560018054909116600160a060020a03841617905561007f906401000000006100a3810204565b6003805483919060ff19166001838181111561009757fe5b0217905550505061014c565b6100bb6002826401000000006105c76100be82021704565b50565b600160a060020a03811615156100d357600080fd5b6100e68282640100000000610115810204565b156100f057600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b6000600160a060020a038216151561012c57600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b61068d8061015b6000396000f3fe608060405234801561001057600080fd5b506004361061005a5760e060020a60003504630c08bf88811461005f5780632e6b684914610069578063608d3d3d1461008f578063d43acc79146100c9578063fe4028bb146100d1575b600080fd5b6100676100f7565b005b6100676004803603602081101561007f57600080fd5b5035600160a060020a0316610115565b6100b5600480360360208110156100a557600080fd5b5035600160a060020a0316610135565b604080519115158252519081900360200190f35b610067610150565b610067600480360360208110156100e757600080fd5b5035600160a060020a0316610159565b61010033610135565b151561010b57600080fd5b610113610320565b565b61011e33610135565b151561012957600080fd5b610132816103e6565b50565b600061014860028363ffffffff6103f716565b90505b919050565b6101133361042e565b60005474010000000000000000000000000000000000000000900460ff161561018157600080fd5b61018a33610135565b151561019557600080fd5b600160a060020a03811660009081526004602052604090205460ff16156101bb57600080fd5b600081905080600160a060020a0316631777fb4b6040518163ffffffff1660e060020a02815260040160206040518083038186803b1580156101fc57600080fd5b505afa158015610210573d6000803e3d6000fd5b505050506040513d602081101561022657600080fd5b5051151561023357600080fd5b600081600160a060020a03166380258e476040518163ffffffff1660e060020a02815260040160206040518083038186803b15801561027157600080fd5b505afa158015610285573d6000803e3d6000fd5b505050506040513d602081101561029b57600080fd5b50519050600560ff821611156102b057600080fd5b60006102bb8261043f565b9050600160035460ff1660018111156102d057fe5b14156102e0576064600a82020490505b600160a060020a038085166000908152600460205260409020805460ff191660019081179091555461031a9116858363ffffffff6104f116565b50505050565b600154604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600092600160a060020a0316916370a08231916024808301926020929190829003018186803b15801561038457600080fd5b505afa158015610398573d6000803e3d6000fd5b505050506040513d60208110156103ae57600080fd5b5051905060008111156103de576000546001546103de91600160a060020a0391821691168363ffffffff6104f116565b610132610590565b61013260028263ffffffff6105c716565b6000600160a060020a038216151561040e57600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b61013260028263ffffffff61061516565b600060ff8216151561045c575069152d02c7e14af680000061014b565b8160ff1660011415610479575069d3c21bcecceda100000061014b565b8160ff166002141561049757506a01a784379d99db4200000061014b565b8160ff16600314156104b557506a027b46536c66c8e300000061014b565b8160ff16600414156104d357506a034f086f3b33b68400000061014b565b8160ff166005141561014b57506a0422ca8b0a00a42500000061014b565b82600160a060020a031663a9059cbb83836040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561055457600080fd5b505af1158015610568573d6000803e3d6000fd5b505050506040513d602081101561057e57600080fd5b5051151561058b57600080fd5b505050565b6000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b600160a060020a03811615156105dc57600080fd5b6105e682826103f7565b156105f057600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b600160a060020a038116151561062a57600080fd5b61063482826103f7565b151561063f57600080fd5b600160a060020a0316600090815260209190915260409020805460ff1916905556fea165627a7a72305820da6d23ac8f4b151242d9a9cc936a0d9469d337bb92eddce5cc529e4f80d49b290029", + "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH1 0x40 DUP1 PUSH2 0x7E8 DUP4 CODECOPY DUP2 ADD DUP1 PUSH1 0x40 MSTORE PUSH1 0x40 DUP2 LT ISZERO PUSH2 0x30 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP DUP1 MLOAD PUSH1 0x20 SWAP1 SWAP2 ADD MLOAD PUSH1 0x0 DUP1 SLOAD CALLER PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB NOT SWAP2 DUP3 AND DUP2 OR PUSH1 0xA0 PUSH1 0x2 EXP PUSH1 0xFF MUL NOT AND SWAP1 SWAP3 SSTORE PUSH1 0x1 DUP1 SLOAD SWAP1 SWAP2 AND PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP5 AND OR SWAP1 SSTORE PUSH2 0x7F SWAP1 PUSH5 0x100000000 PUSH2 0xA3 DUP2 MUL DIV JUMP JUMPDEST PUSH1 0x3 DUP1 SLOAD DUP4 SWAP2 SWAP1 PUSH1 0xFF NOT AND PUSH1 0x1 DUP4 DUP2 DUP2 GT ISZERO PUSH2 0x97 JUMPI INVALID JUMPDEST MUL OR SWAP1 SSTORE POP POP POP PUSH2 0x14C JUMP JUMPDEST PUSH2 0xBB PUSH1 0x2 DUP3 PUSH5 0x100000000 PUSH2 0x5C7 PUSH2 0xBE DUP3 MUL OR DIV JUMP JUMPDEST POP JUMP JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP2 AND ISZERO ISZERO PUSH2 0xD3 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xE6 DUP3 DUP3 PUSH5 0x100000000 PUSH2 0x115 DUP2 MUL DIV JUMP JUMPDEST ISZERO PUSH2 0xF0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP1 SLOAD PUSH1 0xFF NOT AND PUSH1 0x1 OR SWAP1 SSTORE JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP3 AND ISZERO ISZERO PUSH2 0x12C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND SWAP1 JUMP JUMPDEST PUSH2 0x68D DUP1 PUSH2 0x15B PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x5A JUMPI PUSH1 0xE0 PUSH1 0x2 EXP PUSH1 0x0 CALLDATALOAD DIV PUSH4 0xC08BF88 DUP2 EQ PUSH2 0x5F JUMPI DUP1 PUSH4 0x2E6B6849 EQ PUSH2 0x69 JUMPI DUP1 PUSH4 0x608D3D3D EQ PUSH2 0x8F JUMPI DUP1 PUSH4 0xD43ACC79 EQ PUSH2 0xC9 JUMPI DUP1 PUSH4 0xFE4028BB EQ PUSH2 0xD1 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x67 PUSH2 0xF7 JUMP JUMPDEST STOP JUMPDEST PUSH2 0x67 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x7F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH2 0x115 JUMP JUMPDEST PUSH2 0xB5 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0xA5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH2 0x135 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 ISZERO ISZERO DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH2 0x67 PUSH2 0x150 JUMP JUMPDEST PUSH2 0x67 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0xE7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH2 0x159 JUMP JUMPDEST PUSH2 0x100 CALLER PUSH2 0x135 JUMP JUMPDEST ISZERO ISZERO PUSH2 0x10B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x113 PUSH2 0x320 JUMP JUMPDEST JUMP JUMPDEST PUSH2 0x11E CALLER PUSH2 0x135 JUMP JUMPDEST ISZERO ISZERO PUSH2 0x129 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x132 DUP2 PUSH2 0x3E6 JUMP JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 PUSH2 0x148 PUSH1 0x2 DUP4 PUSH4 0xFFFFFFFF PUSH2 0x3F7 AND JUMP JUMPDEST SWAP1 POP JUMPDEST SWAP2 SWAP1 POP JUMP JUMPDEST PUSH2 0x113 CALLER PUSH2 0x42E JUMP JUMPDEST PUSH1 0x0 SLOAD PUSH21 0x10000000000000000000000000000000000000000 SWAP1 DIV PUSH1 0xFF AND ISZERO PUSH2 0x181 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x18A CALLER PUSH2 0x135 JUMP JUMPDEST ISZERO ISZERO PUSH2 0x195 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP2 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x4 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND ISZERO PUSH2 0x1BB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP2 SWAP1 POP DUP1 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH4 0x1777FB4B PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 PUSH1 0x2 EXP MUL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x1FC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x210 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x226 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP MLOAD ISZERO ISZERO PUSH2 0x233 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP2 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH4 0x80258E47 PUSH1 0x40 MLOAD DUP2 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 PUSH1 0x2 EXP MUL DUP2 MSTORE PUSH1 0x4 ADD PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x271 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x285 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x29B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP MLOAD SWAP1 POP PUSH1 0x5 PUSH1 0xFF DUP3 AND GT ISZERO PUSH2 0x2B0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH2 0x2BB DUP3 PUSH2 0x43F JUMP JUMPDEST SWAP1 POP PUSH1 0x1 PUSH1 0x3 SLOAD PUSH1 0xFF AND PUSH1 0x1 DUP2 GT ISZERO PUSH2 0x2D0 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x2E0 JUMPI PUSH1 0x64 PUSH1 0xA DUP3 MUL DIV SWAP1 POP JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP1 DUP6 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x4 PUSH1 0x20 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP1 SLOAD PUSH1 0xFF NOT AND PUSH1 0x1 SWAP1 DUP2 OR SWAP1 SWAP2 SSTORE SLOAD PUSH2 0x31A SWAP2 AND DUP6 DUP4 PUSH4 0xFFFFFFFF PUSH2 0x4F1 AND JUMP JUMPDEST POP POP POP POP JUMP JUMPDEST PUSH1 0x1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH32 0x70A0823100000000000000000000000000000000000000000000000000000000 DUP2 MSTORE ADDRESS PUSH1 0x4 DUP3 ADD MSTORE SWAP1 MLOAD PUSH1 0x0 SWAP3 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND SWAP2 PUSH4 0x70A08231 SWAP2 PUSH1 0x24 DUP1 DUP4 ADD SWAP3 PUSH1 0x20 SWAP3 SWAP2 SWAP1 DUP3 SWAP1 SUB ADD DUP2 DUP7 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x384 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x398 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x3AE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP MLOAD SWAP1 POP PUSH1 0x0 DUP2 GT ISZERO PUSH2 0x3DE JUMPI PUSH1 0x0 SLOAD PUSH1 0x1 SLOAD PUSH2 0x3DE SWAP2 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB SWAP2 DUP3 AND SWAP2 AND DUP4 PUSH4 0xFFFFFFFF PUSH2 0x4F1 AND JUMP JUMPDEST PUSH2 0x132 PUSH2 0x590 JUMP JUMPDEST PUSH2 0x132 PUSH1 0x2 DUP3 PUSH4 0xFFFFFFFF PUSH2 0x5C7 AND JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP3 AND ISZERO ISZERO PUSH2 0x40E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 SLOAD PUSH1 0xFF AND SWAP1 JUMP JUMPDEST PUSH2 0x132 PUSH1 0x2 DUP3 PUSH4 0xFFFFFFFF PUSH2 0x615 AND JUMP JUMPDEST PUSH1 0x0 PUSH1 0xFF DUP3 AND ISZERO ISZERO PUSH2 0x45C JUMPI POP PUSH10 0x152D02C7E14AF6800000 PUSH2 0x14B JUMP JUMPDEST DUP2 PUSH1 0xFF AND PUSH1 0x1 EQ ISZERO PUSH2 0x479 JUMPI POP PUSH10 0xD3C21BCECCEDA1000000 PUSH2 0x14B JUMP JUMPDEST DUP2 PUSH1 0xFF AND PUSH1 0x2 EQ ISZERO PUSH2 0x497 JUMPI POP PUSH11 0x1A784379D99DB42000000 PUSH2 0x14B JUMP JUMPDEST DUP2 PUSH1 0xFF AND PUSH1 0x3 EQ ISZERO PUSH2 0x4B5 JUMPI POP PUSH11 0x27B46536C66C8E3000000 PUSH2 0x14B JUMP JUMPDEST DUP2 PUSH1 0xFF AND PUSH1 0x4 EQ ISZERO PUSH2 0x4D3 JUMPI POP PUSH11 0x34F086F3B33B684000000 PUSH2 0x14B JUMP JUMPDEST DUP2 PUSH1 0xFF AND PUSH1 0x5 EQ ISZERO PUSH2 0x14B JUMPI POP PUSH11 0x422CA8B0A00A425000000 PUSH2 0x14B JUMP JUMPDEST DUP3 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH4 0xA9059CBB DUP4 DUP4 PUSH1 0x40 MLOAD DUP4 PUSH4 0xFFFFFFFF AND PUSH1 0xE0 PUSH1 0x2 EXP MUL DUP2 MSTORE PUSH1 0x4 ADD DUP1 DUP4 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND DUP2 MSTORE PUSH1 0x20 ADD DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP3 POP POP POP PUSH1 0x20 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0x554 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x568 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x20 DUP2 LT ISZERO PUSH2 0x57E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP MLOAD ISZERO ISZERO PUSH2 0x58B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 SLOAD PUSH21 0xFF0000000000000000000000000000000000000000 NOT AND PUSH21 0x10000000000000000000000000000000000000000 OR SWAP1 SSTORE JUMP JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP2 AND ISZERO ISZERO PUSH2 0x5DC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x5E6 DUP3 DUP3 PUSH2 0x3F7 JUMP JUMPDEST ISZERO PUSH2 0x5F0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP1 SLOAD PUSH1 0xFF NOT AND PUSH1 0x1 OR SWAP1 SSTORE JUMP JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP2 AND ISZERO ISZERO PUSH2 0x62A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x634 DUP3 DUP3 PUSH2 0x3F7 JUMP JUMPDEST ISZERO ISZERO PUSH2 0x63F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 SWAP2 SWAP1 SWAP2 MSTORE PUSH1 0x40 SWAP1 KECCAK256 DUP1 SLOAD PUSH1 0xFF NOT AND SWAP1 SSTORE JUMP INVALID LOG1 PUSH6 0x627A7A723058 KECCAK256 0xda PUSH14 0x23AC8F4B151242D9A9CC936A0D94 PUSH10 0xD337BB92EDDCE5CC529E 0x4f DUP1 0xd4 SWAP12 0x29 STOP 0x29 ", + "sourceMap": "551:1237:2:-;;;821:176;8:9:-1;5:2;;;30:1;27;20:12;5:2;821:176:2;;;;;;;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;821:176:2;;;;;;;155:8:5;:21;;166:10;-1:-1:-1;;;;;;155:21:5;;;;;-1:-1:-1;;;;;;187:19:5;;;;-1:-1:-1;635:29:3;;;;;-1:-1:-1;;;;;635:29:3;;;;;366:24:1;;:12;;;;:24;:::i;:::-;969:9:2;:20;;981:8;;969:9;-1:-1:-1;;969:20:2;;981:8;969:20;;;;;;;;;;;;;821:176;;551:1237;;822:96:1;881:29;:16;902:7;881:20;;;;;;:29;:::i;:::-;822:96;:::o;259:181:6:-;-1:-1:-1;;;;;335:21:6;;;;327:30;;;;;;376:18;380:4;386:7;376:3;;;;:18;:::i;:::-;375:19;367:28;;;;;;-1:-1:-1;;;;;406:20:6;:11;:20;;;;;;;;;;;:27;;-1:-1:-1;;406:27:6;429:4;406:27;;;259:181::o;786:162::-;858:4;-1:-1:-1;;;;;882:21:6;;;;874:30;;;;;;-1:-1:-1;;;;;;921:20:6;:11;:20;;;;;;;;;;;;;;;786:162::o;551:1237:2:-;;;;;;;" + }, + "gasEstimates": { + "creation": { + "codeDepositCost": "335400", + "executionCost": "infinite", + "totalCost": "infinite" + }, + "external": { + "addCoreTeam(address)": "infinite", + "isCoreTeam(address)": "infinite", + "renounceCoreTeam()": "infinite", + "terminate()": "infinite", + "transferToMiner(address)": "infinite" + } + }, + "methodIdentifiers": { + "addCoreTeam(address)": "2e6b6849", + "isCoreTeam(address)": "608d3d3d", + "renounceCoreTeam()": "d43acc79", + "terminate()": "0c08bf88", + "transferToMiner(address)": "fe4028bb" + } + }, + "metadata": "{\"compiler\":{\"version\":\"0.5.4+commit.9549d8ff\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":false,\"inputs\":[],\"name\":\"terminate\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"addCoreTeam\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"isCoreTeam\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceCoreTeam\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"minerAddress\",\"type\":\"address\"}],\"name\":\"transferToMiner\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"poolType\",\"type\":\"uint8\"},{\"name\":\"tokenAddress\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoPool.sol\":\"AlgoPool\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoCommon.sol\":{\"keccak256\":\"0x014debd2c96ba7aba7faef24eac1f1a5d46791b55ae55fbd51d7945bf21277e0\",\"urls\":[\"bzzr://b8d1cffc7f1bfdc8c911d90b785cf9c2723b24bd162d7cfd730e127f56932fe9\"]},\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoCoreTeamRole.sol\":{\"keccak256\":\"0x8252ea038586ac8cf89aea6810c1a75d84c2eba48d6b0ecc5f1783929de398a3\",\"urls\":[\"bzzr://3bd6a88368eeb6abb70573d16d481bc20bc22b6c0d3e60702c59c9fab4202528\"]},\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoPool.sol\":{\"keccak256\":\"0xc30444f5c43be3fa9d5c27d4c8d3024c8e8182215d0750b120094fe5f7beb1cd\",\"urls\":[\"bzzr://fb67170fc2d84ce83219d2091c6df3183a413d26c81cfeaa632a6afc78cebb1c\"]},\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/ERC20TokenHolder.sol\":{\"keccak256\":\"0x2c964fd13fcc46f0326055bd50569f2bfb32ea7963780763d77b85ed51320205\",\"urls\":[\"bzzr://3fd83f4de7769670f420f04909921357a8ace3b9e0eb08b7c9df0ee57741d347\"]},\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/IAlgoMiner.sol\":{\"keccak256\":\"0x861339f0f02c28b332f5d8dc165127fa1a402bbbfd7c3923acca26a6139e4f2b\",\"urls\":[\"bzzr://87e5728ff1289cbcc9669fae3a5b994b3a4e0788a2673595adcac700eea8c411\"]},\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/Terminable.sol\":{\"keccak256\":\"0x8704856f4ea109e3df4805b3b3dd7d9b9026e94f80c42c6d750356d46036a530\",\"urls\":[\"bzzr://18db91d498a487cbc7085490ff2bf017849f88bb4032ea7d840bab3561c45cf4\"]},\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol\":{\"keccak256\":\"0x659ba0f9a3392cd50a8a5fafaf5dfd8c6a0878f6a4613bceff4e90dceddcd865\",\"urls\":[\"bzzr://f704341d520fbc98716541f1b3f67737f0ee6e94adf072a66acb2bd25d593c2b\"]},\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x965012d27b4262d7a41f5028cbb30c51ebd9ecd4be8fb30380aaa7a3c64fbc8b\",\"urls\":[\"bzzr://41ca38f6b0fa4b77b0feec43e422cfbec48b7eb38a41edf0b85c77e8d9a296b1\"]},\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x079c4e23ee448f529e43bfa3c4e8fb4be52cd0318ee923a276835bedf45b93d8\",\"urls\":[\"bzzr://48248e86f64407a95f241d6c5c8cfea6b4d4ebf4ebb467e5c98c8af3868fafe4\"]},\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol\":{\"keccak256\":\"0x05fcee7431cd35cd312e14e7f316a44ca3ccc5fb3b859aefc15c1a5db94add7e\",\"urls\":[\"bzzr://5ba67fb83aa7806883a335d53a27dcf1f53b75fa38dedd57893cc84633aa4d4c\"]}},\"version\":1}", + "userdoc": { + "methods": {} + } + } + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/ERC20TokenHolder.sol": { + "ERC20TokenHolder": { + "abi": [ + { + "inputs": [ + { + "name": "tokenAddress", + "type": "address" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + } + ], + "devdoc": { + "methods": {} + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "gasEstimates": null, + "methodIdentifiers": {} + }, + "metadata": "", + "userdoc": { + "methods": {} + } + } + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/IAlgoMiner.sol": { + "IAlgoMiner": { + "abi": [ + { + "constant": true, + "inputs": [], + "name": "isAlgoMiner", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "pure", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "isMining", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getMiner", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getReferral", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getMinerType", + "outputs": [ + { + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getCategory", + "outputs": [ + { + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + } + ], + "devdoc": { + "methods": {} + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "gasEstimates": null, + "methodIdentifiers": { + "getCategory()": "80258e47", + "getMiner()": "302c11ca", + "getMinerType()": "4969ae70", + "getReferral()": "329b1c92", + "isAlgoMiner()": "1777fb4b", + "isMining()": "19a74ab3" + } + }, + "metadata": "", + "userdoc": { + "methods": {} + } + } + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/Terminable.sol": { + "Terminable": { + "abi": [ + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + } + ], + "devdoc": { + "methods": {} + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "gasEstimates": null, + "methodIdentifiers": {} + }, + "metadata": "", + "userdoc": { + "methods": {} + } + } + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol": { + "Roles": { + "abi": [], + "devdoc": { + "details": "Library for managing addresses assigned to a Role.", + "methods": {}, + "title": "Roles" + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea165627a7a7230582072caac54fe9b00b8b816307b2a5ded8de356c5be6012002ca36f81b18422d8260029", + "opcodes": "PUSH1 0x4C PUSH1 0x2C PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x0 DUP2 EQ PUSH1 0x1C JUMPI PUSH1 0x1E JUMP JUMPDEST INVALID JUMPDEST POP ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG1 PUSH6 0x627A7A723058 KECCAK256 PUSH19 0xCAAC54FE9B00B8B816307B2A5DED8DE356C5BE PUSH1 0x12 STOP 0x2c LOG3 PUSH16 0x81B18422D82600290000000000000000 ", + "sourceMap": "108:842:6:-;;132:2:-1;166:7;155:9;146:7;137:37;252:7;246:14;243:1;238:23;232:4;229:33;270:1;265:20;;;;222:63;;265:20;274:9;222:63;;298:9;295:1;288:20;328:4;319:7;311:22;352:7;343;336:24" + }, + "gasEstimates": { + "creation": { + "codeDepositCost": "15200", + "executionCost": "116", + "totalCost": "15316" + }, + "internal": { + "add(struct Roles.Role storage pointer,address)": "infinite", + "has(struct Roles.Role storage pointer,address)": "infinite", + "remove(struct Roles.Role storage pointer,address)": "infinite" + } + }, + "methodIdentifiers": {} + }, + "metadata": "{\"compiler\":{\"version\":\"0.5.4+commit.9549d8ff\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Library for managing addresses assigned to a Role.\",\"methods\":{},\"title\":\"Roles\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol\":\"Roles\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol\":{\"keccak256\":\"0x659ba0f9a3392cd50a8a5fafaf5dfd8c6a0878f6a4613bceff4e90dceddcd865\",\"urls\":[\"bzzr://f704341d520fbc98716541f1b3f67737f0ee6e94adf072a66acb2bd25d593c2b\"]}},\"version\":1}", + "userdoc": { + "methods": {} + } + } + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol": { + "SafeMath": { + "abi": [], + "devdoc": { + "details": "Unsigned math operations with safety checks that revert on error", + "methods": {}, + "title": "SafeMath" + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea165627a7a72305820c8fdc9a15986ffb647c7551d6f3c5b251c8209308e82491b559a3ee6cc289f670029", + "opcodes": "PUSH1 0x4C PUSH1 0x2C PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x0 DUP2 EQ PUSH1 0x1C JUMPI PUSH1 0x1E JUMP JUMPDEST INVALID JUMPDEST POP ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG1 PUSH6 0x627A7A723058 KECCAK256 0xc8 REVERT 0xc9 LOG1 MSIZE DUP7 SELFDESTRUCT 0xb6 0x47 0xc7 SSTORE SAR PUSH16 0x3C5B251C8209308E82491B559A3EE6CC 0x28 SWAP16 PUSH8 0x29000000000000 ", + "sourceMap": "125:1726:7:-;;132:2:-1;166:7;155:9;146:7;137:37;252:7;246:14;243:1;238:23;232:4;229:33;270:1;265:20;;;;222:63;;265:20;274:9;222:63;;298:9;295:1;288:20;328:4;319:7;311:22;352:7;343;336:24" + }, + "gasEstimates": { + "creation": { + "codeDepositCost": "15200", + "executionCost": "116", + "totalCost": "15316" + }, + "internal": { + "add(uint256,uint256)": "infinite", + "div(uint256,uint256)": "infinite", + "mod(uint256,uint256)": "infinite", + "mul(uint256,uint256)": "infinite", + "sub(uint256,uint256)": "infinite" + } + }, + "methodIdentifiers": {} + }, + "metadata": "{\"compiler\":{\"version\":\"0.5.4+commit.9549d8ff\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Unsigned math operations with safety checks that revert on error\",\"methods\":{},\"title\":\"SafeMath\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol\":\"SafeMath\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x965012d27b4262d7a41f5028cbb30c51ebd9ecd4be8fb30380aaa7a3c64fbc8b\",\"urls\":[\"bzzr://41ca38f6b0fa4b77b0feec43e422cfbec48b7eb38a41edf0b85c77e8d9a296b1\"]}},\"version\":1}", + "userdoc": { + "methods": {} + } + } + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol": { + "IERC20": { + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "spender", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "from", + "type": "address" + }, + { + "name": "to", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "who", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "to", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "owner", + "type": "address" + }, + { + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "from", + "type": "address" + }, + { + "indexed": true, + "name": "to", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + } + ], + "devdoc": { + "details": "see https://github.com/ethereum/EIPs/issues/20", + "methods": {}, + "title": "ERC20 interface" + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "", + "opcodes": "", + "sourceMap": "" + }, + "gasEstimates": null, + "methodIdentifiers": { + "allowance(address,address)": "dd62ed3e", + "approve(address,uint256)": "095ea7b3", + "balanceOf(address)": "70a08231", + "totalSupply()": "18160ddd", + "transfer(address,uint256)": "a9059cbb", + "transferFrom(address,address,uint256)": "23b872dd" + } + }, + "metadata": "", + "userdoc": { + "methods": {} + } + } + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol": { + "SafeERC20": { + "abi": [], + "devdoc": { + "details": "Wrappers around ERC20 operations that throw on failure. To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract, which allows you to call the safe operations as `token.safeTransfer(...)`, etc.", + "methods": {}, + "title": "SafeERC20" + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea165627a7a72305820f19c7b62e065f91bc3f26e33372ab3fae2852e0b472cd6bb775c347272d9d5120029", + "opcodes": "PUSH1 0x4C PUSH1 0x2C PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x0 DUP2 EQ PUSH1 0x1C JUMPI PUSH1 0x1E JUMP JUMPDEST INVALID JUMPDEST POP ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT INVALID LOG1 PUSH6 0x627A7A723058 KECCAK256 CALL SWAP13 PUSH28 0x62E065F91BC3F26E33372AB3FAE2852E0B472CD6BB775C347272D9D5 SLT STOP 0x29 ", + "sourceMap": "352:1248:9:-;;132:2:-1;166:7;155:9;146:7;137:37;252:7;246:14;243:1;238:23;232:4;229:33;270:1;265:20;;;;222:63;;265:20;274:9;222:63;;298:9;295:1;288:20;328:4;319:7;311:22;352:7;343;336:24" + }, + "gasEstimates": { + "creation": { + "codeDepositCost": "15200", + "executionCost": "116", + "totalCost": "15316" + }, + "internal": { + "safeApprove(contract IERC20,address,uint256)": "infinite", + "safeDecreaseAllowance(contract IERC20,address,uint256)": "infinite", + "safeIncreaseAllowance(contract IERC20,address,uint256)": "infinite", + "safeTransfer(contract IERC20,address,uint256)": "infinite", + "safeTransferFrom(contract IERC20,address,address,uint256)": "infinite" + } + }, + "methodIdentifiers": {} + }, + "metadata": "{\"compiler\":{\"version\":\"0.5.4+commit.9549d8ff\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Wrappers around ERC20 operations that throw on failure. To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract, which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\",\"methods\":{},\"title\":\"SafeERC20\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol\":\"SafeERC20\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x965012d27b4262d7a41f5028cbb30c51ebd9ecd4be8fb30380aaa7a3c64fbc8b\",\"urls\":[\"bzzr://41ca38f6b0fa4b77b0feec43e422cfbec48b7eb38a41edf0b85c77e8d9a296b1\"]},\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x079c4e23ee448f529e43bfa3c4e8fb4be52cd0318ee923a276835bedf45b93d8\",\"urls\":[\"bzzr://48248e86f64407a95f241d6c5c8cfea6b4d4ebf4ebb467e5c98c8af3868fafe4\"]},\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol\":{\"keccak256\":\"0x05fcee7431cd35cd312e14e7f316a44ca3ccc5fb3b859aefc15c1a5db94add7e\",\"urls\":[\"bzzr://5ba67fb83aa7806883a335d53a27dcf1f53b75fa38dedd57893cc84633aa4d4c\"]}},\"version\":1}", + "userdoc": { + "methods": {} + } + } + } + }, + "sources": { + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoCommon.sol": { + "ast": { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoCommon.sol", + "exportedSymbols": { + "AlgoCommon": [ + 97 + ] + }, + "id": 98, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "0.5", + ".4" + ], + "nodeType": "PragmaDirective", + "src": "0:22:0" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 97, + "linearizedBaseContracts": [ + 97 + ], + "name": "AlgoCommon", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": true, + "id": 8, + "name": "TOKEN_FACTOR", + "nodeType": "VariableDeclaration", + "scope": 97, + "src": "55:58:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "55:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 7, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 3, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "96:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "3138", + "id": 5, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "110:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_18_by_1", + "typeString": "int_const 18" + }, + "value": "18" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_18_by_1", + "typeString": "int_const 18" + } + ], + "id": 4, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "102:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": "uint256" + }, + "id": 6, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "102:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "96:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 13, + "name": "CAT_0_VALUE", + "nodeType": "VariableDeclaration", + "scope": 97, + "src": "120:61:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 9, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "120:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 12, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "313030303030", + "id": 10, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "160:6:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_100000_by_1", + "typeString": "int_const 100000" + }, + "value": "100000" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 11, + "name": "TOKEN_FACTOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "169:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "160:21:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 18, + "name": "CAT_1_VALUE", + "nodeType": "VariableDeclaration", + "scope": 97, + "src": "188:62:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 14, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "188:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 17, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "31303030303030", + "id": 15, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "228:7:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000_by_1", + "typeString": "int_const 1000000" + }, + "value": "1000000" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 16, + "name": "TOKEN_FACTOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "238:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "228:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 25, + "name": "CAT_2_VALUE", + "nodeType": "VariableDeclaration", + "scope": 97, + "src": "257:66:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 19, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "257:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 24, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_rational_2000000_by_1", + "typeString": "int_const 2000000" + }, + "id": 22, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 20, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "297:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31303030303030", + "id": 21, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "301:7:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000_by_1", + "typeString": "int_const 1000000" + }, + "value": "1000000" + }, + "src": "297:11:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_2000000_by_1", + "typeString": "int_const 2000000" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 23, + "name": "TOKEN_FACTOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "311:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "297:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 32, + "name": "CAT_3_VALUE", + "nodeType": "VariableDeclaration", + "scope": 97, + "src": "330:66:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 26, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "330:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 31, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_rational_3000000_by_1", + "typeString": "int_const 3000000" + }, + "id": 29, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "33", + "id": 27, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "370:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31303030303030", + "id": 28, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "374:7:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000_by_1", + "typeString": "int_const 1000000" + }, + "value": "1000000" + }, + "src": "370:11:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_3000000_by_1", + "typeString": "int_const 3000000" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 30, + "name": "TOKEN_FACTOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "384:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "370:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 39, + "name": "CAT_4_VALUE", + "nodeType": "VariableDeclaration", + "scope": 97, + "src": "403:66:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 33, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "403:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 38, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_rational_4000000_by_1", + "typeString": "int_const 4000000" + }, + "id": 36, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "34", + "id": 34, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "443:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31303030303030", + "id": 35, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "447:7:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000_by_1", + "typeString": "int_const 1000000" + }, + "value": "1000000" + }, + "src": "443:11:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_4000000_by_1", + "typeString": "int_const 4000000" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 37, + "name": "TOKEN_FACTOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "457:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "443:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 46, + "name": "CAT_5_VALUE", + "nodeType": "VariableDeclaration", + "scope": 97, + "src": "476:66:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 40, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "476:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 45, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_rational_5000000_by_1", + "typeString": "int_const 5000000" + }, + "id": 43, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "35", + "id": 41, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "516:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31303030303030", + "id": 42, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "520:7:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000_by_1", + "typeString": "int_const 1000000" + }, + "value": "1000000" + }, + "src": "516:11:0", + "typeDescriptions": { + "typeIdentifier": "t_rational_5000000_by_1", + "typeString": "int_const 5000000" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 44, + "name": "TOKEN_FACTOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 8, + "src": "530:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "516:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "body": { + "id": 95, + "nodeType": "Block", + "src": "630:426:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 55, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 53, + "name": "category", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48, + "src": "644:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 54, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "656:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "644:13:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 61, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 59, + "name": "category", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48, + "src": "713:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 60, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "725:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "713:13:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 67, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 65, + "name": "category", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48, + "src": "782:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 66, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "794:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "782:13:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 73, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 71, + "name": "category", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48, + "src": "851:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "33", + "id": 72, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "863:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "src": "851:13:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 79, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 77, + "name": "category", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48, + "src": "920:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "34", + "id": 78, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "932:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "src": "920:13:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 85, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 83, + "name": "category", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48, + "src": "989:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "35", + "id": 84, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1001:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "src": "989:13:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 89, + "nodeType": "IfStatement", + "src": "986:63:0", + "trueBody": { + "id": 88, + "nodeType": "Block", + "src": "1004:45:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 86, + "name": "CAT_5_VALUE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46, + "src": "1026:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 52, + "id": 87, + "nodeType": "Return", + "src": "1019:18:0" + } + ] + } + }, + "id": 90, + "nodeType": "IfStatement", + "src": "917:132:0", + "trueBody": { + "id": 82, + "nodeType": "Block", + "src": "935:45:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 80, + "name": "CAT_4_VALUE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 39, + "src": "957:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 52, + "id": 81, + "nodeType": "Return", + "src": "950:18:0" + } + ] + } + }, + "id": 91, + "nodeType": "IfStatement", + "src": "848:201:0", + "trueBody": { + "id": 76, + "nodeType": "Block", + "src": "866:45:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 74, + "name": "CAT_3_VALUE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 32, + "src": "888:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 52, + "id": 75, + "nodeType": "Return", + "src": "881:18:0" + } + ] + } + }, + "id": 92, + "nodeType": "IfStatement", + "src": "779:270:0", + "trueBody": { + "id": 70, + "nodeType": "Block", + "src": "797:45:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 68, + "name": "CAT_2_VALUE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 25, + "src": "819:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 52, + "id": 69, + "nodeType": "Return", + "src": "812:18:0" + } + ] + } + }, + "id": 93, + "nodeType": "IfStatement", + "src": "710:339:0", + "trueBody": { + "id": 64, + "nodeType": "Block", + "src": "728:45:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 62, + "name": "CAT_1_VALUE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18, + "src": "750:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 52, + "id": 63, + "nodeType": "Return", + "src": "743:18:0" + } + ] + } + }, + "id": 94, + "nodeType": "IfStatement", + "src": "641:408:0", + "trueBody": { + "id": 58, + "nodeType": "Block", + "src": "659:45:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 56, + "name": "CAT_0_VALUE", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 13, + "src": "681:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 52, + "id": 57, + "nodeType": "Return", + "src": "674:18:0" + } + ] + } + } + ] + }, + "documentation": null, + "id": 96, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getCapacityByCategory", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 49, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 48, + "name": "category", + "nodeType": "VariableDeclaration", + "scope": 96, + "src": "582:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 47, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "582:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "581:16:0" + }, + "returnParameters": { + "id": 52, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 51, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 96, + "src": "621:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 50, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "621:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "620:9:0" + }, + "scope": 97, + "src": "551:505:0", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 98, + "src": "26:1033:0" + } + ], + "src": "0:1059:0" + }, + "id": 0 + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoCoreTeamRole.sol": { + "ast": { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoCoreTeamRole.sol", + "exportedSymbols": { + "AlgoCoreTeamRole": [ + 184 + ] + }, + "id": 185, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 99, + "literals": [ + "solidity", + "0.5", + ".4" + ], + "nodeType": "PragmaDirective", + "src": "0:22:1" + }, + { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol", + "file": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol", + "id": 100, + "nodeType": "ImportDirective", + "scope": 185, + "sourceUnit": 533, + "src": "26:189:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 184, + "linearizedBaseContracts": [ + 184 + ], + "name": "AlgoCoreTeamRole", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 103, + "libraryName": { + "contractScope": null, + "id": 101, + "name": "Roles", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 532, + "src": "258:5:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Roles_$532", + "typeString": "library Roles" + } + }, + "nodeType": "UsingForDirective", + "src": "252:27:1", + "typeName": { + "contractScope": null, + "id": 102, + "name": "Roles.Role", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 445, + "src": "268:10:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$445_storage_ptr", + "typeString": "struct Roles.Role" + } + } + }, + { + "constant": false, + "id": 105, + "name": "_coreTeamMembers", + "nodeType": "VariableDeclaration", + "scope": 184, + "src": "287:35:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$445_storage", + "typeString": "struct Roles.Role" + }, + "typeName": { + "contractScope": null, + "id": 104, + "name": "Roles.Role", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 445, + "src": "287:10:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$445_storage_ptr", + "typeString": "struct Roles.Role" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 113, + "nodeType": "Block", + "src": "355:43:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 109, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 889, + "src": "379:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 110, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "379:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 108, + "name": "_addCoreTeam", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 171, + "src": "366:12:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 111, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "366:24:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 112, + "nodeType": "ExpressionStatement", + "src": "366:24:1" + } + ] + }, + "documentation": null, + "id": 114, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 106, + "nodeType": "ParameterList", + "parameters": [], + "src": "343:2:1" + }, + "returnParameters": { + "id": 107, + "nodeType": "ParameterList", + "parameters": [], + "src": "355:0:1" + }, + "scope": 184, + "src": "331:67:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 124, + "nodeType": "Block", + "src": "430:62:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 118, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 889, + "src": "460:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "460:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 117, + "name": "isCoreTeam", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 138, + "src": "449:10:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 120, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "449:22:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 116, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 892, + 893 + ], + "referencedDeclaration": 892, + "src": "441:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 121, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "441:31:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 122, + "nodeType": "ExpressionStatement", + "src": "441:31:1" + }, + { + "id": 123, + "nodeType": "PlaceholderStatement", + "src": "483:1:1" + } + ] + }, + "documentation": null, + "id": 125, + "name": "onlyCoreTeam", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 115, + "nodeType": "ParameterList", + "parameters": [], + "src": "427:2:1" + }, + "src": "406:86:1", + "visibility": "internal" + }, + { + "body": { + "id": 137, + "nodeType": "Block", + "src": "564:55:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 134, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 127, + "src": "603:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 132, + "name": "_coreTeamMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 105, + "src": "582:16:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$445_storage", + "typeString": "struct Roles.Role storage ref" + } + }, + "id": 133, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "has", + "nodeType": "MemberAccess", + "referencedDeclaration": 531, + "src": "582:20:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Role_$445_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Role_$445_storage_ptr_$", + "typeString": "function (struct Roles.Role storage pointer,address) view returns (bool)" + } + }, + "id": 135, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "582:29:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 131, + "id": 136, + "nodeType": "Return", + "src": "575:36:1" + } + ] + }, + "documentation": null, + "id": 138, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isCoreTeam", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 128, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 127, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 138, + "src": "520:15:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 126, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "520:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "519:17:1" + }, + "returnParameters": { + "id": 131, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 130, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 138, + "src": "558:4:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 129, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "558:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "557:6:1" + }, + "scope": 184, + "src": "500:119:1", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 149, + "nodeType": "Block", + "src": "685:40:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 146, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 140, + "src": "709:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 145, + "name": "_addCoreTeam", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 171, + "src": "696:12:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 147, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "696:21:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 148, + "nodeType": "ExpressionStatement", + "src": "696:21:1" + } + ] + }, + "documentation": null, + "id": 150, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 143, + "modifierName": { + "argumentTypes": null, + "id": 142, + "name": "onlyCoreTeam", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 125, + "src": "672:12:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "672:12:1" + } + ], + "name": "addCoreTeam", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 141, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 140, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 150, + "src": "648:15:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 139, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "648:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "647:17:1" + }, + "returnParameters": { + "id": 144, + "nodeType": "ParameterList", + "parameters": [], + "src": "685:0:1" + }, + "scope": 184, + "src": "627:98:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 158, + "nodeType": "Block", + "src": "768:46:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 154, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 889, + "src": "795:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 155, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "795:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 153, + "name": "_removeCoreTeam", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 183, + "src": "779:15:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 156, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "779:27:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 157, + "nodeType": "ExpressionStatement", + "src": "779:27:1" + } + ] + }, + "documentation": null, + "id": 159, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "renounceCoreTeam", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 151, + "nodeType": "ParameterList", + "parameters": [], + "src": "758:2:1" + }, + "returnParameters": { + "id": 152, + "nodeType": "ParameterList", + "parameters": [], + "src": "768:0:1" + }, + "scope": 184, + "src": "733:81:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 170, + "nodeType": "Block", + "src": "870:48:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 167, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 161, + "src": "902:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 164, + "name": "_coreTeamMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 105, + "src": "881:16:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$445_storage", + "typeString": "struct Roles.Role storage ref" + } + }, + "id": 166, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 477, + "src": "881:20:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Role_$445_storage_ptr_$_t_address_$returns$__$bound_to$_t_struct$_Role_$445_storage_ptr_$", + "typeString": "function (struct Roles.Role storage pointer,address)" + } + }, + "id": 168, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "881:29:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 169, + "nodeType": "ExpressionStatement", + "src": "881:29:1" + } + ] + }, + "documentation": null, + "id": 171, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_addCoreTeam", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 162, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 161, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 171, + "src": "844:15:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 160, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "844:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "843:17:1" + }, + "returnParameters": { + "id": 163, + "nodeType": "ParameterList", + "parameters": [], + "src": "870:0:1" + }, + "scope": 184, + "src": "822:96:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 182, + "nodeType": "Block", + "src": "977:51:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 179, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 173, + "src": "1012:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 176, + "name": "_coreTeamMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 105, + "src": "988:16:1", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$445_storage", + "typeString": "struct Roles.Role storage ref" + } + }, + "id": 178, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "remove", + "nodeType": "MemberAccess", + "referencedDeclaration": 508, + "src": "988:23:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Role_$445_storage_ptr_$_t_address_$returns$__$bound_to$_t_struct$_Role_$445_storage_ptr_$", + "typeString": "function (struct Roles.Role storage pointer,address)" + } + }, + "id": 180, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "988:32:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 181, + "nodeType": "ExpressionStatement", + "src": "988:32:1" + } + ] + }, + "documentation": null, + "id": 183, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_removeCoreTeam", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 174, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 173, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 183, + "src": "951:15:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 172, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "951:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "950:17:1" + }, + "returnParameters": { + "id": 175, + "nodeType": "ParameterList", + "parameters": [], + "src": "977:0:1" + }, + "scope": 184, + "src": "926:102:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 185, + "src": "219:812:1" + } + ], + "src": "0:1033:1" + }, + "id": 1 + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoPool.sol": { + "ast": { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoPool.sol", + "exportedSymbols": { + "AlgoPool": [ + 311 + ] + }, + "id": 312, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 186, + "literals": [ + "solidity", + "0.5", + ".4" + ], + "nodeType": "PragmaDirective", + "src": "0:22:2" + }, + { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "file": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "id": 187, + "nodeType": "ImportDirective", + "scope": 312, + "sourceUnit": 730, + "src": "26:195:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol", + "file": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol", + "id": 188, + "nodeType": "ImportDirective", + "scope": 312, + "sourceUnit": 875, + "src": "223:198:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/IAlgoMiner.sol", + "file": "./IAlgoMiner.sol", + "id": 189, + "nodeType": "ImportDirective", + "scope": 312, + "sourceUnit": 402, + "src": "425:26:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoCommon.sol", + "file": "./AlgoCommon.sol", + "id": 190, + "nodeType": "ImportDirective", + "scope": 312, + "sourceUnit": 98, + "src": "453:26:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/ERC20TokenHolder.sol", + "file": "./ERC20TokenHolder.sol", + "id": 191, + "nodeType": "ImportDirective", + "scope": 312, + "sourceUnit": 369, + "src": "481:32:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoCoreTeamRole.sol", + "file": "./AlgoCoreTeamRole.sol", + "id": 192, + "nodeType": "ImportDirective", + "scope": 312, + "sourceUnit": 185, + "src": "515:32:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 193, + "name": "AlgoCommon", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 97, + "src": "572:10:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_AlgoCommon_$97", + "typeString": "contract AlgoCommon" + } + }, + "id": 194, + "nodeType": "InheritanceSpecifier", + "src": "572:10:2" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 195, + "name": "ERC20TokenHolder", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 368, + "src": "584:16:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20TokenHolder_$368", + "typeString": "contract ERC20TokenHolder" + } + }, + "id": 196, + "nodeType": "InheritanceSpecifier", + "src": "584:16:2" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 197, + "name": "AlgoCoreTeamRole", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 184, + "src": "602:16:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_AlgoCoreTeamRole_$184", + "typeString": "contract AlgoCoreTeamRole" + } + }, + "id": 198, + "nodeType": "InheritanceSpecifier", + "src": "602:16:2" + } + ], + "contractDependencies": [ + 438, + 184, + 368, + 97 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 311, + "linearizedBaseContracts": [ + 311, + 184, + 368, + 438, + 97 + ], + "name": "AlgoPool", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 201, + "libraryName": { + "contractScope": null, + "id": 199, + "name": "SafeERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 874, + "src": "632:9:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeERC20_$874", + "typeString": "library SafeERC20" + } + }, + "nodeType": "UsingForDirective", + "src": "626:27:2", + "typeName": { + "contractScope": null, + "id": 200, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 729, + "src": "646:6:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$729", + "typeString": "contract IERC20" + } + } + }, + { + "canonicalName": "AlgoPool.PoolType", + "id": 204, + "members": [ + { + "id": 202, + "name": "MinerPool", + "nodeType": "EnumValue", + "src": "686:9:2" + }, + { + "id": 203, + "name": "ReferralPool", + "nodeType": "EnumValue", + "src": "706:12:2" + } + ], + "name": "PoolType", + "nodeType": "EnumDefinition", + "src": "661:64:2" + }, + { + "constant": false, + "id": 206, + "name": "_poolType", + "nodeType": "VariableDeclaration", + "scope": 311, + "src": "733:26:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_PoolType_$204", + "typeString": "enum AlgoPool.PoolType" + }, + "typeName": { + "contractScope": null, + "id": 205, + "name": "PoolType", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 204, + "src": "733:8:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_PoolType_$204", + "typeString": "enum AlgoPool.PoolType" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 210, + "name": "_fundedMiners", + "nodeType": "VariableDeclaration", + "scope": 311, + "src": "766:46:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "typeName": { + "id": 209, + "keyType": { + "id": 207, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "774:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "766:24:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "valueType": { + "id": 208, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "785:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 226, + "nodeType": "Block", + "src": "958:39:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 224, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 222, + "name": "_poolType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 206, + "src": "969:9:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_PoolType_$204", + "typeString": "enum AlgoPool.PoolType" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 223, + "name": "poolType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 212, + "src": "981:8:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_PoolType_$204", + "typeString": "enum AlgoPool.PoolType" + } + }, + "src": "969:20:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_PoolType_$204", + "typeString": "enum AlgoPool.PoolType" + } + }, + "id": 225, + "nodeType": "ExpressionStatement", + "src": "969:20:2" + } + ] + }, + "documentation": null, + "id": 227, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 217, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 214, + "src": "900:12:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 218, + "modifierName": { + "argumentTypes": null, + "id": 216, + "name": "ERC20TokenHolder", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 368, + "src": "883:16:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20TokenHolder_$368_$", + "typeString": "type(contract ERC20TokenHolder)" + } + }, + "nodeType": "ModifierInvocation", + "src": "883:30:2" + }, + { + "arguments": [], + "id": 220, + "modifierName": { + "argumentTypes": null, + "id": 219, + "name": "AlgoCoreTeamRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 184, + "src": "923:16:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AlgoCoreTeamRole_$184_$", + "typeString": "type(contract AlgoCoreTeamRole)" + } + }, + "nodeType": "ModifierInvocation", + "src": "923:18:2" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 215, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 212, + "name": "poolType", + "nodeType": "VariableDeclaration", + "scope": 227, + "src": "833:17:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_PoolType_$204", + "typeString": "enum AlgoPool.PoolType" + }, + "typeName": { + "contractScope": null, + "id": 211, + "name": "PoolType", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 204, + "src": "833:8:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_PoolType_$204", + "typeString": "enum AlgoPool.PoolType" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 214, + "name": "tokenAddress", + "nodeType": "VariableDeclaration", + "scope": 227, + "src": "852:20:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 213, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "852:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "832:41:2" + }, + "returnParameters": { + "id": 221, + "nodeType": "ParameterList", + "parameters": [], + "src": "958:0:2" + }, + "scope": 311, + "src": "821:176:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 300, + "nodeType": "Block", + "src": "1086:619:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 240, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "1105:28:2", + "subExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 237, + "name": "_fundedMiners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 210, + "src": "1106:13:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 239, + "indexExpression": { + "argumentTypes": null, + "id": 238, + "name": "minerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 229, + "src": "1120:12:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1106:27:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 236, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 892, + 893 + ], + "referencedDeclaration": 892, + "src": "1097:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 241, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1097:37:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 242, + "nodeType": "ExpressionStatement", + "src": "1097:37:2" + }, + { + "assignments": [ + 244 + ], + "declarations": [ + { + "constant": false, + "id": 244, + "name": "algoMiner", + "nodeType": "VariableDeclaration", + "scope": 300, + "src": "1147:20:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IAlgoMiner_$401", + "typeString": "contract IAlgoMiner" + }, + "typeName": { + "contractScope": null, + "id": 243, + "name": "IAlgoMiner", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 401, + "src": "1147:10:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IAlgoMiner_$401", + "typeString": "contract IAlgoMiner" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 248, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 246, + "name": "minerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 229, + "src": "1181:12:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 245, + "name": "IAlgoMiner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 401, + "src": "1170:10:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IAlgoMiner_$401_$", + "typeString": "type(contract IAlgoMiner)" + } + }, + "id": 247, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1170:24:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IAlgoMiner_$401", + "typeString": "contract IAlgoMiner" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1147:47:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 250, + "name": "algoMiner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 244, + "src": "1223:9:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IAlgoMiner_$401", + "typeString": "contract IAlgoMiner" + } + }, + "id": 251, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isAlgoMiner", + "nodeType": "MemberAccess", + "referencedDeclaration": 375, + "src": "1223:21:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_pure$__$returns$_t_bool_$", + "typeString": "function () pure external returns (bool)" + } + }, + "id": 252, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1223:23:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 249, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 892, + 893 + ], + "referencedDeclaration": 892, + "src": "1215:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 253, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1215:32:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 254, + "nodeType": "ExpressionStatement", + "src": "1215:32:2" + }, + { + "assignments": [ + 256 + ], + "declarations": [ + { + "constant": false, + "id": 256, + "name": "minerCategory", + "nodeType": "VariableDeclaration", + "scope": 300, + "src": "1268:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 255, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1268:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 260, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 257, + "name": "algoMiner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 244, + "src": "1290:9:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IAlgoMiner_$401", + "typeString": "contract IAlgoMiner" + } + }, + "id": 258, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "getCategory", + "nodeType": "MemberAccess", + "referencedDeclaration": 385, + "src": "1290:21:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint8_$", + "typeString": "function () view external returns (uint8)" + } + }, + "id": 259, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1290:23:2", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1268:45:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 264, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 262, + "name": "minerCategory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 256, + "src": "1334:13:2", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "35", + "id": 263, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1351:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "src": "1334:18:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 261, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 892, + 893 + ], + "referencedDeclaration": 892, + "src": "1326:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 265, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1326:27:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 266, + "nodeType": "ExpressionStatement", + "src": "1326:27:2" + }, + { + "assignments": [ + 268 + ], + "declarations": [ + { + "constant": false, + "id": 268, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 300, + "src": "1366:13:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 267, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1366:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 272, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 270, + "name": "minerCategory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 256, + "src": "1404:13:2", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 269, + "name": "getCapacityByCategory", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 96, + "src": "1382:21:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint8_$returns$_t_uint256_$", + "typeString": "function (uint8) pure returns (uint256)" + } + }, + "id": 271, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1382:36:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1366:52:2" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_enum$_PoolType_$204", + "typeString": "enum AlgoPool.PoolType" + }, + "id": 276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 273, + "name": "_poolType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 206, + "src": "1513:9:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_PoolType_$204", + "typeString": "enum AlgoPool.PoolType" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 274, + "name": "PoolType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 204, + "src": "1526:8:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_PoolType_$204_$", + "typeString": "type(enum AlgoPool.PoolType)" + } + }, + "id": 275, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "ReferralPool", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1526:21:2", + "typeDescriptions": { + "typeIdentifier": "t_enum$_PoolType_$204", + "typeString": "enum AlgoPool.PoolType" + } + }, + "src": "1513:34:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 286, + "nodeType": "IfStatement", + "src": "1510:90:2", + "trueBody": { + "id": 285, + "nodeType": "Block", + "src": "1549:51:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 283, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 277, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 268, + "src": "1564:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 282, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 280, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 278, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 268, + "src": "1572:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 279, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1580:2:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "src": "1572:10:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "313030", + "id": 281, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1585:3:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_100_by_1", + "typeString": "int_const 100" + }, + "value": "100" + }, + "src": "1572:16:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1564:24:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 284, + "nodeType": "ExpressionStatement", + "src": "1564:24:2" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "id": 291, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 287, + "name": "_fundedMiners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 210, + "src": "1612:13:2", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 289, + "indexExpression": { + "argumentTypes": null, + "id": 288, + "name": "minerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 229, + "src": "1626:12:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1612:27:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 290, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1642:4:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1612:34:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 292, + "nodeType": "ExpressionStatement", + "src": "1612:34:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 296, + "name": "minerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 229, + "src": "1677:12:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 297, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 268, + "src": "1691:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 293, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 323, + "src": "1657:6:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$729", + "typeString": "contract IERC20" + } + }, + "id": 295, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeTransfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 754, + "src": "1657:19:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$729_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$729_$", + "typeString": "function (contract IERC20,address,uint256)" + } + }, + "id": 298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1657:40:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 299, + "nodeType": "ExpressionStatement", + "src": "1657:40:2" + } + ] + }, + "documentation": null, + "id": 301, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 232, + "modifierName": { + "argumentTypes": null, + "id": 231, + "name": "notTerminated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 429, + "src": "1059:13:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1059:13:2" + }, + { + "arguments": null, + "id": 234, + "modifierName": { + "argumentTypes": null, + "id": 233, + "name": "onlyCoreTeam", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 125, + "src": "1073:12:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1073:12:2" + } + ], + "name": "transferToMiner", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 230, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 229, + "name": "minerAddress", + "nodeType": "VariableDeclaration", + "scope": 301, + "src": "1030:20:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 228, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1030:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1029:22:2" + }, + "returnParameters": { + "id": 235, + "nodeType": "ParameterList", + "parameters": [], + "src": "1086:0:2" + }, + "scope": 311, + "src": "1005:700:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 309, + "nodeType": "Block", + "src": "1754:31:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 306, + "name": "_terminate", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 367 + ], + "referencedDeclaration": 367, + "src": "1765:10:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 307, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1765:12:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 308, + "nodeType": "ExpressionStatement", + "src": "1765:12:2" + } + ] + }, + "documentation": null, + "id": 310, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 304, + "modifierName": { + "argumentTypes": null, + "id": 303, + "name": "onlyCoreTeam", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 125, + "src": "1741:12:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1741:12:2" + } + ], + "name": "terminate", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 302, + "nodeType": "ParameterList", + "parameters": [], + "src": "1731:2:2" + }, + "returnParameters": { + "id": 305, + "nodeType": "ParameterList", + "parameters": [], + "src": "1754:0:2" + }, + "scope": 311, + "src": "1713:72:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 312, + "src": "551:1237:2" + } + ], + "src": "0:1790:2" + }, + "id": 2 + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/ERC20TokenHolder.sol": { + "ast": { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/ERC20TokenHolder.sol", + "exportedSymbols": { + "ERC20TokenHolder": [ + 368 + ] + }, + "id": 369, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 313, + "literals": [ + "solidity", + "0.5", + ".4" + ], + "nodeType": "PragmaDirective", + "src": "0:22:3" + }, + { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "file": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "id": 314, + "nodeType": "ImportDirective", + "scope": 369, + "sourceUnit": 730, + "src": "26:195:3", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol", + "file": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol", + "id": 315, + "nodeType": "ImportDirective", + "scope": 369, + "sourceUnit": 875, + "src": "223:198:3", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/Terminable.sol", + "file": "./Terminable.sol", + "id": 316, + "nodeType": "ImportDirective", + "scope": 369, + "sourceUnit": 439, + "src": "425:26:3", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 317, + "name": "Terminable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 438, + "src": "484:10:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Terminable_$438", + "typeString": "contract Terminable" + } + }, + "id": 318, + "nodeType": "InheritanceSpecifier", + "src": "484:10:3" + } + ], + "contractDependencies": [ + 438 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 368, + "linearizedBaseContracts": [ + 368, + 438 + ], + "name": "ERC20TokenHolder", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 321, + "libraryName": { + "contractScope": null, + "id": 319, + "name": "SafeERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 874, + "src": "508:9:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeERC20_$874", + "typeString": "library SafeERC20" + } + }, + "nodeType": "UsingForDirective", + "src": "502:27:3", + "typeName": { + "contractScope": null, + "id": 320, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 729, + "src": "522:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$729", + "typeString": "contract IERC20" + } + } + }, + { + "constant": false, + "id": 323, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 368, + "src": "537:22:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$729", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 322, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 729, + "src": "537:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$729", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + }, + { + "body": { + "id": 336, + "nodeType": "Block", + "src": "624:48:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 334, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 330, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 323, + "src": "635:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$729", + "typeString": "contract IERC20" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 332, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 325, + "src": "651:12:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 331, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 729, + "src": "644:6:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$729_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 333, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "644:20:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$729", + "typeString": "contract IERC20" + } + }, + "src": "635:29:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$729", + "typeString": "contract IERC20" + } + }, + "id": 335, + "nodeType": "ExpressionStatement", + "src": "635:29:3" + } + ] + }, + "documentation": null, + "id": 337, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [], + "id": 328, + "modifierName": { + "argumentTypes": null, + "id": 327, + "name": "Terminable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 438, + "src": "602:10:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Terminable_$438_$", + "typeString": "type(contract Terminable)" + } + }, + "nodeType": "ModifierInvocation", + "src": "602:12:3" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 326, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 325, + "name": "tokenAddress", + "nodeType": "VariableDeclaration", + "scope": 337, + "src": "580:20:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 324, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "580:7:3", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "579:22:3" + }, + "returnParameters": { + "id": 329, + "nodeType": "ParameterList", + "parameters": [], + "src": "624:0:3" + }, + "scope": 368, + "src": "568:104:3", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 366, + "nodeType": "Block", + "src": "711:214:3", + "statements": [ + { + "assignments": [ + 341 + ], + "declarations": [ + { + "constant": false, + "id": 341, + "name": "currentBalance", + "nodeType": "VariableDeclaration", + "scope": 366, + "src": "722:22:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 340, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "722:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 348, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 345, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 919, + "src": "772:4:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20TokenHolder_$368", + "typeString": "contract ERC20TokenHolder" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_ERC20TokenHolder_$368", + "typeString": "contract ERC20TokenHolder" + } + ], + "id": 344, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "764:7:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 346, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "764:13:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 342, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 323, + "src": "747:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$729", + "typeString": "contract IERC20" + } + }, + "id": 343, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 703, + "src": "747:16:3", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 347, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "747:31:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "722:56:3" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 351, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 349, + "name": "currentBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 341, + "src": "792:14:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 350, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "809:1:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "792:18:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 360, + "nodeType": "IfStatement", + "src": "789:95:3", + "trueBody": { + "id": 359, + "nodeType": "Block", + "src": "812:72:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 355, + "name": "_creator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 405, + "src": "847:8:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 356, + "name": "currentBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 341, + "src": "857:14:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 352, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 323, + "src": "827:6:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$729", + "typeString": "contract IERC20" + } + }, + "id": 354, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeTransfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 754, + "src": "827:19:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$729_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$729_$", + "typeString": "function (contract IERC20,address,uint256)" + } + }, + "id": 357, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "827:45:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 358, + "nodeType": "ExpressionStatement", + "src": "827:45:3" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 361, + "name": "Terminable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 438, + "src": "894:10:3", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Terminable_$438_$", + "typeString": "type(contract Terminable)" + } + }, + "id": 363, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "_terminate", + "nodeType": "MemberAccess", + "referencedDeclaration": 437, + "src": "894:21:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 364, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "894:23:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 365, + "nodeType": "ExpressionStatement", + "src": "894:23:3" + } + ] + }, + "documentation": null, + "id": 367, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_terminate", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 338, + "nodeType": "ParameterList", + "parameters": [], + "src": "699:2:3" + }, + "returnParameters": { + "id": 339, + "nodeType": "ParameterList", + "parameters": [], + "src": "711:0:3" + }, + "scope": 368, + "src": "680:245:3", + "stateMutability": "nonpayable", + "superFunction": 437, + "visibility": "internal" + } + ], + "scope": 369, + "src": "455:473:3" + } + ], + "src": "0:928:3" + }, + "id": 3 + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/IAlgoMiner.sol": { + "ast": { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/IAlgoMiner.sol", + "exportedSymbols": { + "IAlgoMiner": [ + 401 + ] + }, + "id": 402, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 370, + "literals": [ + "solidity", + "0.5", + ".4" + ], + "nodeType": "PragmaDirective", + "src": "0:22:4" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": false, + "id": 401, + "linearizedBaseContracts": [ + 401 + ], + "name": "IAlgoMiner", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "id": 375, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "isAlgoMiner", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 371, + "nodeType": "ParameterList", + "parameters": [], + "src": "73:2:4" + }, + "returnParameters": { + "id": 374, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 373, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 375, + "src": "97:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 372, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "97:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "96:6:4" + }, + "scope": 401, + "src": "53:50:4", + "stateMutability": "pure", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 380, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getMinerType", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 376, + "nodeType": "ParameterList", + "parameters": [], + "src": "130:2:4" + }, + "returnParameters": { + "id": 379, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 378, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 380, + "src": "154:5:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 377, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "154:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "153:7:4" + }, + "scope": 401, + "src": "109:52:4", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 385, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getCategory", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 381, + "nodeType": "ParameterList", + "parameters": [], + "src": "187:2:4" + }, + "returnParameters": { + "id": 384, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 383, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 385, + "src": "211:5:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 382, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "211:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "210:7:4" + }, + "scope": 401, + "src": "167:51:4", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 390, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getMiner", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 386, + "nodeType": "ParameterList", + "parameters": [], + "src": "241:2:4" + }, + "returnParameters": { + "id": 389, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 388, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 390, + "src": "265:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 387, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "265:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "264:9:4" + }, + "scope": 401, + "src": "224:50:4", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 395, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "getReferral", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 391, + "nodeType": "ParameterList", + "parameters": [], + "src": "300:2:4" + }, + "returnParameters": { + "id": 394, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 393, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 395, + "src": "324:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 392, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "324:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "323:9:4" + }, + "scope": 401, + "src": "280:53:4", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 400, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "isMining", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 396, + "nodeType": "ParameterList", + "parameters": [], + "src": "356:2:4" + }, + "returnParameters": { + "id": 399, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 398, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 400, + "src": "380:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 397, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "380:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "379:6:4" + }, + "scope": 401, + "src": "339:47:4", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 402, + "src": "26:363:4" + } + ], + "src": "0:389:4" + }, + "id": 4 + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/Terminable.sol": { + "ast": { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/Terminable.sol", + "exportedSymbols": { + "Terminable": [ + 438 + ] + }, + "id": 439, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 403, + "literals": [ + "solidity", + "0.5", + ".4" + ], + "nodeType": "PragmaDirective", + "src": "0:22:5" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 438, + "linearizedBaseContracts": [ + 438 + ], + "name": "Terminable", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 405, + "name": "_creator", + "nodeType": "VariableDeclaration", + "scope": 438, + "src": "55:25:5", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 404, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "55:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 407, + "name": "_terminated", + "nodeType": "VariableDeclaration", + "scope": 438, + "src": "87:25:5", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 406, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "87:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "body": { + "id": 419, + "nodeType": "Block", + "src": "144:70:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 413, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 410, + "name": "_creator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 405, + "src": "155:8:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 411, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 889, + "src": "166:3:5", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 412, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "166:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "155:21:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 414, + "nodeType": "ExpressionStatement", + "src": "155:21:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 417, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 415, + "name": "_terminated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 407, + "src": "187:11:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 416, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "201:5:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "187:19:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 418, + "nodeType": "ExpressionStatement", + "src": "187:19:5" + } + ] + }, + "documentation": null, + "id": 420, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 408, + "nodeType": "ParameterList", + "parameters": [], + "src": "132:2:5" + }, + "returnParameters": { + "id": 409, + "nodeType": "ParameterList", + "parameters": [], + "src": "144:0:5" + }, + "scope": 438, + "src": "121:93:5", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 428, + "nodeType": "Block", + "src": "247:52:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "266:12:5", + "subExpression": { + "argumentTypes": null, + "id": 423, + "name": "_terminated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 407, + "src": "267:11:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 422, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 892, + 893 + ], + "referencedDeclaration": 892, + "src": "258:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 425, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "258:21:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 426, + "nodeType": "ExpressionStatement", + "src": "258:21:5" + }, + { + "id": 427, + "nodeType": "PlaceholderStatement", + "src": "290:1:5" + } + ] + }, + "documentation": null, + "id": 429, + "name": "notTerminated", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 421, + "nodeType": "ParameterList", + "parameters": [], + "src": "244:2:5" + }, + "src": "222:77:5", + "visibility": "internal" + }, + { + "body": { + "id": 436, + "nodeType": "Block", + "src": "338:37:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 434, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 432, + "name": "_terminated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 407, + "src": "349:11:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 433, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "363:4:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "349:18:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 435, + "nodeType": "ExpressionStatement", + "src": "349:18:5" + } + ] + }, + "documentation": null, + "id": 437, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_terminate", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 430, + "nodeType": "ParameterList", + "parameters": [], + "src": "326:2:5" + }, + "returnParameters": { + "id": 431, + "nodeType": "ParameterList", + "parameters": [], + "src": "338:0:5" + }, + "scope": 438, + "src": "307:68:5", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 439, + "src": "26:352:5" + } + ], + "src": "0:378:5" + }, + "id": 5 + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol": { + "ast": { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol", + "exportedSymbols": { + "Roles": [ + 532 + ] + }, + "id": 533, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 440, + "literals": [ + "solidity", + "^", + "0.5", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "0:23:6" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": "@title Roles\n@dev Library for managing addresses assigned to a Role.", + "fullyImplemented": true, + "id": 532, + "linearizedBaseContracts": [ + 532 + ], + "name": "Roles", + "nodeType": "ContractDefinition", + "nodes": [ + { + "canonicalName": "Roles.Role", + "id": 445, + "members": [ + { + "constant": false, + "id": 444, + "name": "bearer", + "nodeType": "VariableDeclaration", + "scope": 445, + "src": "150:32:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "typeName": { + "id": 443, + "keyType": { + "id": 441, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "159:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "150:25:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "valueType": { + "id": 442, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "170:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Role", + "nodeType": "StructDefinition", + "scope": 532, + "src": "128:61:6", + "visibility": "public" + }, + { + "body": { + "id": 476, + "nodeType": "Block", + "src": "317:123:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 457, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 453, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 449, + "src": "335:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 455, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "354:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 454, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "346:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 456, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "346:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "335:21:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 452, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 892, + 893 + ], + "referencedDeclaration": 892, + "src": "327:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 458, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "327:30:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 459, + "nodeType": "ExpressionStatement", + "src": "327:30:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 465, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "375:19:6", + "subExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 462, + "name": "role", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 447, + "src": "380:4:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$445_storage_ptr", + "typeString": "struct Roles.Role storage pointer" + } + }, + { + "argumentTypes": null, + "id": 463, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 449, + "src": "386:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Role_$445_storage_ptr", + "typeString": "struct Roles.Role storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 461, + "name": "has", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 531, + "src": "376:3:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Role_$445_storage_ptr_$_t_address_$returns$_t_bool_$", + "typeString": "function (struct Roles.Role storage pointer,address) view returns (bool)" + } + }, + "id": 464, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "376:18:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 460, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 892, + 893 + ], + "referencedDeclaration": 892, + "src": "367:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 466, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "367:28:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 467, + "nodeType": "ExpressionStatement", + "src": "367:28:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 474, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 468, + "name": "role", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 447, + "src": "406:4:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$445_storage_ptr", + "typeString": "struct Roles.Role storage pointer" + } + }, + "id": 471, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "bearer", + "nodeType": "MemberAccess", + "referencedDeclaration": 444, + "src": "406:11:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 472, + "indexExpression": { + "argumentTypes": null, + "id": 470, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 449, + "src": "418:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "406:20:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 473, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "429:4:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "406:27:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 475, + "nodeType": "ExpressionStatement", + "src": "406:27:6" + } + ] + }, + "documentation": "@dev give an account access to this role", + "id": 477, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "add", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 450, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 447, + "name": "role", + "nodeType": "VariableDeclaration", + "scope": 477, + "src": "272:17:6", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$445_storage_ptr", + "typeString": "struct Roles.Role" + }, + "typeName": { + "contractScope": null, + "id": 446, + "name": "Role", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 445, + "src": "272:4:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$445_storage_ptr", + "typeString": "struct Roles.Role" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 449, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 477, + "src": "291:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 448, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "291:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "271:36:6" + }, + "returnParameters": { + "id": 451, + "nodeType": "ParameterList", + "parameters": [], + "src": "317:0:6" + }, + "scope": 532, + "src": "259:181:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 507, + "nodeType": "Block", + "src": "575:123:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 489, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 485, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 481, + "src": "593:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 487, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "612:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 486, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "604:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 488, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "604:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "593:21:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 484, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 892, + 893 + ], + "referencedDeclaration": 892, + "src": "585:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 490, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "585:30:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 491, + "nodeType": "ExpressionStatement", + "src": "585:30:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 494, + "name": "role", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 479, + "src": "637:4:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$445_storage_ptr", + "typeString": "struct Roles.Role storage pointer" + } + }, + { + "argumentTypes": null, + "id": 495, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 481, + "src": "643:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Role_$445_storage_ptr", + "typeString": "struct Roles.Role storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 493, + "name": "has", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 531, + "src": "633:3:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Role_$445_storage_ptr_$_t_address_$returns$_t_bool_$", + "typeString": "function (struct Roles.Role storage pointer,address) view returns (bool)" + } + }, + "id": 496, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "633:18:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 492, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 892, + 893 + ], + "referencedDeclaration": 892, + "src": "625:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 497, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "625:27:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 498, + "nodeType": "ExpressionStatement", + "src": "625:27:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 505, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 499, + "name": "role", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 479, + "src": "663:4:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$445_storage_ptr", + "typeString": "struct Roles.Role storage pointer" + } + }, + "id": 502, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "bearer", + "nodeType": "MemberAccess", + "referencedDeclaration": 444, + "src": "663:11:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 503, + "indexExpression": { + "argumentTypes": null, + "id": 501, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 481, + "src": "675:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "663:20:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 504, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "686:5:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "663:28:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 506, + "nodeType": "ExpressionStatement", + "src": "663:28:6" + } + ] + }, + "documentation": "@dev remove an account's access to this role", + "id": 508, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "remove", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 482, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 479, + "name": "role", + "nodeType": "VariableDeclaration", + "scope": 508, + "src": "530:17:6", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$445_storage_ptr", + "typeString": "struct Roles.Role" + }, + "typeName": { + "contractScope": null, + "id": 478, + "name": "Role", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 445, + "src": "530:4:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$445_storage_ptr", + "typeString": "struct Roles.Role" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 481, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 508, + "src": "549:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 480, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "549:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "529:36:6" + }, + "returnParameters": { + "id": 483, + "nodeType": "ParameterList", + "parameters": [], + "src": "575:0:6" + }, + "scope": 532, + "src": "514:184:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 530, + "nodeType": "Block", + "src": "864:84:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 522, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 518, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 512, + "src": "882:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 520, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "901:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 519, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "893:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 521, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "893:10:6", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "882:21:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 517, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 892, + 893 + ], + "referencedDeclaration": 892, + "src": "874:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 523, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "874:30:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 524, + "nodeType": "ExpressionStatement", + "src": "874:30:6" + }, + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 525, + "name": "role", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 510, + "src": "921:4:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$445_storage_ptr", + "typeString": "struct Roles.Role storage pointer" + } + }, + "id": 526, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "bearer", + "nodeType": "MemberAccess", + "referencedDeclaration": 444, + "src": "921:11:6", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 528, + "indexExpression": { + "argumentTypes": null, + "id": 527, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 512, + "src": "933:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "921:20:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 516, + "id": 529, + "nodeType": "Return", + "src": "914:27:6" + } + ] + }, + "documentation": "@dev check if an account has this role\n@return bool", + "id": 531, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "has", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 513, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 510, + "name": "role", + "nodeType": "VariableDeclaration", + "scope": 531, + "src": "799:17:6", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$445_storage_ptr", + "typeString": "struct Roles.Role" + }, + "typeName": { + "contractScope": null, + "id": 509, + "name": "Role", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 445, + "src": "799:4:6", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$445_storage_ptr", + "typeString": "struct Roles.Role" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 512, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 531, + "src": "818:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 511, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "818:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "798:36:6" + }, + "returnParameters": { + "id": 516, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 515, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 531, + "src": "858:4:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 514, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "858:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "857:6:6" + }, + "scope": 532, + "src": "786:162:6", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 533, + "src": "108:842:6" + } + ], + "src": "0:951:6" + }, + "id": 6 + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol": { + "ast": { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol", + "exportedSymbols": { + "SafeMath": [ + 660 + ] + }, + "id": 661, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 534, + "literals": [ + "solidity", + "^", + "0.5", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "0:23:7" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": "@title SafeMath\n@dev Unsigned math operations with safety checks that revert on error", + "fullyImplemented": true, + "id": 660, + "linearizedBaseContracts": [ + 660 + ], + "name": "SafeMath", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 566, + "nodeType": "Block", + "src": "296:354:7", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 545, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 543, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 536, + "src": "527:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 544, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "532:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "527:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 549, + "nodeType": "IfStatement", + "src": "523:45:7", + "trueBody": { + "id": 548, + "nodeType": "Block", + "src": "535:33:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "30", + "id": 546, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "556:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "functionReturnParameters": 542, + "id": 547, + "nodeType": "Return", + "src": "549:8:7" + } + ] + } + }, + { + "assignments": [ + 551 + ], + "declarations": [ + { + "constant": false, + "id": 551, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 566, + "src": "578:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 550, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "578:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 555, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 554, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 552, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 536, + "src": "590:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 553, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 538, + "src": "594:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "590:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "578:17:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 561, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 559, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 557, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 551, + "src": "613:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 558, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 536, + "src": "617:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "613:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 560, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 538, + "src": "622:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "613:10:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 556, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 892, + 893 + ], + "referencedDeclaration": 892, + "src": "605:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 562, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "605:19:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 563, + "nodeType": "ExpressionStatement", + "src": "605:19:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 564, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 551, + "src": "642:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 542, + "id": 565, + "nodeType": "Return", + "src": "635:8:7" + } + ] + }, + "documentation": "@dev Multiplies two unsigned integers, reverts on overflow.", + "id": 567, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "mul", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 539, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 536, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 567, + "src": "242:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 535, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "242:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 538, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 567, + "src": "253:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 537, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "253:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "241:22:7" + }, + "returnParameters": { + "id": 542, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 541, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 567, + "src": "287:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 540, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "287:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "286:9:7" + }, + "scope": 660, + "src": "229:421:7", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 590, + "nodeType": "Block", + "src": "845:229:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 579, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 577, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 571, + "src": "929:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 578, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "933:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "929:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 576, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 892, + 893 + ], + "referencedDeclaration": 892, + "src": "921:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 580, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "921:14:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 581, + "nodeType": "ExpressionStatement", + "src": "921:14:7" + }, + { + "assignments": [ + 583 + ], + "declarations": [ + { + "constant": false, + "id": 583, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 590, + "src": "945:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 582, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "945:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 587, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 586, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 584, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 569, + "src": "957:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 585, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 571, + "src": "961:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "957:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "945:17:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 588, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 583, + "src": "1066:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 575, + "id": 589, + "nodeType": "Return", + "src": "1059:8:7" + } + ] + }, + "documentation": "@dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero.", + "id": 591, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "div", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 572, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 569, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 591, + "src": "791:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 568, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "791:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 571, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 591, + "src": "802:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 570, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "802:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "790:22:7" + }, + "returnParameters": { + "id": 575, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 574, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 591, + "src": "836:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 573, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "836:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "835:9:7" + }, + "scope": 660, + "src": "778:296:7", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 614, + "nodeType": "Block", + "src": "1272:78:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 603, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 601, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 595, + "src": "1290:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 602, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 593, + "src": "1295:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1290:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 600, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 892, + 893 + ], + "referencedDeclaration": 892, + "src": "1282:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 604, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1282:15:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 605, + "nodeType": "ExpressionStatement", + "src": "1282:15:7" + }, + { + "assignments": [ + 607 + ], + "declarations": [ + { + "constant": false, + "id": 607, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 614, + "src": "1307:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 606, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1307:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 611, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 610, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 608, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 593, + "src": "1319:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 609, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 595, + "src": "1323:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1319:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1307:17:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 612, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 607, + "src": "1342:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 599, + "id": 613, + "nodeType": "Return", + "src": "1335:8:7" + } + ] + }, + "documentation": "@dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend).", + "id": 615, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "sub", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 596, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 593, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 615, + "src": "1218:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 592, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1218:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 595, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 615, + "src": "1229:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 594, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1229:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1217:22:7" + }, + "returnParameters": { + "id": 599, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 598, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 615, + "src": "1263:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 597, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1263:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1262:9:7" + }, + "scope": 660, + "src": "1205:145:7", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 638, + "nodeType": "Block", + "src": "1498:78:7", + "statements": [ + { + "assignments": [ + 625 + ], + "declarations": [ + { + "constant": false, + "id": 625, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 638, + "src": "1508:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 624, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1508:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 629, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 628, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 626, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 617, + "src": "1520:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 627, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 619, + "src": "1524:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1520:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1508:17:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 633, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 631, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 625, + "src": "1543:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 632, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 617, + "src": "1548:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1543:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 630, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 892, + 893 + ], + "referencedDeclaration": 892, + "src": "1535:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 634, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1535:15:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 635, + "nodeType": "ExpressionStatement", + "src": "1535:15:7" + }, + { + "expression": { + "argumentTypes": null, + "id": 636, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 625, + "src": "1568:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 623, + "id": 637, + "nodeType": "Return", + "src": "1561:8:7" + } + ] + }, + "documentation": "@dev Adds two unsigned integers, reverts on overflow.", + "id": 639, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "add", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 620, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 617, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 639, + "src": "1444:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 616, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1444:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 619, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 639, + "src": "1455:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 618, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1455:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1443:22:7" + }, + "returnParameters": { + "id": 623, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 622, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 639, + "src": "1489:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 621, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1489:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1488:9:7" + }, + "scope": 660, + "src": "1431:145:7", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 658, + "nodeType": "Block", + "src": "1795:54:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 651, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 649, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 643, + "src": "1813:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 650, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1818:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1813:6:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 648, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 892, + 893 + ], + "referencedDeclaration": 892, + "src": "1805:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 652, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1805:15:7", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 653, + "nodeType": "ExpressionStatement", + "src": "1805:15:7" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 656, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 654, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 641, + "src": "1837:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "%", + "rightExpression": { + "argumentTypes": null, + "id": 655, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 643, + "src": "1841:1:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1837:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 647, + "id": 657, + "nodeType": "Return", + "src": "1830:12:7" + } + ] + }, + "documentation": "@dev Divides two unsigned integers and returns the remainder (unsigned integer modulo),\nreverts when dividing by zero.", + "id": 659, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "mod", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 644, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 641, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 659, + "src": "1741:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 640, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1741:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 643, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 659, + "src": "1752:9:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 642, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1752:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1740:22:7" + }, + "returnParameters": { + "id": 647, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 646, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 659, + "src": "1786:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 645, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1786:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1785:9:7" + }, + "scope": 660, + "src": "1728:121:7", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 661, + "src": "125:1726:7" + } + ], + "src": "0:1852:7" + }, + "id": 7 + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol": { + "ast": { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "exportedSymbols": { + "IERC20": [ + 729 + ] + }, + "id": 730, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 662, + "literals": [ + "solidity", + "^", + "0.5", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "0:23:8" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "interface", + "documentation": "@title ERC20 interface\n@dev see https://github.com/ethereum/EIPs/issues/20", + "fullyImplemented": false, + "id": 729, + "linearizedBaseContracts": [ + 729 + ], + "name": "IERC20", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "id": 671, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 667, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 664, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 671, + "src": "155:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 663, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "155:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 666, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 671, + "src": "167:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 665, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "167:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "154:27:8" + }, + "returnParameters": { + "id": 670, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 669, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 671, + "src": "200:4:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 668, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "200:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "199:6:8" + }, + "scope": 729, + "src": "137:69:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 680, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 676, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 673, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 680, + "src": "229:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 672, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "229:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 675, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 680, + "src": "246:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 674, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "246:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "228:32:8" + }, + "returnParameters": { + "id": 679, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 678, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 680, + "src": "279:4:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 677, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "279:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "278:6:8" + }, + "scope": 729, + "src": "212:73:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 691, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 687, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 682, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 691, + "src": "313:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 681, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "313:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 684, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 691, + "src": "327:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 683, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "327:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 686, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 691, + "src": "339:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 685, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "339:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "312:41:8" + }, + "returnParameters": { + "id": 690, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 689, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 691, + "src": "372:4:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 688, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "372:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "371:6:8" + }, + "scope": 729, + "src": "291:87:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 696, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "totalSupply", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 692, + "nodeType": "ParameterList", + "parameters": [], + "src": "404:2:8" + }, + "returnParameters": { + "id": 695, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 694, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 696, + "src": "430:7:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 693, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "430:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "429:9:8" + }, + "scope": 729, + "src": "384:55:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 703, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "balanceOf", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 699, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 698, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 703, + "src": "464:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 697, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "464:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "463:13:8" + }, + "returnParameters": { + "id": 702, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 701, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 703, + "src": "500:7:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 700, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "500:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "499:9:8" + }, + "scope": 729, + "src": "445:64:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 712, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "allowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 708, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 705, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 712, + "src": "534:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 704, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "534:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 707, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 712, + "src": "549:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 706, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "549:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "533:32:8" + }, + "returnParameters": { + "id": 711, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 710, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 712, + "src": "589:7:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 709, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "589:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "588:9:8" + }, + "scope": 729, + "src": "515:83:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "anonymous": false, + "documentation": null, + "id": 720, + "name": "Transfer", + "nodeType": "EventDefinition", + "parameters": { + "id": 719, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 714, + "indexed": true, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 720, + "src": "619:20:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 713, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "619:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 716, + "indexed": true, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 720, + "src": "641:18:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 715, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "641:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 718, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 720, + "src": "661:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 717, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "661:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "618:57:8" + }, + "src": "604:72:8" + }, + { + "anonymous": false, + "documentation": null, + "id": 728, + "name": "Approval", + "nodeType": "EventDefinition", + "parameters": { + "id": 727, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 722, + "indexed": true, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 728, + "src": "697:21:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 721, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "697:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 724, + "indexed": true, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 728, + "src": "720:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 723, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "720:7:8", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 726, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 728, + "src": "745:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 725, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "745:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "696:63:8" + }, + "src": "682:78:8" + } + ], + "scope": 730, + "src": "114:648:8" + } + ], + "src": "0:763:8" + }, + "id": 8 + }, + "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol": { + "ast": { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol", + "exportedSymbols": { + "SafeERC20": [ + 874 + ] + }, + "id": 875, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 731, + "literals": [ + "solidity", + "^", + "0.5", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "0:23:9" + }, + { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", + "file": "./IERC20.sol", + "id": 732, + "nodeType": "ImportDirective", + "scope": 875, + "sourceUnit": 730, + "src": "25:22:9", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol", + "file": "../../math/SafeMath.sol", + "id": 733, + "nodeType": "ImportDirective", + "scope": 875, + "sourceUnit": 661, + "src": "48:33:9", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": "@title SafeERC20\n@dev Wrappers around ERC20 operations that throw on failure.\nTo use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,\nwhich allows you to call the safe operations as `token.safeTransfer(...)`, etc.", + "fullyImplemented": true, + "id": 874, + "linearizedBaseContracts": [ + 874 + ], + "name": "SafeERC20", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 736, + "libraryName": { + "contractScope": null, + "id": 734, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 660, + "src": "382:8:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$660", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "376:27:9", + "typeName": { + "id": 735, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "395:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "body": { + "id": 753, + "nodeType": "Block", + "src": "481:51:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 748, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 740, + "src": "514:2:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 749, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 742, + "src": "518:5:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 746, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 738, + "src": "499:5:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$729", + "typeString": "contract IERC20" + } + }, + "id": 747, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 671, + "src": "499:14:9", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 750, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "499:25:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 745, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 892, + 893 + ], + "referencedDeclaration": 892, + "src": "491:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 751, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "491:34:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 752, + "nodeType": "ExpressionStatement", + "src": "491:34:9" + } + ] + }, + "documentation": null, + "id": 754, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeTransfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 743, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 738, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 754, + "src": "431:12:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$729", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 737, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 729, + "src": "431:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$729", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 740, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 754, + "src": "445:10:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 739, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "445:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 742, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 754, + "src": "457:13:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 741, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "457:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "430:41:9" + }, + "returnParameters": { + "id": 744, + "nodeType": "ParameterList", + "parameters": [], + "src": "481:0:9" + }, + "scope": 874, + "src": "409:123:9", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 774, + "nodeType": "Block", + "src": "628:61:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 768, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 758, + "src": "665:4:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 769, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 760, + "src": "671:2:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 770, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 762, + "src": "675:5:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 766, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 756, + "src": "646:5:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$729", + "typeString": "contract IERC20" + } + }, + "id": 767, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 691, + "src": "646:18:9", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,address,uint256) external returns (bool)" + } + }, + "id": 771, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "646:35:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 765, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 892, + 893 + ], + "referencedDeclaration": 892, + "src": "638:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 772, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "638:44:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 773, + "nodeType": "ExpressionStatement", + "src": "638:44:9" + } + ] + }, + "documentation": null, + "id": 775, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeTransferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 763, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 756, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 775, + "src": "564:12:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$729", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 755, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 729, + "src": "564:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$729", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 758, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 775, + "src": "578:12:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 757, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "578:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 760, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 775, + "src": "592:10:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 759, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "592:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 762, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 775, + "src": "604:13:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 761, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "604:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "563:55:9" + }, + "returnParameters": { + "id": 764, + "nodeType": "ParameterList", + "parameters": [], + "src": "628:0:9" + }, + "scope": 874, + "src": "538:151:9", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 810, + "nodeType": "Block", + "src": "771:353:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 799, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 787, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 785, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 781, + "src": "1007:5:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 786, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1016:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1007:10:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 788, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "1006:12:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 797, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 792, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 913, + "src": "1047:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeERC20_$874", + "typeString": "library SafeERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_SafeERC20_$874", + "typeString": "library SafeERC20" + } + ], + "id": 791, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1039:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 793, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1039:13:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 794, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 779, + "src": "1054:7:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 789, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 777, + "src": "1023:5:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$729", + "typeString": "contract IERC20" + } + }, + "id": 790, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "allowance", + "nodeType": "MemberAccess", + "referencedDeclaration": 712, + "src": "1023:15:9", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", + "typeString": "function (address,address) view external returns (uint256)" + } + }, + "id": 795, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1023:39:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 796, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1066:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1023:44:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 798, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "1022:46:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1006:62:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 784, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 892, + 893 + ], + "referencedDeclaration": 892, + "src": "998:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 800, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "998:71:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 801, + "nodeType": "ExpressionStatement", + "src": "998:71:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 805, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 779, + "src": "1101:7:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 806, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 781, + "src": "1110:5:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 803, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 777, + "src": "1087:5:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$729", + "typeString": "contract IERC20" + } + }, + "id": 804, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "approve", + "nodeType": "MemberAccess", + "referencedDeclaration": 680, + "src": "1087:13:9", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 807, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1087:29:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 802, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 892, + 893 + ], + "referencedDeclaration": 892, + "src": "1079:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 808, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1079:38:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 809, + "nodeType": "ExpressionStatement", + "src": "1079:38:9" + } + ] + }, + "documentation": null, + "id": 811, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeApprove", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 782, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 777, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 811, + "src": "716:12:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$729", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 776, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 729, + "src": "716:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$729", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 779, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 811, + "src": "730:15:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 778, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "730:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 781, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 811, + "src": "747:13:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 780, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "747:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "715:46:9" + }, + "returnParameters": { + "id": 783, + "nodeType": "ParameterList", + "parameters": [], + "src": "771:0:9" + }, + "scope": 874, + "src": "695:429:9", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 841, + "nodeType": "Block", + "src": "1216:145:9", + "statements": [ + { + "assignments": [ + 821 + ], + "declarations": [ + { + "constant": false, + "id": 821, + "name": "newAllowance", + "nodeType": "VariableDeclaration", + "scope": 841, + "src": "1226:20:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 820, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1226:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 832, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 830, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 817, + "src": "1293:5:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 825, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 913, + "src": "1273:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeERC20_$874", + "typeString": "library SafeERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_SafeERC20_$874", + "typeString": "library SafeERC20" + } + ], + "id": 824, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1265:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 826, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1265:13:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 827, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 815, + "src": "1280:7:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 822, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 813, + "src": "1249:5:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$729", + "typeString": "contract IERC20" + } + }, + "id": 823, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "allowance", + "nodeType": "MemberAccess", + "referencedDeclaration": 712, + "src": "1249:15:9", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", + "typeString": "function (address,address) view external returns (uint256)" + } + }, + "id": 828, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1249:39:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 829, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 639, + "src": "1249:43:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 831, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1249:50:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1226:73:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 836, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 815, + "src": "1331:7:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 837, + "name": "newAllowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 821, + "src": "1340:12:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 834, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 813, + "src": "1317:5:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$729", + "typeString": "contract IERC20" + } + }, + "id": 835, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "approve", + "nodeType": "MemberAccess", + "referencedDeclaration": 680, + "src": "1317:13:9", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 838, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1317:36:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 833, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 892, + 893 + ], + "referencedDeclaration": 892, + "src": "1309:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 839, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1309:45:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 840, + "nodeType": "ExpressionStatement", + "src": "1309:45:9" + } + ] + }, + "documentation": null, + "id": 842, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeIncreaseAllowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 818, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 813, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 842, + "src": "1161:12:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$729", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 812, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 729, + "src": "1161:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$729", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 815, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 842, + "src": "1175:15:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 814, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1175:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 817, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 842, + "src": "1192:13:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 816, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1192:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1160:46:9" + }, + "returnParameters": { + "id": 819, + "nodeType": "ParameterList", + "parameters": [], + "src": "1216:0:9" + }, + "scope": 874, + "src": "1130:231:9", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 872, + "nodeType": "Block", + "src": "1453:145:9", + "statements": [ + { + "assignments": [ + 852 + ], + "declarations": [ + { + "constant": false, + "id": 852, + "name": "newAllowance", + "nodeType": "VariableDeclaration", + "scope": 872, + "src": "1463:20:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 851, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1463:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 863, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 861, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 848, + "src": "1530:5:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 856, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 913, + "src": "1510:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeERC20_$874", + "typeString": "library SafeERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_SafeERC20_$874", + "typeString": "library SafeERC20" + } + ], + "id": 855, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1502:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1502:13:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 858, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 846, + "src": "1517:7:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 853, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 844, + "src": "1486:5:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$729", + "typeString": "contract IERC20" + } + }, + "id": 854, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "allowance", + "nodeType": "MemberAccess", + "referencedDeclaration": 712, + "src": "1486:15:9", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", + "typeString": "function (address,address) view external returns (uint256)" + } + }, + "id": 859, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1486:39:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 860, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 615, + "src": "1486:43:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 862, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1486:50:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1463:73:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 867, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 846, + "src": "1568:7:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 868, + "name": "newAllowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 852, + "src": "1577:12:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 865, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 844, + "src": "1554:5:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$729", + "typeString": "contract IERC20" + } + }, + "id": 866, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "approve", + "nodeType": "MemberAccess", + "referencedDeclaration": 680, + "src": "1554:13:9", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 869, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1554:36:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 864, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 892, + 893 + ], + "referencedDeclaration": 892, + "src": "1546:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 870, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1546:45:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 871, + "nodeType": "ExpressionStatement", + "src": "1546:45:9" + } + ] + }, + "documentation": null, + "id": 873, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeDecreaseAllowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 849, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 844, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 873, + "src": "1398:12:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$729", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 843, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 729, + "src": "1398:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$729", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 846, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 873, + "src": "1412:15:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 845, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1412:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 848, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 873, + "src": "1429:13:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 847, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1429:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1397:46:9" + }, + "returnParameters": { + "id": 850, + "nodeType": "ParameterList", + "parameters": [], + "src": "1453:0:9" + }, + "scope": 874, + "src": "1367:231:9", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 875, + "src": "352:1248:9" + } + ], + "src": "0:1601:9" + }, + "id": 9 + } + } +} \ No newline at end of file diff --git a/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/bin/AlgoPool.abi b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/bin/AlgoPool.abi new file mode 100644 index 000000000..fb2d5f9a9 --- /dev/null +++ b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/bin/AlgoPool.abi @@ -0,0 +1 @@ +[{"constant":false,"inputs":[],"name":"terminate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"account","type":"address"}],"name":"addCoreTeam","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"account","type":"address"}],"name":"isCoreTeam","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceCoreTeam","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"minerAddress","type":"address"}],"name":"transferToMiner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"poolType","type":"uint8"},{"name":"tokenAddress","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"}] \ No newline at end of file diff --git a/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/bin/AlgoPool.bin b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/bin/AlgoPool.bin new file mode 100644 index 000000000..51814af0e --- /dev/null +++ b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/bin/AlgoPool.bin @@ -0,0 +1 @@ +608060405234801561001057600080fd5b506040516040806107e88339810180604052604081101561003057600080fd5b5080516020909101516000805433600160a060020a0319918216811760a060020a60ff02191690925560018054909116600160a060020a03841617905561007f906401000000006100a3810204565b6003805483919060ff19166001838181111561009757fe5b0217905550505061014c565b6100bb6002826401000000006105c76100be82021704565b50565b600160a060020a03811615156100d357600080fd5b6100e68282640100000000610115810204565b156100f057600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b6000600160a060020a038216151561012c57600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b61068d8061015b6000396000f3fe608060405234801561001057600080fd5b506004361061005a5760e060020a60003504630c08bf88811461005f5780632e6b684914610069578063608d3d3d1461008f578063d43acc79146100c9578063fe4028bb146100d1575b600080fd5b6100676100f7565b005b6100676004803603602081101561007f57600080fd5b5035600160a060020a0316610115565b6100b5600480360360208110156100a557600080fd5b5035600160a060020a0316610135565b604080519115158252519081900360200190f35b610067610150565b610067600480360360208110156100e757600080fd5b5035600160a060020a0316610159565b61010033610135565b151561010b57600080fd5b610113610320565b565b61011e33610135565b151561012957600080fd5b610132816103e6565b50565b600061014860028363ffffffff6103f716565b90505b919050565b6101133361042e565b60005474010000000000000000000000000000000000000000900460ff161561018157600080fd5b61018a33610135565b151561019557600080fd5b600160a060020a03811660009081526004602052604090205460ff16156101bb57600080fd5b600081905080600160a060020a0316631777fb4b6040518163ffffffff1660e060020a02815260040160206040518083038186803b1580156101fc57600080fd5b505afa158015610210573d6000803e3d6000fd5b505050506040513d602081101561022657600080fd5b5051151561023357600080fd5b600081600160a060020a03166380258e476040518163ffffffff1660e060020a02815260040160206040518083038186803b15801561027157600080fd5b505afa158015610285573d6000803e3d6000fd5b505050506040513d602081101561029b57600080fd5b50519050600560ff821611156102b057600080fd5b60006102bb8261043f565b9050600160035460ff1660018111156102d057fe5b14156102e0576064600a82020490505b600160a060020a038085166000908152600460205260409020805460ff191660019081179091555461031a9116858363ffffffff6104f116565b50505050565b600154604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600092600160a060020a0316916370a08231916024808301926020929190829003018186803b15801561038457600080fd5b505afa158015610398573d6000803e3d6000fd5b505050506040513d60208110156103ae57600080fd5b5051905060008111156103de576000546001546103de91600160a060020a0391821691168363ffffffff6104f116565b610132610590565b61013260028263ffffffff6105c716565b6000600160a060020a038216151561040e57600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b61013260028263ffffffff61061516565b600060ff8216151561045c575069152d02c7e14af680000061014b565b8160ff1660011415610479575069d3c21bcecceda100000061014b565b8160ff166002141561049757506a01a784379d99db4200000061014b565b8160ff16600314156104b557506a027b46536c66c8e300000061014b565b8160ff16600414156104d357506a034f086f3b33b68400000061014b565b8160ff166005141561014b57506a0422ca8b0a00a42500000061014b565b82600160a060020a031663a9059cbb83836040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561055457600080fd5b505af1158015610568573d6000803e3d6000fd5b505050506040513d602081101561057e57600080fd5b5051151561058b57600080fd5b505050565b6000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b600160a060020a03811615156105dc57600080fd5b6105e682826103f7565b156105f057600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b600160a060020a038116151561062a57600080fd5b61063482826103f7565b151561063f57600080fd5b600160a060020a0316600090815260209190915260409020805460ff1916905556fea165627a7a72305820da6d23ac8f4b151242d9a9cc936a0d9469d337bb92eddce5cc529e4f80d49b290029 \ No newline at end of file diff --git a/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/bin/AlgoPool.json b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/bin/AlgoPool.json new file mode 100644 index 000000000..c0e18880b --- /dev/null +++ b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/bin/AlgoPool.json @@ -0,0 +1,106 @@ +{ + "abi": [ + { + "constant": false, + "inputs": [], + "name": "terminate", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "addCoreTeam", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "account", + "type": "address" + } + ], + "name": "isCoreTeam", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renounceCoreTeam", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "minerAddress", + "type": "address" + } + ], + "name": "transferToMiner", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "name": "poolType", + "type": "uint8" + }, + { + "name": "tokenAddress", + "type": "address" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + } + ], + "bytecode": "608060405234801561001057600080fd5b506040516040806107e88339810180604052604081101561003057600080fd5b5080516020909101516000805433600160a060020a0319918216811760a060020a60ff02191690925560018054909116600160a060020a03841617905561007f906401000000006100a3810204565b6003805483919060ff19166001838181111561009757fe5b0217905550505061014c565b6100bb6002826401000000006105c76100be82021704565b50565b600160a060020a03811615156100d357600080fd5b6100e68282640100000000610115810204565b156100f057600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b6000600160a060020a038216151561012c57600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b61068d8061015b6000396000f3fe608060405234801561001057600080fd5b506004361061005a5760e060020a60003504630c08bf88811461005f5780632e6b684914610069578063608d3d3d1461008f578063d43acc79146100c9578063fe4028bb146100d1575b600080fd5b6100676100f7565b005b6100676004803603602081101561007f57600080fd5b5035600160a060020a0316610115565b6100b5600480360360208110156100a557600080fd5b5035600160a060020a0316610135565b604080519115158252519081900360200190f35b610067610150565b610067600480360360208110156100e757600080fd5b5035600160a060020a0316610159565b61010033610135565b151561010b57600080fd5b610113610320565b565b61011e33610135565b151561012957600080fd5b610132816103e6565b50565b600061014860028363ffffffff6103f716565b90505b919050565b6101133361042e565b60005474010000000000000000000000000000000000000000900460ff161561018157600080fd5b61018a33610135565b151561019557600080fd5b600160a060020a03811660009081526004602052604090205460ff16156101bb57600080fd5b600081905080600160a060020a0316631777fb4b6040518163ffffffff1660e060020a02815260040160206040518083038186803b1580156101fc57600080fd5b505afa158015610210573d6000803e3d6000fd5b505050506040513d602081101561022657600080fd5b5051151561023357600080fd5b600081600160a060020a03166380258e476040518163ffffffff1660e060020a02815260040160206040518083038186803b15801561027157600080fd5b505afa158015610285573d6000803e3d6000fd5b505050506040513d602081101561029b57600080fd5b50519050600560ff821611156102b057600080fd5b60006102bb8261043f565b9050600160035460ff1660018111156102d057fe5b14156102e0576064600a82020490505b600160a060020a038085166000908152600460205260409020805460ff191660019081179091555461031a9116858363ffffffff6104f116565b50505050565b600154604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600092600160a060020a0316916370a08231916024808301926020929190829003018186803b15801561038457600080fd5b505afa158015610398573d6000803e3d6000fd5b505050506040513d60208110156103ae57600080fd5b5051905060008111156103de576000546001546103de91600160a060020a0391821691168363ffffffff6104f116565b610132610590565b61013260028263ffffffff6105c716565b6000600160a060020a038216151561040e57600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b61013260028263ffffffff61061516565b600060ff8216151561045c575069152d02c7e14af680000061014b565b8160ff1660011415610479575069d3c21bcecceda100000061014b565b8160ff166002141561049757506a01a784379d99db4200000061014b565b8160ff16600314156104b557506a027b46536c66c8e300000061014b565b8160ff16600414156104d357506a034f086f3b33b68400000061014b565b8160ff166005141561014b57506a0422ca8b0a00a42500000061014b565b82600160a060020a031663a9059cbb83836040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561055457600080fd5b505af1158015610568573d6000803e3d6000fd5b505050506040513d602081101561057e57600080fd5b5051151561058b57600080fd5b505050565b6000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b600160a060020a03811615156105dc57600080fd5b6105e682826103f7565b156105f057600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b600160a060020a038116151561062a57600080fd5b61063482826103f7565b151561063f57600080fd5b600160a060020a0316600090815260209190915260409020805460ff1916905556fea165627a7a72305820da6d23ac8f4b151242d9a9cc936a0d9469d337bb92eddce5cc529e4f80d49b290029", + "functionHashes": { + "addCoreTeam(address)": "2e6b6849", + "isCoreTeam(address)": "608d3d3d", + "renounceCoreTeam()": "d43acc79", + "terminate()": "0c08bf88", + "transferToMiner(address)": "fe4028bb" + }, + "gasEstimates": { + "creation": { + "codeDepositCost": "335400", + "executionCost": "infinite", + "totalCost": "infinite" + }, + "external": { + "addCoreTeam(address)": "infinite", + "isCoreTeam(address)": "infinite", + "renounceCoreTeam()": "infinite", + "terminate()": "infinite", + "transferToMiner(address)": "infinite" + } + } +} \ No newline at end of file diff --git a/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/package-lock.json b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/package-lock.json new file mode 100644 index 000000000..18c9528d6 --- /dev/null +++ b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/package-lock.json @@ -0,0 +1,555 @@ +{ + "name": "algo-token-distribution", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "requires": { + "file-uri-to-path": "1.0.0" + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=" + }, + "cliui": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "requires": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + } + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" + }, + "command-exists": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/command-exists/-/command-exists-1.2.8.tgz", + "integrity": "sha512-PM54PkseWbiiD/mMsbvW351/u+dafwTJ0ye2qB60G1aGQP9j3xK2gmMDc+R34L3nDtx4qMCitXT75mkbkGJDLw==" + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "requires": { + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" + }, + "execa": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "requires": { + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, + "file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "requires": { + "locate-path": "^2.0.0" + } + }, + "fs-extra": { + "version": "0.30.0", + "resolved": "http://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", + "integrity": "sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A=", + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^2.1.0", + "klaw": "^1.0.0", + "path-is-absolute": "^1.0.0", + "rimraf": "^2.2.8" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "get-caller-file": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", + "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==" + }, + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" + }, + "glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "graceful-fs": { + "version": "4.1.15", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", + "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==" + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=" + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + }, + "jsonfile": { + "version": "2.4.0", + "resolved": "http://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", + "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "keccak": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/keccak/-/keccak-1.4.0.tgz", + "integrity": "sha512-eZVaCpblK5formjPjeTBik7TAg+pqnDrMHIffSvi9Lh7PQgM1+hSzakUeZFCk9DVVG0dacZJuaz2ntwlzZUIBw==", + "requires": { + "bindings": "^1.2.1", + "inherits": "^2.0.3", + "nan": "^2.2.1", + "safe-buffer": "^5.1.0" + } + }, + "klaw": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", + "integrity": "sha1-QIhDO0azsbolnXh4XY6W9zugJDk=", + "requires": { + "graceful-fs": "^4.1.9" + } + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "requires": { + "invert-kv": "^1.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "mem": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", + "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "memorystream": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", + "integrity": "sha1-htcJCzDORV1j+64S3aUaR93K+bI=" + }, + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==" + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "nan": { + "version": "2.12.1", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.12.1.tgz", + "integrity": "sha512-JY7V6lRkStKcKTvHO5NVSQRv+RV+FIL5pvDoLiAtSL9pKlC5x9PKQcZDsq7m4FO4d57mkhC6Z+QhAh3Jdk5JFw==" + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "requires": { + "path-key": "^2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "openzeppelin-solidity": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/openzeppelin-solidity/-/openzeppelin-solidity-2.1.3.tgz", + "integrity": "sha512-Zz595xw6w4ZrNU3JJJTlPd8bHFbHv5OkJlkqsM2i+NBs6CzImoHI3dZ+nmhkfR+p52cGXKmayAGbnfdCum1SMg==" + }, + "os-locale": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", + "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", + "requires": { + "execa": "^0.7.0", + "lcid": "^1.0.0", + "mem": "^1.1.0" + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=" + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" + }, + "require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==" + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=" + }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "requires": { + "glob": "^7.1.3" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "semver": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==" + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" + }, + "solc": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/solc/-/solc-0.5.4.tgz", + "integrity": "sha512-Jz3yz2mct0AYzR83/jBgxDqrLXTHhYUg2G2PVJbMMt5Vu+8e3Of1Mn3nvjPw5mh46jrzt8l4fBN7vHqG5ZF0cw==", + "requires": { + "command-exists": "^1.2.8", + "fs-extra": "^0.30.0", + "keccak": "^1.0.2", + "memorystream": "^0.3.1", + "require-from-string": "^2.0.0", + "semver": "^5.5.0", + "tmp": "0.0.33", + "yargs": "^11.0.0" + } + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" + }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "requires": { + "os-tmpdir": "~1.0.2" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "requires": { + "isexe": "^2.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "http://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "^2.0.0" + } + } + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=" + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" + }, + "yargs": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-11.1.0.tgz", + "integrity": "sha512-NwW69J42EsCSanF8kyn5upxvjp5ds+t3+udGBeTbFnERA+lF541DDpMawzo4z6W/QrzNM18D+BPMiOBibnFV5A==", + "requires": { + "cliui": "^4.0.0", + "decamelize": "^1.1.1", + "find-up": "^2.1.0", + "get-caller-file": "^1.0.1", + "os-locale": "^2.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^9.0.2" + } + }, + "yargs-parser": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-9.0.2.tgz", + "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", + "requires": { + "camelcase": "^4.1.0" + } + } + } +} diff --git a/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/package.json b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/package.json new file mode 100644 index 000000000..e0362baf7 --- /dev/null +++ b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/package.json @@ -0,0 +1,15 @@ +{ + "name": "algo-token-distribution", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "dependencies": { + "openzeppelin-solidity": "2.1.3", + "solc": "0.5.4" + } +} diff --git a/labs/algo-token-distribution/test/AdvancedAlgos.AlgoToken.AlgoTokenDistribution.IntegrationTests/AdvancedAlgos.AlgoToken.AlgoTokenDistribution.IntegrationTests.csproj b/labs/algo-token-distribution/test/AdvancedAlgos.AlgoToken.AlgoTokenDistribution.IntegrationTests/AdvancedAlgos.AlgoToken.AlgoTokenDistribution.IntegrationTests.csproj new file mode 100644 index 000000000..df6775c30 --- /dev/null +++ b/labs/algo-token-distribution/test/AdvancedAlgos.AlgoToken.AlgoTokenDistribution.IntegrationTests/AdvancedAlgos.AlgoToken.AlgoTokenDistribution.IntegrationTests.csproj @@ -0,0 +1,24 @@ + + + + netcoreapp2.1 + true + latest + false + + + + + + + + + + + + + + + + + diff --git a/labs/algo-token-distribution/test/AdvancedAlgos.AlgoToken.AlgoTokenDistribution.IntegrationTests/AlgoFeesTests.cs b/labs/algo-token-distribution/test/AdvancedAlgos.AlgoToken.AlgoTokenDistribution.IntegrationTests/AlgoFeesTests.cs new file mode 100644 index 000000000..ad3bf61b1 --- /dev/null +++ b/labs/algo-token-distribution/test/AdvancedAlgos.AlgoToken.AlgoTokenDistribution.IntegrationTests/AlgoFeesTests.cs @@ -0,0 +1,219 @@ +using System; +using System.Numerics; +using System.Threading.Tasks; +using AdvancedAlgos.AlgoToken.AlgoErc20Token; +using AdvancedAlgos.AlgoToken.Framework.Ethereum; +using AdvancedAlgos.AlgoToken.Framework.Ethereum.Exceptions; +using AdvancedAlgos.AlgoToken.Framework.Ethereum.IntegrationTest; +using Nethereum.RPC.Accounts; +using Nethereum.Web3; +using Nethereum.Web3.Accounts; +using Xunit; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenDistribution.IntegrationTests +{ + public class AlgoFeesTests + { + [Fact] + public async Task MinerRegistrationTest() + { + EthNetwork.UseDefaultTestNet(); + + var prefundedAccount = new Account(EthNetwork.Instance.PrefundedPrivateKey); + + var tokenOwnerAccount = EthAccountFactory.Create(); + var coreTeamAccount = EthAccountFactory.Create(); + + await EthNetwork.Instance.RefillAsync(tokenOwnerAccount); + await EthNetwork.Instance.RefillAsync(coreTeamAccount); + + // Create the ERC20 token... + var token = new AlgoTokenV1(EthNetwork.Instance.GetWeb3(tokenOwnerAccount), EthNetwork.Instance.GasPriceProvider); + await token.DeployAsync(); + + // Create a fees... + var fees1 = new AlgoFees(EthNetwork.Instance.GetWeb3(coreTeamAccount), EthNetwork.Instance.GasPriceProvider); + await fees1.DeployAsync(token.ContractAddress); + + // Create some miners... + var minerAccounts = new IAccount[3]; + var referralAccounts = new IAccount[3]; + AlgoMiner[] miners = new AlgoMiner[3]; + + for (int i = 0; i < 3; i++) + { + // Create an account for the miner and the referral... + minerAccounts[i] = EthAccountFactory.Create(); + referralAccounts[i] = EthAccountFactory.Create(); + + // Create the miner... + miners[i] = new AlgoMiner(EthNetwork.Instance.GetWeb3(coreTeamAccount), EthNetwork.Instance.GasPriceProvider); + await miners[i].DeployAsync(0, 2, minerAccounts[i].Address, referralAccounts[i].Address, token.ContractAddress); + } + + // Register a miner... + await fees1.RegisterMinerAsync(miners[0].ContractAddress); + + Assert.Equal(1, await fees1.GetMinerCountAsync()); + Assert.Equal(miners[0].ContractAddress, await fees1.GetMinerByIndexAsync(0)); + + // Remove the only registered miner. + await fees1.UnregisterMinerAsync(miners[0].ContractAddress); + + Assert.Equal(0, await fees1.GetMinerCountAsync()); + + // Register the 3 miners and ensure they are registered... + for (int i = 0; i < 3; i++) + { + await fees1.RegisterMinerAsync(miners[i].ContractAddress); + } + + Assert.Equal(3, await fees1.GetMinerCountAsync()); + + for (int i = 0; i < 3; i++) + { + Assert.Equal(miners[i].ContractAddress, await fees1.GetMinerByIndexAsync(i)); + } + + // Remove the 2nd miner and check... + await fees1.UnregisterMinerAsync(miners[1].ContractAddress); + + Assert.Equal(2, await fees1.GetMinerCountAsync()); + Assert.Equal(miners[0].ContractAddress, await fees1.GetMinerByIndexAsync(0)); + Assert.Equal(miners[2].ContractAddress, await fees1.GetMinerByIndexAsync(1)); + + // Add the removed miner back... + await fees1.RegisterMinerAsync(miners[1].ContractAddress); + + Assert.Equal(3, await fees1.GetMinerCountAsync()); + Assert.Equal(miners[0].ContractAddress, await fees1.GetMinerByIndexAsync(0)); + Assert.Equal(miners[2].ContractAddress, await fees1.GetMinerByIndexAsync(1)); + Assert.Equal(miners[1].ContractAddress, await fees1.GetMinerByIndexAsync(2)); + + // Remove the latest miner... + await fees1.UnregisterMinerAsync(miners[1].ContractAddress); + + Assert.Equal(2, await fees1.GetMinerCountAsync()); + Assert.Equal(miners[0].ContractAddress, await fees1.GetMinerByIndexAsync(0)); + Assert.Equal(miners[2].ContractAddress, await fees1.GetMinerByIndexAsync(1)); + } + + [Fact] + public async Task MineTest() + { + EthNetwork.UseDefaultTestNet(); + + var prefundedAccount = new Account(EthNetwork.Instance.PrefundedPrivateKey); + + var tokenOwnerAccount = EthAccountFactory.Create(); + var systemAccount = EthAccountFactory.Create(); + var coreTeamAccount = EthAccountFactory.Create(); + + await EthNetwork.Instance.RefillAsync(tokenOwnerAccount); + await EthNetwork.Instance.RefillAsync(systemAccount); + await EthNetwork.Instance.RefillAsync(coreTeamAccount); + + // Create the ERC20 token... + var token = new AlgoTokenV1(EthNetwork.Instance.GetWeb3(tokenOwnerAccount), EthNetwork.Instance.GasPriceProvider); + await token.DeployAsync(); + + // Create a fees... + var fees1 = new AlgoFees(EthNetwork.Instance.GetWeb3(coreTeamAccount), EthNetwork.Instance.GasPriceProvider); + await fees1.DeployAsync(token.ContractAddress); + + // Register the system account... + await fees1.AddSystemAsync(systemAccount.Address); + + // Transfer some tokens to the fees... + await token.TransferAsync(fees1.ContractAddress, 151.Algo()); + + // Create one miner per category... + var minerAccounts = new IAccount[6]; + var referralAccounts = new IAccount[6]; + var miners = new AlgoMiner[6]; + + for (byte i = 0; i <= 5; i++) + { + // Create an account for the miner and the referral... + minerAccounts[i] = EthAccountFactory.Create(); + referralAccounts[i] = EthAccountFactory.Create(); + await EthNetwork.Instance.RefillAsync(minerAccounts[i]); + + // Create the miner as "NonPoolBased" so it can be activated... + miners[i] = new AlgoMiner(EthNetwork.Instance.GetWeb3(coreTeamAccount), EthNetwork.Instance.GasPriceProvider); + await miners[i].DeployAsync(1, i, minerAccounts[i].Address, referralAccounts[i].Address, token.ContractAddress); + + // Activate the miner... + await miners[i].ActivateMinerAsync(); + + // Start mining... + { + var miner = new AlgoMiner(miners[i].ContractAddress, EthNetwork.Instance.GetWeb3(minerAccounts[i]), EthNetwork.Instance.GasPriceProvider); + await miner.StartMiningAsync(); + } + + // Register a miner... + await fees1.RegisterMinerAsync(miners[i].ContractAddress); + } + + // Mine the fees... + { + var fees = new AlgoFees(fees1.ContractAddress, EthNetwork.Instance.GetWeb3(systemAccount), EthNetwork.Instance.GasPriceProvider); + await fees.MineAsync(); + } + + // Ensure the miners received the payment from the fees... + var balance0 = await token.BalanceOfAsync(minerAccounts[0].Address); + var balance1 = await token.BalanceOfAsync(minerAccounts[1].Address); + var balance2 = await token.BalanceOfAsync(minerAccounts[2].Address); + var balance3 = await token.BalanceOfAsync(minerAccounts[3].Address); + var balance4 = await token.BalanceOfAsync(minerAccounts[4].Address); + var balance5 = await token.BalanceOfAsync(minerAccounts[5].Address); + + Assert.Equal(1.Algo(), balance0); + Assert.Equal(10.Algo(), balance1); + Assert.Equal(20.Algo(), balance2); + Assert.Equal(30.Algo(), balance3); + Assert.Equal(40.Algo(), balance4); + Assert.Equal(50.Algo(), balance5); + } + + [Fact] + public async Task TerminateTest() + { + EthNetwork.UseDefaultTestNet(); + + var prefundedAccount = new Account(EthNetwork.Instance.PrefundedPrivateKey); + + var tokenOwnerAccount = EthAccountFactory.Create(); + var coreTeamAccount = EthAccountFactory.Create(); + + await EthNetwork.Instance.RefillAsync(tokenOwnerAccount); + await EthNetwork.Instance.RefillAsync(coreTeamAccount); + + // Create the ERC20 token... + var token = new AlgoTokenV1(EthNetwork.Instance.GetWeb3(tokenOwnerAccount), EthNetwork.Instance.GasPriceProvider); + await token.DeployAsync(); + + // Store the current balance of the token owner... + var tokenOwnerAccountBalance = await token.BalanceOfAsync(tokenOwnerAccount.Address); + + // Create a fees... + var fees1 = new AlgoFees(EthNetwork.Instance.GetWeb3(coreTeamAccount), EthNetwork.Instance.GasPriceProvider); + await fees1.DeployAsync(token.ContractAddress); + + // Transfer some tokens to the fees... + await token.TransferAsync(fees1.ContractAddress, 100.Algo()); + + // Ensure the receiver got the tokens... + Assert.Equal(100.Algo(), await token.BalanceOfAsync(fees1.ContractAddress)); + + // Terminate the contract. + await fees1.TerminateAsync(); + + // Ensure the contract returned all the tokens... + Assert.Equal(0, await token.BalanceOfAsync(fees1.ContractAddress)); + Assert.Equal(100.Algo(), await token.BalanceOfAsync(coreTeamAccount.Address)); + } + } +} diff --git a/labs/algo-token-distribution/test/AdvancedAlgos.AlgoToken.AlgoTokenDistribution.IntegrationTests/AlgoMinerTests.cs b/labs/algo-token-distribution/test/AdvancedAlgos.AlgoToken.AlgoTokenDistribution.IntegrationTests/AlgoMinerTests.cs new file mode 100644 index 000000000..afd0384f2 --- /dev/null +++ b/labs/algo-token-distribution/test/AdvancedAlgos.AlgoToken.AlgoTokenDistribution.IntegrationTests/AlgoMinerTests.cs @@ -0,0 +1,155 @@ +using System; +using System.Numerics; +using System.Threading.Tasks; +using AdvancedAlgos.AlgoToken.AlgoErc20Token; +using AdvancedAlgos.AlgoToken.Framework.Ethereum; +using AdvancedAlgos.AlgoToken.Framework.Ethereum.Exceptions; +using AdvancedAlgos.AlgoToken.Framework.Ethereum.IntegrationTest; +using Nethereum.Web3; +using Nethereum.Web3.Accounts; +using Xunit; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenDistribution.IntegrationTests +{ + public class AlgoMinerTests + { + [Fact] + public async Task PoolBasedMinerBasicWorkfloWTest() + { + EthNetwork.UseDefaultTestNet(); + + var prefundedAccount = new Account(EthNetwork.Instance.PrefundedPrivateKey); + + var tokenOwnerAccount = EthAccountFactory.Create(); + var systemAccount = EthAccountFactory.Create(); + var coreTeamAccount = EthAccountFactory.Create(); + var supervisorAccount = EthAccountFactory.Create(); + var minerAccount = EthAccountFactory.Create(); + var referralAccount = EthAccountFactory.Create(); + + await EthNetwork.Instance.RefillAsync(tokenOwnerAccount); + await EthNetwork.Instance.RefillAsync(systemAccount); + await EthNetwork.Instance.RefillAsync(coreTeamAccount); + await EthNetwork.Instance.RefillAsync(supervisorAccount); + await EthNetwork.Instance.RefillAsync(minerAccount); + + // Create the ERC20 token... + var token = new AlgoTokenV1(EthNetwork.Instance.GetWeb3(tokenOwnerAccount), EthNetwork.Instance.GasPriceProvider); + await token.DeployAsync(); + + // Create the pools to transfer the proper number of tokens to the miners... + var pool1 = new AlgoPool(EthNetwork.Instance.GetWeb3(coreTeamAccount), EthNetwork.Instance.GasPriceProvider); + await pool1.DeployAsync(0, token.ContractAddress); + var pool2 = new AlgoPool(EthNetwork.Instance.GetWeb3(coreTeamAccount), EthNetwork.Instance.GasPriceProvider); + await pool2.DeployAsync(1, token.ContractAddress); + + // Transfer some tokens to the pools... + await token.TransferAsync(pool1.ContractAddress, 100.MAlgo()); + await token.TransferAsync(pool2.ContractAddress, 100.MAlgo()); + + // Create a miner category 2... + var miner1 = new AlgoMiner(EthNetwork.Instance.GetWeb3(coreTeamAccount), EthNetwork.Instance.GasPriceProvider); + await miner1.DeployAsync(0, 2, minerAccount.Address, referralAccount.Address, token.ContractAddress); + + // Add roles to the miner... + await miner1.AddSystemAsync(systemAccount.Address); + await miner1.AddSupervisorAsync(supervisorAccount.Address); + + // Transfer tokens to the miner... + await pool1.TransferToMinerAsync(miner1.ContractAddress); + await pool2.TransferToMinerAsync(miner1.ContractAddress); + + // Ensure the miner received the tokens according to its category 2. + Assert.Equal(2.MAlgo() + 2.MAlgo() * 10 / 100, await token.BalanceOfAsync(miner1.ContractAddress)); + + // Activate the miner... + await miner1.ActivateMinerAsync(); + + // Start mining... + miner1.Bind(EthNetwork.Instance.GetWeb3(minerAccount)); + await miner1.StartMiningAsync(); + + // Mine 5 days... + miner1.Bind(EthNetwork.Instance.GetWeb3(systemAccount)); + + var paymentPerDay = 2.MAlgo() / 2 / 365; + BigInteger expectedMinerBalance = 0; + BigInteger expectedReferralBalance = 0; + + for (int i = 0; i < 5; i++) + { + await miner1.MineAsync(); + expectedMinerBalance += paymentPerDay; + expectedReferralBalance += paymentPerDay * 10 / 100; + + Assert.Equal(expectedMinerBalance, await token.BalanceOfAsync(minerAccount.Address)); + Assert.Equal(expectedReferralBalance, await token.BalanceOfAsync(referralAccount.Address)); + } + + // Pause the miner... + miner1.Bind(EthNetwork.Instance.GetWeb3(supervisorAccount)); + await miner1.PauseMiningAsync(); + + // Try to mine one day... + miner1.Bind(EthNetwork.Instance.GetWeb3(systemAccount)); + await Assert.ThrowsAsync( + () => miner1.MineAsync()); + + // Ensure the balance is not changed... + Assert.Equal(expectedMinerBalance, await token.BalanceOfAsync(minerAccount.Address)); + + // Resume the miner... + miner1.Bind(EthNetwork.Instance.GetWeb3(supervisorAccount)); + await miner1.ResumeMiningAsync(); + + // Mine one day... + miner1.Bind(EthNetwork.Instance.GetWeb3(coreTeamAccount)); + await miner1.MineAsync(); + expectedMinerBalance += paymentPerDay; + expectedReferralBalance += paymentPerDay * 10 / 100; + + Assert.Equal(expectedMinerBalance, await token.BalanceOfAsync(minerAccount.Address)); + Assert.Equal(expectedReferralBalance, await token.BalanceOfAsync(referralAccount.Address)); + } + + [Fact] + public async Task TerminateTest() + { + EthNetwork.UseDefaultTestNet(); + + var prefundedAccount = new Account(EthNetwork.Instance.PrefundedPrivateKey); + + var tokenOwnerAccount = EthAccountFactory.Create(); + var coreTeamAccount = EthAccountFactory.Create(); + var minerAccount = EthAccountFactory.Create(); + var referralAccount = EthAccountFactory.Create(); + + await EthNetwork.Instance.RefillAsync(tokenOwnerAccount); + await EthNetwork.Instance.RefillAsync(coreTeamAccount); + + // Create the ERC20 token... + var token = new AlgoTokenV1(EthNetwork.Instance.GetWeb3(tokenOwnerAccount), EthNetwork.Instance.GasPriceProvider); + await token.DeployAsync(); + + // Store the current balance of the token owner... + var tokenOwnerAccountBalance = await token.BalanceOfAsync(tokenOwnerAccount.Address); + + // Create a miner... + var miner1 = new AlgoMiner(EthNetwork.Instance.GetWeb3(coreTeamAccount), EthNetwork.Instance.GasPriceProvider); + await miner1.DeployAsync(0, 2, minerAccount.Address, referralAccount.Address, token.ContractAddress); + + // Transfer some tokens to the miner... + await token.TransferAsync(miner1.ContractAddress, 100.Algo()); + + // Ensure the receiver got the tokens... + Assert.Equal(100.Algo(), await token.BalanceOfAsync(miner1.ContractAddress)); + + // Terminate the contract. + await miner1.TerminateAsync(); + + // Ensure the contract returned all the tokens... + Assert.Equal(0, await token.BalanceOfAsync(miner1.ContractAddress)); + Assert.Equal(100.Algo(), await token.BalanceOfAsync(coreTeamAccount.Address)); + } + } +} diff --git a/labs/algo-token-distribution/test/AdvancedAlgos.AlgoToken.AlgoTokenDistribution.IntegrationTests/AlgoPoolTests.cs b/labs/algo-token-distribution/test/AdvancedAlgos.AlgoToken.AlgoTokenDistribution.IntegrationTests/AlgoPoolTests.cs new file mode 100644 index 000000000..5268bcc4c --- /dev/null +++ b/labs/algo-token-distribution/test/AdvancedAlgos.AlgoToken.AlgoTokenDistribution.IntegrationTests/AlgoPoolTests.cs @@ -0,0 +1,165 @@ +using System; +using System.Numerics; +using System.Threading.Tasks; +using AdvancedAlgos.AlgoToken.AlgoErc20Token; +using AdvancedAlgos.AlgoToken.Framework.Ethereum; +using AdvancedAlgos.AlgoToken.Framework.Ethereum.Exceptions; +using AdvancedAlgos.AlgoToken.Framework.Ethereum.IntegrationTest; +using Nethereum.RPC.Accounts; +using Nethereum.Web3; +using Nethereum.Web3.Accounts; +using Xunit; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenDistribution.IntegrationTests +{ + public class AlgoPoolTests + { + [Fact] + public async Task MinerPoolTransferToMinerTest() + { + EthNetwork.UseDefaultTestNet(); + + var prefundedAccount = new Account(EthNetwork.Instance.PrefundedPrivateKey); + + var tokenOwnerAccount = EthAccountFactory.Create(); + var coreTeamAccount = EthAccountFactory.Create(); + var minerAccounts = new IAccount[6]; + var referralAccounts = new IAccount[6]; + + await EthNetwork.Instance.RefillAsync(tokenOwnerAccount); + await EthNetwork.Instance.RefillAsync(coreTeamAccount); + + // Create the ERC20 token... + var token = new AlgoTokenV1(EthNetwork.Instance.GetWeb3(tokenOwnerAccount), EthNetwork.Instance.GasPriceProvider); + await token.DeployAsync(); + + // Create a pool... + var pool1 = new AlgoPool(EthNetwork.Instance.GetWeb3(coreTeamAccount), EthNetwork.Instance.GasPriceProvider); + await pool1.DeployAsync(0, token.ContractAddress); + + // Transfer some tokens to the pool... + await token.TransferAsync(pool1.ContractAddress, 100.MAlgo()); + + // Create miners for each category... + AlgoMiner[] miners = new AlgoMiner[6]; + + for (byte i = 0; i <= 5; i++) + { + // Create an account for the miner and the referral... + minerAccounts[i] = EthAccountFactory.Create(); + referralAccounts[i] = EthAccountFactory.Create(); + + // Create the miner... + miners[i] = new AlgoMiner(EthNetwork.Instance.GetWeb3(coreTeamAccount), EthNetwork.Instance.GasPriceProvider); + await miners[i].DeployAsync(0, i, minerAccounts[i].Address, referralAccounts[i].Address, token.ContractAddress); + } + + // Transfer tokens from the pool to the miners... + for (int i = 0; i <= 5; i++) + { + await pool1.TransferToMinerAsync(miners[i].ContractAddress); + } + + // Ensure each miner received the proper amount of tokens according its category... + Assert.Equal(100000.Algo(), await token.BalanceOfAsync(miners[0].ContractAddress)); + Assert.Equal(1.MAlgo(), await token.BalanceOfAsync(miners[1].ContractAddress)); + Assert.Equal(2.MAlgo(), await token.BalanceOfAsync(miners[2].ContractAddress)); + Assert.Equal(3.MAlgo(), await token.BalanceOfAsync(miners[3].ContractAddress)); + Assert.Equal(4.MAlgo(), await token.BalanceOfAsync(miners[4].ContractAddress)); + Assert.Equal(5.MAlgo(), await token.BalanceOfAsync(miners[5].ContractAddress)); + } + + [Fact] + public async Task ReferralPoolTransferToMinerTest() + { + EthNetwork.UseDefaultTestNet(); + + var prefundedAccount = new Account(EthNetwork.Instance.PrefundedPrivateKey); + + var tokenOwnerAccount = EthAccountFactory.Create(); + var coreTeamAccount = EthAccountFactory.Create(); + var minerAccounts = new IAccount[6]; + var referralAccounts = new IAccount[6]; + + await EthNetwork.Instance.RefillAsync(tokenOwnerAccount); + await EthNetwork.Instance.RefillAsync(coreTeamAccount); + + // Create the ERC20 token... + var token = new AlgoTokenV1(EthNetwork.Instance.GetWeb3(tokenOwnerAccount), EthNetwork.Instance.GasPriceProvider); + await token.DeployAsync(); + + // Create a pool... + var pool1 = new AlgoPool(EthNetwork.Instance.GetWeb3(coreTeamAccount), EthNetwork.Instance.GasPriceProvider); + await pool1.DeployAsync(1, token.ContractAddress); + + // Transfer some tokens to the pool... + await token.TransferAsync(pool1.ContractAddress, 100.MAlgo()); + + // Create miners for each category... + AlgoMiner[] miners = new AlgoMiner[6]; + + for (byte i = 0; i <= 5; i++) + { + // Create an account for the miner and the referral... + minerAccounts[i] = EthAccountFactory.Create(); + referralAccounts[i] = EthAccountFactory.Create(); + + // Create the miner... + miners[i] = new AlgoMiner(EthNetwork.Instance.GetWeb3(coreTeamAccount), EthNetwork.Instance.GasPriceProvider); + await miners[i].DeployAsync(0, i, minerAccounts[i].Address, referralAccounts[i].Address, token.ContractAddress); + } + + // Transfer tokens from the pool to the miners... + for (int i = 0; i <= 5; i++) + { + await pool1.TransferToMinerAsync(miners[i].ContractAddress); + } + + // Ensure each miner received the proper amount of tokens according its category... + Assert.Equal(100000.Algo() * 10 / 100, await token.BalanceOfAsync(miners[0].ContractAddress)); + Assert.Equal(1.MAlgo() * 10 / 100, await token.BalanceOfAsync(miners[1].ContractAddress)); + Assert.Equal(2.MAlgo() * 10 / 100, await token.BalanceOfAsync(miners[2].ContractAddress)); + Assert.Equal(3.MAlgo() * 10 / 100, await token.BalanceOfAsync(miners[3].ContractAddress)); + Assert.Equal(4.MAlgo() * 10 / 100, await token.BalanceOfAsync(miners[4].ContractAddress)); + Assert.Equal(5.MAlgo() * 10 / 100, await token.BalanceOfAsync(miners[5].ContractAddress)); + } + + [Fact] + public async Task TerminateTest() + { + EthNetwork.UseDefaultTestNet(); + + var prefundedAccount = new Account(EthNetwork.Instance.PrefundedPrivateKey); + + var tokenOwnerAccount = EthAccountFactory.Create(); + var coreTeamAccount = EthAccountFactory.Create(); + + await EthNetwork.Instance.RefillAsync(tokenOwnerAccount); + await EthNetwork.Instance.RefillAsync(coreTeamAccount); + + // Create the ERC20 token... + var token = new AlgoTokenV1(EthNetwork.Instance.GetWeb3(tokenOwnerAccount), EthNetwork.Instance.GasPriceProvider); + await token.DeployAsync(); + + // Store the current balance of the token owner... + var tokenOwnerAccountBalance = await token.BalanceOfAsync(tokenOwnerAccount.Address); + + // Create a pool... + var pool1 = new AlgoPool(EthNetwork.Instance.GetWeb3(coreTeamAccount), EthNetwork.Instance.GasPriceProvider); + await pool1.DeployAsync(0, token.ContractAddress); + + // Transfer some tokens to the pool... + await token.TransferAsync(pool1.ContractAddress, 100.Algo()); + + // Ensure the receiver got the tokens... + Assert.Equal(100.Algo(), await token.BalanceOfAsync(pool1.ContractAddress)); + + // Terminate the contract. + await pool1.TerminateAsync(); + + // Ensure the contract returned all the tokens... + Assert.Equal(0, await token.BalanceOfAsync(pool1.ContractAddress)); + Assert.Equal(100.Algo(), await token.BalanceOfAsync(coreTeamAccount.Address)); + } + } +} diff --git a/labs/algo-token-distribution/test/AdvancedAlgos.AlgoToken.AlgoTokenDistribution.IntegrationTests/Algorithms/FeesDistributionAlgorithmTests.cs b/labs/algo-token-distribution/test/AdvancedAlgos.AlgoToken.AlgoTokenDistribution.IntegrationTests/Algorithms/FeesDistributionAlgorithmTests.cs new file mode 100644 index 000000000..cd4055a37 --- /dev/null +++ b/labs/algo-token-distribution/test/AdvancedAlgos.AlgoToken.AlgoTokenDistribution.IntegrationTests/Algorithms/FeesDistributionAlgorithmTests.cs @@ -0,0 +1,56 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using AdvancedAlgos.AlgoToken.AlgoTokenDistribution.Algorithms; +using Xunit; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenDistribution.IntegrationTests.Algorithms +{ + public class FeesDistributionAlgorithmTests + { + [Fact] + public void TestDistributionAlgorithm1() + { + var miners = new long[] { 100, 100, 100, 100, 100, 100 }; + var fees = FeesDistributionAlgorithm.Distribute(151000, miners); + + Assert.Equal(10, fees[0]); + Assert.Equal(100, fees[1]); + Assert.Equal(200, fees[2]); + Assert.Equal(300, fees[3]); + Assert.Equal(400, fees[4]); + Assert.Equal(500, fees[5]); + + Assert.Equal(151000, GetTotalAmount(miners, fees)); + } + + [Fact] + public void TestDistributionAlgorithm2() + { + var miners = new long[] { 100, 100, 0, 100, 100, 100 }; + var fees = FeesDistributionAlgorithm.Distribute(131000, miners); + + Assert.Equal(10, fees[0]); + Assert.Equal(100, fees[1]); + Assert.Equal(0, fees[2]); + Assert.Equal(300, fees[3]); + Assert.Equal(400, fees[4]); + Assert.Equal(500, fees[5]); + + Assert.Equal(131000, GetTotalAmount(miners, fees)); + } + + private static decimal GetTotalAmount(long[] miners, decimal[] fees) + { + decimal totalAmount = 0; + + for (int i = 0; i < 6; i++) + { + totalAmount += miners[i] * fees[i]; + } + + return totalAmount; + } + } +} diff --git a/labs/algo-token-playground/README.md b/labs/algo-token-playground/README.md new file mode 100644 index 000000000..0fbef2920 --- /dev/null +++ b/labs/algo-token-playground/README.md @@ -0,0 +1,418 @@ +# AlgoToken Playground + +## Building the application + +1. Download and install the netcore 2.1 SDK from +1. Build the application running the proper build script located in the `build` directory (`/labs/algo-token-playground/build`) according to your OS +1. The compiled binaries will be located in the `release/{platform}` directory +1. Once the application is compiled, the generated binaries do not require the netcore SDK to run. All dependencies, including the netcore runtime, are included in the generated directory. + +## Running the application + +* Run the application by executing proper binary file for your OS. The file name is `AdvancedAlgos.AlgoToken.AlgoTokenPlayground` plus the `.exe` extension on Windows. + +## Using the application + +### Environment + +By default the application is configured to run using the following configuration: + +* Eth Network URL: `http://127.0.0.1:8545` +* Gas Price: `20Gwei` + +You can check the configuration by running the command `list-env`. + +* Use the command `set-network ` to change the current network. +* Use the command `set-gasprice ` to change the gas price used for the transactions. The value is expected in Gweis. + +### Using Ganache to emulate a local testnet + +You can emulate a local testnet by installing Ganache in your machine. + +* Download and install the Ganache application from + * Ensure you set the port to 8545, which is the default port for GETH nodes + * Ensure you disable the setting "ERROR ON TRANSACTION FAILURE" to emulate the behavior of the GETH client + * Ensure you disable the setting "LOCK ACCOUNTS" to avoid locking the prefunded accounts +* If you prefer the command line version, you need to install nodejs and then you can use the scripts located in `/labs/tools/ganache-cli-setup` to install and run the application + * The Windows version of the script expect the directory `C:\Temp` to be available for the Ganache DB + * The Linux version of the script expect the directory `ganache-db` to be available in the current directory for the Ganache DB + * You can change the Ganache DB directory by using the `--db` switch + +### Managing accounts + +#### Creating a new account + +Use the `new-account [-n ]` command to create a new account. + +The optional `-n` switch let you set a friendly name for the new account, later can be used as an alias for the account address when is necessary. + +>Example: `new-account -n miner_1_account` + +#### Importing an existing account + +Use the command `import-account [-n ]` to import an existing account. + +>Example: `import-account 0936af475d2701538aad321f87e0a51f2b297634653393e8cab7290a674009a5 -n prefunded` + +#### Selecting an account for singing transactions + +Before executing any transaction, you need to set the account to be used for signing the transaction. + +Use the `set-account ` command to set the signing account. All subsequent transactions will be signed using this account. + +>Example: `set-account miner_1_account` + +The `new-account` and `import-account` commands will set the current account automatically. + +Notice that the current account name is shown in the command prompt. + +#### Listing the accounts registered in the playground + +The `list-accounts` command shows the list of accounts registered in the Playground. + +>Example: `list-accounts` + +### Ether management + +Before using an account to sing a transaction you need to send some ethers to that account. + +#### Transfer ethers to an account + +Use the `eth-transfer ` command to transfer ethers to an account: +* `to`: the destination account address (or name if the account is registered in the playground) +* `value`: the amount to transfer. By default this value is expected in weis, you can specify the following suffixes to use a different unit: + * `wei`: base unit + * `gwei`: 1000000000 weis + * `ether` or `eth`: 1000000000000000000 weis + * `mether` or `m`: 1000000000000000000000000 weis or 1M eth + +>Example: `eth-transfer miner_1_account 1eth` + +#### Getting the balance of an account + +Use the `eth-getbalance ` command to get the balance of the specified account. + +>Example: `eth-getbalance miner_1_account` + +### Using aliases + +The playground support aliases for account or contract addresses, in every place where an address is expected, the name given to the account or the contract can be used in place. Notice that this is an internal feature of the playground, neither accounts or contracts register this name in Ethereum. + +Some commands allow you to specify an alias, for example when an account is created or when a contract is deployed. + +Usually the `-n ` switch is the standard way to create an alias for an address. If you omit the switch the command will set an alias automatically. + +Valid chars for alias identifiers are any char except reserved chars. + +### Working with contracts + +#### Deploying contracts + +Ensure the current account is set before invoking a transaction (see `set-account` command). + +Every contract provides an specific command to deploy a new instance of the contract, the pattern used by the playground is `deploy-`, followed by the constructor parameters if they are required by the contract. Also the `-n ` switch is avaible to create an alias for the new instance address. + +To list the contracts created during the playground session use the command `list-contracts`. + +#### Invoking a transactional operation + +In order to invoke transactional operations, the pattern used is: + +`. ` + +Where `contract` is the contract address or an alias, the `operation` is the function you are calling, and `` is the list of parameters required by the operation, separated by spaces. + +String type parameters can be enclosed in double quotes, but is not mandatory, unless the string contains a reserved char. + +#### Invoking a call function + +The invoke syntax is the same used for transactional operations, the only difference is that the current account is not used, since the call functions do not need to be signed. + +#### Creating an alias for an contract address + +Use the command `register-contract
` to create an alias for an existing contract address: +* `address`: the address of the contract +* `name`: the alias name for the specified contract address + +## Algo Contracts + +The detailed specification of the following contracts can be found in the "Smart Contracts Requirements / Specifications" document. + +The goal of this document is to describe the commands available in the playground. For the behavior/business rules check the mentioned document. + +### AlgoToken + +AlgoToken is an standard ERC20 token contract. All available functions belong the ERC20 specification. + +The following commands are supported for the `AlgoToken` contract: + +#### deploy-algotoken + +`deploy-algotoken [-n ]` + +Creates a new instance of the `AlgoToken` contract. + +>Example: `deploy-algotoken -n token` + +#### algotoken-transfer + +`.algotoken-transfer ` + +Transfer tokens to the specified address: +* `to`: the destination account address +* `value`: the amount to transfer + +*These parameters follow the same rules listed in the `eth-transfer` command.* + +>Example: `token.algotoken-transfer dev_pool 100m` + +#### algotoken-balanceof + +`.algotoken-balanceof ` + +Get the balance for the specified address: +* `owner`: the account address to check + +>Example: `token.algotoken-balanceof dev_pool` + +#### algotoken-pause + +`.algotoken-pause` + +Pauses the token. All transactions will be suspended. + +>Example: `token.algotoken-pause` + +#### algotoken-unpause + +`.algotoken-unpause` + +Unpauses the token. All transactions will be resumed. + +>Example: `token.algotoken-unpause` + +### AlgoPool + +The following commands are supported for the `AlgoPool` contract: + +#### deploy-algopool + +`deploy-algopool [-n ]` + +Creates a new instance of the `AlgoPool` contract. +* `poolType`: the type of pool (uint8: 0 = MinerPool, 1 = ReferralPool) +* `tokenAddress`: the address of the AlgoToken contract + +>Example: `deploy-algopool 0 token -n dev_pool` + +#### algopool-transfertominer + +`.algopool-transfertominer ` + +Transfer tokens from the AlgoPool balance to the AlgoMiner balance. The amount of tokens to be transfered is determined by the AlgoMiner category (see the specification document). +* `minerAddress`: the address of the AlgoMiner contract + +>Example: `dev_pool.algopool-transfertominer miner_1` + +#### algopool-terminate + +`.algopool-terminate` + +Terminates the contract and return its balance to the creator. + +>Example: `dev_pool.algopool-terminate` + +### AlgoMiner + +The following commands are supported for the `AlgoMiner` contract: + +#### deploy-algominer + +`deploy-algominer [-n ]` + +Creates a new instance of the `AlgoPool` contract. +* `minerType`: the type of miner (uint8: 0 = PoolBased, 1 = NonPoolBased) +* `category`: the category of miner (uint8: valid from 0 to 5) +* `minerAccountAddress`: the address of the miner's owner +* `referralAccountAddress`: the address of the referral +* `tokenAddress`: the address of the AlgoToken contract + +>Example: `deploy-algominer 0 2 miner_1_account referral_1_account token -n miner_1` + +#### algominer-activateminer + +`.algominer-activateminer` + +Activates the miner. + +>Example: `miner_1.algominer-activateminer` + +#### algominer-deactivateminer + +`.algominer-deactivateminer` + +Deactivates the miner. + +>Example: `miner_1.algominer-deactivateminer` + +#### algominer-migrateminer + +`.algominer-migrateminer ` + +Transfer all tokens from this AlgoMiner another AlgoMiner. The miner must be deactivated before running this operation +* `newMinerAddress`: the address of the new AlgoMiner contract + +>Example: `miner_1.algominer-migrateminer miner_2` + +#### algominer-pausemining + +`.algominer-pausemining` + +Pauses the miner. + +>Example: `miner_1.algominer-pausemining` + +#### algominer-resumemining + +`.algominer-resumemining` + +Resumes the miner. + +>Example: `miner_1.algominer-resumemining` + +#### algominer-stopandremoveownership + +`.algominer-stopandremoveownership` + +Sets the miner to the stopped state and remove the ownership, a new owner and referral will be assigned using the `resetMiner` operation. + +>Example: `miner_1.algominer-stopandremoveownership` + +#### algominer-resetminer + +`.algominer-resetminer ` + +Resets the miner. +* `newOwnerAddress`: the address of the new owner +* `newReferralAddress`: the address of the new referral + +>Example: `miner_1.algominer-resetminer` + +#### algominer-startmining + +`.algominer-startmining` + +Starts the miner (used by the owner). + +>Example: `miner_1.algominer-startmining` + +#### algominer-stopmining + +`.algominer-stopmining` + +Stops the miner (used by the owner). + +>Example: `miner_1.algominer-stopmining` + +#### algominer-mine + +`.algominer-mine` + +This operation is executed by the system to request a payment from the AlgoMiner to the owner. The amount to pay is computed using the rules specified in the "Smart Contracts Requirements / Specifications" document. + +>Example: `miner_1.algominer-mine` + +#### algominer-terminate + +`.algominer-terminate` + +Terminates the contract and return its balance to the creator. + +>Example: `miner_1.algominer-terminate` + +#### algominer-addsystem + +`.algominer-addsystem ` + +Adds the specified account to the "System" role. +* `account`: the address of account to be added to the role. + +>Example: `miner_1.algominer-addsystem 0x862f8938949e4A1aA82Cd427d87E4fc76940e7a1` + +#### algominer-addcoreteam + +`.algominer-addcoreteam ` + +Adds the specified account to the "Core Team" role. +* `account`: the address of account to be added to the role. + +>Example: `miner_1.algominer-addcoreteam 0x862f8938949e4A1aA82Cd427d87E4fc76940e7a1` + +#### algominer-addsupervisor + +`.algominer-addsupervisor ` + +Adds the specified account to the "Supervisor" role. +* `account`: the address of account to be added to the role. + +>Example: `miner_1.algominer-addsupervisor 0x862f8938949e4A1aA82Cd427d87E4fc76940e7a1` + +### AlgoFees + +The following commands are supported for the `AlgoFees` contract: + +#### deploy-algofees + +`deploy-algofees [-n ]` + +Creates a new instance of the `AlgoFees` contract. +* `tokenAddress`: the address of the AlgoToken contract + +>Example: `deploy-algofees token -n fees1` + +#### algofees-registerminer + +`.algofees-registerminer ` + +Registers a miner with the AlgoFees. +* `minerAddress`: the address of the AlgoMiner contract + +>Example: `fees1.algofees-registerminer miner_0` + +#### algofees-unregisterminer + +`.algofees-unregisterminer ` + +Unregisters a miner from the AlgoFees. +* `minerAddress`: the address of the AlgoMiner contract + +>Example: `fees1.algofees-unregisterminer miner_0` + +#### algofees-mine + +`.algofees-mine` + +This operation is executed by the system to request a payment from the AlgoFees to registered miners. The amount to pay is computed using the rules specified in the "Smart Contracts Requirements / Specifications" document. + +>Example: `fees1.algofees-mine` + +#### algominer-terminate + +`.algofees-terminate` + +Terminates the contract and return its balance to the creator. + +>Example: `algofees.algofees-terminate` + +### System commands + +#### reset + +Resets the current playground instance, removing all aliases created. + +>Example: `reset` + +### Notes + +* Reserved chars: the following chars are reserved chars and cannot be used in identifiers or strings not enclosed in quotes: "space" ":" "/" "-" "." "," +* Commands, operations and identifiers are case insensitive diff --git a/labs/algo-token-playground/algofees-script.txt b/labs/algo-token-playground/algofees-script.txt new file mode 100644 index 000000000..732121402 --- /dev/null +++ b/labs/algo-token-playground/algofees-script.txt @@ -0,0 +1,61 @@ +new-account -n miner_0_account +new-account -n ref_0_account +new-account -n miner_1_account +new-account -n ref_1_account +new-account -n miner_2_account +new-account -n ref_2_account +new-account -n miner_3_account +new-account -n ref_3_account +new-account -n miner_4_account +new-account -n ref_4_account +new-account -n miner_5_account +new-account -n ref_5_account +import-account 0936af475d2701538aad321f87e0a51f2b297634653393e8cab7290a674009a5 -n prefunded +eth-transfer miner_0_account 1eth +eth-transfer miner_1_account 1eth +eth-transfer miner_2_account 1eth +eth-transfer miner_3_account 1eth +eth-transfer miner_4_account 1eth +eth-transfer miner_5_account 1eth +deploy-algotoken -n token +deploy-algominer 1 0 miner_0_account ref_0_account token -n miner_0 +deploy-algominer 1 1 miner_1_account ref_1_account token -n miner_1 +deploy-algominer 1 2 miner_2_account ref_2_account token -n miner_2 +deploy-algominer 1 3 miner_3_account ref_3_account token -n miner_3 +deploy-algominer 1 4 miner_4_account ref_4_account token -n miner_4 +deploy-algominer 1 5 miner_5_account ref_5_account token -n miner_5 +miner_0.algominer-activateminer +miner_1.algominer-activateminer +miner_2.algominer-activateminer +miner_3.algominer-activateminer +miner_4.algominer-activateminer +miner_5.algominer-activateminer +set-account miner_0_account +miner_0.algominer-startmining +set-account miner_1_account +miner_1.algominer-startmining +set-account miner_2_account +miner_2.algominer-startmining +set-account miner_3_account +miner_3.algominer-startmining +set-account miner_4_account +miner_4.algominer-startmining +set-account miner_5_account +miner_5.algominer-startmining +set-account prefunded +deploy-algofees token -n fees1 +token.algotoken-transfer fees1 151eth +token.algotoken-balanceof fees1 +fees1.algofees-registerminer miner_0 +fees1.algofees-registerminer miner_1 +fees1.algofees-registerminer miner_2 +fees1.algofees-registerminer miner_3 +fees1.algofees-registerminer miner_4 +fees1.algofees-registerminer miner_5 +fees1.algofees-mine +token.algotoken-balanceof miner_0_account +token.algotoken-balanceof miner_1_account +token.algotoken-balanceof miner_2_account +token.algotoken-balanceof miner_3_account +token.algotoken-balanceof miner_4_account +token.algotoken-balanceof miner_5_account diff --git a/labs/algo-token-playground/build/build-osx-x64.cmd b/labs/algo-token-playground/build/build-osx-x64.cmd new file mode 100644 index 000000000..61a0aadc3 --- /dev/null +++ b/labs/algo-token-playground/build/build-osx-x64.cmd @@ -0,0 +1 @@ +dotnet publish ../src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/AdvancedAlgos.AlgoToken.AlgoTokenPlayground.csproj -c Release -o ../../build/release/osx-x64 --self-contained -r osx-x64 diff --git a/labs/algo-token-playground/build/build-osx-x64.sh b/labs/algo-token-playground/build/build-osx-x64.sh new file mode 100644 index 000000000..6740e82b0 --- /dev/null +++ b/labs/algo-token-playground/build/build-osx-x64.sh @@ -0,0 +1,2 @@ +#!/bin/bash +dotnet publish ../src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/AdvancedAlgos.AlgoToken.AlgoTokenPlayground.csproj -c Release -o ../../build/release/osx-x64 --self-contained -r osx-x64 diff --git a/labs/algo-token-playground/build/build-win-x64.cmd b/labs/algo-token-playground/build/build-win-x64.cmd new file mode 100644 index 000000000..ea75e2ad0 --- /dev/null +++ b/labs/algo-token-playground/build/build-win-x64.cmd @@ -0,0 +1 @@ +dotnet publish ../src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/AdvancedAlgos.AlgoToken.AlgoTokenPlayground.csproj -c Release -o ../../build/release/win-x64 --self-contained -r win-x64 diff --git a/labs/algo-token-playground/build/build-win-x64.sh b/labs/algo-token-playground/build/build-win-x64.sh new file mode 100644 index 000000000..1df886e0d --- /dev/null +++ b/labs/algo-token-playground/build/build-win-x64.sh @@ -0,0 +1,2 @@ +#!/bin/bash +dotnet publish ../src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/AdvancedAlgos.AlgoToken.AlgoTokenPlayground.csproj -c Release -o ../../build/release/win-x64 --self-contained -r win-x64 diff --git a/labs/algo-token-playground/pool-based-algominer-script.txt b/labs/algo-token-playground/pool-based-algominer-script.txt new file mode 100644 index 000000000..5d4cf358a --- /dev/null +++ b/labs/algo-token-playground/pool-based-algominer-script.txt @@ -0,0 +1,26 @@ +new-account -n miner_1_account +new-account -n ref_1_account +import-account 0936af475d2701538aad321f87e0a51f2b297634653393e8cab7290a674009a5 -n prefunded +eth-transfer miner_1_account 1eth +eth-getbalance miner_1_account +deploy-algotoken -n token +deploy-algopool 0 token -n dev_pool +deploy-algopool 1 token -n ref_pool +token.algotoken-transfer dev_pool 100m +token.algotoken-transfer ref_pool 100m +token.algotoken-balanceof dev_pool +token.algotoken-balanceof ref_pool +deploy-algominer 0 2 miner_1_account ref_1_account token -n miner_1 +dev_pool.algopool-transfertominer miner_1 +ref_pool.algopool-transfertominer miner_1 +token.algotoken-balanceof miner_1 +miner_1.algominer-activateminer +set-account miner_1_account +miner_1.algominer-startmining +set-account prefunded +miner_1.algominer-mine +token.algotoken-balanceof miner_1_account +token.algotoken-balanceof ref_1_account +miner_1.algominer-mine +token.algotoken-balanceof miner_1_account +token.algotoken-balanceof ref_1_account diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/AdvancedAlgos.AlgoToken.AlgoTokenPlayground.csproj b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/AdvancedAlgos.AlgoToken.AlgoTokenPlayground.csproj new file mode 100644 index 000000000..8b51d428d --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/AdvancedAlgos.AlgoToken.AlgoTokenPlayground.csproj @@ -0,0 +1,21 @@ + + + + Exe + netcoreapp2.1 + true + latest + + + + + + + + + + + + + + diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AccountManagement/AccountCounter.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AccountManagement/AccountCounter.cs new file mode 100644 index 000000000..84c6029b3 --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AccountManagement/AccountCounter.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Threading; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.AccountManagement +{ + public static class AccountCounter + { + private static long _count = 0; + + public static long Next() + { + Interlocked.Increment(ref _count); + return _count; + } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AccountManagement/ImportAccountCommand.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AccountManagement/ImportAccountCommand.cs new file mode 100644 index 000000000..afea426bc --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AccountManagement/ImportAccountCommand.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Text; +using System.Threading.Tasks; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Runtime; +using AdvancedAlgos.AlgoToken.Framework.Ethereum; +using Nethereum.Web3.Accounts; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.AccountManagement +{ + public class ImportAccountCommand : ICommand + { + private const string DEFAULT_NAME_FORMAT = "account#{0}"; + + public string Name { get; set; } + public string PrivateKey { get; set; } + + public Task ExecuteAsync(RuntimeContext context) + { + string name = string.IsNullOrWhiteSpace(Name) ? + string.Format(CultureInfo.InvariantCulture, DEFAULT_NAME_FORMAT, AccountCounter.Next()) : Name; + + if (context.Accounts.ContainsKey(name)) throw new Exception($"The name '{name}' already exists."); + + var ethAccountDescriptor = new EthAccountDescriptor(name, new Account(PrivateKey)); + + context.Accounts.Add(name, ethAccountDescriptor); + context.CurrentAccount = ethAccountDescriptor; + + Console.WriteLine("Account imported:"); + Console.WriteLine($"- Name: '{name}'."); + Console.WriteLine($"- Address: '{ethAccountDescriptor.Account.Address}'."); + + return Task.CompletedTask; + } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AccountManagement/ListAccountsCommand.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AccountManagement/ListAccountsCommand.cs new file mode 100644 index 000000000..69117feb3 --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AccountManagement/ListAccountsCommand.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Threading.Tasks; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Runtime; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.AccountManagement +{ + public class ListAccountsCommand : ICommand + { + public Task ExecuteAsync(RuntimeContext context) + { + foreach (var ethAccountDescriptor in context.Accounts.Values) + { + Console.WriteLine($"- {ethAccountDescriptor.Name}:{ethAccountDescriptor.Account.Address}"); + } + + return Task.CompletedTask; + } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AccountManagement/NewAccountCommand.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AccountManagement/NewAccountCommand.cs new file mode 100644 index 000000000..82e77351c --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AccountManagement/NewAccountCommand.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Text; +using System.Threading.Tasks; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Runtime; +using AdvancedAlgos.AlgoToken.Framework.Ethereum; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.AccountManagement +{ + public class NewAccountCommand : ICommand + { + private const string DEFAULT_NAME_FORMAT = "account#{0}"; + + public string Name { get; set; } + + public Task ExecuteAsync(RuntimeContext context) + { + string name = string.IsNullOrWhiteSpace(Name) ? + string.Format(CultureInfo.InvariantCulture, DEFAULT_NAME_FORMAT, AccountCounter.Next()) : Name; + + if (context.Accounts.ContainsKey(name)) throw new Exception($"The name '{name}' already exists."); + + var ethAccountDescriptor = new EthAccountDescriptor(name, EthAccountFactory.Create()); + + context.Accounts.Add(name, ethAccountDescriptor); + context.CurrentAccount = ethAccountDescriptor; + + Console.WriteLine("New account created:"); + Console.WriteLine($"- Name: '{name}'."); + Console.WriteLine($"- Address: '{ethAccountDescriptor.Account.Address}'."); + Console.WriteLine($"- Private Key: '{ethAccountDescriptor.Account.PrivateKey}'."); + + return Task.CompletedTask; + } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AccountManagement/SetAccountCommand.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AccountManagement/SetAccountCommand.cs new file mode 100644 index 000000000..15c1aac92 --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AccountManagement/SetAccountCommand.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Threading.Tasks; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Runtime; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.AccountManagement +{ + public class SetAccountCommand : ICommand + { + public string Name { get; set; } + + public Task ExecuteAsync(RuntimeContext context) + { + if (!context.Accounts.ContainsKey(Name)) throw new Exception($"Account '{Name}' not found."); + + context.CurrentAccount = context.Accounts[Name]; + + return Task.CompletedTask; + } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoFeesContract/AlgoFeesDeployCommand.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoFeesContract/AlgoFeesDeployCommand.cs new file mode 100644 index 000000000..21db54aff --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoFeesContract/AlgoFeesDeployCommand.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Threading.Tasks; +using AdvancedAlgos.AlgoToken.AlgoTokenDistribution; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.ContractManagement; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Runtime; +using Nethereum.RPC.Eth.DTOs; +using Nethereum.Web3; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.AlgoFeesContract +{ + public class AlgoFeesDeployCommand : DeployContractCommand + { + public override string DefaultName => "AlgoFees"; + + public string TokenAddress { get; set; } + + protected override async Task DeployContractAsync(RuntimeContext context, Web3 web3) + { + var algoFees = new AlgoFees(web3, context.GasPriceProvider); + return await algoFees.DeployAsync(context.ResolveContractReference(TokenAddress)); + } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoFeesContract/AlgoFeesMineCommand.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoFeesContract/AlgoFeesMineCommand.cs new file mode 100644 index 000000000..27ab17661 --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoFeesContract/AlgoFeesMineCommand.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Numerics; +using System.Text; +using System.Threading.Tasks; +using AdvancedAlgos.AlgoToken.AlgoTokenDistribution; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.ContractManagement; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Runtime; +using Nethereum.RPC.Eth.DTOs; +using Nethereum.Web3; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.AlgoFeesContract +{ + public class AlgoFeesMineCommand : EthInvokeTransactionalFunctionCommand + { + protected override async Task ExecuteAsync(RuntimeContext context, string contractAddress, Web3 web3) + { + var algoFees = new AlgoFees(contractAddress, web3, context.GasPriceProvider); + + return await algoFees.MineAsync(); + } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoFeesContract/AlgoFeesRegisterMinerCommand.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoFeesContract/AlgoFeesRegisterMinerCommand.cs new file mode 100644 index 000000000..e7828e3dc --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoFeesContract/AlgoFeesRegisterMinerCommand.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Numerics; +using System.Text; +using System.Threading.Tasks; +using AdvancedAlgos.AlgoToken.AlgoTokenDistribution; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.ContractManagement; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Runtime; +using Nethereum.RPC.Eth.DTOs; +using Nethereum.Web3; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.AlgoFeesContract +{ + public class AlgoFeesRegisterMinerCommand : EthInvokeTransactionalFunctionCommand + { + public string MinerAddress { get; set; } + + protected override async Task ExecuteAsync(RuntimeContext context, string contractAddress, Web3 web3) + { + var algoFees = new AlgoFees(contractAddress, web3, context.GasPriceProvider); + + return await algoFees.RegisterMinerAsync(context.ResolveContractReference(MinerAddress)); + } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoFeesContract/AlgoFeesTerminateCommand.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoFeesContract/AlgoFeesTerminateCommand.cs new file mode 100644 index 000000000..c5ae0f464 --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoFeesContract/AlgoFeesTerminateCommand.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Numerics; +using System.Text; +using System.Threading.Tasks; +using AdvancedAlgos.AlgoToken.AlgoTokenDistribution; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.ContractManagement; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Runtime; +using Nethereum.RPC.Eth.DTOs; +using Nethereum.Web3; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.AlgoFeesContract +{ + public class AlgoFeesTerminateCommand : EthInvokeTransactionalFunctionCommand + { + protected override async Task ExecuteAsync(RuntimeContext context, string contractAddress, Web3 web3) + { + var algoFees = new AlgoFees(contractAddress, web3, context.GasPriceProvider); + + return await algoFees.TerminateAsync(); + } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoFeesContract/AlgoFeesUnregisterMinerCommand.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoFeesContract/AlgoFeesUnregisterMinerCommand.cs new file mode 100644 index 000000000..15cfded48 --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoFeesContract/AlgoFeesUnregisterMinerCommand.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Numerics; +using System.Text; +using System.Threading.Tasks; +using AdvancedAlgos.AlgoToken.AlgoTokenDistribution; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.ContractManagement; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Runtime; +using Nethereum.RPC.Eth.DTOs; +using Nethereum.Web3; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.AlgoFeesContract +{ + public class AlgoFeesUnregisterMinerCommand : EthInvokeTransactionalFunctionCommand + { + public string MinerAddress { get; set; } + + protected override async Task ExecuteAsync(RuntimeContext context, string contractAddress, Web3 web3) + { + var algoFees = new AlgoFees(contractAddress, web3, context.GasPriceProvider); + + return await algoFees.UnregisterMinerAsync(context.ResolveContractReference(MinerAddress)); + } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoMinerContract/AlgoMinerActivateMinerCommand.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoMinerContract/AlgoMinerActivateMinerCommand.cs new file mode 100644 index 000000000..d5f40545d --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoMinerContract/AlgoMinerActivateMinerCommand.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Numerics; +using System.Text; +using System.Threading.Tasks; +using AdvancedAlgos.AlgoToken.AlgoTokenDistribution; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.ContractManagement; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Runtime; +using Nethereum.RPC.Eth.DTOs; +using Nethereum.Web3; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.AlgoMinerContract +{ + public class AlgoMinerActivateMinerCommand : EthInvokeTransactionalFunctionCommand + { + protected override async Task ExecuteAsync(RuntimeContext context, string contractAddress, Web3 web3) + { + var algoMiner = new AlgoMiner(contractAddress, web3, context.GasPriceProvider); + + return await algoMiner.ActivateMinerAsync(); + } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoMinerContract/AlgoMinerAddCoreTeamCommand.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoMinerContract/AlgoMinerAddCoreTeamCommand.cs new file mode 100644 index 000000000..741a9b40d --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoMinerContract/AlgoMinerAddCoreTeamCommand.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Numerics; +using System.Text; +using System.Threading.Tasks; +using AdvancedAlgos.AlgoToken.AlgoTokenDistribution; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.ContractManagement; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Runtime; +using Nethereum.RPC.Eth.DTOs; +using Nethereum.Web3; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.AlgoMinerContract +{ + public class AlgoMinerAddCoreTeamCommand : EthInvokeTransactionalFunctionCommand + { + public string Account { get; set; } + + protected override async Task ExecuteAsync(RuntimeContext context, string contractAddress, Web3 web3) + { + var algoMiner = new AlgoMiner(contractAddress, web3, context.GasPriceProvider); + + return await algoMiner.AddCoreTeamAsync(context.ResolveAccountReference(Account)); + } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoMinerContract/AlgoMinerAddSupervisorCommand.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoMinerContract/AlgoMinerAddSupervisorCommand.cs new file mode 100644 index 000000000..6b28c00dd --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoMinerContract/AlgoMinerAddSupervisorCommand.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Numerics; +using System.Text; +using System.Threading.Tasks; +using AdvancedAlgos.AlgoToken.AlgoTokenDistribution; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.ContractManagement; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Runtime; +using Nethereum.RPC.Eth.DTOs; +using Nethereum.Web3; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.AlgoMinerContract +{ + public class AlgoMinerAddSupervisorCommand : EthInvokeTransactionalFunctionCommand + { + public string Account { get; set; } + + protected override async Task ExecuteAsync(RuntimeContext context, string contractAddress, Web3 web3) + { + var algoMiner = new AlgoMiner(contractAddress, web3, context.GasPriceProvider); + + return await algoMiner.AddSupervisorAsync(context.ResolveAccountReference(Account)); + } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoMinerContract/AlgoMinerAddSystemCommand.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoMinerContract/AlgoMinerAddSystemCommand.cs new file mode 100644 index 000000000..dd47486cf --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoMinerContract/AlgoMinerAddSystemCommand.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Numerics; +using System.Text; +using System.Threading.Tasks; +using AdvancedAlgos.AlgoToken.AlgoTokenDistribution; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.ContractManagement; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Runtime; +using Nethereum.RPC.Eth.DTOs; +using Nethereum.Web3; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.AlgoMinerContract +{ + public class AlgoMinerAddSystemCommand : EthInvokeTransactionalFunctionCommand + { + public string Account { get; set; } + + protected override async Task ExecuteAsync(RuntimeContext context, string contractAddress, Web3 web3) + { + var algoMiner = new AlgoMiner(contractAddress, web3, context.GasPriceProvider); + + return await algoMiner.AddSystemAsync(context.ResolveAccountReference(Account)); + } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoMinerContract/AlgoMinerDeactivateMinerCommand.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoMinerContract/AlgoMinerDeactivateMinerCommand.cs new file mode 100644 index 000000000..82ab1672b --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoMinerContract/AlgoMinerDeactivateMinerCommand.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Numerics; +using System.Text; +using System.Threading.Tasks; +using AdvancedAlgos.AlgoToken.AlgoTokenDistribution; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.ContractManagement; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Runtime; +using Nethereum.RPC.Eth.DTOs; +using Nethereum.Web3; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.AlgoMinerContract +{ + public class AlgoMinerDeactivateMinerCommand : EthInvokeTransactionalFunctionCommand + { + protected override async Task ExecuteAsync(RuntimeContext context, string contractAddress, Web3 web3) + { + var algoMiner = new AlgoMiner(contractAddress, web3, context.GasPriceProvider); + + return await algoMiner.DeactivateMinerAsync(); + } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoMinerContract/AlgoMinerDeployCommand.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoMinerContract/AlgoMinerDeployCommand.cs new file mode 100644 index 000000000..41f9df66f --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoMinerContract/AlgoMinerDeployCommand.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Threading.Tasks; +using AdvancedAlgos.AlgoToken.AlgoTokenDistribution; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.ContractManagement; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Runtime; +using Nethereum.RPC.Eth.DTOs; +using Nethereum.Web3; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.AlgoMinerContract +{ + public class AlgoMinerDeployCommand : DeployContractCommand + { + public override string DefaultName => "AlgoMiner"; + + public byte MinerType { get; set; } + public byte Category { get; set; } + public string MinerAccountAddress { get; set; } + public string ReferralAccountAddress { get; set; } + public string TokenAddress { get; set; } + + protected override async Task DeployContractAsync(RuntimeContext context, Web3 web3) + { + var algoMiner = new AlgoMiner(web3, context.GasPriceProvider); + return await algoMiner.DeployAsync( + MinerType, + Category, + context.ResolveAccountReference(MinerAccountAddress), + context.ResolveAccountReference(ReferralAccountAddress), + context.ResolveContractReference(TokenAddress)); + } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoMinerContract/AlgoMinerMigrateMinerCommand.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoMinerContract/AlgoMinerMigrateMinerCommand.cs new file mode 100644 index 000000000..42444cbf7 --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoMinerContract/AlgoMinerMigrateMinerCommand.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Numerics; +using System.Text; +using System.Threading.Tasks; +using AdvancedAlgos.AlgoToken.AlgoTokenDistribution; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.ContractManagement; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Runtime; +using Nethereum.RPC.Eth.DTOs; +using Nethereum.Web3; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.AlgoMinerContract +{ + public class AlgoMinerMigrateMinerCommand : EthInvokeTransactionalFunctionCommand + { + public string NewMinerAddress { get; set; } + + protected override async Task ExecuteAsync(RuntimeContext context, string contractAddress, Web3 web3) + { + var algoMiner = new AlgoMiner(contractAddress, web3, context.GasPriceProvider); + + return await algoMiner.MigrateMinerAsync(context.ResolveContractReference(NewMinerAddress)); + } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoMinerContract/AlgoMinerMineCommand.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoMinerContract/AlgoMinerMineCommand.cs new file mode 100644 index 000000000..acd35e621 --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoMinerContract/AlgoMinerMineCommand.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Numerics; +using System.Text; +using System.Threading.Tasks; +using AdvancedAlgos.AlgoToken.AlgoTokenDistribution; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.ContractManagement; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Runtime; +using Nethereum.RPC.Eth.DTOs; +using Nethereum.Web3; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.AlgoMinerContract +{ + public class AlgoMinerMineCommand : EthInvokeTransactionalFunctionCommand + { + protected override async Task ExecuteAsync(RuntimeContext context, string contractAddress, Web3 web3) + { + var algoMiner = new AlgoMiner(contractAddress, web3, context.GasPriceProvider); + + return await algoMiner.MineAsync(); + } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoMinerContract/AlgoMinerPauseMiningCommand.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoMinerContract/AlgoMinerPauseMiningCommand.cs new file mode 100644 index 000000000..ee163137d --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoMinerContract/AlgoMinerPauseMiningCommand.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Numerics; +using System.Text; +using System.Threading.Tasks; +using AdvancedAlgos.AlgoToken.AlgoTokenDistribution; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.ContractManagement; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Runtime; +using Nethereum.RPC.Eth.DTOs; +using Nethereum.Web3; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.AlgoMinerContract +{ + public class AlgoMinerPauseMiningCommand : EthInvokeTransactionalFunctionCommand + { + protected override async Task ExecuteAsync(RuntimeContext context, string contractAddress, Web3 web3) + { + var algoMiner = new AlgoMiner(contractAddress, web3, context.GasPriceProvider); + + return await algoMiner.PauseMiningAsync(); + } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoMinerContract/AlgoMinerResetMinerCommand.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoMinerContract/AlgoMinerResetMinerCommand.cs new file mode 100644 index 000000000..5faa0df01 --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoMinerContract/AlgoMinerResetMinerCommand.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Numerics; +using System.Text; +using System.Threading.Tasks; +using AdvancedAlgos.AlgoToken.AlgoTokenDistribution; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.ContractManagement; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Runtime; +using Nethereum.RPC.Eth.DTOs; +using Nethereum.Web3; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.AlgoMinerContract +{ + public class AlgoMinerResetMinerCommand : EthInvokeTransactionalFunctionCommand + { + public string NewOwnerAddress { get; set; } + public string NewReferralAddress { get; set; } + + protected override async Task ExecuteAsync(RuntimeContext context, string contractAddress, Web3 web3) + { + var algoMiner = new AlgoMiner(contractAddress, web3, context.GasPriceProvider); + + return await algoMiner.ResetMinerAsync( + context.ResolveAccountReference(NewOwnerAddress), + context.ResolveAccountReference(NewReferralAddress)); + } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoMinerContract/AlgoMinerResumeMiningCommand.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoMinerContract/AlgoMinerResumeMiningCommand.cs new file mode 100644 index 000000000..82e2b5b79 --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoMinerContract/AlgoMinerResumeMiningCommand.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Numerics; +using System.Text; +using System.Threading.Tasks; +using AdvancedAlgos.AlgoToken.AlgoTokenDistribution; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.ContractManagement; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Runtime; +using Nethereum.RPC.Eth.DTOs; +using Nethereum.Web3; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.AlgoMinerContract +{ + public class AlgoMinerResumeMiningCommand : EthInvokeTransactionalFunctionCommand + { + protected override async Task ExecuteAsync(RuntimeContext context, string contractAddress, Web3 web3) + { + var algoMiner = new AlgoMiner(contractAddress, web3, context.GasPriceProvider); + + return await algoMiner.ResumeMiningAsync(); + } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoMinerContract/AlgoMinerStartMiningCommand.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoMinerContract/AlgoMinerStartMiningCommand.cs new file mode 100644 index 000000000..eca781a6c --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoMinerContract/AlgoMinerStartMiningCommand.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Numerics; +using System.Text; +using System.Threading.Tasks; +using AdvancedAlgos.AlgoToken.AlgoTokenDistribution; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.ContractManagement; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Runtime; +using Nethereum.RPC.Eth.DTOs; +using Nethereum.Web3; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.AlgoMinerContract +{ + public class AlgoMinerStartMiningCommand : EthInvokeTransactionalFunctionCommand + { + protected override async Task ExecuteAsync(RuntimeContext context, string contractAddress, Web3 web3) + { + var algoMiner = new AlgoMiner(contractAddress, web3, context.GasPriceProvider); + + return await algoMiner.StartMiningAsync(); + } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoMinerContract/AlgoMinerStopAndRemoveOwnershipCommand.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoMinerContract/AlgoMinerStopAndRemoveOwnershipCommand.cs new file mode 100644 index 000000000..496213588 --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoMinerContract/AlgoMinerStopAndRemoveOwnershipCommand.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Numerics; +using System.Text; +using System.Threading.Tasks; +using AdvancedAlgos.AlgoToken.AlgoTokenDistribution; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.ContractManagement; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Runtime; +using Nethereum.RPC.Eth.DTOs; +using Nethereum.Web3; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.AlgoMinerContract +{ + public class AlgoMinerStopAndRemoveOwnershipCommand : EthInvokeTransactionalFunctionCommand + { + protected override async Task ExecuteAsync(RuntimeContext context, string contractAddress, Web3 web3) + { + var algoMiner = new AlgoMiner(contractAddress, web3, context.GasPriceProvider); + + return await algoMiner.StopAndRemoveOwnershipAsync(); + } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoMinerContract/AlgoMinerStopMiningCommand.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoMinerContract/AlgoMinerStopMiningCommand.cs new file mode 100644 index 000000000..8ce66f982 --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoMinerContract/AlgoMinerStopMiningCommand.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Numerics; +using System.Text; +using System.Threading.Tasks; +using AdvancedAlgos.AlgoToken.AlgoTokenDistribution; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.ContractManagement; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Runtime; +using Nethereum.RPC.Eth.DTOs; +using Nethereum.Web3; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.AlgoMinerContract +{ + public class AlgoMinerStopMiningCommand : EthInvokeTransactionalFunctionCommand + { + protected override async Task ExecuteAsync(RuntimeContext context, string contractAddress, Web3 web3) + { + var algoMiner = new AlgoMiner(contractAddress, web3, context.GasPriceProvider); + + return await algoMiner.StopMiningAsync(); + } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoMinerContract/AlgoMinerTerminateCommand.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoMinerContract/AlgoMinerTerminateCommand.cs new file mode 100644 index 000000000..b1efd4602 --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoMinerContract/AlgoMinerTerminateCommand.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Numerics; +using System.Text; +using System.Threading.Tasks; +using AdvancedAlgos.AlgoToken.AlgoTokenDistribution; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.ContractManagement; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Runtime; +using Nethereum.RPC.Eth.DTOs; +using Nethereum.Web3; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.AlgoMinerContract +{ + public class AlgoMinerTerminateCommand : EthInvokeTransactionalFunctionCommand + { + protected override async Task ExecuteAsync(RuntimeContext context, string contractAddress, Web3 web3) + { + var algoMiner = new AlgoMiner(contractAddress, web3, context.GasPriceProvider); + + return await algoMiner.TerminateAsync(); + } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoPoolContract/AlgoPoolDeployCommand.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoPoolContract/AlgoPoolDeployCommand.cs new file mode 100644 index 000000000..ed6732c6d --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoPoolContract/AlgoPoolDeployCommand.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Threading.Tasks; +using AdvancedAlgos.AlgoToken.AlgoTokenDistribution; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.ContractManagement; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Runtime; +using Nethereum.RPC.Eth.DTOs; +using Nethereum.Web3; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.AlgoPoolContract +{ + public class AlgoPoolDeployCommand : DeployContractCommand + { + public override string DefaultName => "AlgoPool"; + + public byte PoolType { get; set; } + public string TokenAddress { get; set; } + + protected override async Task DeployContractAsync(RuntimeContext context, Web3 web3) + { + var algoPool = new AlgoPool(web3, context.GasPriceProvider); + return await algoPool.DeployAsync(PoolType, context.ResolveContractReference(TokenAddress)); + } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoPoolContract/AlgoPoolTerminateCommand.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoPoolContract/AlgoPoolTerminateCommand.cs new file mode 100644 index 000000000..c75efbd37 --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoPoolContract/AlgoPoolTerminateCommand.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Numerics; +using System.Text; +using System.Threading.Tasks; +using AdvancedAlgos.AlgoToken.AlgoTokenDistribution; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.ContractManagement; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Runtime; +using Nethereum.RPC.Eth.DTOs; +using Nethereum.Web3; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.AlgoPoolContract +{ + public class AlgoPoolTerminateCommand : EthInvokeTransactionalFunctionCommand + { + protected override async Task ExecuteAsync(RuntimeContext context, string contractAddress, Web3 web3) + { + var algoPool = new AlgoPool(contractAddress, web3, context.GasPriceProvider); + + return await algoPool.TerminateAsync(); + } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoPoolContract/AlgoPoolTransferToMinerCommand.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoPoolContract/AlgoPoolTransferToMinerCommand.cs new file mode 100644 index 000000000..0fab1e522 --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoPoolContract/AlgoPoolTransferToMinerCommand.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Numerics; +using System.Text; +using System.Threading.Tasks; +using AdvancedAlgos.AlgoToken.AlgoTokenDistribution; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.ContractManagement; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Runtime; +using Nethereum.RPC.Eth.DTOs; +using Nethereum.Web3; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.AlgoPoolContract +{ + public class AlgoPoolTransferToMinerCommand : EthInvokeTransactionalFunctionCommand + { + public string MinerAddress { get; set; } + + protected override async Task ExecuteAsync(RuntimeContext context, string contractAddress, Web3 web3) + { + var algoPool = new AlgoPool(contractAddress, web3, context.GasPriceProvider); + + return await algoPool.TransferToMinerAsync(context.ResolveContractReference(MinerAddress)); + } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoTokenContract/AlgoTokenBalanceOfCommand.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoTokenContract/AlgoTokenBalanceOfCommand.cs new file mode 100644 index 000000000..5a55db87d --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoTokenContract/AlgoTokenBalanceOfCommand.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Numerics; +using System.Text; +using System.Threading.Tasks; +using AdvancedAlgos.AlgoToken.AlgoErc20Token; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.ContractManagement; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Runtime; +using Nethereum.RPC.Eth.DTOs; +using Nethereum.Web3; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.AlgoTokenContract +{ + public class AlgoTokenBalanceOfCommand : EthInvokeCallFunctionCommand + { + public string OwnerAddress { get; set; } + + protected override async Task ExecuteAsync(RuntimeContext context, string contractAddress, Web3 web3) + { + var algoToken = new AlgoTokenV1(contractAddress, web3, context.GasPriceProvider); + return await algoToken.BalanceOfAsync(context.ResolveAccountOrContractReference(OwnerAddress)); + } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoTokenContract/AlgoTokenDeployCommand.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoTokenContract/AlgoTokenDeployCommand.cs new file mode 100644 index 000000000..eec93f058 --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoTokenContract/AlgoTokenDeployCommand.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Threading.Tasks; +using AdvancedAlgos.AlgoToken.AlgoErc20Token; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.ContractManagement; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Runtime; +using Nethereum.RPC.Eth.DTOs; +using Nethereum.Web3; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.AlgoTokenContract +{ + public class AlgoTokenDeployCommand : DeployContractCommand + { + public override string DefaultName => "AlgoToken"; + + protected override async Task DeployContractAsync(RuntimeContext context, Web3 web3) + { + var algoToken = new AlgoTokenV1(web3, context.GasPriceProvider); + return await algoToken.DeployAsync(); + } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoTokenContract/AlgoTokenPauseCommand.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoTokenContract/AlgoTokenPauseCommand.cs new file mode 100644 index 000000000..3455188c2 --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoTokenContract/AlgoTokenPauseCommand.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Numerics; +using System.Text; +using System.Threading.Tasks; +using AdvancedAlgos.AlgoToken.AlgoErc20Token; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.ContractManagement; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Runtime; +using Nethereum.RPC.Eth.DTOs; +using Nethereum.Web3; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.AlgoTokenContract +{ + public class AlgoTokenPauseCommand : EthInvokeTransactionalFunctionCommand + { + protected override Task ExecuteAsync(RuntimeContext context, string contractAddress, Web3 web3) + { + var algoToken = new AlgoTokenV1(contractAddress, web3, context.GasPriceProvider); + return algoToken.PauseAsync(); + } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoTokenContract/AlgoTokenTransferCommand.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoTokenContract/AlgoTokenTransferCommand.cs new file mode 100644 index 000000000..6f3bf36e5 --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoTokenContract/AlgoTokenTransferCommand.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Numerics; +using System.Text; +using System.Threading.Tasks; +using AdvancedAlgos.AlgoToken.AlgoErc20Token; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.ContractManagement; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Runtime; +using Nethereum.RPC.Eth.DTOs; +using Nethereum.Web3; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.AlgoTokenContract +{ + public class AlgoTokenTransferCommand : EthInvokeTransactionalFunctionCommand + { + public string To { get; set; } + public BigInteger Value { get; set; } + + protected override async Task ExecuteAsync(RuntimeContext context, string contractAddress, Web3 web3) + { + var algoToken = new AlgoTokenV1(contractAddress, web3, context.GasPriceProvider); + return await algoToken.TransferAsync(context.ResolveAccountOrContractReference(To), Value); + } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoTokenContract/AlgoTokenUnpauseCommand.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoTokenContract/AlgoTokenUnpauseCommand.cs new file mode 100644 index 000000000..555f6175e --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoTokenContract/AlgoTokenUnpauseCommand.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Numerics; +using System.Text; +using System.Threading.Tasks; +using AdvancedAlgos.AlgoToken.AlgoErc20Token; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.ContractManagement; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Runtime; +using Nethereum.RPC.Eth.DTOs; +using Nethereum.Web3; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.AlgoTokenContract +{ + public class AlgoTokenUnpauseCommand : EthInvokeTransactionalFunctionCommand + { + protected override Task ExecuteAsync(RuntimeContext context, string contractAddress, Web3 web3) + { + var algoToken = new AlgoTokenV1(contractAddress, web3, context.GasPriceProvider); + return algoToken.UnpauseAsync(); + } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/ContractManagement/ContractCounter.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/ContractManagement/ContractCounter.cs new file mode 100644 index 000000000..b6f673697 --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/ContractManagement/ContractCounter.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Threading; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.ContractManagement +{ + public static class ContractCounter + { + private static long _count = 0; + + public static long Next() + { + Interlocked.Increment(ref _count); + return _count; + } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/ContractManagement/DeployContractCommand.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/ContractManagement/DeployContractCommand.cs new file mode 100644 index 000000000..1be07c16a --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/ContractManagement/DeployContractCommand.cs @@ -0,0 +1,52 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Text; +using System.Threading.Tasks; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.EthTransactions; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Runtime; +using AdvancedAlgos.AlgoToken.Framework.Ethereum.Exceptions; +using Nethereum.RPC.Eth.DTOs; +using Nethereum.Web3; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.ContractManagement +{ + public abstract class DeployContractCommand : EthTransactionalCommand + { + private const string DEFAULT_NAME_FORMAT = "{0}#{1}"; + + public string Name { get; set; } + + public abstract string DefaultName { get; } + + protected abstract Task DeployContractAsync(RuntimeContext context, Web3 web3); + + protected override async Task ExecuteAsync(RuntimeContext context, Web3 web3) + { + string name = string.IsNullOrWhiteSpace(Name) ? + string.Format(CultureInfo.InvariantCulture, DEFAULT_NAME_FORMAT, DefaultName, ContractCounter.Next()) : Name; + + if (context.Contracts.ContainsKey(name)) throw new Exception($"The name '{name}' already exists."); + + try + { + var transactionReceipt = await DeployContractAsync(context, web3); + + if (transactionReceipt == null) return null; + + context.Contracts.Add(name, new EthContractDescriptor(name, transactionReceipt.ContractAddress)); + + Console.WriteLine("Contract successfully deployed."); + Console.WriteLine($"- Contract Name: '{name}'."); + Console.WriteLine($"- Contract Address: '{transactionReceipt.ContractAddress}'."); + + return transactionReceipt; + } + catch + { + Console.WriteLine("Failed to deploy the contract."); + throw; + } + } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/ContractManagement/EthInvokeCallFunctionCommand.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/ContractManagement/EthInvokeCallFunctionCommand.cs new file mode 100644 index 000000000..619b14161 --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/ContractManagement/EthInvokeCallFunctionCommand.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Text; +using System.Threading.Tasks; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Runtime; +using AdvancedAlgos.AlgoToken.Framework.Ethereum; +using Nethereum.RPC.Eth.DTOs; +using Nethereum.Web3; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.ContractManagement +{ + public abstract class EthInvokeCallFunctionCommand : ICommand + { + public string ContractReference { get; set; } + + public async Task ExecuteAsync(RuntimeContext context) + { + var web3 = new Web3(context.EthNetworkUrl); + + try + { + var result = await ExecuteAsync(context, context.ResolveContractReference(ContractReference), web3); + + Console.WriteLine(string.Format(CultureInfo.InvariantCulture, "- Result: {0}.", result)); + } + catch + { + Console.WriteLine("Failed to execute the call."); + throw; + } + } + + protected abstract Task ExecuteAsync(RuntimeContext context, string contractAddress, Web3 web3); + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/ContractManagement/EthInvokeTransactionalFunctionCommand.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/ContractManagement/EthInvokeTransactionalFunctionCommand.cs new file mode 100644 index 000000000..94d4cc2fb --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/ContractManagement/EthInvokeTransactionalFunctionCommand.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Threading.Tasks; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.EthTransactions; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Runtime; +using Nethereum.RPC.Eth.DTOs; +using Nethereum.Web3; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.ContractManagement +{ + public abstract class EthInvokeTransactionalFunctionCommand : EthTransactionalCommand + { + public string ContractReference { get; set; } + + protected abstract Task ExecuteAsync(RuntimeContext context, string contractAddress, Web3 web3); + + protected override async Task ExecuteAsync(RuntimeContext context, Web3 web3) + { + try + { + var transactionReceipt = await ExecuteAsync(context, context.ResolveContractReference(ContractReference), web3); + + Console.WriteLine("Function successfully executed."); + + return transactionReceipt; + } + catch + { + Console.WriteLine("Failed to execute the transaction."); + throw; + } + } + } +} \ No newline at end of file diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/ContractManagement/ListContractsCommand.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/ContractManagement/ListContractsCommand.cs new file mode 100644 index 000000000..28f1a6cda --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/ContractManagement/ListContractsCommand.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Threading.Tasks; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Runtime; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.ContractManagement +{ + public class ListContractsCommand : ICommand + { + public Task ExecuteAsync(RuntimeContext context) + { + foreach (var ethContractDescriptor in context.Contracts.Values) + { + Console.WriteLine($"- {ethContractDescriptor.Name}:{ethContractDescriptor.ContractAddress}"); + } + + return Task.CompletedTask; + } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/ContractManagement/RegisterContractCommand.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/ContractManagement/RegisterContractCommand.cs new file mode 100644 index 000000000..00868c667 --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/ContractManagement/RegisterContractCommand.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Threading.Tasks; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Runtime; +using AdvancedAlgos.AlgoToken.Framework.Ethereum; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.ContractManagement +{ + public class RegisterContractCommand : ICommand + { + public string Name { get; set; } + public string Address { get; set; } + + public Task ExecuteAsync(RuntimeContext context) + { + if (context.Contracts.ContainsKey(Name)) throw new Exception($"The name '{Name}' already exists."); + if (!EthAddressParser.ValidateAddress(Address)) throw new Exception($"The address '{Address}' is invalid."); + + context.Contracts.Add(Name, new EthContractDescriptor(Name, Address)); + + Console.WriteLine($"Contract at '{Address}' registered as '{Name}'."); + + return Task.CompletedTask; + } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/EthNetwork/SetGasPriceCommand.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/EthNetwork/SetGasPriceCommand.cs new file mode 100644 index 000000000..e99b7344c --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/EthNetwork/SetGasPriceCommand.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Numerics; +using System.Text; +using System.Threading.Tasks; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Runtime; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.EthNetwork +{ + public class SetGasPriceCommand : ICommand + { + public BigInteger GasPrice { get; set; } + + public Task ExecuteAsync(RuntimeContext context) + { + context.GasPriceProvider.SetGasPrice(GasPrice); + + Console.WriteLine($"Gas Price set to {GasPrice}Gwei."); + + return Task.CompletedTask; + } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/EthNetwork/SetNetworkCommand.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/EthNetwork/SetNetworkCommand.cs new file mode 100644 index 000000000..0af43225e --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/EthNetwork/SetNetworkCommand.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Threading.Tasks; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Runtime; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.EthNetwork +{ + public class SetNetworkCommand : ICommand + { + public string NetworkUrl { get; set; } + + public Task ExecuteAsync(RuntimeContext context) + { + if (string.Equals(NetworkUrl, RuntimeContext.LOCAL_NETWORK_ID, StringComparison.OrdinalIgnoreCase)) + { + NetworkUrl = RuntimeContext.LOCAL_NETWORK_URL; + } + + context.EthNetworkUrl = NetworkUrl; + + Console.WriteLine($"Network set to '{NetworkUrl}'."); + + return Task.CompletedTask; + } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/EthTransactions/EthGetBalanceCommand.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/EthTransactions/EthGetBalanceCommand.cs new file mode 100644 index 000000000..e5d34de99 --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/EthTransactions/EthGetBalanceCommand.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Numerics; +using System.Text; +using System.Threading.Tasks; +using AdvancedAlgos.AlgoToken.AlgoErc20Token; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.EthTransactions; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Runtime; +using Nethereum.Hex.HexTypes; +using Nethereum.RPC.Eth.DTOs; +using Nethereum.Web3; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.EthTransactions +{ + public class EthGetBalanceCommand : ICommand + { + public string Account { get; set; } + + public async Task ExecuteAsync(RuntimeContext context) + { + var web3 = new Web3(context.EthNetworkUrl); + + try + { + var balance = await web3.Eth.GetBalance.SendRequestAsync(context.ResolveAccountOrContractReference(Account)); + + Console.WriteLine(string.Format(CultureInfo.InvariantCulture, "- Balance: {0}.", balance.Value)); + } + catch + { + Console.WriteLine("Failed to get balance."); + throw; + } + } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/EthTransactions/EthTransactionalCommand.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/EthTransactions/EthTransactionalCommand.cs new file mode 100644 index 000000000..82448ae11 --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/EthTransactions/EthTransactionalCommand.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Threading.Tasks; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Runtime; +using Nethereum.RPC.Eth.DTOs; +using Nethereum.Web3; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.EthTransactions +{ + public abstract class EthTransactionalCommand : ICommand + { + public async Task ExecuteAsync(RuntimeContext context) + { + if (context.CurrentAccount == null) throw new Exception("Current account is not set."); + + var web3 = new Web3(context.CurrentAccount.Account, context.EthNetworkUrl); + + var transactionReceipt = await ExecuteAsync(context, web3); + + if (transactionReceipt != null) + { + Console.WriteLine($"- Gas used: {transactionReceipt.GasUsed.Value}."); + } + } + + protected abstract Task ExecuteAsync(RuntimeContext context, Web3 web3); + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/EthTransactions/EthTransferCommand.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/EthTransactions/EthTransferCommand.cs new file mode 100644 index 000000000..5f13855f5 --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/EthTransactions/EthTransferCommand.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Numerics; +using System.Text; +using System.Threading.Tasks; +using AdvancedAlgos.AlgoToken.AlgoErc20Token; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.EthTransactions; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Runtime; +using Nethereum.Hex.HexTypes; +using Nethereum.RPC.Eth.DTOs; +using Nethereum.Web3; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.EthTransactions +{ + public class EthTransferCommand : EthTransactionalCommand + { + public string To { get; set; } + public BigInteger Value { get; set; } + + protected override async Task ExecuteAsync(RuntimeContext context, Web3 web3) + { + return await web3.TransactionManager.TransactionReceiptService.SendRequestAndWaitForReceiptAsync(() => + web3.TransactionManager.SendTransactionAsync( + context.CurrentAccount.Account.Address, + context.ResolveAccountOrContractReference(To), + new HexBigInteger(Value))); + } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/ICommand.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/ICommand.cs new file mode 100644 index 000000000..38151aa46 --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/ICommand.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Threading.Tasks; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Runtime; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands +{ + public interface ICommand + { + Task ExecuteAsync(RuntimeContext context); + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/System/ListEnvironmentCommand.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/System/ListEnvironmentCommand.cs new file mode 100644 index 000000000..c63db111f --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/System/ListEnvironmentCommand.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Numerics; +using System.Text; +using System.Threading.Tasks; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Runtime; +using AdvancedAlgos.AlgoToken.Framework.Ethereum; +using Nethereum.Util; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.System +{ + public class ListEnvironmentCommand : ICommand + { + public Task ExecuteAsync(RuntimeContext context) + { + Console.WriteLine($"- Network Url: '{context.EthNetworkUrl}'."); + Console.WriteLine($"- Gas Price: {UnitConversion.Convert.FromWei(context.GasPriceProvider.GetGasPrice(), UnitConversion.EthUnit.Gwei)}Gwei."); + + return Task.CompletedTask; + } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/System/ResetCommand.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/System/ResetCommand.cs new file mode 100644 index 000000000..1c3722ec1 --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/System/ResetCommand.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Numerics; +using System.Text; +using System.Threading.Tasks; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Runtime; +using AdvancedAlgos.AlgoToken.Framework.Ethereum; +using Nethereum.Util; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.System +{ + public class ResetCommand : ICommand + { + public Task ExecuteAsync(RuntimeContext context) + { + context.Reset(); + + Console.WriteLine("Done."); + + return Task.CompletedTask; + } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Parsers/AccountManagementParsers.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Parsers/AccountManagementParsers.cs new file mode 100644 index 000000000..7f3d003d2 --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Parsers/AccountManagementParsers.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.Text; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.AccountManagement; +using Sprache; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Parsers +{ + public static class AccountManagementParsers + { + public static void Register() + { + (from command in CommonParsers.Token("new-account") + from name in CommonParsers.Switch('n', "name", CommonParsers.Identifier).Optional() + select new NewAccountCommand + { + Name = name.GetOrDefault() + }).Register(); + + (from command in CommonParsers.Token("import-account") + from privateKey in CommonParsers.StringValue + from name in CommonParsers.Switch('n', "name", CommonParsers.Identifier).Optional() + select new ImportAccountCommand + { + Name = name.GetOrDefault(), + PrivateKey = privateKey + }).Register(); + + (from command in CommonParsers.Token("list-accounts") + select new ListAccountsCommand() + ).Register(); + + (from command in CommonParsers.Token("set-account") + from name in CommonParsers.Identifier + select new SetAccountCommand + { + Name = name + }).Register(); + } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Parsers/AlgoFeesParsers.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Parsers/AlgoFeesParsers.cs new file mode 100644 index 000000000..937a68fa4 --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Parsers/AlgoFeesParsers.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.Text; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.AlgoFeesContract; +using Sprache; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Parsers +{ + public static class AlgoFeesParsers + { + public static void Register() + { + (from command in CommonParsers.Token("deploy-algofees") + from tokenAddress in CommonParsers.StringValue + from name in CommonParsers.Switch('n', "name", CommonParsers.Identifier).Optional() + select new AlgoFeesDeployCommand + { + Name = name.GetOrDefault(), + TokenAddress = tokenAddress + }).Register(); + + (from contractReference in CommonParsers.Invoke("algofees-registerminer") + from minerAddress in CommonParsers.StringValue + select new AlgoFeesRegisterMinerCommand + { + ContractReference = contractReference, + MinerAddress = minerAddress + }).Register(); + + (from contractReference in CommonParsers.Invoke("algofees-unregisterminer") + from minerAddress in CommonParsers.StringValue + select new AlgoFeesUnregisterMinerCommand + { + ContractReference = contractReference, + MinerAddress = minerAddress + }).Register(); + + (from contractReference in CommonParsers.Invoke("algofees-mine") + select new AlgoFeesMineCommand + { + ContractReference = contractReference + }).Register(); + + (from contractReference in CommonParsers.Invoke("algofees-terminate") + select new AlgoFeesTerminateCommand + { + ContractReference = contractReference + }).Register(); + } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Parsers/AlgoMinerParsers.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Parsers/AlgoMinerParsers.cs new file mode 100644 index 000000000..582d714a8 --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Parsers/AlgoMinerParsers.cs @@ -0,0 +1,127 @@ +using System; +using System.Collections.Generic; +using System.Text; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.AlgoMinerContract; +using Sprache; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Parsers +{ + public static class AlgoMinerParsers + { + public static void Register() + { + (from command in CommonParsers.Token("deploy-algominer") + from minerType in CommonParsers.ByteValue + from category in CommonParsers.ByteValue + from minerAccountAddress in CommonParsers.StringValue + from referralAccountAddress in CommonParsers.StringValue + from tokenAddress in CommonParsers.StringValue + from name in CommonParsers.Switch('n', "name", CommonParsers.Identifier).Optional() + select new AlgoMinerDeployCommand + { + Name = name.GetOrDefault(), + MinerType = minerType, + Category = category, + MinerAccountAddress = minerAccountAddress, + ReferralAccountAddress = referralAccountAddress, + TokenAddress = tokenAddress + }).Register(); + + (from contractReference in CommonParsers.Invoke("algominer-activateminer") + select new AlgoMinerActivateMinerCommand + { + ContractReference = contractReference, + }).Register(); + + (from contractReference in CommonParsers.Invoke("algominer-deactivateminer") + select new AlgoMinerDeactivateMinerCommand + { + ContractReference = contractReference, + }).Register(); + + (from contractReference in CommonParsers.Invoke("algominer-migrateminer") + from newMinerAddress in CommonParsers.StringValue + select new AlgoMinerMigrateMinerCommand + { + ContractReference = contractReference, + NewMinerAddress = newMinerAddress + }).Register(); + + (from contractReference in CommonParsers.Invoke("algominer-pausemining") + select new AlgoMinerPauseMiningCommand + { + ContractReference = contractReference, + }).Register(); + + (from contractReference in CommonParsers.Invoke("algominer-resumemining") + select new AlgoMinerResumeMiningCommand + { + ContractReference = contractReference, + }).Register(); + + (from contractReference in CommonParsers.Invoke("algominer-stopandremoveownership") + select new AlgoMinerStopAndRemoveOwnershipCommand + { + ContractReference = contractReference, + }).Register(); + + (from contractReference in CommonParsers.Invoke("algominer-resetminer") + from newOwnerAddress in CommonParsers.StringValue + from newReferralAddress in CommonParsers.StringValue + select new AlgoMinerResetMinerCommand + { + ContractReference = contractReference, + NewOwnerAddress = newOwnerAddress, + NewReferralAddress = newReferralAddress + }).Register(); + + (from contractReference in CommonParsers.Invoke("algominer-startmining") + select new AlgoMinerStartMiningCommand + { + ContractReference = contractReference, + }).Register(); + + (from contractReference in CommonParsers.Invoke("algominer-stopmining") + select new AlgoMinerStopMiningCommand + { + ContractReference = contractReference, + }).Register(); + + (from contractReference in CommonParsers.Invoke("algominer-mine") + select new AlgoMinerMineCommand + { + ContractReference = contractReference, + }).Register(); + + (from contractReference in CommonParsers.Invoke("algominer-terminate") + select new AlgoMinerTerminateCommand + { + ContractReference = contractReference + }).Register(); + + (from contractReference in CommonParsers.Invoke("algominer-addsystem") + from account in CommonParsers.StringValue + select new AlgoMinerAddSystemCommand + { + ContractReference = contractReference, + Account = account + }).Register(); + + (from contractReference in CommonParsers.Invoke("algominer-addcoreteam") + from account in CommonParsers.StringValue + select new AlgoMinerAddCoreTeamCommand + { + ContractReference = contractReference, + Account = account + }).Register(); + + (from contractReference in CommonParsers.Invoke("algominer-addsupervisor") + from account in CommonParsers.StringValue + select new AlgoMinerAddSupervisorCommand + { + ContractReference = contractReference, + Account = account + }).Register(); + } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Parsers/AlgoPoolParsers.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Parsers/AlgoPoolParsers.cs new file mode 100644 index 000000000..5d933ef4a --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Parsers/AlgoPoolParsers.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.Text; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.AlgoPoolContract; +using Sprache; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Parsers +{ + public static class AlgoPoolParsers + { + public static void Register() + { + (from command in CommonParsers.Token("deploy-algopool") + from poolType in CommonParsers.ByteValue + from tokenAddress in CommonParsers.StringValue + from name in CommonParsers.Switch('n', "name", CommonParsers.Identifier).Optional() + select new AlgoPoolDeployCommand + { + Name = name.GetOrDefault(), + PoolType = poolType, + TokenAddress = tokenAddress + }).Register(); + + (from contractReference in CommonParsers.Invoke("algopool-transfertominer") + from minerAddress in CommonParsers.StringValue + select new AlgoPoolTransferToMinerCommand + { + ContractReference = contractReference, + MinerAddress = minerAddress + }).Register(); + + (from contractReference in CommonParsers.Invoke("algopool-terminate") + select new AlgoPoolTerminateCommand + { + ContractReference = contractReference + }).Register(); + } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Parsers/AlgoTokenParsers.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Parsers/AlgoTokenParsers.cs new file mode 100644 index 000000000..1e0592995 --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Parsers/AlgoTokenParsers.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.Text; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.AlgoTokenContract; +using Sprache; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Parsers +{ + public static class AlgoTokenParsers + { + public static void Register() + { + (from command in CommonParsers.Token("deploy-algotoken") + from name in CommonParsers.Switch('n', "name", CommonParsers.Identifier).Optional() + select new AlgoTokenDeployCommand + { + Name = name.GetOrDefault() + }).Register(); + + (from contractReference in CommonParsers.Invoke("algotoken-transfer") + from to in CommonParsers.StringValue + from value in EthUnitParsers.EthValue + select new AlgoTokenTransferCommand + { + ContractReference = contractReference, + To = to, + Value = value + }).Register(); + + (from contractReference in CommonParsers.Invoke("algotoken-balanceof") + from owner in CommonParsers.StringValue + select new AlgoTokenBalanceOfCommand + { + ContractReference = contractReference, + OwnerAddress = owner + }).Register(); + + (from contractReference in CommonParsers.Invoke("algotoken-pause") + select new AlgoTokenPauseCommand + { + ContractReference = contractReference, + }).Register(); + + (from contractReference in CommonParsers.Invoke("algotoken-unpause") + select new AlgoTokenUnpauseCommand + { + ContractReference = contractReference, + }).Register(); + } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Parsers/CommonParsers.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Parsers/CommonParsers.cs new file mode 100644 index 000000000..5ee66ae6c --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Parsers/CommonParsers.cs @@ -0,0 +1,80 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Numerics; +using System.Text; +using Sprache; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Parsers +{ + public static class CommonParsers + { + public static readonly Parser ReservedChar = + Parse.Char(' ').XOr(Parse.Char(':')).XOr(Parse.Char('/')).XOr(Parse.Char('-')).XOr(Parse.Char('.')).XOr(Parse.Char(',')); + + public static readonly Parser Integer = + Parse.Digit.AtLeastOnce().Text().Token(); + + public static readonly Parser> String = + Parse.AnyChar.Except(ReservedChar).AtLeastOnce().Text(); + + public static readonly Parser> QuotedString = + from open in Parse.Char('"') + from content in Parse.CharExcept('"').Many().Text() + from close in Parse.Char('"') + select content; + + public static readonly Parser ByteValue = + Integer.Select(x => byte.Parse(x, CultureInfo.InvariantCulture)); + + public static readonly Parser IntegerValue = + Integer.Select(x => int.Parse(x, CultureInfo.InvariantCulture)); + + public static readonly Parser BigIntegerValue = + Integer.Select(x => BigInteger.Parse(x, CultureInfo.InvariantCulture)); + + public static readonly Parser DecimalValue = + Parse.DecimalInvariant.Token().Select(x => decimal.Parse(x, CultureInfo.InvariantCulture)); + + public static readonly Parser StringValue = + QuotedString.XOr(String).Text().Token(); + + public static readonly Parser Identifier = + Parse.AnyChar.Except(ReservedChar).AtLeastOnce().Text().Token(); + + public static Parser Token(string name) + => Parse.IgnoreCase(name).Text().Token().Select(_ => true); + + public static Parser Switch(char shortName, string longName) + => (from switchIdentifier in ShortSwitch(shortName).Or(LongSwitch(longName)) + select true).Token(); + + public static Parser Switch(char shortName, string longName, Parser valueParser) + => (from switchIdentifier in ShortSwitch(shortName).Or(LongSwitch(longName)) + from separator in Parse.Char(' ').XOr(Parse.Char(':')).Optional() + from value in valueParser + select value).Token(); + + public static Parser> List(Parser itemParser) + => itemParser.DelimitedBy(Parse.Char(',')).Token(); + + public static Parser EnumValue() where T : struct + => StringValue.Select(x => Enum.Parse(x, true)); + + public static Parser ShortSwitch(char shortName) + => from prefix in Parse.Char('/').XOr(Parse.Char('-')) + from switchIdentifier in Parse.IgnoreCase(shortName) + select true; + + public static Parser LongSwitch(string longName) + => from prefix in Parse.String("--") + from switchIdentifier in Parse.IgnoreCase(longName) + select true; + + public static Parser Invoke(string functionName) + => from target in Identifier + from separator in Parse.Char('.') + from _ in Token(functionName) + select target; + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Parsers/ContractManagementParsers.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Parsers/ContractManagementParsers.cs new file mode 100644 index 000000000..aa2ee6f90 --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Parsers/ContractManagementParsers.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Text; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.ContractManagement; +using Sprache; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Parsers +{ + public static class ContractManagementParsers + { + public static void Register() + { + (from command in CommonParsers.Token("register-contract") + from address in CommonParsers.StringValue + from name in CommonParsers.StringValue + select new RegisterContractCommand + { + Name = name, + Address = address + }).Register(); + + (from command in CommonParsers.Token("list-contracts") + select new ListContractsCommand() + ).Register(); + } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Parsers/EthNetworkParsers.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Parsers/EthNetworkParsers.cs new file mode 100644 index 000000000..3021a0fd9 --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Parsers/EthNetworkParsers.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Text; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.EthNetwork; +using Sprache; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Parsers +{ + public static class EthNetworkParsers + { + public static void Register() + { + (from command in CommonParsers.Token("set-network") + from networkUrl in CommonParsers.StringValue + select new SetNetworkCommand + { + NetworkUrl = networkUrl + }).Register(); + + (from command in CommonParsers.Token("set-gasprice") + from gasPrice in CommonParsers.BigIntegerValue + select new SetGasPriceCommand + { + GasPrice = gasPrice + }).Register(); + } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Parsers/EthTransactionsParsers.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Parsers/EthTransactionsParsers.cs new file mode 100644 index 000000000..d80c6f41a --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Parsers/EthTransactionsParsers.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Text; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.EthTransactions; +using Sprache; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Parsers +{ + public static class EthTransactionsParsers + { + public static void Register() + { + (from command in CommonParsers.Token("eth-transfer") + from to in CommonParsers.StringValue + from value in EthUnitParsers.EthValue + select new EthTransferCommand + { + To = to, + Value = value + }).Register(); + + (from command in CommonParsers.Token("eth-getbalance") + from account in CommonParsers.StringValue + select new EthGetBalanceCommand + { + Account = account + }).Register(); + } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Parsers/EthUnitParsers.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Parsers/EthUnitParsers.cs new file mode 100644 index 000000000..1a415186b --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Parsers/EthUnitParsers.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.Numerics; +using System.Text; +using Nethereum.Util; +using Sprache; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Parsers +{ + public static class EthUnitParsers + { + public static readonly Parser EthValue = + EthUnit("wei") + .Or(EthUnit("gwei")) + .Or(EthUnit("eth")) + .Or(EthUnit("ether")) + .Or(EthUnit("m")) + .Or(EthUnit("mether")) + .Or(CommonParsers.BigIntegerValue); + + public static Parser EthUnit(string unitName) + => from value in CommonParsers.BigIntegerValue + from unit in Parse.IgnoreCase(unitName).Text() + select Convert(value, unit); + + private static BigInteger Convert(BigInteger value, string unitName) + { + switch (unitName.ToLowerInvariant()) + { + case "wei": + return value; + case "gwei": + return UnitConversion.Convert.ToWei(value, UnitConversion.EthUnit.Gwei); + case "eth": + case "ether": + return UnitConversion.Convert.ToWei(value, UnitConversion.EthUnit.Ether); + case "m": + case "mether": + return UnitConversion.Convert.ToWei(value, UnitConversion.EthUnit.Mether); + } + + throw new Exception("Invalid unit."); + } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Parsers/ParserExtensions.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Parsers/ParserExtensions.cs new file mode 100644 index 000000000..5344846f1 --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Parsers/ParserExtensions.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Text; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands; +using Sprache; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Parsers +{ + public static class ParserExtensions + { + public static void Register(this Parser parser) + => REPL.Instance.RegisterParser(parser); + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Parsers/SystemParsers.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Parsers/SystemParsers.cs new file mode 100644 index 000000000..72f6bfb8c --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Parsers/SystemParsers.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Text; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands.System; +using Sprache; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Parsers +{ + public static class SystemParsers + { + public static void Register() + { + (from command in CommonParsers.Token("reset") + select new ResetCommand() + ).Register(); + + (from command in CommonParsers.Token("list-env") + select new ListEnvironmentCommand() + ).Register(); + } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Program.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Program.cs new file mode 100644 index 000000000..21bf29707 --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Program.cs @@ -0,0 +1,13 @@ +using System; +using System.Threading.Tasks; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground +{ + public static class Program + { + public static async Task Main(string[] args) + { + await REPL.Instance.RunAsync(); + } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/REPL.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/REPL.cs new file mode 100644 index 000000000..a4f253be0 --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/REPL.cs @@ -0,0 +1,99 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Commands; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Parsers; +using AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Runtime; +using Sprache; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground +{ + public class REPL + { + public static readonly REPL Instance = new REPL(); + + private readonly List> _parsers = new List>(); + private readonly RuntimeContext _context = new RuntimeContext(); + + static REPL() + { + SystemParsers.Register(); + EthNetworkParsers.Register(); + EthTransactionsParsers.Register(); + AccountManagementParsers.Register(); + ContractManagementParsers.Register(); + AlgoTokenParsers.Register(); + AlgoPoolParsers.Register(); + AlgoFeesParsers.Register(); + AlgoMinerParsers.Register(); + } + + private REPL() { } + + public void RegisterParser(Parser parser) => _parsers.Add(parser); + + public async Task RunAsync() + { + Console.WriteLine("Ready."); + + do + { + PrintPrompt(); + } while (await ProcessAsync(Console.ReadLine())); + } + + private void PrintPrompt() + { + var prompt = new StringBuilder(); + + if (_context.CurrentAccount != null) + { + prompt.Append(_context.CurrentAccount.Name); + } + + prompt.Append(">"); + + Console.Write(prompt.ToString()); + } + + private async Task ProcessAsync(string commandLine) + { + if (string.IsNullOrWhiteSpace(commandLine)) return true; + + if (commandLine.Equals("cls", StringComparison.OrdinalIgnoreCase) || + commandLine.Equals("clear", StringComparison.OrdinalIgnoreCase)) + { + Console.Clear(); + return true; + } + + if (commandLine.Equals("exit", StringComparison.OrdinalIgnoreCase) || + commandLine.Equals("quit", StringComparison.OrdinalIgnoreCase)) return false; + + foreach (var parser in _parsers) + { + var result = parser.TryParse(commandLine); + + if (!result.WasSuccessful) continue; + + try + { + await result.Value.ExecuteAsync(_context); + } + catch (Exception ex) + { + Console.WriteLine(ex.Message); + } + + return true; + } + + Console.WriteLine("Syntax error."); + + return true; + } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Runtime/EthAccountDescriptor.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Runtime/EthAccountDescriptor.cs new file mode 100644 index 000000000..7bb921916 --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Runtime/EthAccountDescriptor.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Text; +using Nethereum.Web3.Accounts; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Runtime +{ + public class EthAccountDescriptor + { + public EthAccountDescriptor(string name, Account account) + { + Name = name ?? throw new ArgumentNullException(nameof(name)); + Account = account ?? throw new ArgumentNullException(nameof(account)); + } + + public string Name { get; set; } + public Account Account { get; set; } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Runtime/EthContractDescriptor.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Runtime/EthContractDescriptor.cs new file mode 100644 index 000000000..439f9eb01 --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Runtime/EthContractDescriptor.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Text; +using Nethereum.Web3.Accounts; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Runtime +{ + public class EthContractDescriptor + { + public EthContractDescriptor(string name, string contractAddress) + { + Name = name ?? throw new ArgumentNullException(nameof(name)); + ContractAddress = contractAddress ?? throw new ArgumentNullException(nameof(contractAddress)); + } + + public string Name { get; set; } + public string ContractAddress { get; set; } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Runtime/RuntimeContext.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Runtime/RuntimeContext.cs new file mode 100644 index 000000000..cca9d97a7 --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Runtime/RuntimeContext.cs @@ -0,0 +1,91 @@ +using System; +using System.Collections.Generic; +using System.Text; +using AdvancedAlgos.AlgoToken.Framework.Ethereum; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Runtime +{ + public class RuntimeContext + { + public const string LOCAL_NETWORK_ID = "local"; + public const string LOCAL_NETWORK_URL = "http://127.0.0.1:8545"; + + public string EthNetworkUrl { get; set; } = LOCAL_NETWORK_URL; + public EthAccountDescriptor CurrentAccount { get; set; } + public Dictionary Accounts { get; private set; } = new Dictionary(StringComparer.OrdinalIgnoreCase); + public Dictionary Contracts { get; private set; } = new Dictionary(StringComparer.OrdinalIgnoreCase); + public StaticGasPriceProvider GasPriceProvider { get; } = new StaticGasPriceProvider(); + + public void Reset() + { + Accounts = new Dictionary(StringComparer.OrdinalIgnoreCase); + Contracts = new Dictionary(StringComparer.OrdinalIgnoreCase); + } + + public string ResolveAccountReference(string reference) + { + if (string.IsNullOrWhiteSpace(reference) || string.Equals(reference, "0x0", StringComparison.OrdinalIgnoreCase)) return "0x0"; + + if (TryResolveAccountReference(reference, out string address)) return address; + + throw new Exception($"Invalid account name or address: '{reference}'."); + } + + public string ResolveContractReference(string reference) + { + if (TryResolveContractReference(reference, out string address)) return address; + + throw new Exception($"Invalid contract name or address: '{reference}'."); + } + + public string ResolveAccountOrContractReference(string reference) + { + if (TryResolveAccountOrContractReference(reference, out string address)) return address; + + throw new Exception($"Invalid name or address: '{reference}'."); + } + + public bool TryResolveAccountReference(string reference, out string address) + { + if (Accounts.ContainsKey(reference)) + { + address = Accounts[reference].Account.Address; + return true; + } + + if (EthAddressParser.ValidateAddress(reference)) + { + address = reference; + return true; + } + + address = null; + return false; + } + + public bool TryResolveContractReference(string reference, out string address) + { + if (Contracts.ContainsKey(reference)) + { + address = Contracts[reference].ContractAddress; + return true; + } + + if (EthAddressParser.ValidateAddress(reference)) + { + address = reference; + return true; + } + + address = null; + return false; + } + + public bool TryResolveAccountOrContractReference(string reference, out string address) + { + if (TryResolveAccountReference(reference, out address)) return true; + if (TryResolveContractReference(reference, out address)) return true; + return false; + } + } +} diff --git a/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Runtime/StaticGasPriceProvider.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Runtime/StaticGasPriceProvider.cs new file mode 100644 index 000000000..08bb368b3 --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Runtime/StaticGasPriceProvider.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Numerics; +using System.Text; +using AdvancedAlgos.AlgoToken.Framework.Ethereum; +using Nethereum.Util; + +namespace AdvancedAlgos.AlgoToken.AlgoTokenPlayground.Runtime +{ + public class StaticGasPriceProvider : IGasPriceProvider + { + private BigInteger _gasPrice; + + public StaticGasPriceProvider() + { + _gasPrice = UnitConversion.Convert.ToWei(20, UnitConversion.EthUnit.Gwei); + } + + public BigInteger GetGasPrice() => _gasPrice; + public void SetGasPrice(BigInteger valueGwei) => _gasPrice = UnitConversion.Convert.ToWei(valueGwei, UnitConversion.EthUnit.Gwei); + } +} diff --git a/labs/algo-token-playground/terminate-script.txt b/labs/algo-token-playground/terminate-script.txt new file mode 100644 index 000000000..83d82ea65 --- /dev/null +++ b/labs/algo-token-playground/terminate-script.txt @@ -0,0 +1,29 @@ +new-account -n miner_1_account +new-account -n ref_1_account +import-account 0936af475d2701538aad321f87e0a51f2b297634653393e8cab7290a674009a5 -n prefunded + +deploy-algotoken -n token + +token.algotoken-balanceof prefunded +deploy-algopool 0 token -n dev_pool +token.algotoken-transfer dev_pool 100m +token.algotoken-balanceof dev_pool +dev_pool.algopool-terminate +token.algotoken-balanceof dev_pool +token.algotoken-balanceof prefunded + +token.algotoken-balanceof prefunded +deploy-algofees token -n fees1 +token.algotoken-transfer fees1 100m +token.algotoken-balanceof fees1 +fees1.algofees-terminate +token.algotoken-balanceof fees1 +token.algotoken-balanceof prefunded + +token.algotoken-balanceof prefunded +deploy-algominer 0 2 miner_1_account ref_1_account token -n miner_1 +token.algotoken-transfer miner_1 100m +token.algotoken-balanceof miner_1 +miner_1.algominer-terminate +token.algotoken-balanceof miner_1 +token.algotoken-balanceof prefunded diff --git a/labs/framework/src/AdvancedAlgos.AlgoToken.Framework.Ethereum.IntegrationTest/AdvancedAlgos.AlgoToken.Framework.Ethereum.IntegrationTest.csproj b/labs/framework/src/AdvancedAlgos.AlgoToken.Framework.Ethereum.IntegrationTest/AdvancedAlgos.AlgoToken.Framework.Ethereum.IntegrationTest.csproj new file mode 100644 index 000000000..fe23923a5 --- /dev/null +++ b/labs/framework/src/AdvancedAlgos.AlgoToken.Framework.Ethereum.IntegrationTest/AdvancedAlgos.AlgoToken.Framework.Ethereum.IntegrationTest.csproj @@ -0,0 +1,17 @@ + + + + netcoreapp2.1 + true + latest + + + + + + + + + + + diff --git a/labs/framework/src/AdvancedAlgos.AlgoToken.Framework.Ethereum.IntegrationTest/EthNetwork.cs b/labs/framework/src/AdvancedAlgos.AlgoToken.Framework.Ethereum.IntegrationTest/EthNetwork.cs new file mode 100644 index 000000000..4ff2462e3 --- /dev/null +++ b/labs/framework/src/AdvancedAlgos.AlgoToken.Framework.Ethereum.IntegrationTest/EthNetwork.cs @@ -0,0 +1,78 @@ +using System; +using System.Collections.Generic; +using System.Numerics; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Nethereum.Hex.HexTypes; +using Nethereum.RPC.Accounts; +using Nethereum.Util; +using Nethereum.Web3; +using Nethereum.Web3.Accounts; + +namespace AdvancedAlgos.AlgoToken.Framework.Ethereum.IntegrationTest +{ + public class EthNetwork + { + public const int TRANSACTION_BASE_FEE = 21000; + + public static EthNetwork Instance { get; private set; } + + private SemaphoreSlim _refillSync = new SemaphoreSlim(1, 1); + + public string Url { get; private set; } + public string PrefundedAddress { get; private set; } + public string PrefundedPrivateKey { get; private set; } + public IGasPriceProvider GasPriceProvider { get; private set; } + public BigInteger TxBaseFeeWei => GasPriceProvider.GetGasPrice() * TRANSACTION_BASE_FEE; + + public static void UseDefaultTestNet() => UseGanacheTestNet(); + + public static void UseGanacheTestNet() + { + Instance = new EthNetwork + { + Url = "http://127.0.0.1:8545", + PrefundedAddress = "0x06bB4674A4b08d07186b721378C7e241eD85443b", + PrefundedPrivateKey = "0936af475d2701538aad321f87e0a51f2b297634653393e8cab7290a674009a5", + GasPriceProvider = new StaticGasPriceProvider(2000000000) + }; + } + + public static void UseGethTestNet() + { + Instance = new EthNetwork + { + Url = "http://10.4.0.4:8545", + PrefundedAddress = "0x88474Ec3cfddfC943d3E42C94763D43f181A5a83", + PrefundedPrivateKey = "0x69970bd6c1b6cfbffea16656c27ff7b330b751ed5e46c1644b54a642871f4bbb", + GasPriceProvider = new StaticGasPriceProvider(2000000000) + }; + } + + public Web3 GetWeb3() => new Web3(Url); + public Web3 GetWeb3(IAccount account) => new Web3(account, Url); + + public Task RefillAsync(IAccount account) + { + return RefillAsync(account, UnitConversion.Convert.ToWei(1)); + } + + public async Task RefillAsync(IAccount account, BigInteger weis) + { + await _refillSync.WaitAsync(); + try + { + var prefundedAccount = new Account(PrefundedPrivateKey); + var web3 = new Web3(prefundedAccount, Url); + var recepit = await web3.TransactionManager.TransactionReceiptService.SendRequestAndWaitForReceiptAsync(() => + web3.TransactionManager.SendTransactionAsync(prefundedAccount.Address, account.Address, new HexBigInteger(weis)) + ); + } + finally + { + _refillSync.Release(); + } + } + } +} diff --git a/labs/framework/src/AdvancedAlgos.AlgoToken.Framework.Ethereum.IntegrationTest/StaticGasPriceProvider.cs b/labs/framework/src/AdvancedAlgos.AlgoToken.Framework.Ethereum.IntegrationTest/StaticGasPriceProvider.cs new file mode 100644 index 000000000..e8cc59df8 --- /dev/null +++ b/labs/framework/src/AdvancedAlgos.AlgoToken.Framework.Ethereum.IntegrationTest/StaticGasPriceProvider.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Numerics; +using System.Text; + +namespace AdvancedAlgos.AlgoToken.Framework.Ethereum.IntegrationTest +{ + public class StaticGasPriceProvider : IGasPriceProvider + { + private BigInteger _gasPrice; + + public StaticGasPriceProvider(BigInteger gasPrice) + { + _gasPrice = gasPrice; + } + + public BigInteger GetGasPrice() => _gasPrice; + } +} diff --git a/labs/framework/src/AdvancedAlgos.AlgoToken.Framework.Ethereum/AdvancedAlgos.AlgoToken.Framework.Ethereum.csproj b/labs/framework/src/AdvancedAlgos.AlgoToken.Framework.Ethereum/AdvancedAlgos.AlgoToken.Framework.Ethereum.csproj new file mode 100644 index 000000000..d98ed2e6d --- /dev/null +++ b/labs/framework/src/AdvancedAlgos.AlgoToken.Framework.Ethereum/AdvancedAlgos.AlgoToken.Framework.Ethereum.csproj @@ -0,0 +1,13 @@ + + + + netcoreapp2.1 + true + latest + + + + + + + diff --git a/labs/framework/src/AdvancedAlgos.AlgoToken.Framework.Ethereum/EthAccountFactory.cs b/labs/framework/src/AdvancedAlgos.AlgoToken.Framework.Ethereum/EthAccountFactory.cs new file mode 100644 index 000000000..c3933ce1b --- /dev/null +++ b/labs/framework/src/AdvancedAlgos.AlgoToken.Framework.Ethereum/EthAccountFactory.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Text; +using Nethereum.Hex.HexConvertors.Extensions; +using Nethereum.Signer; +using Nethereum.Web3.Accounts; + +namespace AdvancedAlgos.AlgoToken.Framework.Ethereum +{ + public static class EthAccountFactory + { + public static Account Create() + { + var accountEcKey = EthECKey.GenerateKey(); + var accountPrivateKey = accountEcKey.GetPrivateKeyAsBytes().ToHex(); + return new Account(accountPrivateKey); + } + } +} diff --git a/labs/framework/src/AdvancedAlgos.AlgoToken.Framework.Ethereum/EthAddressParser.cs b/labs/framework/src/AdvancedAlgos.AlgoToken.Framework.Ethereum/EthAddressParser.cs new file mode 100644 index 000000000..d8e9a5c8e --- /dev/null +++ b/labs/framework/src/AdvancedAlgos.AlgoToken.Framework.Ethereum/EthAddressParser.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Text; +using Nethereum.Hex.HexConvertors.Extensions; +using Nethereum.Util; + +namespace AdvancedAlgos.AlgoToken.Framework.Ethereum +{ + public static class EthAddressParser + { + private static readonly AddressUtil _addressUtil = new AddressUtil(); + + public static bool ValidateAddress(string address) + { + try + { + if (!_addressUtil.IsValidAddressLength(address)) return false; + address = _addressUtil.ConvertToChecksumAddress(address); + return _addressUtil.IsChecksumAddress(address); + } + catch + { + return false; + } + } + } +} diff --git a/labs/framework/src/AdvancedAlgos.AlgoToken.Framework.Ethereum/Exceptions/TransactionRejectedException.cs b/labs/framework/src/AdvancedAlgos.AlgoToken.Framework.Ethereum/Exceptions/TransactionRejectedException.cs new file mode 100644 index 000000000..7aaf4592f --- /dev/null +++ b/labs/framework/src/AdvancedAlgos.AlgoToken.Framework.Ethereum/Exceptions/TransactionRejectedException.cs @@ -0,0 +1,24 @@ +#pragma warning disable RCS1194 // Implement exception constructors. + +using System; +using System.Collections.Generic; +using System.Text; +using Nethereum.RPC.Eth.DTOs; + +namespace AdvancedAlgos.AlgoToken.Framework.Ethereum.Exceptions +{ + public class TransactionRejectedException : Exception + { + private const string ERROR_MESSAGE = "The transaction was rejected."; + + public TransactionRejectedException(TransactionReceipt transactionReceipt) + : base(ERROR_MESSAGE) + { + TransactionReceipt = transactionReceipt; + } + + public TransactionReceipt TransactionReceipt { get; } + + public static void Throw(TransactionReceipt transactionReceipt) => throw new TransactionRejectedException(transactionReceipt); + } +} diff --git a/labs/framework/src/AdvancedAlgos.AlgoToken.Framework.Ethereum/Extensions/TransactionReceiptExtensions.cs b/labs/framework/src/AdvancedAlgos.AlgoToken.Framework.Ethereum/Extensions/TransactionReceiptExtensions.cs new file mode 100644 index 000000000..47d5ebc24 --- /dev/null +++ b/labs/framework/src/AdvancedAlgos.AlgoToken.Framework.Ethereum/Extensions/TransactionReceiptExtensions.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Text; +using Nethereum.RPC.Eth.DTOs; +using AdvancedAlgos.AlgoToken.Framework.Ethereum.Exceptions; + +namespace AdvancedAlgos.AlgoToken.Framework.Ethereum.Extensions +{ + public static class TransactionReceiptExtensions + { + public static void EnsureSucceededStatus(this TransactionReceipt transactionReceipt) + { + if (transactionReceipt.Status.Value != 1) TransactionRejectedException.Throw(transactionReceipt); + } + } +} diff --git a/labs/framework/src/AdvancedAlgos.AlgoToken.Framework.Ethereum/IGasPriceProvider.cs b/labs/framework/src/AdvancedAlgos.AlgoToken.Framework.Ethereum/IGasPriceProvider.cs new file mode 100644 index 000000000..1a16a0b9c --- /dev/null +++ b/labs/framework/src/AdvancedAlgos.AlgoToken.Framework.Ethereum/IGasPriceProvider.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Numerics; +using System.Text; + +namespace AdvancedAlgos.AlgoToken.Framework.Ethereum +{ + public interface IGasPriceProvider + { + BigInteger GetGasPrice(); + } +} diff --git a/labs/framework/src/AdvancedAlgos.AlgoToken.Framework.Ethereum/Reflection/AssemblyExtensions.cs b/labs/framework/src/AdvancedAlgos.AlgoToken.Framework.Ethereum/Reflection/AssemblyExtensions.cs new file mode 100644 index 000000000..9fc668554 --- /dev/null +++ b/labs/framework/src/AdvancedAlgos.AlgoToken.Framework.Ethereum/Reflection/AssemblyExtensions.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Reflection; +using System.Text; + +namespace AdvancedAlgos.AlgoToken.Framework.Ethereum.Reflection +{ + public static class AssemblyExtensions + { + public static string GetResourceString(this Assembly assembly, string resourceName, Encoding encoding = null) + { + using (var stream = assembly.GetManifestResourceStream(assembly.GetName().Name + "." + resourceName)) + using (var reader = new StreamReader(stream, encoding ?? Encoding.UTF8)) + { + return reader.ReadToEnd(); + } + } + } +} diff --git a/labs/framework/src/AdvancedAlgos.AlgoToken.Framework.Ethereum/SmartContract.cs b/labs/framework/src/AdvancedAlgos.AlgoToken.Framework.Ethereum/SmartContract.cs new file mode 100644 index 000000000..deed26c1e --- /dev/null +++ b/labs/framework/src/AdvancedAlgos.AlgoToken.Framework.Ethereum/SmartContract.cs @@ -0,0 +1,109 @@ +using System; +using System.Numerics; +using System.Threading.Tasks; +using AdvancedAlgos.AlgoToken.Framework.Ethereum.Extensions; +using AdvancedAlgos.AlgoToken.Framework.Ethereum.Reflection; +using Nethereum.Contracts; +using Nethereum.Hex.HexTypes; +using Nethereum.RPC.Eth.DTOs; +using Nethereum.Web3; + +namespace AdvancedAlgos.AlgoToken.Framework.Ethereum +{ + public abstract class SmartContract where TContract : SmartContract + { + private static readonly object _syncForResourceLoader = new object(); + + private static string _abi; + private static string _bin; + + public SmartContract(Web3 web3, IGasPriceProvider gasPriceProvider) + { + Web3 = web3 ?? throw new ArgumentNullException(nameof(web3)); + GasPriceProvider = gasPriceProvider ?? throw new ArgumentNullException(nameof(gasPriceProvider)); + + LoadAbiAndBin(); + } + + public SmartContract(string contractAddress, Web3 web3, IGasPriceProvider gasPriceProvider) + { + Web3 = web3 ?? throw new ArgumentNullException(nameof(web3)); + GasPriceProvider = gasPriceProvider ?? throw new ArgumentNullException(nameof(gasPriceProvider)); + ContractAddress = contractAddress ?? throw new ArgumentNullException(nameof(contractAddress)); + + LoadAbiAndBin(); + + var contractDescriptor = web3.Eth.GetContract(_abi, contractAddress); + + Initialize(contractDescriptor); + } + + public Web3 Web3 { get; private set; } + public IGasPriceProvider GasPriceProvider { get; } + public string ContractAddress { get; private set; } + + protected abstract string AbiResourceName { get; } + protected abstract string BinResourceName { get; } + protected abstract BigInteger DeploymentGasUnits { get; } + + public void Bind(Web3 web3) + { + Web3 = web3 ?? throw new ArgumentNullException(nameof(web3)); + + var contractDescriptor = Web3.Eth.GetContract(_abi, ContractAddress); + + Initialize(contractDescriptor); + } + + protected virtual void Initialize(Contract contractDescriptor) { } + + protected async Task DeployAsync(params object[] constructorParameters) + { + var transactionReceipt = await Web3.Eth.DeployContract.SendRequestAndWaitForReceiptAsync( + _abi, + _bin, + Web3.TransactionManager.Account.Address, + new HexBigInteger(DeploymentGasUnits), + new HexBigInteger(GasPriceProvider.GetGasPrice()), + null, + null, + constructorParameters); + + transactionReceipt.EnsureSucceededStatus(); + + var contractDescriptor = Web3.Eth.GetContract(_abi, transactionReceipt.ContractAddress); + + Initialize(contractDescriptor); + + ContractAddress = transactionReceipt.ContractAddress; + + return transactionReceipt; + } + + protected async Task InvokeAsync(Function function, BigInteger gasUnits, params object[] parameters) + { + var transactionReceipt = await function.SendTransactionAndWaitForReceiptAsync( + Web3.TransactionManager.Account.Address, + new HexBigInteger(gasUnits), + new HexBigInteger(GasPriceProvider.GetGasPrice()), + null, + null, + parameters); + + transactionReceipt.EnsureSucceededStatus(); + + return transactionReceipt; + } + + private void LoadAbiAndBin() + { + lock (_syncForResourceLoader) + { + if (_abi != null) return; + + _abi = GetType().Assembly.GetResourceString(AbiResourceName); + _bin = GetType().Assembly.GetResourceString(BinResourceName); + } + } + } +} diff --git a/labs/tools/ganache-cli-setup/README.md b/labs/tools/ganache-cli-setup/README.md new file mode 100644 index 000000000..e2f11c0cc --- /dev/null +++ b/labs/tools/ganache-cli-setup/README.md @@ -0,0 +1,11 @@ +Ganache accounts: + +mnemonic: act analyst ability congress enter point unlock universe winner achieve refuse border + +Account #0 +Address: 0x06bB4674A4b08d07186b721378C7e241eD85443b +Private Key: 0x0936af475d2701538aad321f87e0a51f2b297634653393e8cab7290a674009a5 + +Account #1 +Address: 0x6d197071d41C77A2779B33304B8cC6Ea41f69918 +Private Key: 0x5e697f9196588307b9e818fafca38c33f6592c005bfd190820b1d2cc2d608882 \ No newline at end of file diff --git a/labs/tools/ganache-cli-setup/install-local-ganache-cli.cmd b/labs/tools/ganache-cli-setup/install-local-ganache-cli.cmd new file mode 100644 index 000000000..94a9e8a1c --- /dev/null +++ b/labs/tools/ganache-cli-setup/install-local-ganache-cli.cmd @@ -0,0 +1,2 @@ +npm install -g ganache-cli + diff --git a/labs/tools/ganache-cli-setup/install-local-ganache-cli.sh b/labs/tools/ganache-cli-setup/install-local-ganache-cli.sh new file mode 100644 index 000000000..363a3abfc --- /dev/null +++ b/labs/tools/ganache-cli-setup/install-local-ganache-cli.sh @@ -0,0 +1,2 @@ +#!/bin/bash +npm install -g ganache-cli diff --git a/labs/tools/ganache-cli-setup/run-local-ganache-cli.cmd b/labs/tools/ganache-cli-setup/run-local-ganache-cli.cmd new file mode 100644 index 000000000..9f4bd884c --- /dev/null +++ b/labs/tools/ganache-cli-setup/run-local-ganache-cli.cmd @@ -0,0 +1 @@ +ganache-cli "--mnemonic" "act analyst ability congress enter point unlock universe winner achieve refuse border" "--accounts" "2" "--defaultBalanceEther" "10000000" "--networkId" "777" "--db" "C:/Temp" "--deterministic" "--noVMErrorsOnRPCResponse" \ No newline at end of file diff --git a/labs/tools/ganache-cli-setup/run-local-ganache-cli.sh b/labs/tools/ganache-cli-setup/run-local-ganache-cli.sh new file mode 100644 index 000000000..c6dde2f78 --- /dev/null +++ b/labs/tools/ganache-cli-setup/run-local-ganache-cli.sh @@ -0,0 +1,2 @@ +#!/bin/bash +ganache-cli "--mnemonic" "act analyst ability congress enter point unlock universe winner achieve refuse border" "--accounts" "2" "--defaultBalanceEther" "10000000" "--networkId" "777" "--db" "$PWD/ganache-db" "--deterministic" "--noVMErrorsOnRPCResponse"