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/AdvancedAlgos.AlgoErc20Token.sln b/labs/algo-erc20-token/AdvancedAlgos.AlgoErc20Token.sln deleted file mode 100644 index d496c206e..000000000 --- a/labs/algo-erc20-token/AdvancedAlgos.AlgoErc20Token.sln +++ /dev/null @@ -1,37 +0,0 @@ - -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.AlgoErc20Token", "src\AdvancedAlgos.AlgoErc20Token\AdvancedAlgos.AlgoErc20Token.csproj", "{6916F713-4B7F-4B20-9205-BAEF417A0316}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AdvancedAlgos.AlgoErc20Token.IntegrationTests", "test\AdvancedAlgos.AlgoErc20Token.IntegrationTests\AdvancedAlgos.AlgoErc20Token.IntegrationTests.csproj", "{4587034D-7844-4A36-9F49-FBA9702382E6}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AdvancedAlgos.AlgoErc20Token.EthClientExtensions", "src\AdvancedAlgos.AlgoErc20Token.EthClientExtensions\AdvancedAlgos.AlgoErc20Token.EthClientExtensions.csproj", "{A392DD77-CB11-464F-A0D6-77F4AC5BC79F}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {6916F713-4B7F-4B20-9205-BAEF417A0316}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6916F713-4B7F-4B20-9205-BAEF417A0316}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6916F713-4B7F-4B20-9205-BAEF417A0316}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6916F713-4B7F-4B20-9205-BAEF417A0316}.Release|Any CPU.Build.0 = Release|Any CPU - {4587034D-7844-4A36-9F49-FBA9702382E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4587034D-7844-4A36-9F49-FBA9702382E6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4587034D-7844-4A36-9F49-FBA9702382E6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4587034D-7844-4A36-9F49-FBA9702382E6}.Release|Any CPU.Build.0 = Release|Any CPU - {A392DD77-CB11-464F-A0D6-77F4AC5BC79F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A392DD77-CB11-464F-A0D6-77F4AC5BC79F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A392DD77-CB11-464F-A0D6-77F4AC5BC79F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A392DD77-CB11-464F-A0D6-77F4AC5BC79F}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {7273BF71-A9AA-472B-84A8-7658BB88D497} - EndGlobalSection -EndGlobal diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/bin/AlgoTokenV1.json b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/bin/AlgoTokenV1.json deleted file mode 100644 index e0b102ac5..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/bin/AlgoTokenV1.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "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": "60806040523480156200001157600080fd5b50604080518082018252600581527f416c676f7300000000000000000000000000000000000000000000000000000060208083019182528351808501909452600484527f414c474f00000000000000000000000000000000000000000000000000000000908401528151919291601291620000909160039190620002c1565b508151620000a6906004906020850190620002c1565b506005805460ff191660ff9290921691909117905550620000d290503364010000000062000103810204565b6007805460ff19169055620000fd336b033b2e3c9fd0803ce800000064010000000062000155810204565b62000366565b6200011e60068264010000000062000b226200021482021704565b604051600160a060020a038216907f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f890600090a250565b600160a060020a03821615156200016b57600080fd5b60025462000188908264010000000062000ac46200026f82021704565b600255600160a060020a038216600090815260208190526040902054620001be908264010000000062000ac46200026f82021704565b600160a060020a0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b600160a060020a03811615156200022a57600080fd5b6200023f828264010000000062000289810204565b156200024a57600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b6000828201838110156200028257600080fd5b9392505050565b6000600160a060020a0382161515620002a157600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200030457805160ff191683800117855562000334565b8280016001018555821562000334579182015b828111156200033457825182559160200191906001019062000317565b506200034292915062000346565b5090565b6200036391905b808211156200034257600081556001016200034d565b90565b610b9c80620003766000396000f3006080604052600436106100fb5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610100578063095ea7b31461018a57806318160ddd146101c257806323b872dd146101e95780632ff2e9dc14610213578063313ce5671461022857806339509351146102535780633f4ba83a1461027757806346fbf68e1461028e5780635c975abb146102af5780636ef8d66d146102c457806370a08231146102d957806382dc1ec4146102fa5780638456cb591461031b57806395d89b4114610330578063a457c2d714610345578063a9059cbb14610369578063dd62ed3e1461038d575b600080fd5b34801561010c57600080fd5b506101156103b4565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561014f578181015183820152602001610137565b50505050905090810190601f16801561017c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561019657600080fd5b506101ae600160a060020a036004351660243561044a565b604080519115158252519081900360200190f35b3480156101ce57600080fd5b506101d761046e565b60408051918252519081900360200190f35b3480156101f557600080fd5b506101ae600160a060020a0360043581169060243516604435610474565b34801561021f57600080fd5b506101d761049a565b34801561023457600080fd5b5061023d6104aa565b6040805160ff9092168252519081900360200190f35b34801561025f57600080fd5b506101ae600160a060020a03600435166024356104b3565b34801561028357600080fd5b5061028c6104d0565b005b34801561029a57600080fd5b506101ae600160a060020a0360043516610534565b3480156102bb57600080fd5b506101ae61054d565b3480156102d057600080fd5b5061028c610556565b3480156102e557600080fd5b506101d7600160a060020a0360043516610561565b34801561030657600080fd5b5061028c600160a060020a036004351661057c565b34801561032757600080fd5b5061028c61059c565b34801561033c57600080fd5b50610115610602565b34801561035157600080fd5b506101ae600160a060020a0360043516602435610663565b34801561037557600080fd5b506101ae600160a060020a0360043516602435610680565b34801561039957600080fd5b506101d7600160a060020a036004358116906024351661069d565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104405780601f1061041557610100808354040283529160200191610440565b820191906000526020600020905b81548152906001019060200180831161042357829003601f168201915b5050505050905090565b60075460009060ff161561045d57600080fd5b61046783836106c8565b9392505050565b60025490565b60075460009060ff161561048757600080fd5b610492848484610746565b949350505050565b6b033b2e3c9fd0803ce800000081565b60055460ff1690565b60075460009060ff16156104c657600080fd5b61046783836107e3565b6104d933610534565b15156104e457600080fd5b60075460ff1615156104f557600080fd5b6007805460ff191690556040805133815290517f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa9181900360200190a1565b600061054760068363ffffffff61089316565b92915050565b60075460ff1690565b61055f336108ca565b565b600160a060020a031660009081526020819052604090205490565b61058533610534565b151561059057600080fd5b61059981610912565b50565b6105a533610534565b15156105b057600080fd5b60075460ff16156105c057600080fd5b6007805460ff191660011790556040805133815290517f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2589181900360200190a1565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104405780601f1061041557610100808354040283529160200191610440565b60075460009060ff161561067657600080fd5b610467838361095a565b60075460009060ff161561069357600080fd5b61046783836109a5565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6000600160a060020a03831615156106df57600080fd5b336000818152600160209081526040808320600160a060020a03881680855290835292819020869055805186815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a350600192915050565b600160a060020a038316600090815260016020908152604080832033845290915281205482111561077657600080fd5b600160a060020a03841660009081526001602090815260408083203384529091529020546107aa908363ffffffff6109bb16565b600160a060020a03851660009081526001602090815260408083203384529091529020556107d98484846109d2565b5060019392505050565b6000600160a060020a03831615156107fa57600080fd5b336000908152600160209081526040808320600160a060020a038716845290915290205461082e908363ffffffff610ac416565b336000818152600160209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b6000600160a060020a03821615156108aa57600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b6108db60068263ffffffff610ad616565b604051600160a060020a038216907fcd265ebaf09df2871cc7bd4133404a235ba12eff2041bb89d9c714a2621c7c7e90600090a250565b61092360068263ffffffff610b2216565b604051600160a060020a038216907f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f890600090a250565b6000600160a060020a038316151561097157600080fd5b336000908152600160209081526040808320600160a060020a038716845290915290205461082e908363ffffffff6109bb16565b60006109b23384846109d2565b50600192915050565b600080838311156109cb57600080fd5b5050900390565b600160a060020a0383166000908152602081905260409020548111156109f757600080fd5b600160a060020a0382161515610a0c57600080fd5b600160a060020a038316600090815260208190526040902054610a35908263ffffffff6109bb16565b600160a060020a038085166000908152602081905260408082209390935590841681522054610a6a908263ffffffff610ac416565b600160a060020a038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008282018381101561046757600080fd5b600160a060020a0381161515610aeb57600080fd5b610af58282610893565b1515610b0057600080fd5b600160a060020a0316600090815260209190915260409020805460ff19169055565b600160a060020a0381161515610b3757600080fd5b610b418282610893565b15610b4b57600080fd5b600160a060020a0316600090815260209190915260409020805460ff191660011790555600a165627a7a723058202dd18facb88fce52397143655484bd6bb04ca8578eb8c0779511f9e8d97c55f20029", - "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": [ - null, - 594400 - ], - "external": { - "INITIAL_SUPPLY()": 272, - "addPauser(address)": null, - "allowance(address,address)": 1082, - "approve(address,uint256)": 22732, - "balanceOf(address)": 851, - "decimals()": 509, - "decreaseAllowance(address,uint256)": null, - "increaseAllowance(address,uint256)": null, - "isPauser(address)": null, - "name()": null, - "pause()": null, - "paused()": 594, - "renouncePauser()": null, - "symbol()": null, - "totalSupply()": 428, - "transfer(address,uint256)": null, - "transferFrom(address,address,uint256)": null, - "unpause()": null - }, - "internal": {} - }, - "runtimeBytecode": "6080604052600436106100fb5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610100578063095ea7b31461018a57806318160ddd146101c257806323b872dd146101e95780632ff2e9dc14610213578063313ce5671461022857806339509351146102535780633f4ba83a1461027757806346fbf68e1461028e5780635c975abb146102af5780636ef8d66d146102c457806370a08231146102d957806382dc1ec4146102fa5780638456cb591461031b57806395d89b4114610330578063a457c2d714610345578063a9059cbb14610369578063dd62ed3e1461038d575b600080fd5b34801561010c57600080fd5b506101156103b4565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561014f578181015183820152602001610137565b50505050905090810190601f16801561017c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561019657600080fd5b506101ae600160a060020a036004351660243561044a565b604080519115158252519081900360200190f35b3480156101ce57600080fd5b506101d761046e565b60408051918252519081900360200190f35b3480156101f557600080fd5b506101ae600160a060020a0360043581169060243516604435610474565b34801561021f57600080fd5b506101d761049a565b34801561023457600080fd5b5061023d6104aa565b6040805160ff9092168252519081900360200190f35b34801561025f57600080fd5b506101ae600160a060020a03600435166024356104b3565b34801561028357600080fd5b5061028c6104d0565b005b34801561029a57600080fd5b506101ae600160a060020a0360043516610534565b3480156102bb57600080fd5b506101ae61054d565b3480156102d057600080fd5b5061028c610556565b3480156102e557600080fd5b506101d7600160a060020a0360043516610561565b34801561030657600080fd5b5061028c600160a060020a036004351661057c565b34801561032757600080fd5b5061028c61059c565b34801561033c57600080fd5b50610115610602565b34801561035157600080fd5b506101ae600160a060020a0360043516602435610663565b34801561037557600080fd5b506101ae600160a060020a0360043516602435610680565b34801561039957600080fd5b506101d7600160a060020a036004358116906024351661069d565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104405780601f1061041557610100808354040283529160200191610440565b820191906000526020600020905b81548152906001019060200180831161042357829003601f168201915b5050505050905090565b60075460009060ff161561045d57600080fd5b61046783836106c8565b9392505050565b60025490565b60075460009060ff161561048757600080fd5b610492848484610746565b949350505050565b6b033b2e3c9fd0803ce800000081565b60055460ff1690565b60075460009060ff16156104c657600080fd5b61046783836107e3565b6104d933610534565b15156104e457600080fd5b60075460ff1615156104f557600080fd5b6007805460ff191690556040805133815290517f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa9181900360200190a1565b600061054760068363ffffffff61089316565b92915050565b60075460ff1690565b61055f336108ca565b565b600160a060020a031660009081526020819052604090205490565b61058533610534565b151561059057600080fd5b61059981610912565b50565b6105a533610534565b15156105b057600080fd5b60075460ff16156105c057600080fd5b6007805460ff191660011790556040805133815290517f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2589181900360200190a1565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104405780601f1061041557610100808354040283529160200191610440565b60075460009060ff161561067657600080fd5b610467838361095a565b60075460009060ff161561069357600080fd5b61046783836109a5565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6000600160a060020a03831615156106df57600080fd5b336000818152600160209081526040808320600160a060020a03881680855290835292819020869055805186815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a350600192915050565b600160a060020a038316600090815260016020908152604080832033845290915281205482111561077657600080fd5b600160a060020a03841660009081526001602090815260408083203384529091529020546107aa908363ffffffff6109bb16565b600160a060020a03851660009081526001602090815260408083203384529091529020556107d98484846109d2565b5060019392505050565b6000600160a060020a03831615156107fa57600080fd5b336000908152600160209081526040808320600160a060020a038716845290915290205461082e908363ffffffff610ac416565b336000818152600160209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b6000600160a060020a03821615156108aa57600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b6108db60068263ffffffff610ad616565b604051600160a060020a038216907fcd265ebaf09df2871cc7bd4133404a235ba12eff2041bb89d9c714a2621c7c7e90600090a250565b61092360068263ffffffff610b2216565b604051600160a060020a038216907f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f890600090a250565b6000600160a060020a038316151561097157600080fd5b336000908152600160209081526040808320600160a060020a038716845290915290205461082e908363ffffffff6109bb16565b60006109b23384846109d2565b50600192915050565b600080838311156109cb57600080fd5b5050900390565b600160a060020a0383166000908152602081905260409020548111156109f757600080fd5b600160a060020a0382161515610a0c57600080fd5b600160a060020a038316600090815260208190526040902054610a35908263ffffffff6109bb16565b600160a060020a038085166000908152602081905260408082209390935590841681522054610a6a908263ffffffff610ac416565b600160a060020a038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008282018381101561046757600080fd5b600160a060020a0381161515610aeb57600080fd5b610af58282610893565b1515610b0057600080fd5b600160a060020a0316600090815260209190915260409020805460ff19169055565b600160a060020a0381161515610b3757600080fd5b610b418282610893565b15610b4b57600080fd5b600160a060020a0316600090815260209190915260409020805460ff191660011790555600a165627a7a723058202dd18facb88fce52397143655484bd6bb04ca8578eb8c0779511f9e8d97c55f20029" -} \ No newline at end of file diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/OPENZEPPELIN-SOLIDITY-LICENSE b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/OPENZEPPELIN-SOLIDITY-LICENSE deleted file mode 100644 index 98dd89cdc..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/OPENZEPPELIN-SOLIDITY-LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 Smart Contract Solutions, Inc. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/README.md b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/README.md deleted file mode 100644 index 040789b93..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# ERC20 implementation - -The code used for the token smart-contract implementation is based on openzeppelin-solidity - -* Source: https://github.com/OpenZeppelin/openzeppelin-solidity diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/.npmignore b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/.npmignore deleted file mode 100644 index e792d8bc6..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -mocks -examples diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/ARCHITECTURE.md b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/ARCHITECTURE.md deleted file mode 100644 index bfb6cff8d..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/ARCHITECTURE.md +++ /dev/null @@ -1,27 +0,0 @@ -## Architecture - -The following provides visibility into how OpenZeppelin's contracts are organized: - -- **access** - Smart contracts that enable functionality that can be used for selective restrictions and basic authorization control functions. -- **crowdsale** - A collection of smart contracts used to manage token crowdsales that allow investors to purchase tokens with ETH. Includes a base contract which implements fundamental crowdsale functionality in its simplest form. The base contract can be extended in order to satisfy your crowdsale’s specific requirements. - - **distribution** - Includes extensions of the base crowdsale contract which can be used to customize the completion of a crowdsale. - - **emission** - Includes extensions of the base crowdsale contract which can be used to mint and manage how tokens are issued to purchasers. - - **price** - Includes extensions of the crowdsale contract that can be used to manage changes in token prices. - - **validation** - Includes extensions of the crowdsale contract that can be used to enforce restraints and limit access to token purchases. -- **examples** - A collection of simple smart contracts that demonstrate how to add new features to base contracts through multiple inheritance. -- **introspection** - An interface that can be used to make a contract comply with the ERC-165 standard as well as a contract that implements ERC-165 using a lookup table. -- **lifecycle** - A collection of base contracts used to manage the existence and behavior of your contracts and their funds. -- **math** - Libraries with safety checks on operations that throw on errors. -- **mocks** - A collection of abstract contracts that are primarily used for unit testing. They also serve as good usage examples and demonstrate how to combine contracts with inheritance when developing your own custom applications. -- **ownership** - A collection of smart contracts that can be used to manage contract and token ownership -- **payment** - A collection of smart contracts that can be used to manage payments through escrow arrangements, withdrawals, and claims. Includes support for both single payees and multiple payees. -- **proposals** - A collection of smart contracts that reflect community Ethereum Improvement Proposals (EIPs). These contracts are under development and standardization. They are not recommended for production, but they are useful for experimentation with pending EIP standards. Go [here](https://github.com/OpenZeppelin/openzeppelin-solidity/wiki/ERC-Process) for more information. - -- **token** - A collection of approved ERC standard tokens -- their interfaces and implementations. - - **ERC20** - A standard interface for fungible tokens: - - *Interfaces* - Includes the ERC-20 token standard basic interface. I.e., what the contract’s ABI can represent. - - *Implementations* - Includes ERC-20 token implementations that include all required and some optional ERC-20 functionality. - - **ERC721** - A standard interface for non-fungible tokens - - *Interfaces* - Includes the ERC-721 token standard basic interface. I.e., what the contract’s ABI can represent. - - *Implementations* - Includes ERC-721 token implementations that include all required and some optional ERC-721 functionality. - diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/access/Roles.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/access/Roles.sol deleted file mode 100644 index e3b97ddb7..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/access/Roles.sol +++ /dev/null @@ -1,44 +0,0 @@ -pragma solidity ^0.4.24; - -/** - * @title Roles - * @dev Library for managing addresses assigned to a Role. - */ -library Roles { - struct Role { - mapping (address => bool) bearer; - } - - /** - * @dev give an account access to this role - */ - function add(Role storage role, address account) internal { - require(account != address(0)); - require(!has(role, account)); - - role.bearer[account] = true; - } - - /** - * @dev remove an account's access to this role - */ - function remove(Role storage role, address account) internal { - require(account != address(0)); - require(has(role, account)); - - role.bearer[account] = false; - } - - /** - * @dev check if an account has this role - * @return bool - */ - function has(Role storage role, address account) - internal - view - returns (bool) - { - require(account != address(0)); - return role.bearer[account]; - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/access/roles/CapperRole.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/access/roles/CapperRole.sol deleted file mode 100644 index d6b2ba066..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/access/roles/CapperRole.sol +++ /dev/null @@ -1,43 +0,0 @@ -pragma solidity ^0.4.24; - -import "../Roles.sol"; - -contract CapperRole { - using Roles for Roles.Role; - - event CapperAdded(address indexed account); - event CapperRemoved(address indexed account); - - Roles.Role private cappers; - - constructor() internal { - _addCapper(msg.sender); - } - - modifier onlyCapper() { - require(isCapper(msg.sender)); - _; - } - - function isCapper(address account) public view returns (bool) { - return cappers.has(account); - } - - function addCapper(address account) public onlyCapper { - _addCapper(account); - } - - function renounceCapper() public { - _removeCapper(msg.sender); - } - - function _addCapper(address account) internal { - cappers.add(account); - emit CapperAdded(account); - } - - function _removeCapper(address account) internal { - cappers.remove(account); - emit CapperRemoved(account); - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/access/roles/MinterRole.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/access/roles/MinterRole.sol deleted file mode 100644 index 57f4a5a80..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/access/roles/MinterRole.sol +++ /dev/null @@ -1,43 +0,0 @@ -pragma solidity ^0.4.24; - -import "../Roles.sol"; - -contract MinterRole { - using Roles for Roles.Role; - - event MinterAdded(address indexed account); - event MinterRemoved(address indexed account); - - Roles.Role private minters; - - constructor() internal { - _addMinter(msg.sender); - } - - modifier onlyMinter() { - require(isMinter(msg.sender)); - _; - } - - function isMinter(address account) public view returns (bool) { - return minters.has(account); - } - - function addMinter(address account) public onlyMinter { - _addMinter(account); - } - - function renounceMinter() public { - _removeMinter(msg.sender); - } - - function _addMinter(address account) internal { - minters.add(account); - emit MinterAdded(account); - } - - function _removeMinter(address account) internal { - minters.remove(account); - emit MinterRemoved(account); - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/access/roles/PauserRole.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/access/roles/PauserRole.sol deleted file mode 100644 index 58bb6a313..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/access/roles/PauserRole.sol +++ /dev/null @@ -1,43 +0,0 @@ -pragma solidity ^0.4.24; - -import "../Roles.sol"; - -contract PauserRole { - using Roles for Roles.Role; - - event PauserAdded(address indexed account); - event PauserRemoved(address indexed account); - - Roles.Role private pausers; - - constructor() internal { - _addPauser(msg.sender); - } - - modifier onlyPauser() { - require(isPauser(msg.sender)); - _; - } - - function isPauser(address account) public view returns (bool) { - return pausers.has(account); - } - - function addPauser(address account) public onlyPauser { - _addPauser(account); - } - - function renouncePauser() public { - _removePauser(msg.sender); - } - - function _addPauser(address account) internal { - pausers.add(account); - emit PauserAdded(account); - } - - function _removePauser(address account) internal { - pausers.remove(account); - emit PauserRemoved(account); - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/access/roles/SignerRole.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/access/roles/SignerRole.sol deleted file mode 100644 index 6a2bc602d..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/access/roles/SignerRole.sol +++ /dev/null @@ -1,43 +0,0 @@ -pragma solidity ^0.4.24; - -import "../Roles.sol"; - -contract SignerRole { - using Roles for Roles.Role; - - event SignerAdded(address indexed account); - event SignerRemoved(address indexed account); - - Roles.Role private signers; - - constructor() internal { - _addSigner(msg.sender); - } - - modifier onlySigner() { - require(isSigner(msg.sender)); - _; - } - - function isSigner(address account) public view returns (bool) { - return signers.has(account); - } - - function addSigner(address account) public onlySigner { - _addSigner(account); - } - - function renounceSigner() public { - _removeSigner(msg.sender); - } - - function _addSigner(address account) internal { - signers.add(account); - emit SignerAdded(account); - } - - function _removeSigner(address account) internal { - signers.remove(account); - emit SignerRemoved(account); - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/crowdsale/Crowdsale.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/crowdsale/Crowdsale.sol deleted file mode 100644 index a0c227607..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/crowdsale/Crowdsale.sol +++ /dev/null @@ -1,241 +0,0 @@ -pragma solidity ^0.4.24; - -import "../token/ERC20/IERC20.sol"; -import "../math/SafeMath.sol"; -import "../token/ERC20/SafeERC20.sol"; -import "../utils/ReentrancyGuard.sol"; - -/** - * @title Crowdsale - * @dev Crowdsale is a base contract for managing a token crowdsale, - * allowing investors to purchase tokens with ether. This contract implements - * such functionality in its most fundamental form and can be extended to provide additional - * functionality and/or custom behavior. - * The external interface represents the basic interface for purchasing tokens, and conform - * the base architecture for crowdsales. They are *not* intended to be modified / overridden. - * The internal interface conforms the extensible and modifiable surface of crowdsales. Override - * the methods to add functionality. Consider using 'super' where appropriate to concatenate - * behavior. - */ -contract Crowdsale is ReentrancyGuard { - using SafeMath for uint256; - using SafeERC20 for IERC20; - - // The token being sold - IERC20 private _token; - - // Address where funds are collected - address private _wallet; - - // How many token units a buyer gets per wei. - // The rate is the conversion between wei and the smallest and indivisible token unit. - // So, if you are using a rate of 1 with a ERC20Detailed token with 3 decimals called TOK - // 1 wei will give you 1 unit, or 0.001 TOK. - uint256 private _rate; - - // Amount of wei raised - uint256 private _weiRaised; - - /** - * Event for token purchase logging - * @param purchaser who paid for the tokens - * @param beneficiary who got the tokens - * @param value weis paid for purchase - * @param amount amount of tokens purchased - */ - event TokensPurchased( - address indexed purchaser, - address indexed beneficiary, - uint256 value, - uint256 amount - ); - - /** - * @param rate Number of token units a buyer gets per wei - * @dev The rate is the conversion between wei and the smallest and indivisible - * token unit. So, if you are using a rate of 1 with a ERC20Detailed token - * with 3 decimals called TOK, 1 wei will give you 1 unit, or 0.001 TOK. - * @param wallet Address where collected funds will be forwarded to - * @param token Address of the token being sold - */ - constructor(uint256 rate, address wallet, IERC20 token) internal { - require(rate > 0); - require(wallet != address(0)); - require(token != address(0)); - - _rate = rate; - _wallet = wallet; - _token = token; - } - - // ----------------------------------------- - // Crowdsale external interface - // ----------------------------------------- - - /** - * @dev fallback function ***DO NOT OVERRIDE*** - * Note that other contracts will transfer fund with a base gas stipend - * of 2300, which is not enough to call buyTokens. Consider calling - * buyTokens directly when purchasing tokens from a contract. - */ - function () external payable { - buyTokens(msg.sender); - } - - /** - * @return the token being sold. - */ - function token() public view returns(IERC20) { - return _token; - } - - /** - * @return the address where funds are collected. - */ - function wallet() public view returns(address) { - return _wallet; - } - - /** - * @return the number of token units a buyer gets per wei. - */ - function rate() public view returns(uint256) { - return _rate; - } - - /** - * @return the amount of wei raised. - */ - function weiRaised() public view returns (uint256) { - return _weiRaised; - } - - /** - * @dev low level token purchase ***DO NOT OVERRIDE*** - * This function has a non-reentrancy guard, so it shouldn't be called by - * another `nonReentrant` function. - * @param beneficiary Recipient of the token purchase - */ - function buyTokens(address beneficiary) public nonReentrant payable { - - uint256 weiAmount = msg.value; - _preValidatePurchase(beneficiary, weiAmount); - - // calculate token amount to be created - uint256 tokens = _getTokenAmount(weiAmount); - - // update state - _weiRaised = _weiRaised.add(weiAmount); - - _processPurchase(beneficiary, tokens); - emit TokensPurchased( - msg.sender, - beneficiary, - weiAmount, - tokens - ); - - _updatePurchasingState(beneficiary, weiAmount); - - _forwardFunds(); - _postValidatePurchase(beneficiary, weiAmount); - } - - // ----------------------------------------- - // Internal interface (extensible) - // ----------------------------------------- - - /** - * @dev Validation of an incoming purchase. Use require statements to revert state when conditions are not met. Use `super` in contracts that inherit from Crowdsale to extend their validations. - * Example from CappedCrowdsale.sol's _preValidatePurchase method: - * super._preValidatePurchase(beneficiary, weiAmount); - * require(weiRaised().add(weiAmount) <= cap); - * @param beneficiary Address performing the token purchase - * @param weiAmount Value in wei involved in the purchase - */ - function _preValidatePurchase( - address beneficiary, - uint256 weiAmount - ) - internal - view - { - require(beneficiary != address(0)); - require(weiAmount != 0); - } - - /** - * @dev Validation of an executed purchase. Observe state and use revert statements to undo rollback when valid conditions are not met. - * @param beneficiary Address performing the token purchase - * @param weiAmount Value in wei involved in the purchase - */ - function _postValidatePurchase( - address beneficiary, - uint256 weiAmount - ) - internal - view - { - // optional override - } - - /** - * @dev Source of tokens. Override this method to modify the way in which the crowdsale ultimately gets and sends its tokens. - * @param beneficiary Address performing the token purchase - * @param tokenAmount Number of tokens to be emitted - */ - function _deliverTokens( - address beneficiary, - uint256 tokenAmount - ) - internal - { - _token.safeTransfer(beneficiary, tokenAmount); - } - - /** - * @dev Executed when a purchase has been validated and is ready to be executed. Doesn't necessarily emit/send tokens. - * @param beneficiary Address receiving the tokens - * @param tokenAmount Number of tokens to be purchased - */ - function _processPurchase( - address beneficiary, - uint256 tokenAmount - ) - internal - { - _deliverTokens(beneficiary, tokenAmount); - } - - /** - * @dev Override for extensions that require an internal state to check for validity (current user contributions, etc.) - * @param beneficiary Address receiving the tokens - * @param weiAmount Value in wei involved in the purchase - */ - function _updatePurchasingState( - address beneficiary, - uint256 weiAmount - ) - internal - { - // optional override - } - - /** - * @dev Override to extend the way in which ether is converted to tokens. - * @param weiAmount Value in wei to be converted into tokens - * @return Number of tokens that can be purchased with the specified _weiAmount - */ - function _getTokenAmount(uint256 weiAmount) - internal view returns (uint256) - { - return weiAmount.mul(_rate); - } - - /** - * @dev Determines how ETH is stored/forwarded on purchases. - */ - function _forwardFunds() internal { - _wallet.transfer(msg.value); - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/crowdsale/distribution/FinalizableCrowdsale.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/crowdsale/distribution/FinalizableCrowdsale.sol deleted file mode 100644 index 8add165da..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/crowdsale/distribution/FinalizableCrowdsale.sol +++ /dev/null @@ -1,50 +0,0 @@ -pragma solidity ^0.4.24; - -import "../../math/SafeMath.sol"; -import "../validation/TimedCrowdsale.sol"; - -/** - * @title FinalizableCrowdsale - * @dev Extension of Crowdsale with a one-off finalization action, where one - * can do extra work after finishing. - */ -contract FinalizableCrowdsale is TimedCrowdsale { - using SafeMath for uint256; - - bool private _finalized; - - event CrowdsaleFinalized(); - - constructor() internal { - _finalized = false; - } - - /** - * @return true if the crowdsale is finalized, false otherwise. - */ - function finalized() public view returns (bool) { - return _finalized; - } - - /** - * @dev Must be called after crowdsale ends, to do some extra finalization - * work. Calls the contract's finalization function. - */ - function finalize() public { - require(!_finalized); - require(hasClosed()); - - _finalized = true; - - _finalization(); - emit CrowdsaleFinalized(); - } - - /** - * @dev Can be overridden to add finalization logic. The overriding function - * should call super._finalization() to ensure the chain of finalization is - * executed entirely. - */ - function _finalization() internal { - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/crowdsale/distribution/PostDeliveryCrowdsale.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/crowdsale/distribution/PostDeliveryCrowdsale.sol deleted file mode 100644 index b8c9ede77..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/crowdsale/distribution/PostDeliveryCrowdsale.sol +++ /dev/null @@ -1,50 +0,0 @@ -pragma solidity ^0.4.24; - -import "../validation/TimedCrowdsale.sol"; -import "../../math/SafeMath.sol"; - -/** - * @title PostDeliveryCrowdsale - * @dev Crowdsale that locks tokens from withdrawal until it ends. - */ -contract PostDeliveryCrowdsale is TimedCrowdsale { - using SafeMath for uint256; - - mapping(address => uint256) private _balances; - - constructor() internal {} - - /** - * @dev Withdraw tokens only after crowdsale ends. - * @param beneficiary Whose tokens will be withdrawn. - */ - function withdrawTokens(address beneficiary) public { - require(hasClosed()); - uint256 amount = _balances[beneficiary]; - require(amount > 0); - _balances[beneficiary] = 0; - _deliverTokens(beneficiary, amount); - } - - /** - * @return the balance of an account. - */ - function balanceOf(address account) public view returns(uint256) { - return _balances[account]; - } - - /** - * @dev Overrides parent by storing balances instead of issuing tokens right away. - * @param beneficiary Token purchaser - * @param tokenAmount Amount of tokens purchased - */ - function _processPurchase( - address beneficiary, - uint256 tokenAmount - ) - internal - { - _balances[beneficiary] = _balances[beneficiary].add(tokenAmount); - } - -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/crowdsale/distribution/RefundableCrowdsale.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/crowdsale/distribution/RefundableCrowdsale.sol deleted file mode 100644 index 9b814cd7d..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/crowdsale/distribution/RefundableCrowdsale.sol +++ /dev/null @@ -1,91 +0,0 @@ -pragma solidity ^0.4.24; - -import "../../math/SafeMath.sol"; -import "./FinalizableCrowdsale.sol"; -import "../../payment/escrow/RefundEscrow.sol"; - -/** - * @title RefundableCrowdsale - * @dev Extension of Crowdsale contract that adds a funding goal, and - * the possibility of users getting a refund if goal is not met. - * WARNING: note that if you allow tokens to be traded before the goal - * is met, then an attack is possible in which the attacker purchases - * tokens from the crowdsale and when they sees that the goal is - * unlikely to be met, they sell their tokens (possibly at a discount). - * The attacker will be refunded when the crowdsale is finalized, and - * the users that purchased from them will be left with worthless - * tokens. There are many possible ways to avoid this, like making the - * the crowdsale inherit from PostDeliveryCrowdsale, or imposing - * restrictions on token trading until the crowdsale is finalized. - * This is being discussed in - * https://github.com/OpenZeppelin/openzeppelin-solidity/issues/877 - * This contract will be updated when we agree on a general solution - * for this problem. - */ -contract RefundableCrowdsale is FinalizableCrowdsale { - using SafeMath for uint256; - - // minimum amount of funds to be raised in weis - uint256 private _goal; - - // refund escrow used to hold funds while crowdsale is running - RefundEscrow private _escrow; - - /** - * @dev Constructor, creates RefundEscrow. - * @param goal Funding goal - */ - constructor(uint256 goal) internal { - require(goal > 0); - _escrow = new RefundEscrow(wallet()); - _goal = goal; - } - - /** - * @return minimum amount of funds to be raised in wei. - */ - function goal() public view returns(uint256) { - return _goal; - } - - /** - * @dev Investors can claim refunds here if crowdsale is unsuccessful - * @param beneficiary Whose refund will be claimed. - */ - function claimRefund(address beneficiary) public { - require(finalized()); - require(!goalReached()); - - _escrow.withdraw(beneficiary); - } - - /** - * @dev Checks whether funding goal was reached. - * @return Whether funding goal was reached - */ - function goalReached() public view returns (bool) { - return weiRaised() >= _goal; - } - - /** - * @dev escrow finalization task, called when finalize() is called - */ - function _finalization() internal { - if (goalReached()) { - _escrow.close(); - _escrow.beneficiaryWithdraw(); - } else { - _escrow.enableRefunds(); - } - - super._finalization(); - } - - /** - * @dev Overrides Crowdsale fund forwarding, sending funds to escrow. - */ - function _forwardFunds() internal { - _escrow.deposit.value(msg.value)(msg.sender); - } - -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/crowdsale/emission/AllowanceCrowdsale.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/crowdsale/emission/AllowanceCrowdsale.sol deleted file mode 100644 index 346275c7d..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/crowdsale/emission/AllowanceCrowdsale.sol +++ /dev/null @@ -1,59 +0,0 @@ -pragma solidity ^0.4.24; - -import "../Crowdsale.sol"; -import "../../token/ERC20/IERC20.sol"; -import "../../token/ERC20/SafeERC20.sol"; -import "../../math/SafeMath.sol"; -import "../../math/Math.sol"; - -/** - * @title AllowanceCrowdsale - * @dev Extension of Crowdsale where tokens are held by a wallet, which approves an allowance to the crowdsale. - */ -contract AllowanceCrowdsale is Crowdsale { - using SafeMath for uint256; - using SafeERC20 for IERC20; - - address private _tokenWallet; - - /** - * @dev Constructor, takes token wallet address. - * @param tokenWallet Address holding the tokens, which has approved allowance to the crowdsale - */ - constructor(address tokenWallet) internal { - require(tokenWallet != address(0)); - _tokenWallet = tokenWallet; - } - - /** - * @return the address of the wallet that will hold the tokens. - */ - function tokenWallet() public view returns(address) { - return _tokenWallet; - } - - /** - * @dev Checks the amount of tokens left in the allowance. - * @return Amount of tokens left in the allowance - */ - function remainingTokens() public view returns (uint256) { - return Math.min( - token().balanceOf(_tokenWallet), - token().allowance(_tokenWallet, this) - ); - } - - /** - * @dev Overrides parent behavior by transferring tokens from wallet. - * @param beneficiary Token purchaser - * @param tokenAmount Amount of tokens purchased - */ - function _deliverTokens( - address beneficiary, - uint256 tokenAmount - ) - internal - { - token().safeTransferFrom(_tokenWallet, beneficiary, tokenAmount); - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/crowdsale/emission/MintedCrowdsale.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/crowdsale/emission/MintedCrowdsale.sol deleted file mode 100644 index 3ebea857d..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/crowdsale/emission/MintedCrowdsale.sol +++ /dev/null @@ -1,29 +0,0 @@ -pragma solidity ^0.4.24; - -import "../Crowdsale.sol"; -import "../../token/ERC20/ERC20Mintable.sol"; - -/** - * @title MintedCrowdsale - * @dev Extension of Crowdsale contract whose tokens are minted in each purchase. - * Token ownership should be transferred to MintedCrowdsale for minting. - */ -contract MintedCrowdsale is Crowdsale { - constructor() internal {} - - /** - * @dev Overrides delivery by minting tokens upon purchase. - * @param beneficiary Token purchaser - * @param tokenAmount Number of tokens to be minted - */ - function _deliverTokens( - address beneficiary, - uint256 tokenAmount - ) - internal - { - // Potentially dangerous assumption about the type of the token. - require( - ERC20Mintable(address(token())).mint(beneficiary, tokenAmount)); - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/crowdsale/price/IncreasingPriceCrowdsale.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/crowdsale/price/IncreasingPriceCrowdsale.sol deleted file mode 100644 index c86353c0f..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/crowdsale/price/IncreasingPriceCrowdsale.sol +++ /dev/null @@ -1,81 +0,0 @@ -pragma solidity ^0.4.24; - -import "../validation/TimedCrowdsale.sol"; -import "../../math/SafeMath.sol"; - -/** - * @title IncreasingPriceCrowdsale - * @dev Extension of Crowdsale contract that increases the price of tokens linearly in time. - * Note that what should be provided to the constructor is the initial and final _rates_, that is, - * the amount of tokens per wei contributed. Thus, the initial rate must be greater than the final rate. - */ -contract IncreasingPriceCrowdsale is TimedCrowdsale { - using SafeMath for uint256; - - uint256 private _initialRate; - uint256 private _finalRate; - - /** - * @dev Constructor, takes initial and final rates of tokens received per wei contributed. - * @param initialRate Number of tokens a buyer gets per wei at the start of the crowdsale - * @param finalRate Number of tokens a buyer gets per wei at the end of the crowdsale - */ - constructor(uint256 initialRate, uint256 finalRate) internal { - require(finalRate > 0); - require(initialRate > finalRate); - _initialRate = initialRate; - _finalRate = finalRate; - } - - /** - * The base rate function is overridden to revert, since this crowdsale doens't use it, and - * all calls to it are a mistake. - */ - function rate() public view returns(uint256) { - revert(); - } - - /** - * @return the initial rate of the crowdsale. - */ - function initialRate() public view returns(uint256) { - return _initialRate; - } - - /** - * @return the final rate of the crowdsale. - */ - function finalRate() public view returns (uint256) { - return _finalRate; - } - - /** - * @dev Returns the rate of tokens per wei at the present time. - * Note that, as price _increases_ with time, the rate _decreases_. - * @return The number of tokens a buyer gets per wei at a given time - */ - function getCurrentRate() public view returns (uint256) { - if (!isOpen()) { - return 0; - } - - // solium-disable-next-line security/no-block-members - uint256 elapsedTime = block.timestamp.sub(openingTime()); - uint256 timeRange = closingTime().sub(openingTime()); - uint256 rateRange = _initialRate.sub(_finalRate); - return _initialRate.sub(elapsedTime.mul(rateRange).div(timeRange)); - } - - /** - * @dev Overrides parent method taking into account variable rate. - * @param weiAmount The value in wei to be converted into tokens - * @return The number of tokens _weiAmount wei will buy at present time - */ - function _getTokenAmount(uint256 weiAmount) - internal view returns (uint256) - { - uint256 currentRate = getCurrentRate(); - return currentRate.mul(weiAmount); - } - -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/crowdsale/validation/CappedCrowdsale.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/crowdsale/validation/CappedCrowdsale.sol deleted file mode 100644 index 4d9eb604d..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/crowdsale/validation/CappedCrowdsale.sol +++ /dev/null @@ -1,55 +0,0 @@ -pragma solidity ^0.4.24; - -import "../../math/SafeMath.sol"; -import "../Crowdsale.sol"; - -/** - * @title CappedCrowdsale - * @dev Crowdsale with a limit for total contributions. - */ -contract CappedCrowdsale is Crowdsale { - using SafeMath for uint256; - - uint256 private _cap; - - /** - * @dev Constructor, takes maximum amount of wei accepted in the crowdsale. - * @param cap Max amount of wei to be contributed - */ - constructor(uint256 cap) internal { - require(cap > 0); - _cap = cap; - } - - /** - * @return the cap of the crowdsale. - */ - function cap() public view returns(uint256) { - return _cap; - } - - /** - * @dev Checks whether the cap has been reached. - * @return Whether the cap was reached - */ - function capReached() public view returns (bool) { - return weiRaised() >= _cap; - } - - /** - * @dev Extend parent behavior requiring purchase to respect the funding cap. - * @param beneficiary Token purchaser - * @param weiAmount Amount of wei contributed - */ - function _preValidatePurchase( - address beneficiary, - uint256 weiAmount - ) - internal - view - { - super._preValidatePurchase(beneficiary, weiAmount); - require(weiRaised().add(weiAmount) <= _cap); - } - -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/crowdsale/validation/IndividuallyCappedCrowdsale.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/crowdsale/validation/IndividuallyCappedCrowdsale.sol deleted file mode 100644 index 5a5d4e317..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/crowdsale/validation/IndividuallyCappedCrowdsale.sol +++ /dev/null @@ -1,81 +0,0 @@ -pragma solidity ^0.4.24; - -import "../../math/SafeMath.sol"; -import "../Crowdsale.sol"; -import "../../access/roles/CapperRole.sol"; - -/** - * @title IndividuallyCappedCrowdsale - * @dev Crowdsale with per-beneficiary caps. - */ -contract IndividuallyCappedCrowdsale is Crowdsale, CapperRole { - using SafeMath for uint256; - - mapping(address => uint256) private _contributions; - mapping(address => uint256) private _caps; - - constructor() internal {} - - /** - * @dev Sets a specific beneficiary's maximum contribution. - * @param beneficiary Address to be capped - * @param cap Wei limit for individual contribution - */ - function setCap(address beneficiary, uint256 cap) external onlyCapper { - _caps[beneficiary] = cap; - } - - /** - * @dev Returns the cap of a specific beneficiary. - * @param beneficiary Address whose cap is to be checked - * @return Current cap for individual beneficiary - */ - function getCap(address beneficiary) public view returns (uint256) { - return _caps[beneficiary]; - } - - /** - * @dev Returns the amount contributed so far by a specific beneficiary. - * @param beneficiary Address of contributor - * @return Beneficiary contribution so far - */ - function getContribution(address beneficiary) - public view returns (uint256) - { - return _contributions[beneficiary]; - } - - /** - * @dev Extend parent behavior requiring purchase to respect the beneficiary's funding cap. - * @param beneficiary Token purchaser - * @param weiAmount Amount of wei contributed - */ - function _preValidatePurchase( - address beneficiary, - uint256 weiAmount - ) - internal - view - { - super._preValidatePurchase(beneficiary, weiAmount); - require( - _contributions[beneficiary].add(weiAmount) <= _caps[beneficiary]); - } - - /** - * @dev Extend parent behavior to update beneficiary contributions - * @param beneficiary Token purchaser - * @param weiAmount Amount of wei contributed - */ - function _updatePurchasingState( - address beneficiary, - uint256 weiAmount - ) - internal - { - super._updatePurchasingState(beneficiary, weiAmount); - _contributions[beneficiary] = _contributions[beneficiary].add( - weiAmount); - } - -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/crowdsale/validation/TimedCrowdsale.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/crowdsale/validation/TimedCrowdsale.sol deleted file mode 100644 index 73d6a5c0f..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/crowdsale/validation/TimedCrowdsale.sol +++ /dev/null @@ -1,85 +0,0 @@ -pragma solidity ^0.4.24; - -import "../../math/SafeMath.sol"; -import "../Crowdsale.sol"; - -/** - * @title TimedCrowdsale - * @dev Crowdsale accepting contributions only within a time frame. - */ -contract TimedCrowdsale is Crowdsale { - using SafeMath for uint256; - - uint256 private _openingTime; - uint256 private _closingTime; - - /** - * @dev Reverts if not in crowdsale time range. - */ - modifier onlyWhileOpen { - require(isOpen()); - _; - } - - /** - * @dev Constructor, takes crowdsale opening and closing times. - * @param openingTime Crowdsale opening time - * @param closingTime Crowdsale closing time - */ - constructor(uint256 openingTime, uint256 closingTime) internal { - // solium-disable-next-line security/no-block-members - require(openingTime >= block.timestamp); - require(closingTime > openingTime); - - _openingTime = openingTime; - _closingTime = closingTime; - } - - /** - * @return the crowdsale opening time. - */ - function openingTime() public view returns(uint256) { - return _openingTime; - } - - /** - * @return the crowdsale closing time. - */ - function closingTime() public view returns(uint256) { - return _closingTime; - } - - /** - * @return true if the crowdsale is open, false otherwise. - */ - function isOpen() public view returns (bool) { - // solium-disable-next-line security/no-block-members - return block.timestamp >= _openingTime && block.timestamp <= _closingTime; - } - - /** - * @dev Checks whether the period in which the crowdsale is open has already elapsed. - * @return Whether crowdsale period has elapsed - */ - function hasClosed() public view returns (bool) { - // solium-disable-next-line security/no-block-members - return block.timestamp > _closingTime; - } - - /** - * @dev Extend parent behavior requiring to be within contributing period - * @param beneficiary Token purchaser - * @param weiAmount Amount of wei contributed - */ - function _preValidatePurchase( - address beneficiary, - uint256 weiAmount - ) - internal - onlyWhileOpen - view - { - super._preValidatePurchase(beneficiary, weiAmount); - } - -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/cryptography/ECDSA.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/cryptography/ECDSA.sol deleted file mode 100644 index 71c0e41ed..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/cryptography/ECDSA.sol +++ /dev/null @@ -1,71 +0,0 @@ -pragma solidity ^0.4.24; - -/** - * @title Elliptic curve signature operations - * @dev Based on https://gist.github.com/axic/5b33912c6f61ae6fd96d6c4a47afde6d - * TODO Remove this library once solidity supports passing a signature to ecrecover. - * See https://github.com/ethereum/solidity/issues/864 - */ - -library ECDSA { - - /** - * @dev Recover signer address from a message by using their signature - * @param hash bytes32 message, the hash is the signed message. What is recovered is the signer address. - * @param signature bytes signature, the signature is generated using web3.eth.sign() - */ - function recover(bytes32 hash, bytes signature) - internal - pure - returns (address) - { - bytes32 r; - bytes32 s; - uint8 v; - - // Check the signature length - if (signature.length != 65) { - return (address(0)); - } - - // Divide the signature in r, s and v variables - // ecrecover takes the signature parameters, and the only way to get them - // currently is to use assembly. - // solium-disable-next-line security/no-inline-assembly - assembly { - r := mload(add(signature, 0x20)) - s := mload(add(signature, 0x40)) - v := byte(0, mload(add(signature, 0x60))) - } - - // Version of signature should be 27 or 28, but 0 and 1 are also possible versions - if (v < 27) { - v += 27; - } - - // If the version is correct return the signer address - if (v != 27 && v != 28) { - return (address(0)); - } else { - // solium-disable-next-line arg-overflow - return ecrecover(hash, v, r, s); - } - } - - /** - * toEthSignedMessageHash - * @dev prefix a bytes32 value with "\x19Ethereum Signed Message:" - * and hash the result - */ - function toEthSignedMessageHash(bytes32 hash) - internal - pure - returns (bytes32) - { - // 32 is the length in bytes of hash, - // enforced by the type signature above - return keccak256( - abi.encodePacked("\x19Ethereum Signed Message:\n32", hash) - ); - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/cryptography/MerkleProof.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/cryptography/MerkleProof.sol deleted file mode 100644 index a0c304c57..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/cryptography/MerkleProof.sol +++ /dev/null @@ -1,42 +0,0 @@ -pragma solidity ^0.4.24; - -/** - * @title MerkleProof - * @dev Merkle proof verification based on - * https://github.com/ameensol/merkle-tree-solidity/blob/master/src/MerkleProof.sol - */ -library MerkleProof { - /** - * @dev Verifies a Merkle proof proving the existence of a leaf in a Merkle tree. Assumes that each pair of leaves - * and each pair of pre-images are sorted. - * @param proof Merkle proof containing sibling hashes on the branch from the leaf to the root of the Merkle tree - * @param root Merkle root - * @param leaf Leaf of Merkle tree - */ - function verify( - bytes32[] proof, - bytes32 root, - bytes32 leaf - ) - internal - pure - returns (bool) - { - bytes32 computedHash = leaf; - - for (uint256 i = 0; i < proof.length; i++) { - bytes32 proofElement = proof[i]; - - if (computedHash < proofElement) { - // Hash(current computed hash + current element of the proof) - computedHash = keccak256(abi.encodePacked(computedHash, proofElement)); - } else { - // Hash(current element of the proof + current computed hash) - computedHash = keccak256(abi.encodePacked(proofElement, computedHash)); - } - } - - // Check if the computed hash (root) is equal to the provided root - return computedHash == root; - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/drafts/.gitkeep b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/drafts/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/drafts/Counter.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/drafts/Counter.sol deleted file mode 100644 index 3557bd744..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/drafts/Counter.sol +++ /dev/null @@ -1,28 +0,0 @@ -pragma solidity ^0.4.24; - -/** - * @title Counter - * @author Matt Condon (@shrugs) - * @dev Provides an incrementing uint256 id acquired by the `Counter#next` getter. - * Use this for issuing ERC721 ids or keeping track of request ids, anything you want, really. - * - * Include with `using Counter for Counter.Counter;` - * @notice Does not allow an Id of 0, which is popularly used to signify a null state in solidity. - * Does not protect from overflows, but if you have 2^256 ids, you have other problems. - * (But actually, it's generally impossible to increment a counter this many times, energy wise - * so it's not something you have to worry about.) - */ -library Counter { - - struct Counter { - uint256 current; // default: 0 - } - - function next(Counter storage index) - internal - returns (uint256) - { - index.current += 1; - return index.current; - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/drafts/ERC1046/TokenMetadata.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/drafts/ERC1046/TokenMetadata.sol deleted file mode 100644 index 9057711d9..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/drafts/ERC1046/TokenMetadata.sol +++ /dev/null @@ -1,27 +0,0 @@ -pragma solidity ^0.4.24; - -import "../../token/ERC20/IERC20.sol"; - -/** - * @title ERC-1047 Token Metadata - * @dev See https://eips.ethereum.org/EIPS/eip-1046 - * @dev tokenURI must respond with a URI that implements https://eips.ethereum.org/EIPS/eip-1047 - * @dev TODO - update https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/token/ERC721/IERC721.sol#L17 when 1046 is finalized - */ -contract ERC20TokenMetadata is IERC20 { - function tokenURI() external view returns (string); -} - -contract ERC20WithMetadata is ERC20TokenMetadata { - string private _tokenURI; - - constructor(string tokenURI) - public - { - _tokenURI = tokenURI; - } - - function tokenURI() external view returns (string) { - return _tokenURI; - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/drafts/ERC20Migrator.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/drafts/ERC20Migrator.sol deleted file mode 100644 index 44ed16423..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/drafts/ERC20Migrator.sol +++ /dev/null @@ -1,100 +0,0 @@ -pragma solidity ^0.4.24; - -import "../token/ERC20/IERC20.sol"; -import "../token/ERC20/ERC20Mintable.sol"; -import "../token/ERC20/SafeERC20.sol"; -import "../math/Math.sol"; - -/** - * @title ERC20Migrator - * @dev This contract can be used to migrate an ERC20 token from one - * contract to another, where each token holder has to opt-in to the migration. - * To opt-in, users must approve for this contract the number of tokens they - * want to migrate. Once the allowance is set up, anyone can trigger the - * migration to the new token contract. In this way, token holders "turn in" - * their old balance and will be minted an equal amount in the new token. - * The new token contract must be mintable. For the precise interface refer to - * OpenZeppelin's ERC20Mintable, but the only functions that are needed are - * `isMinter(address)` and `mint(address, amount)`. The migrator will check - * that it is a minter for the token. - * The balance from the legacy token will be transfered to the migrator, as it - * is migrated, and remain there forever. - * Although this contract can be used in many different scenarios, the main - * motivation was to provide a way to migrate ERC20 tokens into an upgradeable - * version of it using ZeppelinOS. To read more about how this can be done - * using this implementation, please follow the official documentation site of - * ZeppelinOS: https://docs.zeppelinos.org/docs/erc20_onboarding.html - * Example of usage: - * ``` - * const migrator = await ERC20Migrator.new(legacyToken.address); - * await newToken.addMinter(migrator.address); - * await migrator.beginMigration(newToken.address); - * ``` - */ -contract ERC20Migrator { - using SafeERC20 for IERC20; - - /// Address of the old token contract - IERC20 private _legacyToken; - - /// Address of the new token contract - ERC20Mintable private _newToken; - - /** - * @param legacyToken address of the old token contract - */ - constructor(IERC20 legacyToken) public { - require(legacyToken != address(0)); - _legacyToken = legacyToken; - } - - /** - * @dev Returns the legacy token that is being migrated. - */ - function legacyToken() public view returns (IERC20) { - return _legacyToken; - } - - /** - * @dev Returns the new token to which we are migrating. - */ - function newToken() public view returns (IERC20) { - return _newToken; - } - - /** - * @dev Begins the migration by setting which is the new token that will be - * minted. This contract must be a minter for the new token. - * @param newToken the token that will be minted - */ - function beginMigration(ERC20Mintable newToken) public { - require(_newToken == address(0)); - require(newToken != address(0)); - require(newToken.isMinter(this)); - - _newToken = newToken; - } - - /** - * @dev Transfers part of an account's balance in the old token to this - * contract, and mints the same amount of new tokens for that account. - * @param account whose tokens will be migrated - * @param amount amount of tokens to be migrated - */ - function migrate(address account, uint256 amount) public { - _legacyToken.safeTransferFrom(account, this, amount); - _newToken.mint(account, amount); - } - - /** - * @dev Transfers all of an account's allowed balance in the old token to - * this contract, and mints the same amount of new tokens for that account. - * @param account whose tokens will be migrated - */ - function migrateAll(address account) public { - uint256 balance = _legacyToken.balanceOf(account); - uint256 allowance = _legacyToken.allowance(account, this); - uint256 amount = Math.min(balance, allowance); - migrate(account, amount); - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/drafts/SignatureBouncer.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/drafts/SignatureBouncer.sol deleted file mode 100644 index 2cd600b35..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/drafts/SignatureBouncer.sol +++ /dev/null @@ -1,146 +0,0 @@ -pragma solidity ^0.4.24; - -import "../access/roles/SignerRole.sol"; -import "../cryptography/ECDSA.sol"; - -/** - * @title SignatureBouncer - * @author PhABC, Shrugs and aflesher - * @dev SignatureBouncer allows users to submit a signature as a permission to - * do an action. - * If the signature is from one of the authorized signer addresses, the - * signature is valid. - * Note that SignatureBouncer offers no protection against replay attacks, users - * must add this themselves! - * - * Signer addresses can be individual servers signing grants or different - * users within a decentralized club that have permission to invite other - * members. This technique is useful for whitelists and airdrops; instead of - * putting all valid addresses on-chain, simply sign a grant of the form - * keccak256(abi.encodePacked(`:contractAddress` + `:granteeAddress`)) using a - * valid signer address. - * Then restrict access to your crowdsale/whitelist/airdrop using the - * `onlyValidSignature` modifier (or implement your own using _isValidSignature). - * In addition to `onlyValidSignature`, `onlyValidSignatureAndMethod` and - * `onlyValidSignatureAndData` can be used to restrict access to only a given - * method or a given method with given parameters respectively. - * See the tests in SignatureBouncer.test.js for specific usage examples. - * - * @notice A method that uses the `onlyValidSignatureAndData` modifier must make - * the _signature parameter the "last" parameter. You cannot sign a message that - * has its own signature in it so the last 128 bytes of msg.data (which - * represents the length of the _signature data and the _signaature data itself) - * is ignored when validating. Also non fixed sized parameters make constructing - * the data in the signature much more complex. - * See https://ethereum.stackexchange.com/a/50616 for more details. - */ -contract SignatureBouncer is SignerRole { - using ECDSA for bytes32; - - // Function selectors are 4 bytes long, as documented in - // https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector - uint256 private constant _METHOD_ID_SIZE = 4; - // Signature size is 65 bytes (tightly packed v + r + s), but gets padded to 96 bytes - uint256 private constant _SIGNATURE_SIZE = 96; - - constructor() internal {} - - /** - * @dev requires that a valid signature of a signer was provided - */ - modifier onlyValidSignature(bytes signature) - { - require(_isValidSignature(msg.sender, signature)); - _; - } - - /** - * @dev requires that a valid signature with a specifed method of a signer was provided - */ - modifier onlyValidSignatureAndMethod(bytes signature) - { - require(_isValidSignatureAndMethod(msg.sender, signature)); - _; - } - - /** - * @dev requires that a valid signature with a specifed method and params of a signer was provided - */ - modifier onlyValidSignatureAndData(bytes signature) - { - require(_isValidSignatureAndData(msg.sender, signature)); - _; - } - - /** - * @dev is the signature of `this + sender` from a signer? - * @return bool - */ - function _isValidSignature(address account, bytes signature) - internal - view - returns (bool) - { - return _isValidDataHash( - keccak256(abi.encodePacked(address(this), account)), - signature - ); - } - - /** - * @dev is the signature of `this + sender + methodId` from a signer? - * @return bool - */ - function _isValidSignatureAndMethod(address account, bytes signature) - internal - view - returns (bool) - { - bytes memory data = new bytes(_METHOD_ID_SIZE); - for (uint i = 0; i < data.length; i++) { - data[i] = msg.data[i]; - } - return _isValidDataHash( - keccak256(abi.encodePacked(address(this), account, data)), - signature - ); - } - - /** - * @dev is the signature of `this + sender + methodId + params(s)` from a signer? - * @notice the signature parameter of the method being validated must be the "last" parameter - * @return bool - */ - function _isValidSignatureAndData(address account, bytes signature) - internal - view - returns (bool) - { - require(msg.data.length > _SIGNATURE_SIZE); - bytes memory data = new bytes(msg.data.length - _SIGNATURE_SIZE); - for (uint i = 0; i < data.length; i++) { - data[i] = msg.data[i]; - } - return _isValidDataHash( - keccak256(abi.encodePacked(address(this), account, data)), - signature - ); - } - - /** - * @dev internal function to convert a hash to an eth signed message - * and then recover the signature and check it against the signer role - * @return bool - */ - function _isValidDataHash(bytes32 hash, bytes signature) - internal - view - returns (bool) - { - address signer = hash - .toEthSignedMessageHash() - .recover(signature); - - return signer != address(0) && isSigner(signer); - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/drafts/TokenVesting.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/drafts/TokenVesting.sol deleted file mode 100644 index 2f5fd2fdc..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/drafts/TokenVesting.sol +++ /dev/null @@ -1,175 +0,0 @@ -/* solium-disable security/no-block-members */ - -pragma solidity ^0.4.24; - -import "../token/ERC20/SafeERC20.sol"; -import "../ownership/Ownable.sol"; -import "../math/SafeMath.sol"; - -/** - * @title TokenVesting - * @dev A token holder contract that can release its token balance gradually like a - * typical vesting scheme, with a cliff and vesting period. Optionally revocable by the - * owner. - */ -contract TokenVesting is Ownable { - using SafeMath for uint256; - using SafeERC20 for IERC20; - - event TokensReleased(address token, uint256 amount); - event TokenVestingRevoked(address token); - - // beneficiary of tokens after they are released - address private _beneficiary; - - uint256 private _cliff; - uint256 private _start; - uint256 private _duration; - - bool private _revocable; - - mapping (address => uint256) private _released; - mapping (address => bool) private _revoked; - - /** - * @dev Creates a vesting contract that vests its balance of any ERC20 token to the - * beneficiary, gradually in a linear fashion until start + duration. By then all - * of the balance will have vested. - * @param beneficiary address of the beneficiary to whom vested tokens are transferred - * @param cliffDuration duration in seconds of the cliff in which tokens will begin to vest - * @param start the time (as Unix time) at which point vesting starts - * @param duration duration in seconds of the period in which the tokens will vest - * @param revocable whether the vesting is revocable or not - */ - constructor( - address beneficiary, - uint256 start, - uint256 cliffDuration, - uint256 duration, - bool revocable - ) - public - { - require(beneficiary != address(0)); - require(cliffDuration <= duration); - require(duration > 0); - require(start.add(duration) > block.timestamp); - - _beneficiary = beneficiary; - _revocable = revocable; - _duration = duration; - _cliff = start.add(cliffDuration); - _start = start; - } - - /** - * @return the beneficiary of the tokens. - */ - function beneficiary() public view returns(address) { - return _beneficiary; - } - - /** - * @return the cliff time of the token vesting. - */ - function cliff() public view returns(uint256) { - return _cliff; - } - - /** - * @return the start time of the token vesting. - */ - function start() public view returns(uint256) { - return _start; - } - - /** - * @return the duration of the token vesting. - */ - function duration() public view returns(uint256) { - return _duration; - } - - /** - * @return true if the vesting is revocable. - */ - function revocable() public view returns(bool) { - return _revocable; - } - - /** - * @return the amount of the token released. - */ - function released(address token) public view returns(uint256) { - return _released[token]; - } - - /** - * @return true if the token is revoked. - */ - function revoked(address token) public view returns(bool) { - return _revoked[token]; - } - - /** - * @notice Transfers vested tokens to beneficiary. - * @param token ERC20 token which is being vested - */ - function release(IERC20 token) public { - uint256 unreleased = _releasableAmount(token); - - require(unreleased > 0); - - _released[token] = _released[token].add(unreleased); - - token.safeTransfer(_beneficiary, unreleased); - - emit TokensReleased(token, unreleased); - } - - /** - * @notice Allows the owner to revoke the vesting. Tokens already vested - * remain in the contract, the rest are returned to the owner. - * @param token ERC20 token which is being vested - */ - function revoke(IERC20 token) public onlyOwner { - require(_revocable); - require(!_revoked[token]); - - uint256 balance = token.balanceOf(address(this)); - - uint256 unreleased = _releasableAmount(token); - uint256 refund = balance.sub(unreleased); - - _revoked[token] = true; - - token.safeTransfer(owner(), refund); - - emit TokenVestingRevoked(token); - } - - /** - * @dev Calculates the amount that has already vested but hasn't been released yet. - * @param token ERC20 token which is being vested - */ - function _releasableAmount(IERC20 token) private view returns (uint256) { - return _vestedAmount(token).sub(_released[token]); - } - - /** - * @dev Calculates the amount that has already vested. - * @param token ERC20 token which is being vested - */ - function _vestedAmount(IERC20 token) private view returns (uint256) { - uint256 currentBalance = token.balanceOf(this); - uint256 totalBalance = currentBalance.add(_released[token]); - - if (block.timestamp < _cliff) { - return 0; - } else if (block.timestamp >= _start.add(_duration) || _revoked[token]) { - return totalBalance; - } else { - return totalBalance.mul(block.timestamp.sub(_start)).div(_duration); - } - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/examples/SampleCrowdsale.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/examples/SampleCrowdsale.sol deleted file mode 100644 index d22598092..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/examples/SampleCrowdsale.sol +++ /dev/null @@ -1,57 +0,0 @@ -pragma solidity ^0.4.24; - -import "../crowdsale/validation/CappedCrowdsale.sol"; -import "../crowdsale/distribution/RefundableCrowdsale.sol"; -import "../crowdsale/emission/MintedCrowdsale.sol"; -import "../token/ERC20/ERC20Mintable.sol"; -import "../token/ERC20/ERC20Detailed.sol"; - -/** - * @title SampleCrowdsaleToken - * @dev Very simple ERC20 Token that can be minted. - * It is meant to be used in a crowdsale contract. - */ -contract SampleCrowdsaleToken is ERC20Mintable, ERC20Detailed { - constructor() public ERC20Detailed("Sample Crowdsale Token", "SCT", 18) {} -} - -/** - * @title SampleCrowdsale - * @dev This is an example of a fully fledged crowdsale. - * The way to add new features to a base crowdsale is by multiple inheritance. - * In this example we are providing following extensions: - * CappedCrowdsale - sets a max boundary for raised funds - * RefundableCrowdsale - set a min goal to be reached and returns funds if it's not met - * MintedCrowdsale - assumes the token can be minted by the crowdsale, which does so - * when receiving purchases. - * - * After adding multiple features it's good practice to run integration tests - * to ensure that subcontracts works together as intended. - */ -// XXX There doesn't seem to be a way to split this line that keeps solium -// happy. See: -// https://github.com/duaraghav8/Solium/issues/205 -// --elopio - 2018-05-10 -// solium-disable-next-line max-len -contract SampleCrowdsale is CappedCrowdsale, RefundableCrowdsale, MintedCrowdsale { - - constructor( - uint256 openingTime, - uint256 closingTime, - uint256 rate, - address wallet, - uint256 cap, - ERC20Mintable token, - uint256 goal - ) - public - Crowdsale(rate, wallet, token) - CappedCrowdsale(cap) - TimedCrowdsale(openingTime, closingTime) - RefundableCrowdsale(goal) - { - //As goal needs to be met for a successful crowdsale - //the value needs to less or equal than a cap which is limit for accepted funds - require(goal <= cap); - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/examples/SimpleToken.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/examples/SimpleToken.sol deleted file mode 100644 index 8c63fdd98..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/examples/SimpleToken.sol +++ /dev/null @@ -1,26 +0,0 @@ -pragma solidity ^0.4.24; - -import "../token/ERC20/ERC20.sol"; - -/** - * @title SimpleToken - * @dev Very simple ERC20 Token example, where all tokens are pre-assigned to the creator. - * Note they can later distribute these tokens as they wish using `transfer` and other - * `ERC20` functions. - */ -contract SimpleToken is ERC20 { - - string public constant name = "SimpleToken"; - string public constant symbol = "SIM"; - uint8 public constant decimals = 18; - - uint256 public constant INITIAL_SUPPLY = 10000 * (10 ** uint256(decimals)); - - /** - * @dev Constructor that gives msg.sender all of existing tokens. - */ - constructor() public { - _mint(msg.sender, INITIAL_SUPPLY); - } - -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/introspection/ERC165.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/introspection/ERC165.sol deleted file mode 100644 index 5d083acdf..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/introspection/ERC165.sol +++ /dev/null @@ -1,53 +0,0 @@ -pragma solidity ^0.4.24; - -import "./IERC165.sol"; - -/** - * @title ERC165 - * @author Matt Condon (@shrugs) - * @dev Implements ERC165 using a lookup table. - */ -contract ERC165 is IERC165 { - - bytes4 private constant _InterfaceId_ERC165 = 0x01ffc9a7; - /** - * 0x01ffc9a7 === - * bytes4(keccak256('supportsInterface(bytes4)')) - */ - - /** - * @dev a mapping of interface id to whether or not it's supported - */ - mapping(bytes4 => bool) private _supportedInterfaces; - - /** - * @dev A contract implementing SupportsInterfaceWithLookup - * implement ERC165 itself - */ - constructor() - internal - { - _registerInterface(_InterfaceId_ERC165); - } - - /** - * @dev implement supportsInterface(bytes4) using a lookup table - */ - function supportsInterface(bytes4 interfaceId) - external - view - returns (bool) - { - return _supportedInterfaces[interfaceId]; - } - - /** - * @dev internal method for registering an interface - */ - function _registerInterface(bytes4 interfaceId) - internal - { - require(interfaceId != 0xffffffff); - _supportedInterfaces[interfaceId] = true; - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/introspection/ERC165Checker.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/introspection/ERC165Checker.sol deleted file mode 100644 index 2490b191e..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/introspection/ERC165Checker.sol +++ /dev/null @@ -1,146 +0,0 @@ -pragma solidity ^0.4.24; - -/** - * @title ERC165Checker - * @dev Use `using ERC165Checker for address`; to include this library - * https://github.com/ethereum/EIPs/blob/master/EIPS/eip-165.md - */ -library ERC165Checker { - // As per the EIP-165 spec, no interface should ever match 0xffffffff - bytes4 private constant _InterfaceId_Invalid = 0xffffffff; - - bytes4 private constant _InterfaceId_ERC165 = 0x01ffc9a7; - /** - * 0x01ffc9a7 === - * bytes4(keccak256('supportsInterface(bytes4)')) - */ - - /** - * @notice Query if a contract supports ERC165 - * @param account The address of the contract to query for support of ERC165 - * @return true if the contract at account implements ERC165 - */ - function _supportsERC165(address account) - internal - view - returns (bool) - { - // Any contract that implements ERC165 must explicitly indicate support of - // InterfaceId_ERC165 and explicitly indicate non-support of InterfaceId_Invalid - return _supportsERC165Interface(account, _InterfaceId_ERC165) && - !_supportsERC165Interface(account, _InterfaceId_Invalid); - } - - /** - * @notice Query if a contract implements an interface, also checks support of ERC165 - * @param account The address of the contract to query for support of an interface - * @param interfaceId The interface identifier, as specified in ERC-165 - * @return true if the contract at account indicates support of the interface with - * identifier interfaceId, false otherwise - * @dev Interface identification is specified in ERC-165. - */ - function _supportsInterface(address account, bytes4 interfaceId) - internal - view - returns (bool) - { - // query support of both ERC165 as per the spec and support of _interfaceId - return _supportsERC165(account) && - _supportsERC165Interface(account, interfaceId); - } - - /** - * @notice Query if a contract implements interfaces, also checks support of ERC165 - * @param account The address of the contract to query for support of an interface - * @param interfaceIds A list of interface identifiers, as specified in ERC-165 - * @return true if the contract at account indicates support all interfaces in the - * interfaceIds list, false otherwise - * @dev Interface identification is specified in ERC-165. - */ - function _supportsAllInterfaces(address account, bytes4[] interfaceIds) - internal - view - returns (bool) - { - // query support of ERC165 itself - if (!_supportsERC165(account)) { - return false; - } - - // query support of each interface in _interfaceIds - for (uint256 i = 0; i < interfaceIds.length; i++) { - if (!_supportsERC165Interface(account, interfaceIds[i])) { - return false; - } - } - - // all interfaces supported - return true; - } - - /** - * @notice Query if a contract implements an interface, does not check ERC165 support - * @param account The address of the contract to query for support of an interface - * @param interfaceId The interface identifier, as specified in ERC-165 - * @return true if the contract at account indicates support of the interface with - * identifier interfaceId, false otherwise - * @dev Assumes that account contains a contract that supports ERC165, otherwise - * the behavior of this method is undefined. This precondition can be checked - * with the `supportsERC165` method in this library. - * Interface identification is specified in ERC-165. - */ - function _supportsERC165Interface(address account, bytes4 interfaceId) - private - view - returns (bool) - { - // success determines whether the staticcall succeeded and result determines - // whether the contract at account indicates support of _interfaceId - (bool success, bool result) = _callERC165SupportsInterface( - account, interfaceId); - - return (success && result); - } - - /** - * @notice Calls the function with selector 0x01ffc9a7 (ERC165) and suppresses throw - * @param account The address of the contract to query for support of an interface - * @param interfaceId The interface identifier, as specified in ERC-165 - * @return success true if the STATICCALL succeeded, false otherwise - * @return result true if the STATICCALL succeeded and the contract at account - * indicates support of the interface with identifier interfaceId, false otherwise - */ - function _callERC165SupportsInterface( - address account, - bytes4 interfaceId - ) - private - view - returns (bool success, bool result) - { - bytes memory encodedParams = abi.encodeWithSelector( - _InterfaceId_ERC165, - interfaceId - ); - - // solium-disable-next-line security/no-inline-assembly - assembly { - let encodedParams_data := add(0x20, encodedParams) - let encodedParams_size := mload(encodedParams) - - let output := mload(0x40) // Find empty storage location using "free memory pointer" - mstore(output, 0x0) - - success := staticcall( - 30000, // 30k gas - account, // To addr - encodedParams_data, - encodedParams_size, - output, - 0x20 // Outputs are 32 bytes long - ) - - result := mload(output) // Load the result - } - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/introspection/IERC165.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/introspection/IERC165.sol deleted file mode 100644 index 4e4b7bbf6..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/introspection/IERC165.sol +++ /dev/null @@ -1,19 +0,0 @@ -pragma solidity ^0.4.24; - -/** - * @title IERC165 - * @dev https://github.com/ethereum/EIPs/blob/master/EIPS/eip-165.md - */ -interface IERC165 { - - /** - * @notice Query if a contract implements an interface - * @param interfaceId The interface identifier, as specified in ERC-165 - * @dev Interface identification is specified in ERC-165. This function - * uses less than 30,000 gas. - */ - function supportsInterface(bytes4 interfaceId) - external - view - returns (bool); -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/lifecycle/Pausable.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/lifecycle/Pausable.sol deleted file mode 100644 index 3703fed4b..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/lifecycle/Pausable.sol +++ /dev/null @@ -1,57 +0,0 @@ -pragma solidity ^0.4.24; - -import "../access/roles/PauserRole.sol"; - -/** - * @title Pausable - * @dev Base contract which allows children to implement an emergency stop mechanism. - */ -contract Pausable is PauserRole { - event Paused(address account); - event Unpaused(address account); - - bool private _paused; - - constructor() internal { - _paused = false; - } - - /** - * @return true if the contract is paused, false otherwise. - */ - function paused() public view returns(bool) { - return _paused; - } - - /** - * @dev Modifier to make a function callable only when the contract is not paused. - */ - modifier whenNotPaused() { - require(!_paused); - _; - } - - /** - * @dev Modifier to make a function callable only when the contract is paused. - */ - modifier whenPaused() { - require(_paused); - _; - } - - /** - * @dev called by the owner to pause, triggers stopped state - */ - function pause() public onlyPauser whenNotPaused { - _paused = true; - emit Paused(msg.sender); - } - - /** - * @dev called by the owner to unpause, returns to normal state - */ - function unpause() public onlyPauser whenPaused { - _paused = false; - emit Unpaused(msg.sender); - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/math/Math.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/math/Math.sol deleted file mode 100644 index ffff83961..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/math/Math.sol +++ /dev/null @@ -1,31 +0,0 @@ -pragma solidity ^0.4.24; - -/** - * @title Math - * @dev Assorted math operations - */ -library Math { - /** - * @dev Returns the largest of two numbers. - */ - function max(uint256 a, uint256 b) internal pure returns (uint256) { - return a >= b ? a : b; - } - - /** - * @dev Returns the smallest of two numbers. - */ - function min(uint256 a, uint256 b) internal pure returns (uint256) { - return a < b ? a : b; - } - - /** - * @dev Calculates the average of two numbers. Since these are integers, - * averages of an even and odd number cannot be represented, and will be - * rounded down. - */ - function average(uint256 a, uint256 b) internal pure returns (uint256) { - // (a + b) / 2 can overflow, so we distribute - return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2); - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/math/SafeMath.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/math/SafeMath.sol deleted file mode 100644 index 97494e1f1..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/math/SafeMath.sol +++ /dev/null @@ -1,65 +0,0 @@ -pragma solidity ^0.4.24; - -/** - * @title SafeMath - * @dev Math operations with safety checks that revert on error - */ -library SafeMath { - - /** - * @dev Multiplies two numbers, reverts on overflow. - */ - function mul(uint256 a, uint256 b) internal pure returns (uint256) { - // Gas optimization: this is cheaper than requiring 'a' not being zero, but the - // benefit is lost if 'b' is also tested. - // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 - if (a == 0) { - return 0; - } - - uint256 c = a * b; - require(c / a == b); - - return c; - } - - /** - * @dev Integer division of two numbers truncating the quotient, reverts on division by zero. - */ - function div(uint256 a, uint256 b) internal pure returns (uint256) { - require(b > 0); // Solidity only automatically asserts when dividing by 0 - uint256 c = a / b; - // assert(a == b * c + a % b); // There is no case in which this doesn't hold - - return c; - } - - /** - * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend). - */ - function sub(uint256 a, uint256 b) internal pure returns (uint256) { - require(b <= a); - uint256 c = a - b; - - return c; - } - - /** - * @dev Adds two numbers, reverts on overflow. - */ - function add(uint256 a, uint256 b) internal pure returns (uint256) { - uint256 c = a + b; - require(c >= a); - - return c; - } - - /** - * @dev Divides two numbers and returns the remainder (unsigned integer modulo), - * reverts when dividing by zero. - */ - function mod(uint256 a, uint256 b) internal pure returns (uint256) { - require(b != 0); - return a % b; - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/AddressImpl.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/AddressImpl.sol deleted file mode 100644 index e29396056..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/AddressImpl.sol +++ /dev/null @@ -1,14 +0,0 @@ -pragma solidity ^0.4.24; - -import "../utils/Address.sol"; - -contract AddressImpl { - function isContract(address account) - external - view - returns (bool) - { - return Address.isContract(account); - } - -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/AllowanceCrowdsaleImpl.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/AllowanceCrowdsaleImpl.sol deleted file mode 100644 index 5b2104e38..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/AllowanceCrowdsaleImpl.sol +++ /dev/null @@ -1,20 +0,0 @@ -pragma solidity ^0.4.24; - -import "../token/ERC20/IERC20.sol"; -import "../crowdsale/emission/AllowanceCrowdsale.sol"; - -contract AllowanceCrowdsaleImpl is AllowanceCrowdsale { - - constructor ( - uint256 rate, - address wallet, - IERC20 token, - address tokenWallet - ) - public - Crowdsale(rate, wallet, token) - AllowanceCrowdsale(tokenWallet) - { - } - -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ArraysImpl.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ArraysImpl.sol deleted file mode 100644 index 8a2b9ec51..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ArraysImpl.sol +++ /dev/null @@ -1,18 +0,0 @@ -pragma solidity ^0.4.24; - -import "../utils/Arrays.sol"; - -contract ArraysImpl { - - using Arrays for uint256[]; - - uint256[] private array; - - constructor(uint256[] _array) public { - array = _array; - } - - function findUpperBound(uint256 _element) external view returns (uint256) { - return array.findUpperBound(_element); - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/CappedCrowdsaleImpl.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/CappedCrowdsaleImpl.sol deleted file mode 100644 index 176033b7f..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/CappedCrowdsaleImpl.sol +++ /dev/null @@ -1,20 +0,0 @@ -pragma solidity ^0.4.24; - -import "../token/ERC20/IERC20.sol"; -import "../crowdsale/validation/CappedCrowdsale.sol"; - -contract CappedCrowdsaleImpl is CappedCrowdsale { - - constructor ( - uint256 rate, - address wallet, - IERC20 token, - uint256 cap - ) - public - Crowdsale(rate, wallet, token) - CappedCrowdsale(cap) - { - } - -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/CapperRoleMock.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/CapperRoleMock.sol deleted file mode 100644 index 118058f39..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/CapperRoleMock.sol +++ /dev/null @@ -1,17 +0,0 @@ -pragma solidity ^0.4.24; - -import "../access/roles/CapperRole.sol"; - -contract CapperRoleMock is CapperRole { - function removeCapper(address account) public { - _removeCapper(account); - } - - function onlyCapperMock() public view onlyCapper { - } - - // Causes a compilation error if super._removeCapper is not internal - function _removeCapper(address account) internal { - super._removeCapper(account); - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ConditionalEscrowMock.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ConditionalEscrowMock.sol deleted file mode 100644 index 3e30c21a2..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ConditionalEscrowMock.sol +++ /dev/null @@ -1,16 +0,0 @@ -pragma solidity ^0.4.24; - -import "../payment/escrow/ConditionalEscrow.sol"; - -// mock class using ConditionalEscrow -contract ConditionalEscrowMock is ConditionalEscrow { - mapping(address => bool) private _allowed; - - function setAllowed(address payee, bool allowed) public { - _allowed[payee] = allowed; - } - - function withdrawalAllowed(address payee) public view returns (bool) { - return _allowed[payee]; - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/CounterImpl.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/CounterImpl.sol deleted file mode 100644 index 3c958ba97..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/CounterImpl.sol +++ /dev/null @@ -1,20 +0,0 @@ -pragma solidity ^0.4.24; - -import "../drafts/Counter.sol"; - -contract CounterImpl { - using Counter for Counter.Counter; - - uint256 public theId; - - // use whatever key you want to track your counters - mapping(string => Counter.Counter) private _counters; - - function doThing(string key) - public - returns (uint256) - { - theId = _counters[key].next(); - return theId; - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/CrowdsaleMock.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/CrowdsaleMock.sol deleted file mode 100644 index 834105e6a..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/CrowdsaleMock.sol +++ /dev/null @@ -1,9 +0,0 @@ -pragma solidity ^0.4.24; - -import "../crowdsale/Crowdsale.sol"; - -contract CrowdsaleMock is Crowdsale { - constructor(uint256 rate, address wallet, IERC20 token) public - Crowdsale(rate, wallet, token) { - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/DetailedERC20Mock.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/DetailedERC20Mock.sol deleted file mode 100644 index eea706326..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/DetailedERC20Mock.sol +++ /dev/null @@ -1,15 +0,0 @@ -pragma solidity ^0.4.24; - -import "../token/ERC20/ERC20.sol"; -import "../token/ERC20/ERC20Detailed.sol"; - -contract ERC20DetailedMock is ERC20, ERC20Detailed { - constructor( - string name, - string symbol, - uint8 decimals - ) - ERC20Detailed(name, symbol, decimals) - public - {} -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ECDSAMock.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ECDSAMock.sol deleted file mode 100644 index 9f489069f..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ECDSAMock.sol +++ /dev/null @@ -1,23 +0,0 @@ -pragma solidity ^0.4.24; - -import "../cryptography/ECDSA.sol"; - -contract ECDSAMock { - using ECDSA for bytes32; - - function recover(bytes32 hash, bytes signature) - public - pure - returns (address) - { - return hash.recover(signature); - } - - function toEthSignedMessageHash(bytes32 hash) - public - pure - returns (bytes32) - { - return hash.toEthSignedMessageHash(); - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ERC165/ERC165InterfacesSupported.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ERC165/ERC165InterfacesSupported.sol deleted file mode 100644 index e41901a32..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ERC165/ERC165InterfacesSupported.sol +++ /dev/null @@ -1,66 +0,0 @@ -pragma solidity ^0.4.24; - -import "../../introspection/IERC165.sol"; - -/** - * https://github.com/ethereum/EIPs/blob/master/EIPS/eip-214.md#specification - * > Any attempts to make state-changing operations inside an execution instance with STATIC set to true will instead throw an exception. - * > These operations include [...], LOG0, LOG1, LOG2, [...] - * - * therefore, because this contract is staticcall'd we need to not emit events (which is how solidity-coverage works) - * solidity-coverage ignores the /mocks folder, so we duplicate its implementation here to avoid instrumenting it - */ -contract SupportsInterfaceWithLookupMock is IERC165 { - - bytes4 public constant InterfaceId_ERC165 = 0x01ffc9a7; - /** - * 0x01ffc9a7 === - * bytes4(keccak256('supportsInterface(bytes4)')) - */ - - /** - * @dev a mapping of interface id to whether or not it's supported - */ - mapping(bytes4 => bool) private _supportedInterfaces; - - /** - * @dev A contract implementing SupportsInterfaceWithLookup - * implement ERC165 itself - */ - constructor() - public - { - _registerInterface(InterfaceId_ERC165); - } - - /** - * @dev implement supportsInterface(bytes4) using a lookup table - */ - function supportsInterface(bytes4 interfaceId) - external - view - returns (bool) - { - return _supportedInterfaces[interfaceId]; - } - - /** - * @dev private method for registering an interface - */ - function _registerInterface(bytes4 interfaceId) - internal - { - require(interfaceId != 0xffffffff); - _supportedInterfaces[interfaceId] = true; - } -} - -contract ERC165InterfacesSupported is SupportsInterfaceWithLookupMock { - constructor (bytes4[] interfaceIds) - public - { - for (uint256 i = 0; i < interfaceIds.length; i++) { - _registerInterface(interfaceIds[i]); - } - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ERC165/ERC165NotSupported.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ERC165/ERC165NotSupported.sol deleted file mode 100644 index 156ef8e8b..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ERC165/ERC165NotSupported.sol +++ /dev/null @@ -1,5 +0,0 @@ -pragma solidity ^0.4.24; - -contract ERC165NotSupported { - -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ERC165CheckerMock.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ERC165CheckerMock.sol deleted file mode 100644 index 559cea0d7..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ERC165CheckerMock.sol +++ /dev/null @@ -1,31 +0,0 @@ -pragma solidity ^0.4.24; - -import "../introspection/ERC165Checker.sol"; - -contract ERC165CheckerMock { - using ERC165Checker for address; - - function supportsERC165(address account) - public - view - returns (bool) - { - return account._supportsERC165(); - } - - function supportsInterface(address account, bytes4 interfaceId) - public - view - returns (bool) - { - return account._supportsInterface(interfaceId); - } - - function supportsAllInterfaces(address account, bytes4[] interfaceIds) - public - view - returns (bool) - { - return account._supportsAllInterfaces(interfaceIds); - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ERC165Mock.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ERC165Mock.sol deleted file mode 100644 index c42ba62f2..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ERC165Mock.sol +++ /dev/null @@ -1,11 +0,0 @@ -pragma solidity ^0.4.24; - -import "../introspection/ERC165.sol"; - -contract ERC165Mock is ERC165 { - function registerInterface(bytes4 interfaceId) - public - { - _registerInterface(interfaceId); - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ERC20BurnableMock.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ERC20BurnableMock.sol deleted file mode 100644 index 2c8b3b54a..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ERC20BurnableMock.sol +++ /dev/null @@ -1,11 +0,0 @@ -pragma solidity ^0.4.24; - -import "../token/ERC20/ERC20Burnable.sol"; - -contract ERC20BurnableMock is ERC20Burnable { - - constructor(address initialAccount, uint256 initialBalance) public { - _mint(initialAccount, initialBalance); - } - -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ERC20MintableMock.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ERC20MintableMock.sol deleted file mode 100644 index 31384c790..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ERC20MintableMock.sol +++ /dev/null @@ -1,7 +0,0 @@ -pragma solidity ^0.4.24; - -import "../token/ERC20/ERC20Mintable.sol"; -import "./MinterRoleMock.sol"; - -contract ERC20MintableMock is ERC20Mintable, MinterRoleMock { -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ERC20Mock.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ERC20Mock.sol deleted file mode 100644 index ab0877653..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ERC20Mock.sol +++ /dev/null @@ -1,24 +0,0 @@ -pragma solidity ^0.4.24; - -import "../token/ERC20/ERC20.sol"; - -// mock class using ERC20 -contract ERC20Mock is ERC20 { - - constructor(address initialAccount, uint256 initialBalance) public { - _mint(initialAccount, initialBalance); - } - - function mint(address account, uint256 amount) public { - _mint(account, amount); - } - - function burn(address account, uint256 amount) public { - _burn(account, amount); - } - - function burnFrom(address account, uint256 amount) public { - _burnFrom(account, amount); - } - -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ERC20PausableMock.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ERC20PausableMock.sol deleted file mode 100644 index c6c0fd5ed..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ERC20PausableMock.sol +++ /dev/null @@ -1,13 +0,0 @@ -pragma solidity ^0.4.24; - -import "../token/ERC20/ERC20Pausable.sol"; -import "./PauserRoleMock.sol"; - -// mock class using ERC20Pausable -contract ERC20PausableMock is ERC20Pausable, PauserRoleMock { - - constructor(address initialAccount, uint initialBalance) public { - _mint(initialAccount, initialBalance); - } - -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ERC20WithMetadataMock.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ERC20WithMetadataMock.sol deleted file mode 100644 index ec2d122a1..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ERC20WithMetadataMock.sol +++ /dev/null @@ -1,11 +0,0 @@ -pragma solidity ^0.4.24; - -import "../token/ERC20/ERC20.sol"; -import "../drafts/ERC1046/TokenMetadata.sol"; - -contract ERC20WithMetadataMock is ERC20, ERC20WithMetadata { - constructor(string tokenURI) public - ERC20WithMetadata(tokenURI) - { - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ERC721FullMock.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ERC721FullMock.sol deleted file mode 100644 index 2d85e7372..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ERC721FullMock.sol +++ /dev/null @@ -1,32 +0,0 @@ -pragma solidity ^0.4.24; - -import "../token/ERC721/ERC721Full.sol"; -import "../token/ERC721/ERC721Mintable.sol"; -import "../token/ERC721/ERC721MetadataMintable.sol"; -import "../token/ERC721/ERC721Burnable.sol"; - -/** - * @title ERC721FullMock - * This mock just provides a public mint and burn functions for testing purposes, - * and a public setter for metadata URI - */ -contract ERC721FullMock - is ERC721Full, ERC721Mintable, ERC721MetadataMintable, ERC721Burnable { - - constructor(string name, string symbol) public - ERC721Mintable() - ERC721Full(name, symbol) - {} - - function exists(uint256 tokenId) public view returns (bool) { - return _exists(tokenId); - } - - function setTokenURI(uint256 tokenId, string uri) public { - _setTokenURI(tokenId, uri); - } - - function removeTokenFrom(address from, uint256 tokenId) public { - _removeTokenFrom(from, tokenId); - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ERC721MintableBurnableImpl.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ERC721MintableBurnableImpl.sol deleted file mode 100644 index 51d3ff4f6..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ERC721MintableBurnableImpl.sol +++ /dev/null @@ -1,20 +0,0 @@ -pragma solidity ^0.4.24; - -import "../token/ERC721/ERC721Full.sol"; -import "../token/ERC721/ERC721Mintable.sol"; -import "../token/ERC721/ERC721MetadataMintable.sol"; -import "../token/ERC721/ERC721Burnable.sol"; - -/** - * @title ERC721MintableBurnableImpl - */ -contract ERC721MintableBurnableImpl - is ERC721Full, ERC721Mintable, ERC721MetadataMintable, ERC721Burnable { - - constructor() - ERC721Mintable() - ERC721Full("Test", "TEST") - public - { - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ERC721Mock.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ERC721Mock.sol deleted file mode 100644 index 514d3bdbe..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ERC721Mock.sol +++ /dev/null @@ -1,17 +0,0 @@ -pragma solidity ^0.4.24; - -import "../token/ERC721/ERC721.sol"; - -/** - * @title ERC721Mock - * This mock just provides a public mint and burn functions for testing purposes - */ -contract ERC721Mock is ERC721 { - function mint(address to, uint256 tokenId) public { - _mint(to, tokenId); - } - - function burn(uint256 tokenId) public { - _burn(ownerOf(tokenId), tokenId); - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ERC721PausableMock.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ERC721PausableMock.sol deleted file mode 100644 index 9751d04cb..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ERC721PausableMock.sol +++ /dev/null @@ -1,22 +0,0 @@ -pragma solidity ^0.4.24; - -import "../token/ERC721/ERC721Pausable.sol"; -import "./PauserRoleMock.sol"; - -/** - * @title ERC721PausableMock - * This mock just provides a public mint, burn and exists functions for testing purposes - */ -contract ERC721PausableMock is ERC721Pausable, PauserRoleMock { - function mint(address to, uint256 tokenId) public { - super._mint(to, tokenId); - } - - function burn(uint256 tokenId) public { - super._burn(ownerOf(tokenId), tokenId); - } - - function exists(uint256 tokenId) public view returns (bool) { - return super._exists(tokenId); - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ERC721ReceiverMock.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ERC721ReceiverMock.sol deleted file mode 100644 index 57fb04e3a..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ERC721ReceiverMock.sol +++ /dev/null @@ -1,41 +0,0 @@ -pragma solidity ^0.4.24; - -import "../token/ERC721/IERC721Receiver.sol"; - -contract ERC721ReceiverMock is IERC721Receiver { - bytes4 private _retval; - bool private _reverts; - - event Received( - address operator, - address from, - uint256 tokenId, - bytes data, - uint256 gas - ); - - constructor(bytes4 retval, bool reverts) public { - _retval = retval; - _reverts = reverts; - } - - function onERC721Received( - address operator, - address from, - uint256 tokenId, - bytes data - ) - public - returns(bytes4) - { - require(!_reverts); - emit Received( - operator, - from, - tokenId, - data, - gasleft() // msg.gas was deprecated in solidityv0.4.21 - ); - return _retval; - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/EventEmitter.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/EventEmitter.sol deleted file mode 100644 index 71582d9f5..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/EventEmitter.sol +++ /dev/null @@ -1,62 +0,0 @@ -pragma solidity ^0.4.24; - -contract EventEmitter { - event Argumentless(); - event ShortUint(uint8 value); - event ShortInt(int8 value); - event LongUint(uint256 value); - event LongInt(int256 value); - event Address(address value); - event Boolean(bool value); - event String(string value); - event LongUintBooleanString( - uint256 uintValue, - bool booleanValue, - string stringValue - ); - - function emitArgumentless() public { - emit Argumentless(); - } - - function emitShortUint(uint8 value) public { - emit ShortUint(value); - } - - function emitShortInt(int8 value) public { - emit ShortInt(value); - } - - function emitLongUint(uint256 value) public { - emit LongUint(value); - } - - function emitLongInt(int256 value) public { - emit LongInt(value); - } - - function emitAddress(address value) public { - emit Address(value); - } - - function emitBoolean(bool value) public { - emit Boolean(value); - } - - function emitString(string value) public { - emit String(value); - } - - function emitLongUintBooleanString( - uint256 uintValue, - bool booleanValue, - string stringValue) - public { - emit LongUintBooleanString(uintValue, booleanValue, stringValue); - } - - function emitLongUintAndBoolean(uint256 uintValue, bool boolValue) public { - emit LongUint(uintValue); - emit Boolean(boolValue); - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/FinalizableCrowdsaleImpl.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/FinalizableCrowdsaleImpl.sol deleted file mode 100644 index 084780b1d..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/FinalizableCrowdsaleImpl.sol +++ /dev/null @@ -1,21 +0,0 @@ -pragma solidity ^0.4.24; - -import "../token/ERC20/IERC20.sol"; -import "../crowdsale/distribution/FinalizableCrowdsale.sol"; - -contract FinalizableCrowdsaleImpl is FinalizableCrowdsale { - - constructor ( - uint256 openingTime, - uint256 closingTime, - uint256 rate, - address wallet, - IERC20 token - ) - public - Crowdsale(rate, wallet, token) - TimedCrowdsale(openingTime, closingTime) - { - } - -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/IncreasingPriceCrowdsaleImpl.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/IncreasingPriceCrowdsaleImpl.sol deleted file mode 100644 index 6f1f2e2a0..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/IncreasingPriceCrowdsaleImpl.sol +++ /dev/null @@ -1,23 +0,0 @@ -pragma solidity ^0.4.24; - -import "../crowdsale/price/IncreasingPriceCrowdsale.sol"; -import "../math/SafeMath.sol"; - -contract IncreasingPriceCrowdsaleImpl is IncreasingPriceCrowdsale { - - constructor ( - uint256 openingTime, - uint256 closingTime, - address wallet, - IERC20 token, - uint256 initialRate, - uint256 finalRate - ) - public - Crowdsale(initialRate, wallet, token) - TimedCrowdsale(openingTime, closingTime) - IncreasingPriceCrowdsale(initialRate, finalRate) - { - } - -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/IndividuallyCappedCrowdsaleImpl.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/IndividuallyCappedCrowdsaleImpl.sol deleted file mode 100644 index 1bcb95301..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/IndividuallyCappedCrowdsaleImpl.sol +++ /dev/null @@ -1,19 +0,0 @@ -pragma solidity ^0.4.24; - -import "../token/ERC20/IERC20.sol"; -import "../crowdsale/validation/IndividuallyCappedCrowdsale.sol"; -import "./CapperRoleMock.sol"; - -contract IndividuallyCappedCrowdsaleImpl - is IndividuallyCappedCrowdsale, CapperRoleMock { - - constructor( - uint256 rate, - address wallet, - IERC20 token - ) - public - Crowdsale(rate, wallet, token) - { - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/MathMock.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/MathMock.sol deleted file mode 100644 index 72f7fc204..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/MathMock.sol +++ /dev/null @@ -1,17 +0,0 @@ -pragma solidity ^0.4.24; - -import "../math/Math.sol"; - -contract MathMock { - function max(uint256 a, uint256 b) public pure returns (uint256) { - return Math.max(a, b); - } - - function min(uint256 a, uint256 b) public pure returns (uint256) { - return Math.min(a, b); - } - - function average(uint256 a, uint256 b) public pure returns (uint256) { - return Math.average(a, b); - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/MerkleProofWrapper.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/MerkleProofWrapper.sol deleted file mode 100644 index b359dc790..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/MerkleProofWrapper.sol +++ /dev/null @@ -1,18 +0,0 @@ -pragma solidity ^0.4.24; - -import { MerkleProof } from "../cryptography/MerkleProof.sol"; - -contract MerkleProofWrapper { - - function verify( - bytes32[] proof, - bytes32 root, - bytes32 leaf - ) - public - pure - returns (bool) - { - return MerkleProof.verify(proof, root, leaf); - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/MintedCrowdsaleImpl.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/MintedCrowdsaleImpl.sol deleted file mode 100644 index 518371b75..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/MintedCrowdsaleImpl.sol +++ /dev/null @@ -1,18 +0,0 @@ -pragma solidity ^0.4.24; - -import "../token/ERC20/ERC20Mintable.sol"; -import "../crowdsale/emission/MintedCrowdsale.sol"; - -contract MintedCrowdsaleImpl is MintedCrowdsale { - - constructor ( - uint256 rate, - address wallet, - ERC20Mintable token - ) - public - Crowdsale(rate, wallet, token) - { - } - -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/MinterRoleMock.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/MinterRoleMock.sol deleted file mode 100644 index 45e5a4195..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/MinterRoleMock.sol +++ /dev/null @@ -1,17 +0,0 @@ -pragma solidity ^0.4.24; - -import "../access/roles/MinterRole.sol"; - -contract MinterRoleMock is MinterRole { - function removeMinter(address account) public { - _removeMinter(account); - } - - function onlyMinterMock() public view onlyMinter { - } - - // Causes a compilation error if super._removeMinter is not internal - function _removeMinter(address account) internal { - super._removeMinter(account); - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/OwnableMock.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/OwnableMock.sol deleted file mode 100644 index e16a89012..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/OwnableMock.sol +++ /dev/null @@ -1,6 +0,0 @@ -pragma solidity ^0.4.24; - -import "../ownership/Ownable.sol"; - -contract OwnableMock is Ownable { -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/PausableMock.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/PausableMock.sol deleted file mode 100644 index 72ec843ed..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/PausableMock.sol +++ /dev/null @@ -1,24 +0,0 @@ -pragma solidity ^0.4.24; - -import "../lifecycle/Pausable.sol"; -import "./PauserRoleMock.sol"; - -// mock class using Pausable -contract PausableMock is Pausable, PauserRoleMock { - bool public drasticMeasureTaken; - uint256 public count; - - constructor() public { - drasticMeasureTaken = false; - count = 0; - } - - function normalProcess() external whenNotPaused { - count++; - } - - function drasticMeasure() external whenPaused { - drasticMeasureTaken = true; - } - -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/PauserRoleMock.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/PauserRoleMock.sol deleted file mode 100644 index 267101e4a..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/PauserRoleMock.sol +++ /dev/null @@ -1,17 +0,0 @@ -pragma solidity ^0.4.24; - -import "../access/roles/PauserRole.sol"; - -contract PauserRoleMock is PauserRole { - function removePauser(address account) public { - _removePauser(account); - } - - function onlyPauserMock() public view onlyPauser { - } - - // Causes a compilation error if super._removePauser is not internal - function _removePauser(address account) internal { - super._removePauser(account); - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/PostDeliveryCrowdsaleImpl.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/PostDeliveryCrowdsaleImpl.sol deleted file mode 100644 index 98d056c66..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/PostDeliveryCrowdsaleImpl.sol +++ /dev/null @@ -1,21 +0,0 @@ -pragma solidity ^0.4.24; - -import "../token/ERC20/IERC20.sol"; -import "../crowdsale/distribution/PostDeliveryCrowdsale.sol"; - -contract PostDeliveryCrowdsaleImpl is PostDeliveryCrowdsale { - - constructor ( - uint256 openingTime, - uint256 closingTime, - uint256 rate, - address wallet, - IERC20 token - ) - public - TimedCrowdsale(openingTime, closingTime) - Crowdsale(rate, wallet, token) - { - } - -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/PullPaymentMock.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/PullPaymentMock.sol deleted file mode 100644 index 63076c904..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/PullPaymentMock.sol +++ /dev/null @@ -1,15 +0,0 @@ -pragma solidity ^0.4.24; - -import "../payment/PullPayment.sol"; - -// mock class using PullPayment -contract PullPaymentMock is PullPayment { - - constructor() public payable { } - - // test helper function to call asyncTransfer - function callTransfer(address dest, uint256 amount) public { - _asyncTransfer(dest, amount); - } - -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ReentrancyAttack.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ReentrancyAttack.sol deleted file mode 100644 index 96231de27..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ReentrancyAttack.sol +++ /dev/null @@ -1,10 +0,0 @@ -pragma solidity ^0.4.24; - -contract ReentrancyAttack { - - function callSender(bytes4 data) public { - // solium-disable-next-line security/no-low-level-calls - require(msg.sender.call(abi.encodeWithSelector(data))); - } - -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ReentrancyMock.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ReentrancyMock.sol deleted file mode 100644 index 474ecd433..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/ReentrancyMock.sol +++ /dev/null @@ -1,44 +0,0 @@ -pragma solidity ^0.4.24; - -import "../utils/ReentrancyGuard.sol"; -import "./ReentrancyAttack.sol"; - -contract ReentrancyMock is ReentrancyGuard { - - uint256 public counter; - - constructor() public { - counter = 0; - } - - function callback() external nonReentrant { - count(); - } - - function countLocalRecursive(uint256 n) public nonReentrant { - if (n > 0) { - count(); - countLocalRecursive(n - 1); - } - } - - function countThisRecursive(uint256 n) public nonReentrant { - if (n > 0) { - count(); - // solium-disable-next-line security/no-low-level-calls - bool result = address(this).call(abi.encodeWithSignature("countThisRecursive(uint256)", n - 1)); - require(result == true); - } - } - - function countAndCall(ReentrancyAttack attacker) public nonReentrant { - count(); - bytes4 func = bytes4(keccak256("callback()")); - attacker.callSender(func); - } - - function count() private { - counter += 1; - } - -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/RefundableCrowdsaleImpl.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/RefundableCrowdsaleImpl.sol deleted file mode 100644 index a14dfbcb3..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/RefundableCrowdsaleImpl.sol +++ /dev/null @@ -1,23 +0,0 @@ -pragma solidity ^0.4.24; - -import "../token/ERC20/ERC20Mintable.sol"; -import "../crowdsale/distribution/RefundableCrowdsale.sol"; - -contract RefundableCrowdsaleImpl is RefundableCrowdsale { - - constructor ( - uint256 openingTime, - uint256 closingTime, - uint256 rate, - address wallet, - ERC20Mintable token, - uint256 goal - ) - public - Crowdsale(rate, wallet, token) - TimedCrowdsale(openingTime, closingTime) - RefundableCrowdsale(goal) - { - } - -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/RolesMock.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/RolesMock.sol deleted file mode 100644 index bfcee20ee..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/RolesMock.sol +++ /dev/null @@ -1,21 +0,0 @@ -pragma solidity ^0.4.24; - -import "../access/Roles.sol"; - -contract RolesMock { - using Roles for Roles.Role; - - Roles.Role private dummyRole; - - function add(address account) public { - dummyRole.add(account); - } - - function remove(address account) public { - dummyRole.remove(account); - } - - function has(address account) public view returns (bool) { - return dummyRole.has(account); - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/SafeERC20Helper.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/SafeERC20Helper.sol deleted file mode 100644 index 7e639f86f..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/SafeERC20Helper.sol +++ /dev/null @@ -1,112 +0,0 @@ -pragma solidity ^0.4.24; - -import "../token/ERC20/IERC20.sol"; -import "../token/ERC20/SafeERC20.sol"; - -contract ERC20FailingMock { - uint256 private _allowance; - - function transfer(address, uint256) public returns (bool) { - return false; - } - - function transferFrom(address, address, uint256) public returns (bool) { - return false; - } - - function approve(address, uint256) public returns (bool) { - return false; - } - - function allowance(address, address) public view returns (uint256) { - return 0; - } -} - -contract ERC20SucceedingMock { - uint256 private _allowance; - - function transfer(address, uint256) public returns (bool) { - return true; - } - - function transferFrom(address, address, uint256) public returns (bool) { - return true; - } - - function approve(address, uint256) public returns (bool) { - return true; - } - - function setAllowance(uint256 allowance_) public { - _allowance = allowance_; - } - - function allowance(address, address) public view returns (uint256) { - return _allowance; - } -} - -contract SafeERC20Helper { - using SafeERC20 for IERC20; - - IERC20 private _failing; - IERC20 private _succeeding; - - constructor() public { - _failing = IERC20(new ERC20FailingMock()); - _succeeding = IERC20(new ERC20SucceedingMock()); - } - - // Using _failing - - function doFailingTransfer() public { - _failing.safeTransfer(address(0), 0); - } - - function doFailingTransferFrom() public { - _failing.safeTransferFrom(address(0), address(0), 0); - } - - function doFailingApprove() public { - _failing.safeApprove(address(0), 0); - } - - function doFailingIncreaseAllowance() public { - _failing.safeIncreaseAllowance(address(0), 0); - } - - function doFailingDecreaseAllowance() public { - _failing.safeDecreaseAllowance(address(0), 0); - } - - // Using _succeeding - - function doSucceedingTransfer() public { - _succeeding.safeTransfer(address(0), 0); - } - - function doSucceedingTransferFrom() public { - _succeeding.safeTransferFrom(address(0), address(0), 0); - } - - function doSucceedingApprove(uint256 amount) public { - _succeeding.safeApprove(address(0), amount); - } - - function doSucceedingIncreaseAllowance(uint256 amount) public { - _succeeding.safeIncreaseAllowance(address(0), amount); - } - - function doSucceedingDecreaseAllowance(uint256 amount) public { - _succeeding.safeDecreaseAllowance(address(0), amount); - } - - function setAllowance(uint256 allowance_) public { - ERC20SucceedingMock(_succeeding).setAllowance(allowance_); - } - - function allowance() public view returns (uint256) { - return _succeeding.allowance(address(0), address(0)); - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/SafeMathMock.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/SafeMathMock.sol deleted file mode 100644 index 7ddf17e9f..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/SafeMathMock.sol +++ /dev/null @@ -1,26 +0,0 @@ -pragma solidity ^0.4.24; - -import "../math/SafeMath.sol"; - -contract SafeMathMock { - - function mul(uint256 a, uint256 b) public pure returns (uint256) { - return SafeMath.mul(a, b); - } - - function div(uint256 a, uint256 b) public pure returns (uint256) { - return SafeMath.div(a, b); - } - - function sub(uint256 a, uint256 b) public pure returns (uint256) { - return SafeMath.sub(a, b); - } - - function add(uint256 a, uint256 b) public pure returns (uint256) { - return SafeMath.add(a, b); - } - - function mod(uint256 a, uint256 b) public pure returns (uint256) { - return SafeMath.mod(a, b); - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/SecondaryMock.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/SecondaryMock.sol deleted file mode 100644 index 268c12516..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/SecondaryMock.sol +++ /dev/null @@ -1,8 +0,0 @@ -pragma solidity ^0.4.24; - -import "../ownership/Secondary.sol"; - -contract SecondaryMock is Secondary { - function onlyPrimaryMock() public view onlyPrimary { - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/SignatureBouncerMock.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/SignatureBouncerMock.sol deleted file mode 100644 index 85076eae6..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/SignatureBouncerMock.sol +++ /dev/null @@ -1,73 +0,0 @@ -pragma solidity ^0.4.24; - -import "../drafts/SignatureBouncer.sol"; -import "./SignerRoleMock.sol"; - -contract SignatureBouncerMock is SignatureBouncer, SignerRoleMock { - function checkValidSignature(address account, bytes signature) - public - view - returns (bool) - { - return _isValidSignature(account, signature); - } - - function onlyWithValidSignature(bytes signature) - public - onlyValidSignature(signature) - view - { - - } - - function checkValidSignatureAndMethod(address account, bytes signature) - public - view - returns (bool) - { - return _isValidSignatureAndMethod(account, signature); - } - - function onlyWithValidSignatureAndMethod(bytes signature) - public - onlyValidSignatureAndMethod(signature) - view - { - - } - - function checkValidSignatureAndData( - address account, - bytes, - uint, - bytes signature - ) - public - view - returns (bool) - { - return _isValidSignatureAndData(account, signature); - } - - function onlyWithValidSignatureAndData(uint, bytes signature) - public - onlyValidSignatureAndData(signature) - view - { - - } - - function theWrongMethod(bytes) - public - pure - { - - } - - function tooShortMsgData() - public - onlyValidSignatureAndData("") - view - { - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/SignerRoleMock.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/SignerRoleMock.sol deleted file mode 100644 index faf92db68..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/SignerRoleMock.sol +++ /dev/null @@ -1,17 +0,0 @@ -pragma solidity ^0.4.24; - -import "../access/roles/SignerRole.sol"; - -contract SignerRoleMock is SignerRole { - function removeSigner(address account) public { - _removeSigner(account); - } - - function onlySignerMock() public view onlySigner { - } - - // Causes a compilation error if super._removeSigner is not internal - function _removeSigner(address account) internal { - super._removeSigner(account); - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/TimedCrowdsaleImpl.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/TimedCrowdsaleImpl.sol deleted file mode 100644 index f16e5eb2a..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/mocks/TimedCrowdsaleImpl.sol +++ /dev/null @@ -1,21 +0,0 @@ -pragma solidity ^0.4.24; - -import "../token/ERC20/IERC20.sol"; -import "../crowdsale/validation/TimedCrowdsale.sol"; - -contract TimedCrowdsaleImpl is TimedCrowdsale { - - constructor ( - uint256 openingTime, - uint256 closingTime, - uint256 rate, - address wallet, - IERC20 token - ) - public - Crowdsale(rate, wallet, token) - TimedCrowdsale(openingTime, closingTime) - { - } - -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/ownership/Ownable.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/ownership/Ownable.sol deleted file mode 100644 index 7b5b72102..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/ownership/Ownable.sol +++ /dev/null @@ -1,75 +0,0 @@ -pragma solidity ^0.4.24; - -/** - * @title Ownable - * @dev The Ownable contract has an owner address, and provides basic authorization control - * functions, this simplifies the implementation of "user permissions". - */ -contract Ownable { - address private _owner; - - event OwnershipTransferred( - address indexed previousOwner, - address indexed newOwner - ); - - /** - * @dev The Ownable constructor sets the original `owner` of the contract to the sender - * account. - */ - constructor() internal { - _owner = msg.sender; - emit OwnershipTransferred(address(0), _owner); - } - - /** - * @return the address of the owner. - */ - function owner() public view returns(address) { - return _owner; - } - - /** - * @dev Throws if called by any account other than the owner. - */ - modifier onlyOwner() { - require(isOwner()); - _; - } - - /** - * @return true if `msg.sender` is the owner of the contract. - */ - function isOwner() public view returns(bool) { - return msg.sender == _owner; - } - - /** - * @dev Allows the current owner to relinquish control of the contract. - * @notice Renouncing to ownership will leave the contract without an owner. - * It will not be possible to call the functions with the `onlyOwner` - * modifier anymore. - */ - function renounceOwnership() public onlyOwner { - emit OwnershipTransferred(_owner, address(0)); - _owner = address(0); - } - - /** - * @dev Allows the current owner to transfer control of the contract to a newOwner. - * @param newOwner The address to transfer ownership to. - */ - function transferOwnership(address newOwner) public onlyOwner { - _transferOwnership(newOwner); - } - - /** - * @dev Transfers control of the contract to a newOwner. - * @param newOwner The address to transfer ownership to. - */ - function _transferOwnership(address newOwner) internal { - require(newOwner != address(0)); - emit OwnershipTransferred(_owner, newOwner); - _owner = newOwner; - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/ownership/Secondary.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/ownership/Secondary.sol deleted file mode 100644 index 67d2250d5..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/ownership/Secondary.sol +++ /dev/null @@ -1,46 +0,0 @@ -pragma solidity ^0.4.24; - -/** - * @title Secondary - * @dev A Secondary contract can only be used by its primary account (the one that created it) - */ -contract Secondary { - address private _primary; - - event PrimaryTransferred( - address recipient - ); - - /** - * @dev Sets the primary account to the one that is creating the Secondary contract. - */ - constructor() internal { - _primary = msg.sender; - emit PrimaryTransferred(_primary); - } - - /** - * @dev Reverts if called from any account other than the primary. - */ - modifier onlyPrimary() { - require(msg.sender == _primary); - _; - } - - /** - * @return the address of the primary. - */ - function primary() public view returns (address) { - return _primary; - } - - /** - * @dev Transfers contract to a new primary. - * @param recipient The address of new primary. - */ - function transferPrimary(address recipient) public onlyPrimary { - require(recipient != address(0)); - _primary = recipient; - emit PrimaryTransferred(_primary); - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/payment/PaymentSplitter.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/payment/PaymentSplitter.sol deleted file mode 100644 index 0a1b470ef..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/payment/PaymentSplitter.sol +++ /dev/null @@ -1,116 +0,0 @@ -pragma solidity ^0.4.24; - -import "../math/SafeMath.sol"; - -/** - * @title PaymentSplitter - * @dev This contract can be used when payments need to be received by a group - * of people and split proportionately to some number of shares they own. - */ -contract PaymentSplitter { - using SafeMath for uint256; - - event PayeeAdded(address account, uint256 shares); - event PaymentReleased(address to, uint256 amount); - event PaymentReceived(address from, uint256 amount); - - uint256 private _totalShares; - uint256 private _totalReleased; - - mapping(address => uint256) private _shares; - mapping(address => uint256) private _released; - address[] private _payees; - - /** - * @dev Constructor - */ - constructor(address[] payees, uint256[] shares) public payable { - require(payees.length == shares.length); - require(payees.length > 0); - - for (uint256 i = 0; i < payees.length; i++) { - _addPayee(payees[i], shares[i]); - } - } - - /** - * @dev payable fallback - */ - function () external payable { - emit PaymentReceived(msg.sender, msg.value); - } - - /** - * @return the total shares of the contract. - */ - function totalShares() public view returns(uint256) { - return _totalShares; - } - - /** - * @return the total amount already released. - */ - function totalReleased() public view returns(uint256) { - return _totalReleased; - } - - /** - * @return the shares of an account. - */ - function shares(address account) public view returns(uint256) { - return _shares[account]; - } - - /** - * @return the amount already released to an account. - */ - function released(address account) public view returns(uint256) { - return _released[account]; - } - - /** - * @return the address of a payee. - */ - function payee(uint256 index) public view returns(address) { - return _payees[index]; - } - - /** - * @dev Release one of the payee's proportional payment. - * @param account Whose payments will be released. - */ - function release(address account) public { - require(_shares[account] > 0); - - uint256 totalReceived = address(this).balance.add(_totalReleased); - uint256 payment = totalReceived.mul( - _shares[account]).div( - _totalShares).sub( - _released[account] - ); - - require(payment != 0); - - _released[account] = _released[account].add(payment); - _totalReleased = _totalReleased.add(payment); - - account.transfer(payment); - emit PaymentReleased(account, payment); - } - - /** - * @dev Add a new payee to the contract. - * @param account The address of the payee to add. - * @param shares_ The number of shares owned by the payee. - */ - function _addPayee(address account, uint256 shares_) private { - require(account != address(0)); - require(shares_ > 0); - require(_shares[account] == 0); - - _payees.push(account); - _shares[account] = shares_; - _totalShares = _totalShares.add(shares_); - emit PayeeAdded(account, shares_); - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/payment/PullPayment.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/payment/PullPayment.sol deleted file mode 100644 index f6d7e2c1e..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/payment/PullPayment.sol +++ /dev/null @@ -1,41 +0,0 @@ -pragma solidity ^0.4.24; - -import "./escrow/Escrow.sol"; - -/** - * @title PullPayment - * @dev Base contract supporting async send for pull payments. Inherit from this - * contract and use _asyncTransfer instead of send or transfer. - */ -contract PullPayment { - Escrow private _escrow; - - constructor() internal { - _escrow = new Escrow(); - } - - /** - * @dev Withdraw accumulated balance. - * @param payee Whose balance will be withdrawn. - */ - function withdrawPayments(address payee) public { - _escrow.withdraw(payee); - } - - /** - * @dev Returns the credit owed to an address. - * @param dest The creditor's address. - */ - function payments(address dest) public view returns (uint256) { - return _escrow.depositsOf(dest); - } - - /** - * @dev Called by the payer to store the sent amount as credit to be pulled. - * @param dest The destination address of the funds. - * @param amount The amount to transfer. - */ - function _asyncTransfer(address dest, uint256 amount) internal { - _escrow.deposit.value(amount)(dest); - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/payment/escrow/ConditionalEscrow.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/payment/escrow/ConditionalEscrow.sol deleted file mode 100644 index c3f63ee37..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/payment/escrow/ConditionalEscrow.sol +++ /dev/null @@ -1,22 +0,0 @@ -pragma solidity ^0.4.24; - -import "./Escrow.sol"; - -/** - * @title ConditionalEscrow - * @dev Base abstract escrow to only allow withdrawal if a condition is met. - * @dev Intended usage: See Escrow.sol. Same usage guidelines apply here. - */ -contract ConditionalEscrow is Escrow { - /** - * @dev Returns whether an address is allowed to withdraw their funds. To be - * implemented by derived contracts. - * @param payee The destination address of the funds. - */ - function withdrawalAllowed(address payee) public view returns (bool); - - function withdraw(address payee) public { - require(withdrawalAllowed(payee)); - super.withdraw(payee); - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/payment/escrow/Escrow.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/payment/escrow/Escrow.sol deleted file mode 100644 index b2f2a85ee..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/payment/escrow/Escrow.sol +++ /dev/null @@ -1,54 +0,0 @@ -pragma solidity ^0.4.24; - -import "../../math/SafeMath.sol"; -import "../../ownership/Secondary.sol"; - - /** - * @title Escrow - * @dev Base escrow contract, holds funds designated for a payee until they - * withdraw them. - * @dev Intended usage: This contract (and derived escrow contracts) should be a - * standalone contract, that only interacts with the contract that instantiated - * it. That way, it is guaranteed that all Ether will be handled according to - * the Escrow rules, and there is no need to check for payable functions or - * transfers in the inheritance tree. The contract that uses the escrow as its - * payment method should be its primary, and provide public methods redirecting - * to the escrow's deposit and withdraw. - */ -contract Escrow is Secondary { - using SafeMath for uint256; - - event Deposited(address indexed payee, uint256 weiAmount); - event Withdrawn(address indexed payee, uint256 weiAmount); - - mapping(address => uint256) private _deposits; - - function depositsOf(address payee) public view returns (uint256) { - return _deposits[payee]; - } - - /** - * @dev Stores the sent amount as credit to be withdrawn. - * @param payee The destination address of the funds. - */ - function deposit(address payee) public onlyPrimary payable { - uint256 amount = msg.value; - _deposits[payee] = _deposits[payee].add(amount); - - emit Deposited(payee, amount); - } - - /** - * @dev Withdraw accumulated balance for a payee. - * @param payee The address whose funds will be withdrawn and transferred to. - */ - function withdraw(address payee) public onlyPrimary { - uint256 payment = _deposits[payee]; - - _deposits[payee] = 0; - - payee.transfer(payment); - - emit Withdrawn(payee, payment); - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/payment/escrow/RefundEscrow.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/payment/escrow/RefundEscrow.sol deleted file mode 100644 index a776a81c8..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/payment/escrow/RefundEscrow.sol +++ /dev/null @@ -1,91 +0,0 @@ -pragma solidity ^0.4.24; - -import "./ConditionalEscrow.sol"; - -/** - * @title RefundEscrow - * @dev Escrow that holds funds for a beneficiary, deposited from multiple - * parties. - * @dev Intended usage: See Escrow.sol. Same usage guidelines apply here. - * @dev The primary account (that is, the contract that instantiates this - * contract) may deposit, close the deposit period, and allow for either - * withdrawal by the beneficiary, or refunds to the depositors. All interactions - * with RefundEscrow will be made through the primary contract. See the - * RefundableCrowdsale contract for an example of RefundEscrow’s use. - */ -contract RefundEscrow is ConditionalEscrow { - enum State { Active, Refunding, Closed } - - event RefundsClosed(); - event RefundsEnabled(); - - State private _state; - address private _beneficiary; - - /** - * @dev Constructor. - * @param beneficiary The beneficiary of the deposits. - */ - constructor(address beneficiary) public { - require(beneficiary != address(0)); - _beneficiary = beneficiary; - _state = State.Active; - } - - /** - * @return the current state of the escrow. - */ - function state() public view returns (State) { - return _state; - } - - /** - * @return the beneficiary of the escrow. - */ - function beneficiary() public view returns (address) { - return _beneficiary; - } - - /** - * @dev Stores funds that may later be refunded. - * @param refundee The address funds will be sent to if a refund occurs. - */ - function deposit(address refundee) public payable { - require(_state == State.Active); - super.deposit(refundee); - } - - /** - * @dev Allows for the beneficiary to withdraw their funds, rejecting - * further deposits. - */ - function close() public onlyPrimary { - require(_state == State.Active); - _state = State.Closed; - emit RefundsClosed(); - } - - /** - * @dev Allows for refunds to take place, rejecting further deposits. - */ - function enableRefunds() public onlyPrimary { - require(_state == State.Active); - _state = State.Refunding; - emit RefundsEnabled(); - } - - /** - * @dev Withdraws the beneficiary's funds. - */ - function beneficiaryWithdraw() public { - require(_state == State.Closed); - _beneficiary.transfer(address(this).balance); - } - - /** - * @dev Returns whether refundees can withdraw their deposits (be refunded). - */ - function withdrawalAllowed(address payee) public view returns (bool) { - return _state == State.Refunding; - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC20/ERC20.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC20/ERC20.sol deleted file mode 100644 index 25b2694a2..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC20/ERC20.sol +++ /dev/null @@ -1,211 +0,0 @@ -pragma solidity ^0.4.24; - -import "./IERC20.sol"; -import "../../math/SafeMath.sol"; - -/** - * @title Standard ERC20 token - * - * @dev 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 - */ -contract ERC20 is IERC20 { - using SafeMath for uint256; - - mapping (address => uint256) private _balances; - - mapping (address => mapping (address => uint256)) private _allowed; - - uint256 private _totalSupply; - - /** - * @dev Total number of tokens in existence - */ - function totalSupply() public view returns (uint256) { - return _totalSupply; - } - - /** - * @dev Gets the balance of the specified address. - * @param owner The address to query the balance of. - * @return An uint256 representing the amount owned by the passed address. - */ - function balanceOf(address owner) public view returns (uint256) { - return _balances[owner]; - } - - /** - * @dev Function to check the amount of tokens that an owner allowed to a spender. - * @param owner address The address which owns the funds. - * @param spender address The address which will spend the funds. - * @return A uint256 specifying the amount of tokens still available for the spender. - */ - function allowance( - address owner, - address spender - ) - public - view - returns (uint256) - { - return _allowed[owner][spender]; - } - - /** - * @dev Transfer token for a specified address - * @param to The address to transfer to. - * @param value The amount to be transferred. - */ - function transfer(address to, uint256 value) public returns (bool) { - _transfer(msg.sender, to, value); - return true; - } - - /** - * @dev 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 - * @param spender The address which will spend the funds. - * @param value The amount of tokens to be spent. - */ - function approve(address spender, uint256 value) public returns (bool) { - require(spender != address(0)); - - _allowed[msg.sender][spender] = value; - emit Approval(msg.sender, spender, value); - return true; - } - - /** - * @dev Transfer tokens from one address to another - * @param from address The address which you want to send tokens from - * @param to address The address which you want to transfer to - * @param value uint256 the amount of tokens to be transferred - */ - function transferFrom( - address from, - address to, - uint256 value - ) - public - returns (bool) - { - require(value <= _allowed[from][msg.sender]); - - _allowed[from][msg.sender] = _allowed[from][msg.sender].sub(value); - _transfer(from, to, value); - return true; - } - - /** - * @dev 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 - * @param spender The address which will spend the funds. - * @param addedValue The amount of tokens to increase the allowance by. - */ - function increaseAllowance( - address spender, - uint256 addedValue - ) - public - returns (bool) - { - require(spender != address(0)); - - _allowed[msg.sender][spender] = ( - _allowed[msg.sender][spender].add(addedValue)); - emit Approval(msg.sender, spender, _allowed[msg.sender][spender]); - return true; - } - - /** - * @dev 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 - * @param spender The address which will spend the funds. - * @param subtractedValue The amount of tokens to decrease the allowance by. - */ - function decreaseAllowance( - address spender, - uint256 subtractedValue - ) - public - returns (bool) - { - require(spender != address(0)); - - _allowed[msg.sender][spender] = ( - _allowed[msg.sender][spender].sub(subtractedValue)); - emit Approval(msg.sender, spender, _allowed[msg.sender][spender]); - return true; - } - - /** - * @dev Transfer token for a specified addresses - * @param from The address to transfer from. - * @param to The address to transfer to. - * @param value The amount to be transferred. - */ - function _transfer(address from, address to, uint256 value) internal { - require(value <= _balances[from]); - require(to != address(0)); - - _balances[from] = _balances[from].sub(value); - _balances[to] = _balances[to].add(value); - emit Transfer(from, to, value); - } - - /** - * @dev Internal function that mints an amount of the token and assigns it to - * an account. This encapsulates the modification of balances such that the - * proper events are emitted. - * @param account The account that will receive the created tokens. - * @param value The amount that will be created. - */ - function _mint(address account, uint256 value) internal { - require(account != 0); - _totalSupply = _totalSupply.add(value); - _balances[account] = _balances[account].add(value); - emit Transfer(address(0), account, value); - } - - /** - * @dev Internal function that burns an amount of the token of a given - * account. - * @param account The account whose tokens will be burnt. - * @param value The amount that will be burnt. - */ - function _burn(address account, uint256 value) internal { - require(account != 0); - require(value <= _balances[account]); - - _totalSupply = _totalSupply.sub(value); - _balances[account] = _balances[account].sub(value); - emit Transfer(account, address(0), value); - } - - /** - * @dev Internal function that burns an amount of the token of a given - * account, deducting from the sender's allowance for said account. Uses the - * internal burn function. - * @param account The account whose tokens will be burnt. - * @param value The amount that will be burnt. - */ - function _burnFrom(address account, uint256 value) internal { - require(value <= _allowed[account][msg.sender]); - - // Should https://github.com/OpenZeppelin/zeppelin-solidity/issues/707 be accepted, - // this function needs to emit an event with the updated approval. - _allowed[account][msg.sender] = _allowed[account][msg.sender].sub( - value); - _burn(account, value); - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC20/ERC20Burnable.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC20/ERC20Burnable.sol deleted file mode 100644 index ba4a2ccbe..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC20/ERC20Burnable.sol +++ /dev/null @@ -1,27 +0,0 @@ -pragma solidity ^0.4.24; - -import "./ERC20.sol"; - -/** - * @title Burnable Token - * @dev Token that can be irreversibly burned (destroyed). - */ -contract ERC20Burnable is ERC20 { - - /** - * @dev Burns a specific amount of tokens. - * @param value The amount of token to be burned. - */ - function burn(uint256 value) public { - _burn(msg.sender, value); - } - - /** - * @dev Burns a specific amount of tokens from the target address and decrements allowance - * @param from address The address which you want to send tokens from - * @param value uint256 The amount of token to be burned - */ - function burnFrom(address from, uint256 value) public { - _burnFrom(from, value); - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC20/ERC20Capped.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC20/ERC20Capped.sol deleted file mode 100644 index a80dd491c..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC20/ERC20Capped.sol +++ /dev/null @@ -1,31 +0,0 @@ -pragma solidity ^0.4.24; - -import "./ERC20Mintable.sol"; - -/** - * @title Capped token - * @dev Mintable token with a token cap. - */ -contract ERC20Capped is ERC20Mintable { - - uint256 private _cap; - - constructor(uint256 cap) - public - { - require(cap > 0); - _cap = cap; - } - - /** - * @return the cap for the token minting. - */ - function cap() public view returns(uint256) { - return _cap; - } - - function _mint(address account, uint256 value) internal { - require(totalSupply().add(value) <= _cap); - super._mint(account, value); - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol deleted file mode 100644 index 706dbfc46..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol +++ /dev/null @@ -1,42 +0,0 @@ -pragma solidity ^0.4.24; - -import "./IERC20.sol"; - -/** - * @title ERC20Detailed token - * @dev 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. - */ -contract ERC20Detailed is IERC20 { - string private _name; - string private _symbol; - uint8 private _decimals; - - constructor(string name, string symbol, uint8 decimals) public { - _name = name; - _symbol = symbol; - _decimals = decimals; - } - - /** - * @return the name of the token. - */ - function name() public view returns(string) { - return _name; - } - - /** - * @return the symbol of the token. - */ - function symbol() public view returns(string) { - return _symbol; - } - - /** - * @return the number of decimals of the token. - */ - function decimals() public view returns(uint8) { - return _decimals; - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC20/ERC20Mintable.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC20/ERC20Mintable.sol deleted file mode 100644 index eb01f06e7..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC20/ERC20Mintable.sol +++ /dev/null @@ -1,28 +0,0 @@ -pragma solidity ^0.4.24; - -import "./ERC20.sol"; -import "../../access/roles/MinterRole.sol"; - -/** - * @title ERC20Mintable - * @dev ERC20 minting logic - */ -contract ERC20Mintable is ERC20, MinterRole { - /** - * @dev Function to mint tokens - * @param to The address that will receive the minted tokens. - * @param value The amount of tokens to mint. - * @return A boolean that indicates if the operation was successful. - */ - function mint( - address to, - uint256 value - ) - public - onlyMinter - returns (bool) - { - _mint(to, value); - return true; - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC20/ERC20Pausable.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC20/ERC20Pausable.sol deleted file mode 100644 index 8e6aa881f..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC20/ERC20Pausable.sol +++ /dev/null @@ -1,67 +0,0 @@ -pragma solidity ^0.4.24; - -import "./ERC20.sol"; -import "../../lifecycle/Pausable.sol"; - -/** - * @title Pausable token - * @dev ERC20 modified with pausable transfers. - **/ -contract ERC20Pausable is ERC20, Pausable { - - function transfer( - address to, - uint256 value - ) - public - whenNotPaused - returns (bool) - { - return super.transfer(to, value); - } - - function transferFrom( - address from, - address to, - uint256 value - ) - public - whenNotPaused - returns (bool) - { - return super.transferFrom(from, to, value); - } - - function approve( - address spender, - uint256 value - ) - public - whenNotPaused - returns (bool) - { - return super.approve(spender, value); - } - - function increaseAllowance( - address spender, - uint addedValue - ) - public - whenNotPaused - returns (bool success) - { - return super.increaseAllowance(spender, addedValue); - } - - function decreaseAllowance( - address spender, - uint subtractedValue - ) - public - whenNotPaused - returns (bool success) - { - return super.decreaseAllowance(spender, subtractedValue); - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol deleted file mode 100644 index 37e5a447c..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol +++ /dev/null @@ -1,34 +0,0 @@ -pragma solidity ^0.4.24; - -/** - * @title ERC20 interface - * @dev see https://github.com/ethereum/EIPs/issues/20 - */ -interface IERC20 { - function totalSupply() external view returns (uint256); - - function balanceOf(address who) external view returns (uint256); - - function allowance(address owner, address spender) - external view returns (uint256); - - function transfer(address to, uint256 value) external returns (bool); - - function approve(address spender, uint256 value) - external returns (bool); - - function transferFrom(address from, address to, uint256 value) - external returns (bool); - - event Transfer( - address indexed from, - address indexed to, - uint256 value - ); - - event Approval( - address indexed owner, - address indexed spender, - uint256 value - ); -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol deleted file mode 100644 index 2774afa08..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol +++ /dev/null @@ -1,72 +0,0 @@ -pragma solidity ^0.4.24; - -import "./IERC20.sol"; -import "../../math/SafeMath.sol"; - -/** - * @title SafeERC20 - * @dev 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. - */ -library SafeERC20 { - - using SafeMath for uint256; - - function safeTransfer( - IERC20 token, - address to, - uint256 value - ) - internal - { - require(token.transfer(to, value)); - } - - function safeTransferFrom( - IERC20 token, - address from, - address to, - uint256 value - ) - internal - { - require(token.transferFrom(from, to, value)); - } - - function safeApprove( - IERC20 token, - address spender, - uint256 value - ) - internal - { - // safeApprove should only be called when setting an initial allowance, - // or when resetting it to zero. To increase and decrease it, use - // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' - require((value == 0) || (token.allowance(msg.sender, spender) == 0)); - require(token.approve(spender, value)); - } - - function safeIncreaseAllowance( - IERC20 token, - address spender, - uint256 value - ) - internal - { - uint256 newAllowance = token.allowance(address(this), spender).add(value); - require(token.approve(spender, newAllowance)); - } - - function safeDecreaseAllowance( - IERC20 token, - address spender, - uint256 value - ) - internal - { - uint256 newAllowance = token.allowance(address(this), spender).sub(value); - require(token.approve(spender, newAllowance)); - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC20/TokenTimelock.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC20/TokenTimelock.sol deleted file mode 100644 index 55903482b..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC20/TokenTimelock.sol +++ /dev/null @@ -1,69 +0,0 @@ -pragma solidity ^0.4.24; - -import "./SafeERC20.sol"; - -/** - * @title TokenTimelock - * @dev TokenTimelock is a token holder contract that will allow a - * beneficiary to extract the tokens after a given release time - */ -contract TokenTimelock { - using SafeERC20 for IERC20; - - // ERC20 basic token contract being held - IERC20 private _token; - - // beneficiary of tokens after they are released - address private _beneficiary; - - // timestamp when token release is enabled - uint256 private _releaseTime; - - constructor( - IERC20 token, - address beneficiary, - uint256 releaseTime - ) - public - { - // solium-disable-next-line security/no-block-members - require(releaseTime > block.timestamp); - _token = token; - _beneficiary = beneficiary; - _releaseTime = releaseTime; - } - - /** - * @return the token being held. - */ - function token() public view returns(IERC20) { - return _token; - } - - /** - * @return the beneficiary of the tokens. - */ - function beneficiary() public view returns(address) { - return _beneficiary; - } - - /** - * @return the time when the tokens are released. - */ - function releaseTime() public view returns(uint256) { - return _releaseTime; - } - - /** - * @notice Transfers tokens held by timelock to beneficiary. - */ - function release() public { - // solium-disable-next-line security/no-block-members - require(block.timestamp >= _releaseTime); - - uint256 amount = _token.balanceOf(address(this)); - require(amount > 0); - - _token.safeTransfer(_beneficiary, amount); - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC721/ERC721.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC721/ERC721.sol deleted file mode 100644 index ec0763b96..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC721/ERC721.sol +++ /dev/null @@ -1,330 +0,0 @@ -pragma solidity ^0.4.24; - -import "./IERC721.sol"; -import "./IERC721Receiver.sol"; -import "../../math/SafeMath.sol"; -import "../../utils/Address.sol"; -import "../../introspection/ERC165.sol"; - -/** - * @title ERC721 Non-Fungible Token Standard basic implementation - * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md - */ -contract ERC721 is ERC165, IERC721 { - - using SafeMath for uint256; - using Address for address; - - // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` - // which can be also obtained as `IERC721Receiver(0).onERC721Received.selector` - bytes4 private constant _ERC721_RECEIVED = 0x150b7a02; - - // Mapping from token ID to owner - mapping (uint256 => address) private _tokenOwner; - - // Mapping from token ID to approved address - mapping (uint256 => address) private _tokenApprovals; - - // Mapping from owner to number of owned token - mapping (address => uint256) private _ownedTokensCount; - - // Mapping from owner to operator approvals - mapping (address => mapping (address => bool)) private _operatorApprovals; - - bytes4 private constant _InterfaceId_ERC721 = 0x80ac58cd; - /* - * 0x80ac58cd === - * bytes4(keccak256('balanceOf(address)')) ^ - * bytes4(keccak256('ownerOf(uint256)')) ^ - * bytes4(keccak256('approve(address,uint256)')) ^ - * bytes4(keccak256('getApproved(uint256)')) ^ - * bytes4(keccak256('setApprovalForAll(address,bool)')) ^ - * bytes4(keccak256('isApprovedForAll(address,address)')) ^ - * bytes4(keccak256('transferFrom(address,address,uint256)')) ^ - * bytes4(keccak256('safeTransferFrom(address,address,uint256)')) ^ - * bytes4(keccak256('safeTransferFrom(address,address,uint256,bytes)')) - */ - - constructor() - public - { - // register the supported interfaces to conform to ERC721 via ERC165 - _registerInterface(_InterfaceId_ERC721); - } - - /** - * @dev Gets the balance of the specified address - * @param owner address to query the balance of - * @return uint256 representing the amount owned by the passed address - */ - function balanceOf(address owner) public view returns (uint256) { - require(owner != address(0)); - return _ownedTokensCount[owner]; - } - - /** - * @dev Gets the owner of the specified token ID - * @param tokenId uint256 ID of the token to query the owner of - * @return owner address currently marked as the owner of the given token ID - */ - function ownerOf(uint256 tokenId) public view returns (address) { - address owner = _tokenOwner[tokenId]; - require(owner != address(0)); - return owner; - } - - /** - * @dev Approves another address to transfer the given token ID - * The zero address indicates there is no approved address. - * There can only be one approved address per token at a given time. - * Can only be called by the token owner or an approved operator. - * @param to address to be approved for the given token ID - * @param tokenId uint256 ID of the token to be approved - */ - function approve(address to, uint256 tokenId) public { - address owner = ownerOf(tokenId); - require(to != owner); - require(msg.sender == owner || isApprovedForAll(owner, msg.sender)); - - _tokenApprovals[tokenId] = to; - emit Approval(owner, to, tokenId); - } - - /** - * @dev Gets the approved address for a token ID, or zero if no address set - * Reverts if the token ID does not exist. - * @param tokenId uint256 ID of the token to query the approval of - * @return address currently approved for the given token ID - */ - function getApproved(uint256 tokenId) public view returns (address) { - require(_exists(tokenId)); - return _tokenApprovals[tokenId]; - } - - /** - * @dev Sets or unsets the approval of a given operator - * An operator is allowed to transfer all tokens of the sender on their behalf - * @param to operator address to set the approval - * @param approved representing the status of the approval to be set - */ - function setApprovalForAll(address to, bool approved) public { - require(to != msg.sender); - _operatorApprovals[msg.sender][to] = approved; - emit ApprovalForAll(msg.sender, to, approved); - } - - /** - * @dev Tells whether an operator is approved by a given owner - * @param owner owner address which you want to query the approval of - * @param operator operator address which you want to query the approval of - * @return bool whether the given operator is approved by the given owner - */ - function isApprovedForAll( - address owner, - address operator - ) - public - view - returns (bool) - { - return _operatorApprovals[owner][operator]; - } - - /** - * @dev Transfers the ownership of a given token ID to another address - * Usage of this method is discouraged, use `safeTransferFrom` whenever possible - * Requires the msg sender to be the owner, approved, or operator - * @param from current owner of the token - * @param to address to receive the ownership of the given token ID - * @param tokenId uint256 ID of the token to be transferred - */ - function transferFrom( - address from, - address to, - uint256 tokenId - ) - public - { - require(_isApprovedOrOwner(msg.sender, tokenId)); - require(to != address(0)); - - _clearApproval(from, tokenId); - _removeTokenFrom(from, tokenId); - _addTokenTo(to, tokenId); - - emit Transfer(from, to, tokenId); - } - - /** - * @dev Safely transfers the ownership of a given token ID to another address - * If the target address is a contract, it must implement `onERC721Received`, - * which is called upon a safe transfer, and return the magic value - * `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise, - * the transfer is reverted. - * - * Requires the msg sender to be the owner, approved, or operator - * @param from current owner of the token - * @param to address to receive the ownership of the given token ID - * @param tokenId uint256 ID of the token to be transferred - */ - function safeTransferFrom( - address from, - address to, - uint256 tokenId - ) - public - { - // solium-disable-next-line arg-overflow - safeTransferFrom(from, to, tokenId, ""); - } - - /** - * @dev Safely transfers the ownership of a given token ID to another address - * If the target address is a contract, it must implement `onERC721Received`, - * which is called upon a safe transfer, and return the magic value - * `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise, - * the transfer is reverted. - * Requires the msg sender to be the owner, approved, or operator - * @param from current owner of the token - * @param to address to receive the ownership of the given token ID - * @param tokenId uint256 ID of the token to be transferred - * @param _data bytes data to send along with a safe transfer check - */ - function safeTransferFrom( - address from, - address to, - uint256 tokenId, - bytes _data - ) - public - { - transferFrom(from, to, tokenId); - // solium-disable-next-line arg-overflow - require(_checkOnERC721Received(from, to, tokenId, _data)); - } - - /** - * @dev Returns whether the specified token exists - * @param tokenId uint256 ID of the token to query the existence of - * @return whether the token exists - */ - function _exists(uint256 tokenId) internal view returns (bool) { - address owner = _tokenOwner[tokenId]; - return owner != address(0); - } - - /** - * @dev Returns whether the given spender can transfer a given token ID - * @param spender address of the spender to query - * @param tokenId uint256 ID of the token to be transferred - * @return bool whether the msg.sender is approved for the given token ID, - * is an operator of the owner, or is the owner of the token - */ - function _isApprovedOrOwner( - address spender, - uint256 tokenId - ) - internal - view - returns (bool) - { - address owner = ownerOf(tokenId); - // Disable solium check because of - // https://github.com/duaraghav8/Solium/issues/175 - // solium-disable-next-line operator-whitespace - return ( - spender == owner || - getApproved(tokenId) == spender || - isApprovedForAll(owner, spender) - ); - } - - /** - * @dev Internal function to mint a new token - * Reverts if the given token ID already exists - * @param to The address that will own the minted token - * @param tokenId uint256 ID of the token to be minted by the msg.sender - */ - function _mint(address to, uint256 tokenId) internal { - require(to != address(0)); - _addTokenTo(to, tokenId); - emit Transfer(address(0), to, tokenId); - } - - /** - * @dev Internal function to burn a specific token - * Reverts if the token does not exist - * @param tokenId uint256 ID of the token being burned by the msg.sender - */ - function _burn(address owner, uint256 tokenId) internal { - _clearApproval(owner, tokenId); - _removeTokenFrom(owner, tokenId); - emit Transfer(owner, address(0), tokenId); - } - - /** - * @dev Internal function to add a token ID to the list of a given address - * Note that this function is left internal to make ERC721Enumerable possible, but is not - * intended to be called by custom derived contracts: in particular, it emits no Transfer event. - * @param to address representing the new owner of the given token ID - * @param tokenId uint256 ID of the token to be added to the tokens list of the given address - */ - function _addTokenTo(address to, uint256 tokenId) internal { - require(_tokenOwner[tokenId] == address(0)); - _tokenOwner[tokenId] = to; - _ownedTokensCount[to] = _ownedTokensCount[to].add(1); - } - - /** - * @dev Internal function to remove a token ID from the list of a given address - * Note that this function is left internal to make ERC721Enumerable possible, but is not - * intended to be called by custom derived contracts: in particular, it emits no Transfer event, - * and doesn't clear approvals. - * @param from address representing the previous owner of the given token ID - * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address - */ - function _removeTokenFrom(address from, uint256 tokenId) internal { - require(ownerOf(tokenId) == from); - _ownedTokensCount[from] = _ownedTokensCount[from].sub(1); - _tokenOwner[tokenId] = address(0); - } - - /** - * @dev Internal function to invoke `onERC721Received` on a target address - * The call is not executed if the target address is not a contract - * @param from address representing the previous owner of the given token ID - * @param to target address that will receive the tokens - * @param tokenId uint256 ID of the token to be transferred - * @param _data bytes optional data to send along with the call - * @return whether the call correctly returned the expected magic value - */ - function _checkOnERC721Received( - address from, - address to, - uint256 tokenId, - bytes _data - ) - internal - returns (bool) - { - if (!to.isContract()) { - return true; - } - bytes4 retval = IERC721Receiver(to).onERC721Received( - msg.sender, from, tokenId, _data); - return (retval == _ERC721_RECEIVED); - } - - /** - * @dev Private function to clear current approval of a given token ID - * Reverts if the given address is not indeed the owner of the token - * @param owner owner of the token - * @param tokenId uint256 ID of the token to be transferred - */ - function _clearApproval(address owner, uint256 tokenId) private { - require(ownerOf(tokenId) == owner); - if (_tokenApprovals[tokenId] != address(0)) { - _tokenApprovals[tokenId] = address(0); - } - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC721/ERC721Burnable.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC721/ERC721Burnable.sol deleted file mode 100644 index 3fc0277e5..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC721/ERC721Burnable.sol +++ /dev/null @@ -1,12 +0,0 @@ -pragma solidity ^0.4.24; - -import "./ERC721.sol"; - -contract ERC721Burnable is ERC721 { - function burn(uint256 tokenId) - public - { - require(_isApprovedOrOwner(msg.sender, tokenId)); - _burn(ownerOf(tokenId), tokenId); - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC721/ERC721Enumerable.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC721/ERC721Enumerable.sol deleted file mode 100644 index c85514720..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC721/ERC721Enumerable.sol +++ /dev/null @@ -1,150 +0,0 @@ -pragma solidity ^0.4.24; - -import "./IERC721Enumerable.sol"; -import "./ERC721.sol"; -import "../../introspection/ERC165.sol"; - -contract ERC721Enumerable is ERC165, ERC721, IERC721Enumerable { - // Mapping from owner to list of owned token IDs - mapping(address => uint256[]) private _ownedTokens; - - // Mapping from token ID to index of the owner tokens list - mapping(uint256 => uint256) private _ownedTokensIndex; - - // Array with all token ids, used for enumeration - uint256[] private _allTokens; - - // Mapping from token id to position in the allTokens array - mapping(uint256 => uint256) private _allTokensIndex; - - bytes4 private constant _InterfaceId_ERC721Enumerable = 0x780e9d63; - /** - * 0x780e9d63 === - * bytes4(keccak256('totalSupply()')) ^ - * bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) ^ - * bytes4(keccak256('tokenByIndex(uint256)')) - */ - - /** - * @dev Constructor function - */ - constructor() public { - // register the supported interface to conform to ERC721 via ERC165 - _registerInterface(_InterfaceId_ERC721Enumerable); - } - - /** - * @dev Gets the token ID at a given index of the tokens list of the requested owner - * @param owner address owning the tokens list to be accessed - * @param index uint256 representing the index to be accessed of the requested tokens list - * @return uint256 token ID at the given index of the tokens list owned by the requested address - */ - function tokenOfOwnerByIndex( - address owner, - uint256 index - ) - public - view - returns (uint256) - { - require(index < balanceOf(owner)); - return _ownedTokens[owner][index]; - } - - /** - * @dev Gets the total amount of tokens stored by the contract - * @return uint256 representing the total amount of tokens - */ - function totalSupply() public view returns (uint256) { - return _allTokens.length; - } - - /** - * @dev Gets the token ID at a given index of all the tokens in this contract - * Reverts if the index is greater or equal to the total number of tokens - * @param index uint256 representing the index to be accessed of the tokens list - * @return uint256 token ID at the given index of the tokens list - */ - function tokenByIndex(uint256 index) public view returns (uint256) { - require(index < totalSupply()); - return _allTokens[index]; - } - - /** - * @dev Internal function to add a token ID to the list of a given address - * This function is internal due to language limitations, see the note in ERC721.sol. - * It is not intended to be called by custom derived contracts: in particular, it emits no Transfer event. - * @param to address representing the new owner of the given token ID - * @param tokenId uint256 ID of the token to be added to the tokens list of the given address - */ - function _addTokenTo(address to, uint256 tokenId) internal { - super._addTokenTo(to, tokenId); - uint256 length = _ownedTokens[to].length; - _ownedTokens[to].push(tokenId); - _ownedTokensIndex[tokenId] = length; - } - - /** - * @dev Internal function to remove a token ID from the list of a given address - * This function is internal due to language limitations, see the note in ERC721.sol. - * It is not intended to be called by custom derived contracts: in particular, it emits no Transfer event, - * and doesn't clear approvals. - * @param from address representing the previous owner of the given token ID - * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address - */ - function _removeTokenFrom(address from, uint256 tokenId) internal { - super._removeTokenFrom(from, tokenId); - - // To prevent a gap in the array, we store the last token in the index of the token to delete, and - // then delete the last slot. - uint256 tokenIndex = _ownedTokensIndex[tokenId]; - uint256 lastTokenIndex = _ownedTokens[from].length.sub(1); - uint256 lastToken = _ownedTokens[from][lastTokenIndex]; - - _ownedTokens[from][tokenIndex] = lastToken; - // This also deletes the contents at the last position of the array - _ownedTokens[from].length--; - - // Note that this will handle single-element arrays. In that case, both tokenIndex and lastTokenIndex are going to - // be zero. Then we can make sure that we will remove tokenId from the ownedTokens list since we are first swapping - // the lastToken to the first position, and then dropping the element placed in the last position of the list - - _ownedTokensIndex[tokenId] = 0; - _ownedTokensIndex[lastToken] = tokenIndex; - } - - /** - * @dev Internal function to mint a new token - * Reverts if the given token ID already exists - * @param to address the beneficiary that will own the minted token - * @param tokenId uint256 ID of the token to be minted by the msg.sender - */ - function _mint(address to, uint256 tokenId) internal { - super._mint(to, tokenId); - - _allTokensIndex[tokenId] = _allTokens.length; - _allTokens.push(tokenId); - } - - /** - * @dev Internal function to burn a specific token - * Reverts if the token does not exist - * @param owner owner of the token to burn - * @param tokenId uint256 ID of the token being burned by the msg.sender - */ - function _burn(address owner, uint256 tokenId) internal { - super._burn(owner, tokenId); - - // Reorg all tokens array - uint256 tokenIndex = _allTokensIndex[tokenId]; - uint256 lastTokenIndex = _allTokens.length.sub(1); - uint256 lastToken = _allTokens[lastTokenIndex]; - - _allTokens[tokenIndex] = lastToken; - _allTokens[lastTokenIndex] = 0; - - _allTokens.length--; - _allTokensIndex[tokenId] = 0; - _allTokensIndex[lastToken] = tokenIndex; - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC721/ERC721Full.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC721/ERC721Full.sol deleted file mode 100644 index 293637501..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC721/ERC721Full.sol +++ /dev/null @@ -1,18 +0,0 @@ -pragma solidity ^0.4.24; - -import "./ERC721.sol"; -import "./ERC721Enumerable.sol"; -import "./ERC721Metadata.sol"; - -/** - * @title Full ERC721 Token - * This implementation includes all the required and some optional functionality of the ERC721 standard - * Moreover, it includes approve all functionality using operator terminology - * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md - */ -contract ERC721Full is ERC721, ERC721Enumerable, ERC721Metadata { - constructor(string name, string symbol) ERC721Metadata(name, symbol) - public - { - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC721/ERC721Holder.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC721/ERC721Holder.sol deleted file mode 100644 index cf0e9ce55..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC721/ERC721Holder.sol +++ /dev/null @@ -1,17 +0,0 @@ -pragma solidity ^0.4.24; - -import "./IERC721Receiver.sol"; - -contract ERC721Holder is IERC721Receiver { - function onERC721Received( - address, - address, - uint256, - bytes - ) - public - returns(bytes4) - { - return this.onERC721Received.selector; - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC721/ERC721Metadata.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC721/ERC721Metadata.sol deleted file mode 100644 index bd1105188..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC721/ERC721Metadata.sol +++ /dev/null @@ -1,87 +0,0 @@ -pragma solidity ^0.4.24; - -import "./ERC721.sol"; -import "./IERC721Metadata.sol"; -import "../../introspection/ERC165.sol"; - -contract ERC721Metadata is ERC165, ERC721, IERC721Metadata { - // Token name - string private _name; - - // Token symbol - string private _symbol; - - // Optional mapping for token URIs - mapping(uint256 => string) private _tokenURIs; - - bytes4 private constant InterfaceId_ERC721Metadata = 0x5b5e139f; - /** - * 0x5b5e139f === - * bytes4(keccak256('name()')) ^ - * bytes4(keccak256('symbol()')) ^ - * bytes4(keccak256('tokenURI(uint256)')) - */ - - /** - * @dev Constructor function - */ - constructor(string name, string symbol) public { - _name = name; - _symbol = symbol; - - // register the supported interfaces to conform to ERC721 via ERC165 - _registerInterface(InterfaceId_ERC721Metadata); - } - - /** - * @dev Gets the token name - * @return string representing the token name - */ - function name() external view returns (string) { - return _name; - } - - /** - * @dev Gets the token symbol - * @return string representing the token symbol - */ - function symbol() external view returns (string) { - return _symbol; - } - - /** - * @dev Returns an URI for a given token ID - * Throws if the token ID does not exist. May return an empty string. - * @param tokenId uint256 ID of the token to query - */ - function tokenURI(uint256 tokenId) external view returns (string) { - require(_exists(tokenId)); - return _tokenURIs[tokenId]; - } - - /** - * @dev Internal function to set the token URI for a given token - * Reverts if the token ID does not exist - * @param tokenId uint256 ID of the token to set its URI - * @param uri string URI to assign - */ - function _setTokenURI(uint256 tokenId, string uri) internal { - require(_exists(tokenId)); - _tokenURIs[tokenId] = uri; - } - - /** - * @dev Internal function to burn a specific token - * Reverts if the token does not exist - * @param owner owner of the token to burn - * @param tokenId uint256 ID of the token being burned by the msg.sender - */ - function _burn(address owner, uint256 tokenId) internal { - super._burn(owner, tokenId); - - // Clear metadata (if any) - if (bytes(_tokenURIs[tokenId]).length != 0) { - delete _tokenURIs[tokenId]; - } - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC721/ERC721MetadataMintable.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC721/ERC721MetadataMintable.sol deleted file mode 100644 index 95a9f2124..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC721/ERC721MetadataMintable.sol +++ /dev/null @@ -1,32 +0,0 @@ -pragma solidity ^0.4.24; - -import "./ERC721Metadata.sol"; -import "../../access/roles/MinterRole.sol"; - - -/** - * @title ERC721MetadataMintable - * @dev ERC721 minting logic with metadata - */ -contract ERC721MetadataMintable is ERC721, ERC721Metadata, MinterRole { - /** - * @dev Function to mint tokens - * @param to The address that will receive the minted tokens. - * @param tokenId The token id to mint. - * @param tokenURI The token URI of the minted token. - * @return A boolean that indicates if the operation was successful. - */ - function mintWithTokenURI( - address to, - uint256 tokenId, - string tokenURI - ) - public - onlyMinter - returns (bool) - { - _mint(to, tokenId); - _setTokenURI(tokenId, tokenURI); - return true; - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC721/ERC721Mintable.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC721/ERC721Mintable.sol deleted file mode 100644 index 74b7b0186..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC721/ERC721Mintable.sol +++ /dev/null @@ -1,28 +0,0 @@ -pragma solidity ^0.4.24; - -import "./ERC721.sol"; -import "../../access/roles/MinterRole.sol"; - -/** - * @title ERC721Mintable - * @dev ERC721 minting logic - */ -contract ERC721Mintable is ERC721, MinterRole { - /** - * @dev Function to mint tokens - * @param to The address that will receive the minted tokens. - * @param tokenId The token id to mint. - * @return A boolean that indicates if the operation was successful. - */ - function mint( - address to, - uint256 tokenId - ) - public - onlyMinter - returns (bool) - { - _mint(to, tokenId); - return true; - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC721/ERC721Pausable.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC721/ERC721Pausable.sol deleted file mode 100644 index c66d9da1f..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC721/ERC721Pausable.sol +++ /dev/null @@ -1,41 +0,0 @@ -pragma solidity ^0.4.24; - -import "./ERC721.sol"; -import "../../lifecycle/Pausable.sol"; - -/** - * @title ERC721 Non-Fungible Pausable token - * @dev ERC721 modified with pausable transfers. - **/ -contract ERC721Pausable is ERC721, Pausable { - function approve( - address to, - uint256 tokenId - ) - public - whenNotPaused - { - super.approve(to, tokenId); - } - - function setApprovalForAll( - address to, - bool approved - ) - public - whenNotPaused - { - super.setApprovalForAll(to, approved); - } - - function transferFrom( - address from, - address to, - uint256 tokenId - ) - public - whenNotPaused - { - super.transferFrom(from, to, tokenId); - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC721/IERC721.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC721/IERC721.sol deleted file mode 100644 index 24bc6a242..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC721/IERC721.sol +++ /dev/null @@ -1,49 +0,0 @@ -pragma solidity ^0.4.24; - -import "../../introspection/IERC165.sol"; - -/** - * @title ERC721 Non-Fungible Token Standard basic interface - * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md - */ -contract IERC721 is IERC165 { - - event Transfer( - address indexed from, - address indexed to, - uint256 indexed tokenId - ); - event Approval( - address indexed owner, - address indexed approved, - uint256 indexed tokenId - ); - event ApprovalForAll( - address indexed owner, - address indexed operator, - bool approved - ); - - function balanceOf(address owner) public view returns (uint256 balance); - function ownerOf(uint256 tokenId) public view returns (address owner); - - function approve(address to, uint256 tokenId) public; - function getApproved(uint256 tokenId) - public view returns (address operator); - - function setApprovalForAll(address operator, bool _approved) public; - function isApprovedForAll(address owner, address operator) - public view returns (bool); - - function transferFrom(address from, address to, uint256 tokenId) public; - function safeTransferFrom(address from, address to, uint256 tokenId) - public; - - function safeTransferFrom( - address from, - address to, - uint256 tokenId, - bytes data - ) - public; -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC721/IERC721Enumerable.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC721/IERC721Enumerable.sol deleted file mode 100644 index b772f2507..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC721/IERC721Enumerable.sol +++ /dev/null @@ -1,20 +0,0 @@ -pragma solidity ^0.4.24; - -import "./IERC721.sol"; - -/** - * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension - * @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md - */ -contract IERC721Enumerable is IERC721 { - function totalSupply() public view returns (uint256); - function tokenOfOwnerByIndex( - address owner, - uint256 index - ) - public - view - returns (uint256 tokenId); - - function tokenByIndex(uint256 index) public view returns (uint256); -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC721/IERC721Full.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC721/IERC721Full.sol deleted file mode 100644 index 90d8c21d8..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC721/IERC721Full.sol +++ /dev/null @@ -1,12 +0,0 @@ -pragma solidity ^0.4.24; - -import "./IERC721.sol"; -import "./IERC721Enumerable.sol"; -import "./IERC721Metadata.sol"; - -/** - * @title ERC-721 Non-Fungible Token Standard, full implementation interface - * @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md - */ -contract IERC721Full is IERC721, IERC721Enumerable, IERC721Metadata { -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC721/IERC721Metadata.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC721/IERC721Metadata.sol deleted file mode 100644 index 15b5ae4c6..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC721/IERC721Metadata.sol +++ /dev/null @@ -1,13 +0,0 @@ -pragma solidity ^0.4.24; - -import "./IERC721.sol"; - -/** - * @title ERC-721 Non-Fungible Token Standard, optional metadata extension - * @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md - */ -contract IERC721Metadata is IERC721 { - function name() external view returns (string); - function symbol() external view returns (string); - function tokenURI(uint256 tokenId) external view returns (string); -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC721/IERC721Receiver.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC721/IERC721Receiver.sol deleted file mode 100644 index e692f7e2c..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/token/ERC721/IERC721Receiver.sol +++ /dev/null @@ -1,31 +0,0 @@ -pragma solidity ^0.4.24; - -/** - * @title ERC721 token receiver interface - * @dev Interface for any contract that wants to support safeTransfers - * from ERC721 asset contracts. - */ -contract IERC721Receiver { - /** - * @notice Handle the receipt of an NFT - * @dev The ERC721 smart contract calls this function on the recipient - * after a `safeTransfer`. This function MUST return the function selector, - * otherwise the caller will revert the transaction. The selector to be - * returned can be obtained as `this.onERC721Received.selector`. This - * function MAY throw to revert and reject the transfer. - * Note: the ERC721 contract address is always the message sender. - * @param operator The address which called `safeTransferFrom` function - * @param from The address which previously owned the token - * @param tokenId The NFT identifier which is being transferred - * @param data Additional data with no specified format - * @return `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` - */ - function onERC721Received( - address operator, - address from, - uint256 tokenId, - bytes data - ) - public - returns(bytes4); -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/utils/Address.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/utils/Address.sol deleted file mode 100644 index 92a43ff9c..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/utils/Address.sol +++ /dev/null @@ -1,28 +0,0 @@ -pragma solidity ^0.4.24; - -/** - * Utility library of inline functions on addresses - */ -library Address { - - /** - * Returns whether the target address is a contract - * @dev This function will return false if invoked during the constructor of a contract, - * as the code is not actually created until after the constructor finishes. - * @param account address of the account to check - * @return whether the target address is a contract - */ - function isContract(address account) internal view returns (bool) { - uint256 size; - // XXX Currently there is no better way to check if there is a contract in an address - // than to check the size of the code at that address. - // See https://ethereum.stackexchange.com/a/14016/36603 - // for more details about how this works. - // TODO Check this again before the Serenity release, because all addresses will be - // contracts then. - // solium-disable-next-line security/no-inline-assembly - assembly { size := extcodesize(account) } - return size > 0; - } - -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/utils/Arrays.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/utils/Arrays.sol deleted file mode 100644 index 6882ea995..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/utils/Arrays.sol +++ /dev/null @@ -1,56 +0,0 @@ -pragma solidity ^0.4.23; - -import "../math/Math.sol"; - - -/** - * @title Arrays - * @dev Utility library of inline array functions - */ -library Arrays { - - /** - * @dev Upper bound search function which is kind of binary search algoritm. It searches sorted - * array to find index of the element value. If element is found then returns it's index otherwise - * it returns index of first element which is grater than searched value. If searched element is - * bigger than any array element function then returns first index after last element (i.e. all - * values inside the array are smaller than the target). Complexity O(log n). - * @param array The array sorted in ascending order. - * @param element The element's value to be find. - * @return The calculated index value. Returns 0 for empty array. - */ - function findUpperBound( - uint256[] storage array, - uint256 element - ) - internal - view - returns (uint256) - { - if (array.length == 0) { - return 0; - } - - uint256 low = 0; - uint256 high = array.length; - - while (low < high) { - uint256 mid = Math.average(low, high); - - // Note that mid will always be strictly less than high (i.e. it will be a valid array index) - // because Math.average rounds down (it does integer division with truncation). - if (array[mid] > element) { - high = mid; - } else { - low = mid + 1; - } - } - - // At this point `low` is the exclusive upper bound. We will return the inclusive upper bound. - if (low > 0 && array[low - 1] == element) { - return low - 1; - } else { - return low; - } - } -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/utils/ReentrancyGuard.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/utils/ReentrancyGuard.sol deleted file mode 100644 index 7a2895da2..000000000 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/openzeppelin-solidity/contracts/utils/ReentrancyGuard.sol +++ /dev/null @@ -1,34 +0,0 @@ -pragma solidity ^0.4.24; - -/** - * @title Helps contracts guard against reentrancy attacks. - * @author Remco Bloemen , Eenae - * @dev If you mark a function `nonReentrant`, you should also - * mark it `external`. - */ -contract ReentrancyGuard { - - /// @dev counter to allow mutex lock with only one SSTORE operation - uint256 private _guardCounter; - - constructor() internal { - // The counter starts at one to prevent changing it from zero to a non-zero - // value, which is a more expensive operation. - _guardCounter = 1; - } - - /** - * @dev Prevents a contract from calling itself, directly or indirectly. - * Calling a `nonReentrant` function from another `nonReentrant` - * function is not supported. It is possible to prevent this from happening - * by making the `nonReentrant` function external, and make it call a - * `private` function that does the actual work. - */ - modifier nonReentrant() { - _guardCounter += 1; - uint256 localCounter = _guardCounter; - _; - require(localCounter == _guardCounter); - } - -} diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/AdvancedAlgos.AlgoErc20Token.csproj b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/AdvancedAlgos.AlgoToken.AlgoErc20Token.csproj similarity index 75% rename from labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/AdvancedAlgos.AlgoErc20Token.csproj rename to labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/AdvancedAlgos.AlgoToken.AlgoErc20Token.csproj index bc5df3e67..f5790d550 100644 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/AdvancedAlgos.AlgoErc20Token.csproj +++ b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/AdvancedAlgos.AlgoToken.AlgoErc20Token.csproj @@ -8,7 +8,7 @@ - + @@ -18,6 +18,7 @@ - + + diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/AlgoIntegralConverterExtensions.cs b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/AlgoIntegralConverterExtensions.cs similarity index 54% rename from labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/AlgoIntegralConverterExtensions.cs rename to labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/AlgoIntegralConverterExtensions.cs index b870cddaf..94458234c 100644 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/AlgoIntegralConverterExtensions.cs +++ b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/AlgoIntegralConverterExtensions.cs @@ -5,11 +5,12 @@ using System.Collections.Generic; using System.Numerics; using System.Text; -namespace AdvancedAlgos.AlgoErc20Token +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); @@ -21,5 +22,14 @@ namespace AdvancedAlgos.AlgoErc20Token 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.AlgoErc20Token/AlgoTokenV1.cs b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/AlgoTokenV1.cs similarity index 55% rename from labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/AlgoTokenV1.cs rename to labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/AlgoTokenV1.cs index 1f30aa237..d61d8fc78 100644 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/AlgoTokenV1.cs +++ b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/AlgoTokenV1.cs @@ -1,14 +1,18 @@ using System; using System.Numerics; using System.Threading.Tasks; -using AdvancedAlgos.AlgoErc20Token.EthClientExtensions; +using AdvancedAlgos.AlgoToken.Framework.Ethereum; using Nethereum.Contracts; using Nethereum.RPC.Eth.DTOs; +using Nethereum.Web3; -namespace AdvancedAlgos.AlgoErc20Token +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.AlgoErc20Token/Erc20Token.cs b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/Erc20Token.cs similarity index 51% rename from labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/Erc20Token.cs rename to labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/Erc20Token.cs index 5cb42bf9d..9b4bf2dc4 100644 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/Erc20Token.cs +++ b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/Erc20Token.cs @@ -3,20 +3,27 @@ using System.Collections.Generic; using System.Numerics; using System.Text; using System.Threading.Tasks; -using AdvancedAlgos.AlgoErc20Token.EthClientExtensions; +using AdvancedAlgos.AlgoToken.Framework.Ethereum; using Nethereum.Contracts; using Nethereum.RPC.Eth.DTOs; +using Nethereum.Web3; -namespace AdvancedAlgos.AlgoErc20Token +namespace AdvancedAlgos.AlgoToken.AlgoErc20Token { public abstract class Erc20Token : SmartContract - where TContract : SmartContract, new() + 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"); @@ -25,16 +32,16 @@ namespace AdvancedAlgos.AlgoErc20Token _unpause = contractDescriptor.GetFunction("unpause"); } - public Task TransferAsync(BigInteger gasPrice, string to, BigInteger value) => - InvokeAsync(_transfer, 900000, gasPrice, to, value); + public Task TransferAsync(string to, BigInteger value) => + InvokeAsync(_transfer, 900000, to, value); public Task BalanceOfAsync(string owner) => _balanceOf.CallAsync(owner); - public Task PauseAsync(BigInteger gasPrice) => - InvokeAsync(_pause, 900000, gasPrice); + public Task PauseAsync() => + InvokeAsync(_pause, 900000); - public Task UnpauseAsync(BigInteger gasPrice) => - InvokeAsync(_unpause, 900000, gasPrice); + 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.AlgoErc20Token/SmartContracts/src/AlgoTokenV1.sol b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/AlgoTokenV1.sol similarity index 63% rename from labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/AlgoTokenV1.sol rename to labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/AlgoTokenV1.sol index 0563b6d40..654d73592 100644 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/AlgoTokenV1.sol +++ b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/AlgoTokenV1.sol @@ -1,7 +1,7 @@ -pragma solidity ^0.4.24; +pragma solidity 0.4.24; -import "./openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol"; -import "./openzeppelin-solidity/contracts/token/ERC20/ERC20Pausable.sol"; +import "openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol"; +import "openzeppelin-solidity/contracts/token/ERC20/ERC20Pausable.sol"; contract AlgoTokenV1 is ERC20, ERC20Detailed, ERC20Pausable { 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..0f9d5373d --- /dev/null +++ b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/bin/AlgoTokenV1-sol-output.json @@ -0,0 +1,16419 @@ +{ + "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": "60806040523480156200001157600080fd5b50604080518082018252600581527f416c676f7300000000000000000000000000000000000000000000000000000060208083019182528351808501909452600484527f414c474f00000000000000000000000000000000000000000000000000000000908401528151919291601291620000909160039190620002c1565b508151620000a6906004906020850190620002c1565b506005805460ff191660ff9290921691909117905550620000d290503364010000000062000103810204565b6007805460ff19169055620000fd336b033b2e3c9fd0803ce800000064010000000062000155810204565b62000366565b6200011e60068264010000000062000b226200021482021704565b604051600160a060020a038216907f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f890600090a250565b600160a060020a03821615156200016b57600080fd5b60025462000188908264010000000062000ac46200026f82021704565b600255600160a060020a038216600090815260208190526040902054620001be908264010000000062000ac46200026f82021704565b600160a060020a0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b600160a060020a03811615156200022a57600080fd5b6200023f828264010000000062000289810204565b156200024a57600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b6000828201838110156200028257600080fd5b9392505050565b6000600160a060020a0382161515620002a157600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200030457805160ff191683800117855562000334565b8280016001018555821562000334579182015b828111156200033457825182559160200191906001019062000317565b506200034292915062000346565b5090565b6200036391905b808211156200034257600081556001016200034d565b90565b610b9c80620003766000396000f3006080604052600436106100fb5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610100578063095ea7b31461018a57806318160ddd146101c257806323b872dd146101e95780632ff2e9dc14610213578063313ce5671461022857806339509351146102535780633f4ba83a1461027757806346fbf68e1461028e5780635c975abb146102af5780636ef8d66d146102c457806370a08231146102d957806382dc1ec4146102fa5780638456cb591461031b57806395d89b4114610330578063a457c2d714610345578063a9059cbb14610369578063dd62ed3e1461038d575b600080fd5b34801561010c57600080fd5b506101156103b4565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561014f578181015183820152602001610137565b50505050905090810190601f16801561017c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561019657600080fd5b506101ae600160a060020a036004351660243561044a565b604080519115158252519081900360200190f35b3480156101ce57600080fd5b506101d761046e565b60408051918252519081900360200190f35b3480156101f557600080fd5b506101ae600160a060020a0360043581169060243516604435610474565b34801561021f57600080fd5b506101d761049a565b34801561023457600080fd5b5061023d6104aa565b6040805160ff9092168252519081900360200190f35b34801561025f57600080fd5b506101ae600160a060020a03600435166024356104b3565b34801561028357600080fd5b5061028c6104d0565b005b34801561029a57600080fd5b506101ae600160a060020a0360043516610534565b3480156102bb57600080fd5b506101ae61054d565b3480156102d057600080fd5b5061028c610556565b3480156102e557600080fd5b506101d7600160a060020a0360043516610561565b34801561030657600080fd5b5061028c600160a060020a036004351661057c565b34801561032757600080fd5b5061028c61059c565b34801561033c57600080fd5b50610115610602565b34801561035157600080fd5b506101ae600160a060020a0360043516602435610663565b34801561037557600080fd5b506101ae600160a060020a0360043516602435610680565b34801561039957600080fd5b506101d7600160a060020a036004358116906024351661069d565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104405780601f1061041557610100808354040283529160200191610440565b820191906000526020600020905b81548152906001019060200180831161042357829003601f168201915b5050505050905090565b60075460009060ff161561045d57600080fd5b61046783836106c8565b9392505050565b60025490565b60075460009060ff161561048757600080fd5b610492848484610746565b949350505050565b6b033b2e3c9fd0803ce800000081565b60055460ff1690565b60075460009060ff16156104c657600080fd5b61046783836107e3565b6104d933610534565b15156104e457600080fd5b60075460ff1615156104f557600080fd5b6007805460ff191690556040805133815290517f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa9181900360200190a1565b600061054760068363ffffffff61089316565b92915050565b60075460ff1690565b61055f336108ca565b565b600160a060020a031660009081526020819052604090205490565b61058533610534565b151561059057600080fd5b61059981610912565b50565b6105a533610534565b15156105b057600080fd5b60075460ff16156105c057600080fd5b6007805460ff191660011790556040805133815290517f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2589181900360200190a1565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104405780601f1061041557610100808354040283529160200191610440565b60075460009060ff161561067657600080fd5b610467838361095a565b60075460009060ff161561069357600080fd5b61046783836109a5565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6000600160a060020a03831615156106df57600080fd5b336000818152600160209081526040808320600160a060020a03881680855290835292819020869055805186815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a350600192915050565b600160a060020a038316600090815260016020908152604080832033845290915281205482111561077657600080fd5b600160a060020a03841660009081526001602090815260408083203384529091529020546107aa908363ffffffff6109bb16565b600160a060020a03851660009081526001602090815260408083203384529091529020556107d98484846109d2565b5060019392505050565b6000600160a060020a03831615156107fa57600080fd5b336000908152600160209081526040808320600160a060020a038716845290915290205461082e908363ffffffff610ac416565b336000818152600160209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b6000600160a060020a03821615156108aa57600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b6108db60068263ffffffff610ad616565b604051600160a060020a038216907fcd265ebaf09df2871cc7bd4133404a235ba12eff2041bb89d9c714a2621c7c7e90600090a250565b61092360068263ffffffff610b2216565b604051600160a060020a038216907f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f890600090a250565b6000600160a060020a038316151561097157600080fd5b336000908152600160209081526040808320600160a060020a038716845290915290205461082e908363ffffffff6109bb16565b60006109b23384846109d2565b50600192915050565b600080838311156109cb57600080fd5b5050900390565b600160a060020a0383166000908152602081905260409020548111156109f757600080fd5b600160a060020a0382161515610a0c57600080fd5b600160a060020a038316600090815260208190526040902054610a35908263ffffffff6109bb16565b600160a060020a038085166000908152602081905260408082209390935590841681522054610a6a908263ffffffff610ac416565b600160a060020a038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008282018381101561046757600080fd5b600160a060020a0381161515610aeb57600080fd5b610af58282610893565b1515610b0057600080fd5b600160a060020a0316600090815260209190915260409020805460ff19169055565b600160a060020a0381161515610b3757600080fd5b610b418282610893565b15610b4b57600080fd5b600160a060020a0316600090815260209190915260409020805460ff191660011790555600a165627a7a7230582061a190b3074a6fa0ab1f995699a75a855141c91dd51eb835ef565d0c7739360d0029", + "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 0xB22 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 0xAC4 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 0xAC4 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 0xB9C DUP1 PUSH3 0x376 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN STOP PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0xFB JUMPI PUSH4 0xFFFFFFFF PUSH29 0x100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 CALLDATALOAD DIV AND PUSH4 0x6FDDE03 DUP2 EQ PUSH2 0x100 JUMPI DUP1 PUSH4 0x95EA7B3 EQ PUSH2 0x18A JUMPI DUP1 PUSH4 0x18160DDD EQ PUSH2 0x1C2 JUMPI DUP1 PUSH4 0x23B872DD EQ PUSH2 0x1E9 JUMPI DUP1 PUSH4 0x2FF2E9DC EQ PUSH2 0x213 JUMPI DUP1 PUSH4 0x313CE567 EQ PUSH2 0x228 JUMPI DUP1 PUSH4 0x39509351 EQ PUSH2 0x253 JUMPI DUP1 PUSH4 0x3F4BA83A EQ PUSH2 0x277 JUMPI DUP1 PUSH4 0x46FBF68E EQ PUSH2 0x28E JUMPI DUP1 PUSH4 0x5C975ABB EQ PUSH2 0x2AF JUMPI DUP1 PUSH4 0x6EF8D66D EQ PUSH2 0x2C4 JUMPI DUP1 PUSH4 0x70A08231 EQ PUSH2 0x2D9 JUMPI DUP1 PUSH4 0x82DC1EC4 EQ PUSH2 0x2FA JUMPI DUP1 PUSH4 0x8456CB59 EQ PUSH2 0x31B JUMPI DUP1 PUSH4 0x95D89B41 EQ PUSH2 0x330 JUMPI DUP1 PUSH4 0xA457C2D7 EQ PUSH2 0x345 JUMPI DUP1 PUSH4 0xA9059CBB EQ PUSH2 0x369 JUMPI DUP1 PUSH4 0xDD62ED3E EQ PUSH2 0x38D JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x10C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x115 PUSH2 0x3B4 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 0x14F JUMPI DUP2 DUP2 ADD MLOAD DUP4 DUP3 ADD MSTORE PUSH1 0x20 ADD PUSH2 0x137 JUMP JUMPDEST POP POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x17C 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 CALLVALUE DUP1 ISZERO PUSH2 0x196 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1AE PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB PUSH1 0x4 CALLDATALOAD AND PUSH1 0x24 CALLDATALOAD PUSH2 0x44A 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 0x1CE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1D7 PUSH2 0x46E JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x1F5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1AE PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB PUSH1 0x4 CALLDATALOAD DUP2 AND SWAP1 PUSH1 0x24 CALLDATALOAD AND PUSH1 0x44 CALLDATALOAD PUSH2 0x474 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x21F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1D7 PUSH2 0x49A JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x234 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x23D PUSH2 0x4AA 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 0x25F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1AE PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB PUSH1 0x4 CALLDATALOAD AND PUSH1 0x24 CALLDATALOAD PUSH2 0x4B3 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x283 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x28C PUSH2 0x4D0 JUMP JUMPDEST STOP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x29A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1AE PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB PUSH1 0x4 CALLDATALOAD AND PUSH2 0x534 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x2BB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1AE PUSH2 0x54D JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x2D0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x28C PUSH2 0x556 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x2E5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1D7 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB PUSH1 0x4 CALLDATALOAD AND PUSH2 0x561 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x306 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x28C PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB PUSH1 0x4 CALLDATALOAD AND PUSH2 0x57C JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x327 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x28C PUSH2 0x59C JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x33C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x115 PUSH2 0x602 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x351 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1AE PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB PUSH1 0x4 CALLDATALOAD AND PUSH1 0x24 CALLDATALOAD PUSH2 0x663 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x375 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1AE PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB PUSH1 0x4 CALLDATALOAD AND PUSH1 0x24 CALLDATALOAD PUSH2 0x680 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x399 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x1D7 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB PUSH1 0x4 CALLDATALOAD DUP2 AND SWAP1 PUSH1 0x24 CALLDATALOAD AND PUSH2 0x69D 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 0x440 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x415 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x440 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 0x423 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 0x45D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x467 DUP4 DUP4 PUSH2 0x6C8 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 0x487 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x492 DUP5 DUP5 DUP5 PUSH2 0x746 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 0x4C6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x467 DUP4 DUP4 PUSH2 0x7E3 JUMP JUMPDEST PUSH2 0x4D9 CALLER PUSH2 0x534 JUMP JUMPDEST ISZERO ISZERO PUSH2 0x4E4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x7 SLOAD PUSH1 0xFF AND ISZERO ISZERO PUSH2 0x4F5 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 0x547 PUSH1 0x6 DUP4 PUSH4 0xFFFFFFFF PUSH2 0x893 AND JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x7 SLOAD PUSH1 0xFF AND SWAP1 JUMP JUMPDEST PUSH2 0x55F CALLER PUSH2 0x8CA 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 0x585 CALLER PUSH2 0x534 JUMP JUMPDEST ISZERO ISZERO PUSH2 0x590 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x599 DUP2 PUSH2 0x912 JUMP JUMPDEST POP JUMP JUMPDEST PUSH2 0x5A5 CALLER PUSH2 0x534 JUMP JUMPDEST ISZERO ISZERO PUSH2 0x5B0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x7 SLOAD PUSH1 0xFF AND ISZERO PUSH2 0x5C0 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 0x440 JUMPI DUP1 PUSH1 0x1F LT PUSH2 0x415 JUMPI PUSH2 0x100 DUP1 DUP4 SLOAD DIV MUL DUP4 MSTORE SWAP2 PUSH1 0x20 ADD SWAP2 PUSH2 0x440 JUMP JUMPDEST PUSH1 0x7 SLOAD PUSH1 0x0 SWAP1 PUSH1 0xFF AND ISZERO PUSH2 0x676 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x467 DUP4 DUP4 PUSH2 0x95A JUMP JUMPDEST PUSH1 0x7 SLOAD PUSH1 0x0 SWAP1 PUSH1 0xFF AND ISZERO PUSH2 0x693 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x467 DUP4 DUP4 PUSH2 0x9A5 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 0x6DF 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 DUP3 GT ISZERO PUSH2 0x776 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP5 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 SLOAD PUSH2 0x7AA SWAP1 DUP4 PUSH4 0xFFFFFFFF PUSH2 0x9BB 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 0x7D9 DUP5 DUP5 DUP5 PUSH2 0x9D2 JUMP JUMPDEST 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 0x7FA 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 0x82E SWAP1 DUP4 PUSH4 0xFFFFFFFF PUSH2 0xAC4 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 0x8AA 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 0x8DB PUSH1 0x6 DUP3 PUSH4 0xFFFFFFFF PUSH2 0xAD6 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 0x923 PUSH1 0x6 DUP3 PUSH4 0xFFFFFFFF PUSH2 0xB22 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 0x971 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 0x82E SWAP1 DUP4 PUSH4 0xFFFFFFFF PUSH2 0x9BB AND JUMP JUMPDEST PUSH1 0x0 PUSH2 0x9B2 CALLER DUP5 DUP5 PUSH2 0x9D2 JUMP JUMPDEST POP PUSH1 0x1 SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 DUP4 DUP4 GT ISZERO PUSH2 0x9CB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP POP SWAP1 SUB SWAP1 JUMP 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 DUP2 GT ISZERO PUSH2 0x9F7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP3 AND ISZERO ISZERO PUSH2 0xA0C 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 0xA35 SWAP1 DUP3 PUSH4 0xFFFFFFFF PUSH2 0x9BB 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 0xA6A SWAP1 DUP3 PUSH4 0xFFFFFFFF PUSH2 0xAC4 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 0x467 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP2 AND ISZERO ISZERO PUSH2 0xAEB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xAF5 DUP3 DUP3 PUSH2 0x893 JUMP JUMPDEST ISZERO ISZERO PUSH2 0xB00 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 0xB37 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xB41 DUP3 DUP3 PUSH2 0x893 JUMP JUMPDEST ISZERO PUSH2 0xB4B 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 STOP LOG1 PUSH6 0x627A7A723058 KECCAK256 PUSH2 0xA190 0xb3 SMOD 0x4a PUSH16 0xA0AB1F995699A75A855141C91DD51EB8 CALLDATALOAD 0xef JUMP 0x5d 0xc PUSH24 0x39360D002900000000000000000000000000000000000000 ", + "sourceMap": "409:310:0:-;;;560:156;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;398:134:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;467:12;;398:134;;;639:2:0;;467:12:6;;:5;;398:134;467:12;:::i;:::-;-1:-1:-1;485:16:6;;;;:7;;:16;;;;;:::i;:::-;-1:-1:-1;507:9:6;:20;;-1:-1:-1;;507:20:6;;;;;;;;;;;;-1:-1:-1;260:22:2;;-1:-1:-1;271:10:2;260;;;;:22;:::i;:::-;340:7:3;:15;;-1:-1:-1;;340:15:3;;;675:33:0;681:10;519:32;675:5;;;;:33;:::i;:::-;409:310;;629:108:2;681:20;:7;693;681:11;;;;;;:20;:::i;:::-;712;;-1:-1:-1;;;;;712:20:2;;;;;;;;629:108;:::o;5541:235:5:-;-1:-1:-1;;;;;5611:12:5;;;;5603:21;;;;;;5645:12;;:23;;5662:5;5645:16;;;;;;:23;:::i;:::-;5630:12;:38;-1:-1:-1;;;;;5695:18:5;;:9;:18;;;;;;;;;;;:29;;5718:5;5695:22;;;;;;:29;:::i;:::-;-1:-1:-1;;;;;5674:18:5;;:9;:18;;;;;;;;;;;:50;;;;5735:36;;;;;;;5674:18;;:9;;5735:36;;;;;;;;;;5541:235;;:::o;244:167:1:-;-1:-1:-1;;;;;316:21:1;;;;308:30;;;;;;353:18;357:4;363:7;353:3;;;;:18;:::i;:::-;352:19;344:28;;;;;;-1:-1:-1;;;;;379:20:1;:11;:20;;;;;;;;;;;:27;;-1:-1:-1;;379:27:1;402:4;379:27;;;244:167::o;1272:131:4:-;1330:7;1357:5;;;1376:6;;;;1368:15;;;;;;1397:1;1272:131;-1:-1:-1;;;1272:131:4:o;725:166:1:-;809:4;-1:-1:-1;;;;;831:21:1;;;;823:30;;;;;;-1:-1:-1;;;;;;866:20:1;:11;:20;;;;;;;;;;;;;;;725:166::o;409:310:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;409:310:0;;;-1:-1:-1;409:310:0;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;" + }, + "gasEstimates": { + "creation": { + "codeDepositCost": "594400", + "executionCost": "infinite", + "totalCost": "infinite" + }, + "external": { + "INITIAL_SUPPLY()": "272", + "addPauser(address)": "infinite", + "allowance(address,address)": "1082", + "approve(address,uint256)": "22732", + "balanceOf(address)": "851", + "decimals()": "509", + "decreaseAllowance(address,uint256)": "infinite", + "increaseAllowance(address,uint256)": "infinite", + "isPauser(address)": "infinite", + "name()": "infinite", + "pause()": "infinite", + "paused()": "594", + "renouncePauser()": "infinite", + "symbol()": "infinite", + "totalSupply()": "428", + "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.4.24+commit.e67f0147\"},\"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\":\"0xa3ca532ba89cd9078218c7a33002166565007a192a01ab562dda1b4f64cfde7a\",\"urls\":[\"bzzr://b6dfc4d2318bf62ca3e6e8c65884e5d9bb7bf98667168794f65b4d8090f3ea75\"]},\"d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol\":{\"keccak256\":\"0xa6e47d62e68903c8fff23500d80e7cc8085b9127995803478d9982cd8a6d49e4\",\"urls\":[\"bzzr://7c87eb3c145fe7592c97baa287501faff7e81c1965333c9b042ffb6b387e94a1\"]},\"d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/roles/PauserRole.sol\":{\"keccak256\":\"0x9c483b37c788ed1f3ce0c29934e5c41b9e84ff954380c04bffdf42c1e215a1a8\",\"urls\":[\"bzzr://1727e08315c67d0203510d5d50e645c80a569df7964715eddaec10bf90d70bab\"]},\"d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/lifecycle/Pausable.sol\":{\"keccak256\":\"0x9cb69bde8cc3efdd07a2c372e78b664e961f505b3e4195ee27f06b358ffef996\",\"urls\":[\"bzzr://13da310cd2989e27357c2912085af0f1925047070f48be175c6b7e2b0299084f\"]},\"d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0xdd18f05c74536a06166c90a17ec3c6932853764f292bed314ceb23e730ff83af\",\"urls\":[\"bzzr://1d8a608339978ac18782f7051816cf23b4072d8814979e3ef74788cc6025cca0\"]},\"d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0xaa2cf35177f37a9af9c975a973c813c5520be56ccee3a39b6c9883d4781cd072\",\"urls\":[\"bzzr://2244d517ff73299ad9b6c9dcb7d0788e5e452d8b1624d3027c1fb152135de8f4\"]},\"d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol\":{\"keccak256\":\"0xafff01f07c0aca08e5db86a0f35bcf40cbd0a5da06aeeb9964b06c0bac507866\",\"urls\":[\"bzzr://40bb6c5e5b0c7b20f56eb7bd662e2dbd295f3b8f5f0cbb23cbe5114590110729\"]},\"d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/ERC20Pausable.sol\":{\"keccak256\":\"0x34ae26a75fc5dd5d3d283d0d95a080212e81734a5cab7be187778e74224d57d1\",\"urls\":[\"bzzr://8ed5c93c550934720a33a387f8272b252b5aa8c5e0e4c6e21d5e92c662632bbb\"]},\"d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xc8a7f15fa44eb10057f8bcb58418d3aed6f5267d211d18f93f3d4e0293e3da44\",\"urls\":[\"bzzr://8825e2508348b01a091ff47b8525e583b6e5604f6679684f805d67a9a6a2a7e9\"]}},\"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": { + "methods": {}, + "title": "Roles" + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a723058209944a978f76fff24cc87208ce7f37ff326fbfd8cd7d603831a39790f896d15bc0029", + "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 SWAP10 DIFFICULTY 0xa9 PUSH25 0xF76FFF24CC87208CE7F37FF326FBFD8CD7D603831A39790F89 PUSH14 0x15BC002900000000000000000000 ", + "sourceMap": "109:784: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.4.24+commit.e67f0147\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"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\":\"0xa6e47d62e68903c8fff23500d80e7cc8085b9127995803478d9982cd8a6d49e4\",\"urls\":[\"bzzr://7c87eb3c145fe7592c97baa287501faff7e81c1965333c9b042ffb6b387e94a1\"]}},\"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": { + "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": { + "methods": {}, + "title": "SafeMath" + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a7230582058bb1a821f73a50e8c797d9d6c3c6d4818e97d5b10d4a35f2486f49dbe5d83fb0029", + "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 PC 0xbb BYTE DUP3 0x1f PUSH20 0xA50E8C797D9D6C3C6D4818E97D5B10D4A35F2486 DELEGATECALL SWAP14 0xbe 0x5d DUP4 CREATE2 STOP 0x29 ", + "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/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\":\"0xdd18f05c74536a06166c90a17ec3c6932853764f292bed314ceb23e730ff83af\",\"urls\":[\"bzzr://1d8a608339978ac18782f7051816cf23b4072d8814979e3ef74788cc6025cca0\"]}},\"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": { + "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", + "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", + "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", + "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": "608060405234801561001057600080fd5b50610595806100206000396000f30060806040526004361061008d5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663095ea7b3811461009257806318160ddd146100ca57806323b872dd146100f1578063395093511461011b57806370a082311461013f578063a457c2d714610160578063a9059cbb14610184578063dd62ed3e146101a8575b600080fd5b34801561009e57600080fd5b506100b6600160a060020a03600435166024356101cf565b604080519115158252519081900360200190f35b3480156100d657600080fd5b506100df61024d565b60408051918252519081900360200190f35b3480156100fd57600080fd5b506100b6600160a060020a0360043581169060243516604435610253565b34801561012757600080fd5b506100b6600160a060020a03600435166024356102f0565b34801561014b57600080fd5b506100df600160a060020a03600435166103a0565b34801561016c57600080fd5b506100b6600160a060020a03600435166024356103bb565b34801561019057600080fd5b506100b6600160a060020a0360043516602435610406565b3480156101b457600080fd5b506100df600160a060020a036004358116906024351661041c565b6000600160a060020a03831615156101e657600080fd5b336000818152600160209081526040808320600160a060020a03881680855290835292819020869055805186815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a350600192915050565b60025490565b600160a060020a038316600090815260016020908152604080832033845290915281205482111561028357600080fd5b600160a060020a03841660009081526001602090815260408083203384529091529020546102b7908363ffffffff61044716565b600160a060020a03851660009081526001602090815260408083203384529091529020556102e684848461045e565b5060019392505050565b6000600160a060020a038316151561030757600080fd5b336000908152600160209081526040808320600160a060020a038716845290915290205461033b908363ffffffff61055016565b336000818152600160209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a031660009081526020819052604090205490565b6000600160a060020a03831615156103d257600080fd5b336000908152600160209081526040808320600160a060020a038716845290915290205461033b908363ffffffff61044716565b600061041333848461045e565b50600192915050565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6000808383111561045757600080fd5b5050900390565b600160a060020a03831660009081526020819052604090205481111561048357600080fd5b600160a060020a038216151561049857600080fd5b600160a060020a0383166000908152602081905260409020546104c1908263ffffffff61044716565b600160a060020a0380851660009081526020819052604080822093909355908416815220546104f6908263ffffffff61055016565b600160a060020a038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008282018381101561056257600080fd5b93925050505600a165627a7a72305820083071c6150a8cecebb9b0a032aec2e16a0aaadc7643557277a17d1e163e573d0029", + "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x595 DUP1 PUSH2 0x20 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN STOP PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0x8D JUMPI PUSH4 0xFFFFFFFF PUSH29 0x100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 CALLDATALOAD DIV AND PUSH4 0x95EA7B3 DUP2 EQ PUSH2 0x92 JUMPI DUP1 PUSH4 0x18160DDD EQ PUSH2 0xCA JUMPI DUP1 PUSH4 0x23B872DD EQ PUSH2 0xF1 JUMPI DUP1 PUSH4 0x39509351 EQ PUSH2 0x11B JUMPI DUP1 PUSH4 0x70A08231 EQ PUSH2 0x13F JUMPI DUP1 PUSH4 0xA457C2D7 EQ PUSH2 0x160 JUMPI DUP1 PUSH4 0xA9059CBB EQ PUSH2 0x184 JUMPI DUP1 PUSH4 0xDD62ED3E EQ PUSH2 0x1A8 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x9E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xB6 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB PUSH1 0x4 CALLDATALOAD AND PUSH1 0x24 CALLDATALOAD PUSH2 0x1CF 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 0xD6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xDF PUSH2 0x24D JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xFD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xB6 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB PUSH1 0x4 CALLDATALOAD DUP2 AND SWAP1 PUSH1 0x24 CALLDATALOAD AND PUSH1 0x44 CALLDATALOAD PUSH2 0x253 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x127 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xB6 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB PUSH1 0x4 CALLDATALOAD AND PUSH1 0x24 CALLDATALOAD PUSH2 0x2F0 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x14B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xDF PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB PUSH1 0x4 CALLDATALOAD AND PUSH2 0x3A0 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x16C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xB6 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB PUSH1 0x4 CALLDATALOAD AND PUSH1 0x24 CALLDATALOAD PUSH2 0x3BB JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x190 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xB6 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB PUSH1 0x4 CALLDATALOAD AND PUSH1 0x24 CALLDATALOAD PUSH2 0x406 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x1B4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xDF PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB PUSH1 0x4 CALLDATALOAD DUP2 AND SWAP1 PUSH1 0x24 CALLDATALOAD AND PUSH2 0x41C JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP4 AND ISZERO ISZERO PUSH2 0x1E6 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 DUP3 GT ISZERO PUSH2 0x283 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP5 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 SLOAD PUSH2 0x2B7 SWAP1 DUP4 PUSH4 0xFFFFFFFF PUSH2 0x447 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 0x2E6 DUP5 DUP5 DUP5 PUSH2 0x45E JUMP JUMPDEST 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 0x307 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 0x33B SWAP1 DUP4 PUSH4 0xFFFFFFFF PUSH2 0x550 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 0x3D2 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 0x33B SWAP1 DUP4 PUSH4 0xFFFFFFFF PUSH2 0x447 AND JUMP JUMPDEST PUSH1 0x0 PUSH2 0x413 CALLER DUP5 DUP5 PUSH2 0x45E 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 DUP1 DUP4 DUP4 GT ISZERO PUSH2 0x457 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP POP SWAP1 SUB SWAP1 JUMP 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 DUP2 GT ISZERO PUSH2 0x483 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP3 AND ISZERO ISZERO PUSH2 0x498 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 0x4C1 SWAP1 DUP3 PUSH4 0xFFFFFFFF PUSH2 0x447 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 0x4F6 SWAP1 DUP3 PUSH4 0xFFFFFFFF PUSH2 0x550 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 0x562 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP4 SWAP3 POP POP POP JUMP STOP LOG1 PUSH6 0x627A7A723058 KECCAK256 ADDMOD ADDRESS PUSH18 0xC6150A8CECEBB9B0A032AEC2E16A0AAADC76 NUMBER SSTORE PUSH19 0x77A17D1E163E573D0029000000000000000000 ", + "sourceMap": "369:6595:5:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;369:6595:5;;;;;;;" + }, + "gasEstimates": { + "creation": { + "codeDepositCost": "285800", + "executionCost": "324", + "totalCost": "286124" + }, + "external": { + "allowance(address,address)": "862", + "approve(address,uint256)": "22436", + "balanceOf(address)": "697", + "decreaseAllowance(address,uint256)": "infinite", + "increaseAllowance(address,uint256)": "infinite", + "totalSupply()": "406", + "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.4.24+commit.e67f0147\"},\"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\":{\"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\",\"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\",\"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\",\"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\":\"0xdd18f05c74536a06166c90a17ec3c6932853764f292bed314ceb23e730ff83af\",\"urls\":[\"bzzr://1d8a608339978ac18782f7051816cf23b4072d8814979e3ef74788cc6025cca0\"]},\"d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0xaa2cf35177f37a9af9c975a973c813c5520be56ccee3a39b6c9883d4781cd072\",\"urls\":[\"bzzr://2244d517ff73299ad9b6c9dcb7d0788e5e452d8b1624d3027c1fb152135de8f4\"]},\"d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xc8a7f15fa44eb10057f8bcb58418d3aed6f5267d211d18f93f3d4e0293e3da44\",\"urls\":[\"bzzr://8825e2508348b01a091ff47b8525e583b6e5604f6679684f805d67a9a6a2a7e9\"]}},\"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": { + "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": { + "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": "608060405261001633640100000000610025810204565b6004805460ff19169055610102565b61003d60038264010000000061090761007482021704565b604051600160a060020a038216907f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f890600090a250565b600160a060020a038116151561008957600080fd5b61009c82826401000000006100cb810204565b156100a657600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b6000600160a060020a03821615156100e257600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b610981806101116000396000f3006080604052600436106100cf5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663095ea7b381146100d457806318160ddd1461010c57806323b872dd14610133578063395093511461015d5780633f4ba83a1461018157806346fbf68e146101985780635c975abb146101b95780636ef8d66d146101ce57806370a08231146101e357806382dc1ec4146102045780638456cb5914610225578063a457c2d71461023a578063a9059cbb1461025e578063dd62ed3e14610282575b600080fd5b3480156100e057600080fd5b506100f8600160a060020a03600435166024356102a9565b604080519115158252519081900360200190f35b34801561011857600080fd5b506101216102cd565b60408051918252519081900360200190f35b34801561013f57600080fd5b506100f8600160a060020a03600435811690602435166044356102d3565b34801561016957600080fd5b506100f8600160a060020a03600435166024356102f9565b34801561018d57600080fd5b50610196610316565b005b3480156101a457600080fd5b506100f8600160a060020a036004351661037a565b3480156101c557600080fd5b506100f8610393565b3480156101da57600080fd5b5061019661039c565b3480156101ef57600080fd5b50610121600160a060020a03600435166103a7565b34801561021057600080fd5b50610196600160a060020a03600435166103c2565b34801561023157600080fd5b506101966103e2565b34801561024657600080fd5b506100f8600160a060020a0360043516602435610448565b34801561026a57600080fd5b506100f8600160a060020a0360043516602435610465565b34801561028e57600080fd5b50610121600160a060020a0360043581169060243516610482565b60045460009060ff16156102bc57600080fd5b6102c683836104ad565b9392505050565b60025490565b60045460009060ff16156102e657600080fd5b6102f184848461052b565b949350505050565b60045460009060ff161561030c57600080fd5b6102c683836105c8565b61031f3361037a565b151561032a57600080fd5b60045460ff16151561033b57600080fd5b6004805460ff191690556040805133815290517f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa9181900360200190a1565b600061038d60038363ffffffff61067816565b92915050565b60045460ff1690565b6103a5336106af565b565b600160a060020a031660009081526020819052604090205490565b6103cb3361037a565b15156103d657600080fd5b6103df816106f7565b50565b6103eb3361037a565b15156103f657600080fd5b60045460ff161561040657600080fd5b6004805460ff191660011790556040805133815290517f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2589181900360200190a1565b60045460009060ff161561045b57600080fd5b6102c6838361073f565b60045460009060ff161561047857600080fd5b6102c6838361078a565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6000600160a060020a03831615156104c457600080fd5b336000818152600160209081526040808320600160a060020a03881680855290835292819020869055805186815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a350600192915050565b600160a060020a038316600090815260016020908152604080832033845290915281205482111561055b57600080fd5b600160a060020a038416600090815260016020908152604080832033845290915290205461058f908363ffffffff6107a016565b600160a060020a03851660009081526001602090815260408083203384529091529020556105be8484846107b7565b5060019392505050565b6000600160a060020a03831615156105df57600080fd5b336000908152600160209081526040808320600160a060020a0387168452909152902054610613908363ffffffff6108a916565b336000818152600160209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b6000600160a060020a038216151561068f57600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b6106c060038263ffffffff6108bb16565b604051600160a060020a038216907fcd265ebaf09df2871cc7bd4133404a235ba12eff2041bb89d9c714a2621c7c7e90600090a250565b61070860038263ffffffff61090716565b604051600160a060020a038216907f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f890600090a250565b6000600160a060020a038316151561075657600080fd5b336000908152600160209081526040808320600160a060020a0387168452909152902054610613908363ffffffff6107a016565b60006107973384846107b7565b50600192915050565b600080838311156107b057600080fd5b5050900390565b600160a060020a0383166000908152602081905260409020548111156107dc57600080fd5b600160a060020a03821615156107f157600080fd5b600160a060020a03831660009081526020819052604090205461081a908263ffffffff6107a016565b600160a060020a03808516600090815260208190526040808220939093559084168152205461084f908263ffffffff6108a916565b600160a060020a038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6000828201838110156102c657600080fd5b600160a060020a03811615156108d057600080fd5b6108da8282610678565b15156108e557600080fd5b600160a060020a0316600090815260209190915260409020805460ff19169055565b600160a060020a038116151561091c57600080fd5b6109268282610678565b1561093057600080fd5b600160a060020a0316600090815260209190915260409020805460ff191660011790555600a165627a7a72305820ec68135419984dd2cdc693df9167b633b80c03b7d2dd774f775b3d32098439b90029", + "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 0x907 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 0x981 DUP1 PUSH2 0x111 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN STOP PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0xCF JUMPI PUSH4 0xFFFFFFFF PUSH29 0x100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 CALLDATALOAD DIV AND PUSH4 0x95EA7B3 DUP2 EQ PUSH2 0xD4 JUMPI DUP1 PUSH4 0x18160DDD EQ PUSH2 0x10C JUMPI DUP1 PUSH4 0x23B872DD EQ PUSH2 0x133 JUMPI DUP1 PUSH4 0x39509351 EQ PUSH2 0x15D JUMPI DUP1 PUSH4 0x3F4BA83A EQ PUSH2 0x181 JUMPI DUP1 PUSH4 0x46FBF68E EQ PUSH2 0x198 JUMPI DUP1 PUSH4 0x5C975ABB EQ PUSH2 0x1B9 JUMPI DUP1 PUSH4 0x6EF8D66D EQ PUSH2 0x1CE JUMPI DUP1 PUSH4 0x70A08231 EQ PUSH2 0x1E3 JUMPI DUP1 PUSH4 0x82DC1EC4 EQ PUSH2 0x204 JUMPI DUP1 PUSH4 0x8456CB59 EQ PUSH2 0x225 JUMPI DUP1 PUSH4 0xA457C2D7 EQ PUSH2 0x23A JUMPI DUP1 PUSH4 0xA9059CBB EQ PUSH2 0x25E JUMPI DUP1 PUSH4 0xDD62ED3E EQ PUSH2 0x282 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0xE0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xF8 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB PUSH1 0x4 CALLDATALOAD AND PUSH1 0x24 CALLDATALOAD PUSH2 0x2A9 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 0x118 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x121 PUSH2 0x2CD JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x13F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xF8 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB PUSH1 0x4 CALLDATALOAD DUP2 AND SWAP1 PUSH1 0x24 CALLDATALOAD AND PUSH1 0x44 CALLDATALOAD PUSH2 0x2D3 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x169 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xF8 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB PUSH1 0x4 CALLDATALOAD AND PUSH1 0x24 CALLDATALOAD PUSH2 0x2F9 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x18D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x196 PUSH2 0x316 JUMP JUMPDEST STOP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x1A4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xF8 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB PUSH1 0x4 CALLDATALOAD AND PUSH2 0x37A JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x1C5 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xF8 PUSH2 0x393 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x1DA JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x196 PUSH2 0x39C JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x1EF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x121 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB PUSH1 0x4 CALLDATALOAD AND PUSH2 0x3A7 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x210 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x196 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB PUSH1 0x4 CALLDATALOAD AND PUSH2 0x3C2 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x231 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x196 PUSH2 0x3E2 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x246 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xF8 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB PUSH1 0x4 CALLDATALOAD AND PUSH1 0x24 CALLDATALOAD PUSH2 0x448 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x26A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0xF8 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB PUSH1 0x4 CALLDATALOAD AND PUSH1 0x24 CALLDATALOAD PUSH2 0x465 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x28E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x121 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB PUSH1 0x4 CALLDATALOAD DUP2 AND SWAP1 PUSH1 0x24 CALLDATALOAD AND PUSH2 0x482 JUMP JUMPDEST PUSH1 0x4 SLOAD PUSH1 0x0 SWAP1 PUSH1 0xFF AND ISZERO PUSH2 0x2BC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x2C6 DUP4 DUP4 PUSH2 0x4AD 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 0x2E6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x2F1 DUP5 DUP5 DUP5 PUSH2 0x52B JUMP JUMPDEST SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x4 SLOAD PUSH1 0x0 SWAP1 PUSH1 0xFF AND ISZERO PUSH2 0x30C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x2C6 DUP4 DUP4 PUSH2 0x5C8 JUMP JUMPDEST PUSH2 0x31F CALLER PUSH2 0x37A JUMP JUMPDEST ISZERO ISZERO PUSH2 0x32A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x4 SLOAD PUSH1 0xFF AND ISZERO ISZERO PUSH2 0x33B 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 0x38D PUSH1 0x3 DUP4 PUSH4 0xFFFFFFFF PUSH2 0x678 AND JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x4 SLOAD PUSH1 0xFF AND SWAP1 JUMP JUMPDEST PUSH2 0x3A5 CALLER PUSH2 0x6AF 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 0x3CB CALLER PUSH2 0x37A JUMP JUMPDEST ISZERO ISZERO PUSH2 0x3D6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x3DF DUP2 PUSH2 0x6F7 JUMP JUMPDEST POP JUMP JUMPDEST PUSH2 0x3EB CALLER PUSH2 0x37A JUMP JUMPDEST ISZERO ISZERO PUSH2 0x3F6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x4 SLOAD PUSH1 0xFF AND ISZERO PUSH2 0x406 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 0x45B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x2C6 DUP4 DUP4 PUSH2 0x73F JUMP JUMPDEST PUSH1 0x4 SLOAD PUSH1 0x0 SWAP1 PUSH1 0xFF AND ISZERO PUSH2 0x478 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x2C6 DUP4 DUP4 PUSH2 0x78A 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 0x4C4 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 DUP3 GT ISZERO PUSH2 0x55B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP5 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 SLOAD PUSH2 0x58F SWAP1 DUP4 PUSH4 0xFFFFFFFF PUSH2 0x7A0 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 0x5BE DUP5 DUP5 DUP5 PUSH2 0x7B7 JUMP JUMPDEST 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 0x5DF 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 0x613 SWAP1 DUP4 PUSH4 0xFFFFFFFF PUSH2 0x8A9 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 0x68F 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 0x6C0 PUSH1 0x3 DUP3 PUSH4 0xFFFFFFFF PUSH2 0x8BB 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 0x708 PUSH1 0x3 DUP3 PUSH4 0xFFFFFFFF PUSH2 0x907 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 0x756 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 0x613 SWAP1 DUP4 PUSH4 0xFFFFFFFF PUSH2 0x7A0 AND JUMP JUMPDEST PUSH1 0x0 PUSH2 0x797 CALLER DUP5 DUP5 PUSH2 0x7B7 JUMP JUMPDEST POP PUSH1 0x1 SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 DUP4 DUP4 GT ISZERO PUSH2 0x7B0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP POP SWAP1 SUB SWAP1 JUMP 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 DUP2 GT ISZERO PUSH2 0x7DC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP3 AND ISZERO ISZERO PUSH2 0x7F1 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 0x81A SWAP1 DUP3 PUSH4 0xFFFFFFFF PUSH2 0x7A0 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 0x84F SWAP1 DUP3 PUSH4 0xFFFFFFFF PUSH2 0x8A9 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 0x2C6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP2 AND ISZERO ISZERO PUSH2 0x8D0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x8DA DUP3 DUP3 PUSH2 0x678 JUMP JUMPDEST ISZERO ISZERO PUSH2 0x8E5 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 0x91C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x926 DUP3 DUP3 PUSH2 0x678 JUMP JUMPDEST ISZERO PUSH2 0x930 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 STOP LOG1 PUSH6 0x627A7A723058 KECCAK256 0xec PUSH9 0x135419984DD2CDC693 0xdf SWAP2 PUSH8 0xB633B80C03B7D2DD PUSH24 0x4F775B3D32098439B9002900000000000000000000000000 ", + "sourceMap": "170:951:7:-;;;260:22:2;271:10;260;;;;:22;:::i;:::-;340:7:3;:15;;-1:-1:-1;;340:15:3;;;170:951:7;;629:108:2;681:20;:7;693;681:11;;;;;;:20;:::i;:::-;712;;-1:-1:-1;;;;;712:20:2;;;;;;;;629:108;:::o;244:167:1:-;-1:-1:-1;;;;;316:21:1;;;;308:30;;;;;;353:18;357:4;363:7;353:3;;;;:18;:::i;:::-;352:19;344:28;;;;;;-1:-1:-1;;;;;379:20:1;:11;:20;;;;;;;;;;;:27;;-1:-1:-1;;379:27:1;402:4;379:27;;;244:167::o;725:166::-;809:4;-1:-1:-1;;;;;831:21:1;;;;823:30;;;;;;-1:-1:-1;;;;;;866:20:1;:11;:20;;;;;;;;;;;;;;;725:166::o;170:951:7:-;;;;;;;" + }, + "gasEstimates": { + "creation": { + "codeDepositCost": "486600", + "executionCost": "infinite", + "totalCost": "infinite" + }, + "external": { + "addPauser(address)": "infinite", + "allowance(address,address)": "994", + "approve(address,uint256)": "22710", + "balanceOf(address)": "785", + "decreaseAllowance(address,uint256)": "infinite", + "increaseAllowance(address,uint256)": "infinite", + "isPauser(address)": "infinite", + "pause()": "infinite", + "paused()": "528", + "renouncePauser()": "infinite", + "totalSupply()": "406", + "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.4.24+commit.e67f0147\"},\"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\":{\"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\":\"0xa6e47d62e68903c8fff23500d80e7cc8085b9127995803478d9982cd8a6d49e4\",\"urls\":[\"bzzr://7c87eb3c145fe7592c97baa287501faff7e81c1965333c9b042ffb6b387e94a1\"]},\"d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/roles/PauserRole.sol\":{\"keccak256\":\"0x9c483b37c788ed1f3ce0c29934e5c41b9e84ff954380c04bffdf42c1e215a1a8\",\"urls\":[\"bzzr://1727e08315c67d0203510d5d50e645c80a569df7964715eddaec10bf90d70bab\"]},\"d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/lifecycle/Pausable.sol\":{\"keccak256\":\"0x9cb69bde8cc3efdd07a2c372e78b664e961f505b3e4195ee27f06b358ffef996\",\"urls\":[\"bzzr://13da310cd2989e27357c2912085af0f1925047070f48be175c6b7e2b0299084f\"]},\"d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0xdd18f05c74536a06166c90a17ec3c6932853764f292bed314ceb23e730ff83af\",\"urls\":[\"bzzr://1d8a608339978ac18782f7051816cf23b4072d8814979e3ef74788cc6025cca0\"]},\"d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0xaa2cf35177f37a9af9c975a973c813c5520be56ccee3a39b6c9883d4781cd072\",\"urls\":[\"bzzr://2244d517ff73299ad9b6c9dcb7d0788e5e452d8b1624d3027c1fb152135de8f4\"]},\"d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/ERC20Pausable.sol\":{\"keccak256\":\"0x34ae26a75fc5dd5d3d283d0d95a080212e81734a5cab7be187778e74224d57d1\",\"urls\":[\"bzzr://8ed5c93c550934720a33a387f8272b252b5aa8c5e0e4c6e21d5e92c662632bbb\"]},\"d:/GitHub/ALGOToken/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xc8a7f15fa44eb10057f8bcb58418d3aed6f5267d211d18f93f3d4e0293e3da44\",\"urls\":[\"bzzr://8825e2508348b01a091ff47b8525e583b6e5604f6679684f805d67a9a6a2a7e9\"]}},\"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": { + "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.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:23: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": 948, + "src": "27: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": 1050, + "src": "217:188:0", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 4, + "name": "ERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 889, + "src": "433:5:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20_$889", + "typeString": "contract ERC20" + } + }, + "id": 5, + "nodeType": "InheritanceSpecifier", + "src": "433:5:0" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 6, + "name": "ERC20Detailed", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 947, + "src": "440:13:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Detailed_$947", + "typeString": "contract ERC20Detailed" + } + }, + "id": 7, + "nodeType": "InheritanceSpecifier", + "src": "440:13:0" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 8, + "name": "ERC20Pausable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1049, + "src": "455:13:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Pausable_$1049", + "typeString": "contract ERC20Pausable" + } + }, + "id": 9, + "nodeType": "InheritanceSpecifier", + "src": "455:13:0" + } + ], + "contractDependencies": [ + 234, + 317, + 889, + 947, + 1049, + 1118 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 37, + "linearizedBaseContracts": [ + 37, + 1049, + 317, + 234, + 947, + 889, + 1118 + ], + "name": "AlgoTokenV1", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": true, + "id": 19, + "name": "INITIAL_SUPPLY", + "nodeType": "VariableDeclaration", + "scope": 37, + "src": "478:73:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 10, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "478: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": "519: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": "533: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": "547: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": "539: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": "539:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "533:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 17, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "532:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "519:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "public" + }, + { + "body": { + "id": 35, + "nodeType": "Block", + "src": "664:52:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 30, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1133, + "src": "681: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": "681:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 32, + "name": "INITIAL_SUPPLY", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19, + "src": "693:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 29, + "name": "_mint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 799, + "src": "675: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": "675:33:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 34, + "nodeType": "ExpressionStatement", + "src": "675:33:0" + } + ] + }, + "documentation": null, + "id": 36, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 22, + "modifierName": { + "argumentTypes": null, + "id": 21, + "name": "ERC20Pausable", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1049, + "src": "583:13:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20Pausable_$1049_$", + "typeString": "type(contract ERC20Pausable)" + } + }, + "nodeType": "ModifierInvocation", + "src": "583:15:0" + }, + { + "arguments": [ + { + "argumentTypes": null, + "hexValue": "416c676f73", + "id": 24, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "622: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": "631: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": "639: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": 947, + "src": "608:13:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20Detailed_$947_$", + "typeString": "type(contract ERC20Detailed)" + } + }, + "nodeType": "ModifierInvocation", + "src": "608:34:0" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 20, + "nodeType": "ParameterList", + "parameters": [], + "src": "571:2:0" + }, + "payable": false, + "returnParameters": { + "id": 28, + "nodeType": "ParameterList", + "parameters": [], + "src": "664:0:0" + }, + "scope": 37, + "src": "560:156:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 38, + "src": "409:310:0" + } + ], + "src": "0:721: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.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:24: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": "145: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": "154:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "145:25:1", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "valueType": { + "id": 41, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "165:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Role", + "nodeType": "StructDefinition", + "scope": 131, + "src": "127:55:1", + "visibility": "public" + }, + { + "body": { + "id": 75, + "nodeType": "Block", + "src": "302:109: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": "316: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": "335: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": "327: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": "327:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "316:21:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 51, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1136, + 1137 + ], + "referencedDeclaration": 1136, + "src": "308: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": "308:30:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 58, + "nodeType": "ExpressionStatement", + "src": "308:30:1" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 64, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "352:19:1", + "subExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 61, + "name": "role", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46, + "src": "357: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": "363: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": "353: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": "353: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": [ + 1136, + 1137 + ], + "referencedDeclaration": 1136, + "src": "344: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": "344:28:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 66, + "nodeType": "ExpressionStatement", + "src": "344: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": "379: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": "379: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": "391:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "379: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": "402:4:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "379:27:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 74, + "nodeType": "ExpressionStatement", + "src": "379:27:1" + } + ] + }, + "documentation": "@dev give an account access to this role", + "id": 76, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "add", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 49, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 46, + "name": "role", + "nodeType": "VariableDeclaration", + "scope": 76, + "src": "257: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": "257: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": "276:15:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 47, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "276:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "256:36:1" + }, + "payable": false, + "returnParameters": { + "id": 50, + "nodeType": "ParameterList", + "parameters": [], + "src": "302:0:1" + }, + "scope": 131, + "src": "244:167:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 106, + "nodeType": "Block", + "src": "538:109: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": "552: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": "571: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": "563: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": "563:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "552:21:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 83, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1136, + 1137 + ], + "referencedDeclaration": 1136, + "src": "544: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": "544:30:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 90, + "nodeType": "ExpressionStatement", + "src": "544:30:1" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 93, + "name": "role", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 78, + "src": "592: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": "598: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": "588: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": "588:18:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 91, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1136, + 1137 + ], + "referencedDeclaration": 1136, + "src": "580: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": "580:27:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 97, + "nodeType": "ExpressionStatement", + "src": "580: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": "614: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": "614: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": "626:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "614: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": "637:5:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "614:28:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 105, + "nodeType": "ExpressionStatement", + "src": "614:28:1" + } + ] + }, + "documentation": "@dev remove an account's access to this role", + "id": 107, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "remove", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 81, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 78, + "name": "role", + "nodeType": "VariableDeclaration", + "scope": 107, + "src": "493: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": "493: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": "512:15:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 79, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "512:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "492:36:1" + }, + "payable": false, + "returnParameters": { + "id": 82, + "nodeType": "ParameterList", + "parameters": [], + "src": "538:0:1" + }, + "scope": 131, + "src": "477:170:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 129, + "nodeType": "Block", + "src": "817:74: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": "831: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": "850: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": "842: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": "842:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "831:21:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 116, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1136, + 1137 + ], + "referencedDeclaration": 1136, + "src": "823: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": "823:30:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 123, + "nodeType": "ExpressionStatement", + "src": "823:30:1" + }, + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 124, + "name": "role", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 109, + "src": "866: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": "866: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": "878:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "866:20:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 115, + "id": 128, + "nodeType": "Return", + "src": "859:27:1" + } + ] + }, + "documentation": "@dev check if an account has this role\n@return bool", + "id": 130, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "has", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 112, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 109, + "name": "role", + "nodeType": "VariableDeclaration", + "scope": 130, + "src": "738: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": "738: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": "757:15:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 110, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "757:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "737:36:1" + }, + "payable": false, + "returnParameters": { + "id": 115, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 114, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 130, + "src": "809:4:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 113, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "809:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "808:6:1" + }, + "scope": 131, + "src": "725:166:1", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 132, + "src": "109:784:1" + } + ], + "src": "0:894: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.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:24: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": "26: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": "80:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Roles_$131", + "typeString": "library Roles" + } + }, + "nodeType": "UsingForDirective", + "src": "74:27:2", + "typeName": { + "contractScope": null, + "id": 136, + "name": "Roles.Role", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 44, + "src": "90: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": "123:23:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 138, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "123:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "122:25:2" + }, + "src": "105: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": "171:23:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 142, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "171:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "170:25:2" + }, + "src": "151:45:2" + }, + { + "constant": false, + "id": 147, + "name": "pausers", + "nodeType": "VariableDeclaration", + "scope": 234, + "src": "200:26: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": "200:10:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$44_storage_ptr", + "typeString": "struct Roles.Role" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 155, + "nodeType": "Block", + "src": "254:33:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 151, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1133, + "src": "271: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": "271:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 150, + "name": "_addPauser", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 217, + "src": "260: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": "260:22:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 154, + "nodeType": "ExpressionStatement", + "src": "260:22:2" + } + ] + }, + "documentation": null, + "id": 156, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 148, + "nodeType": "ParameterList", + "parameters": [], + "src": "242:2:2" + }, + "payable": false, + "returnParameters": { + "id": 149, + "nodeType": "ParameterList", + "parameters": [], + "src": "254:0:2" + }, + "scope": 234, + "src": "231:56:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 166, + "nodeType": "Block", + "src": "313:47:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 160, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1133, + "src": "336: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": "336:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 159, + "name": "isPauser", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 180, + "src": "327: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": "327:20:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 158, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1136, + 1137 + ], + "referencedDeclaration": 1136, + "src": "319: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": "319:29:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 164, + "nodeType": "ExpressionStatement", + "src": "319:29:2" + }, + { + "id": 165, + "nodeType": "PlaceholderStatement", + "src": "354:1:2" + } + ] + }, + "documentation": null, + "id": 167, + "name": "onlyPauser", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 157, + "nodeType": "ParameterList", + "parameters": [], + "src": "310:2:2" + }, + "src": "291:69:2", + "visibility": "internal" + }, + { + "body": { + "id": 179, + "nodeType": "Block", + "src": "426:38:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 176, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 169, + "src": "451: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": "439:7: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": "439:11: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": "439:20:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 173, + "id": 178, + "nodeType": "Return", + "src": "432:27:2" + } + ] + }, + "documentation": null, + "id": 180, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "isPauser", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 170, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 169, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 180, + "src": "382:15:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 168, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "382:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "381:17:2" + }, + "payable": false, + "returnParameters": { + "id": 173, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 172, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 180, + "src": "420:4:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 171, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "420:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "419:6:2" + }, + "scope": 234, + "src": "364:100:2", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 191, + "nodeType": "Block", + "src": "522:30:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 188, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 182, + "src": "539: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": "528: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": "528:19:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 190, + "nodeType": "ExpressionStatement", + "src": "528:19:2" + } + ] + }, + "documentation": null, + "id": 192, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 185, + "modifierName": { + "argumentTypes": null, + "id": 184, + "name": "onlyPauser", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 167, + "src": "511:10:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "511:10:2" + } + ], + "name": "addPauser", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 183, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 182, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 192, + "src": "487:15:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 181, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "487:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "486:17:2" + }, + "payable": false, + "returnParameters": { + "id": 186, + "nodeType": "ParameterList", + "parameters": [], + "src": "522:0:2" + }, + "scope": 234, + "src": "468:84:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 200, + "nodeType": "Block", + "src": "589:36:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 196, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1133, + "src": "609: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": "609:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 195, + "name": "_removePauser", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 233, + "src": "595: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": "595:25:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 199, + "nodeType": "ExpressionStatement", + "src": "595:25:2" + } + ] + }, + "documentation": null, + "id": 201, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "renouncePauser", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 193, + "nodeType": "ParameterList", + "parameters": [], + "src": "579:2:2" + }, + "payable": false, + "returnParameters": { + "id": 194, + "nodeType": "ParameterList", + "parameters": [], + "src": "589:0:2" + }, + "scope": 234, + "src": "556:69:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 216, + "nodeType": "Block", + "src": "675:62:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 209, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 203, + "src": "693: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": "681:7: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": "681:11: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": "681:20:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 211, + "nodeType": "ExpressionStatement", + "src": "681:20:2" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 213, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 203, + "src": "724: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": "712: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": "712:20:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 215, + "nodeType": "EmitStatement", + "src": "707:25:2" + } + ] + }, + "documentation": null, + "id": 217, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "_addPauser", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 204, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 203, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 217, + "src": "649:15:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 202, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "649:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "648:17:2" + }, + "payable": false, + "returnParameters": { + "id": 205, + "nodeType": "ParameterList", + "parameters": [], + "src": "675:0:2" + }, + "scope": 234, + "src": "629:108:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 232, + "nodeType": "Block", + "src": "790:67:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 225, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 219, + "src": "811: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": "796:7: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": "796:14: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": "796:23:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 227, + "nodeType": "ExpressionStatement", + "src": "796:23:2" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 229, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 219, + "src": "844: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": "830: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": "830:22:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 231, + "nodeType": "EmitStatement", + "src": "825:27:2" + } + ] + }, + "documentation": null, + "id": 233, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "_removePauser", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 220, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 219, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 233, + "src": "764:15:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 218, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "764:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "763:17:2" + }, + "payable": false, + "returnParameters": { + "id": 221, + "nodeType": "ParameterList", + "parameters": [], + "src": "790:0:2" + }, + "scope": 234, + "src": "741:116:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 235, + "src": "50:809:2" + } + ], + "src": "0:860: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.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:24: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": "26:40:3", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 238, + "name": "PauserRole", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 234, + "src": "202:10:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_PauserRole_$234", + "typeString": "contract PauserRole" + } + }, + "id": 239, + "nodeType": "InheritanceSpecifier", + "src": "202: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": "230:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 240, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "230:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "229:17:3" + }, + "src": "217: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": "265:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 244, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "265:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "264:17:3" + }, + "src": "250:32:3" + }, + { + "constant": false, + "id": 249, + "name": "_paused", + "nodeType": "VariableDeclaration", + "scope": 317, + "src": "286:20:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 248, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "286:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 256, + "nodeType": "Block", + "src": "334:26: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": "340: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": "350:5:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "340:15:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 255, + "nodeType": "ExpressionStatement", + "src": "340:15:3" + } + ] + }, + "documentation": null, + "id": 257, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 250, + "nodeType": "ParameterList", + "parameters": [], + "src": "322:2:3" + }, + "payable": false, + "returnParameters": { + "id": 251, + "nodeType": "ParameterList", + "parameters": [], + "src": "334:0:3" + }, + "scope": 317, + "src": "311:49:3", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 264, + "nodeType": "Block", + "src": "482:25:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 262, + "name": "_paused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 249, + "src": "495:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 261, + "id": 263, + "nodeType": "Return", + "src": "488:14:3" + } + ] + }, + "documentation": "@return true if the contract is paused, false otherwise.", + "id": 265, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "paused", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 258, + "nodeType": "ParameterList", + "parameters": [], + "src": "453:2:3" + }, + "payable": false, + "returnParameters": { + "id": 261, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 260, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 265, + "src": "476:4:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 259, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "476:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "475:6:3" + }, + "scope": 317, + "src": "438:69:3", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 273, + "nodeType": "Block", + "src": "633:35:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 269, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "647:8:3", + "subExpression": { + "argumentTypes": null, + "id": 268, + "name": "_paused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 249, + "src": "648: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": [ + 1136, + 1137 + ], + "referencedDeclaration": 1136, + "src": "639: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": "639:17:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 271, + "nodeType": "ExpressionStatement", + "src": "639:17:3" + }, + { + "id": 272, + "nodeType": "PlaceholderStatement", + "src": "662: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": "630:2:3" + }, + "src": "608:60:3", + "visibility": "internal" + }, + { + "body": { + "id": 281, + "nodeType": "Block", + "src": "787:34:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 277, + "name": "_paused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 249, + "src": "801:7:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 276, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1136, + 1137 + ], + "referencedDeclaration": 1136, + "src": "793: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": "793:16:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 279, + "nodeType": "ExpressionStatement", + "src": "793:16:3" + }, + { + "id": 280, + "nodeType": "PlaceholderStatement", + "src": "815: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": "784:2:3" + }, + "src": "765:56:3", + "visibility": "internal" + }, + { + "body": { + "id": 298, + "nodeType": "Block", + "src": "949:54: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": "955: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": "965:4:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "955:14:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 292, + "nodeType": "ExpressionStatement", + "src": "955:14:3" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 294, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1133, + "src": "987: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": "987:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 293, + "name": "Paused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 243, + "src": "980: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": "980:18:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 297, + "nodeType": "EmitStatement", + "src": "975:23:3" + } + ] + }, + "documentation": "@dev called by the owner to pause, triggers stopped state", + "id": 299, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 285, + "modifierName": { + "argumentTypes": null, + "id": 284, + "name": "onlyPauser", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 167, + "src": "924:10:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "924:10:3" + }, + { + "arguments": null, + "id": 287, + "modifierName": { + "argumentTypes": null, + "id": 286, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 274, + "src": "935:13:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "935:13:3" + } + ], + "name": "pause", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 283, + "nodeType": "ParameterList", + "parameters": [], + "src": "914:2:3" + }, + "payable": false, + "returnParameters": { + "id": 288, + "nodeType": "ParameterList", + "parameters": [], + "src": "949:0:3" + }, + "scope": 317, + "src": "900:103:3", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 315, + "nodeType": "Block", + "src": "1133:57: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": "1139: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": "1149:5:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "1139:15:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 309, + "nodeType": "ExpressionStatement", + "src": "1139:15:3" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 311, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1133, + "src": "1174: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": "1174:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 310, + "name": "Unpaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 247, + "src": "1165: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": "1165:20:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 314, + "nodeType": "EmitStatement", + "src": "1160:25:3" + } + ] + }, + "documentation": "@dev called by the owner to unpause, returns to normal state", + "id": 316, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 302, + "modifierName": { + "argumentTypes": null, + "id": 301, + "name": "onlyPauser", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 167, + "src": "1111:10:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1111:10:3" + }, + { + "arguments": null, + "id": 304, + "modifierName": { + "argumentTypes": null, + "id": 303, + "name": "whenPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 282, + "src": "1122:10:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1122:10:3" + } + ], + "name": "unpause", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 300, + "nodeType": "ParameterList", + "parameters": [], + "src": "1101:2:3" + }, + "payable": false, + "returnParameters": { + "id": 305, + "nodeType": "ParameterList", + "parameters": [], + "src": "1133:0:3" + }, + "scope": 317, + "src": "1085:105:3", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 318, + "src": "181:1011:3" + } + ], + "src": "0:1193: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.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": 445, + "linearizedBaseContracts": [ + 445 + ], + "name": "SafeMath", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 351, + "nodeType": "Block", + "src": "271:314: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": "486: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": "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": 334, + "nodeType": "IfStatement", + "src": "482:35:4", + "trueBody": { + "id": 333, + "nodeType": "Block", + "src": "494:23:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "30", + "id": 331, + "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": 327, + "id": 332, + "nodeType": "Return", + "src": "502:8:4" + } + ] + } + }, + { + "assignments": [ + 336 + ], + "declarations": [ + { + "constant": false, + "id": 336, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 352, + "src": "523:9:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 335, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "523: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": "535:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 338, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 323, + "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": 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": "554:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 343, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 321, + "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": 345, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 323, + "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": 341, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1136, + 1137 + ], + "referencedDeclaration": 1136, + "src": "546: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": "546:19:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 348, + "nodeType": "ExpressionStatement", + "src": "546:19:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 349, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 336, + "src": "579:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 327, + "id": 350, + "nodeType": "Return", + "src": "572:8:4" + } + ] + }, + "documentation": "@dev Multiplies two numbers, reverts on overflow.", + "id": 352, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "mul", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 324, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 321, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 352, + "src": "217:9:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 320, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "217:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 323, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 352, + "src": "228:9:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 322, + "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": 327, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 326, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 352, + "src": "262:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 325, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "262:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "261:9:4" + }, + "scope": 445, + "src": "204:381:4", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 375, + "nodeType": "Block", + "src": "762:203: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": "776: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": "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": 361, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1136, + 1137 + ], + "referencedDeclaration": 1136, + "src": "768: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": "768:14:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 366, + "nodeType": "ExpressionStatement", + "src": "768:14:4" + }, + { + "assignments": [ + 368 + ], + "declarations": [ + { + "constant": false, + "id": 368, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 376, + "src": "846:9:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 367, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "846: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": "858:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 370, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 356, + "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": 373, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 368, + "src": "959:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 360, + "id": 374, + "nodeType": "Return", + "src": "952:8:4" + } + ] + }, + "documentation": "@dev Integer division of two numbers truncating the quotient, reverts on division by zero.", + "id": 376, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "div", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 357, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 354, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 376, + "src": "708:9:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 353, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "708:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 356, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 376, + "src": "719:9:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 355, + "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": 360, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 359, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 376, + "src": "753:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 358, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "753:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "752:9:4" + }, + "scope": 445, + "src": "695:270:4", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 399, + "nodeType": "Block", + "src": "1145:64: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": "1159:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 387, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 378, + "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": 385, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1136, + 1137 + ], + "referencedDeclaration": 1136, + "src": "1151: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": "1151:15:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 390, + "nodeType": "ExpressionStatement", + "src": "1151:15:4" + }, + { + "assignments": [ + 392 + ], + "declarations": [ + { + "constant": false, + "id": 392, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 400, + "src": "1172:9:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 391, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1172: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": "1184:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 394, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 380, + "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": 397, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 392, + "src": "1203:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 384, + "id": 398, + "nodeType": "Return", + "src": "1196:8:4" + } + ] + }, + "documentation": "@dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend).", + "id": 400, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "sub", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 381, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 378, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 400, + "src": "1091:9:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 377, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1091:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 380, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 400, + "src": "1102:9:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 379, + "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": 384, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 383, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 400, + "src": "1136:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 382, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1136:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1135:9:4" + }, + "scope": 445, + "src": "1078:131:4", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 423, + "nodeType": "Block", + "src": "1339:64:4", + "statements": [ + { + "assignments": [ + 410 + ], + "declarations": [ + { + "constant": false, + "id": 410, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 424, + "src": "1345:9:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 409, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1345: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": "1357:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 412, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 404, + "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": 418, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 416, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 410, + "src": "1376:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 417, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 402, + "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": 415, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1136, + 1137 + ], + "referencedDeclaration": 1136, + "src": "1368: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": "1368:15:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 420, + "nodeType": "ExpressionStatement", + "src": "1368:15:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 421, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 410, + "src": "1397:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 408, + "id": 422, + "nodeType": "Return", + "src": "1390:8:4" + } + ] + }, + "documentation": "@dev Adds two numbers, reverts on overflow.", + "id": 424, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "add", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 405, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 402, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 424, + "src": "1285:9:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 401, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1285:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 404, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 424, + "src": "1296:9:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 403, + "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": 408, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 407, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 424, + "src": "1330:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 406, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1330:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1329:9:4" + }, + "scope": 445, + "src": "1272:131:4", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 443, + "nodeType": "Block", + "src": "1602:44: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": "1616: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": "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": 433, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1136, + 1137 + ], + "referencedDeclaration": 1136, + "src": "1608: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": "1608:15:4", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 438, + "nodeType": "ExpressionStatement", + "src": "1608: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": "1636:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "%", + "rightExpression": { + "argumentTypes": null, + "id": 440, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 428, + "src": "1640:1:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1636:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 432, + "id": 442, + "nodeType": "Return", + "src": "1629:12:4" + } + ] + }, + "documentation": "@dev Divides two numbers and returns the remainder (unsigned integer modulo),\nreverts when dividing by zero.", + "id": 444, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "mod", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 429, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 426, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 444, + "src": "1548:9:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 425, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1548:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 428, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 444, + "src": "1559:9:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 427, + "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": 432, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 431, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 444, + "src": "1593:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 430, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1593:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1592:9:4" + }, + "scope": 445, + "src": "1535:111:4", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 446, + "src": "117:1531:4" + } + ], + "src": "0:1649: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": [ + 889 + ] + }, + "id": 890, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 447, + "literals": [ + "solidity", + "^", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:24: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": 890, + "sourceUnit": 1119, + "src": "26: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": 890, + "sourceUnit": 446, + "src": "49:33:5", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 450, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1118, + "src": "387:6:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1118", + "typeString": "contract IERC20" + } + }, + "id": 451, + "nodeType": "InheritanceSpecifier", + "src": "387:6:5" + } + ], + "contractDependencies": [ + 1118 + ], + "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: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol", + "fullyImplemented": true, + "id": 889, + "linearizedBaseContracts": [ + 889, + 1118 + ], + "name": "ERC20", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 454, + "libraryName": { + "contractScope": null, + "id": 452, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 445, + "src": "404:8:5", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$445", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "398:27:5", + "typeName": { + "id": 453, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "417:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": false, + "id": 458, + "name": "_balances", + "nodeType": "VariableDeclaration", + "scope": 889, + "src": "429: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": "438:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "429:28:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 456, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "449:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 464, + "name": "_allowed", + "nodeType": "VariableDeclaration", + "scope": 889, + "src": "480: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": "489:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "480: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": "509:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "500:28:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 461, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "520:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 466, + "name": "_totalSupply", + "nodeType": "VariableDeclaration", + "scope": 889, + "src": "551:28:5", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 465, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "551:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 473, + "nodeType": "Block", + "src": "693:30:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 471, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 466, + "src": "706:12:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 470, + "id": 472, + "nodeType": "Return", + "src": "699:19:5" + } + ] + }, + "documentation": "@dev Total number of tokens in existence", + "id": 474, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "totalSupply", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 467, + "nodeType": "ParameterList", + "parameters": [], + "src": "660:2:5" + }, + "payable": false, + "returnParameters": { + "id": 470, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 469, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 474, + "src": "684:7:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 468, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "684:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "683:9:5" + }, + "scope": 889, + "src": "640:83:5", + "stateMutability": "view", + "superFunction": 1056, + "visibility": "public" + }, + { + "body": { + "id": 485, + "nodeType": "Block", + "src": "984:34:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 481, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 458, + "src": "997: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": "1007:5:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "997:16:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 480, + "id": 484, + "nodeType": "Return", + "src": "990: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, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "balanceOf", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 477, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 476, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 486, + "src": "939:13:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 475, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "939:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "938:15:5" + }, + "payable": false, + "returnParameters": { + "id": 480, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 479, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 486, + "src": "975:7:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 478, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "975:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "974:9:5" + }, + "scope": 889, + "src": "920:98:5", + "stateMutability": "view", + "superFunction": 1063, + "visibility": "public" + }, + { + "body": { + "id": 501, + "nodeType": "Block", + "src": "1443:42:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 495, + "name": "_allowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 464, + "src": "1456: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": "1465:5:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1456: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": "1472:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1456:24:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 494, + "id": 500, + "nodeType": "Return", + "src": "1449: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, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "allowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 491, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 488, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 502, + "src": "1359:13:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 487, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1359:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 490, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 502, + "src": "1378:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 489, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1378:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1353:45:5" + }, + "payable": false, + "returnParameters": { + "id": 494, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 493, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 502, + "src": "1432:7:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 492, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1432:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1431:9:5" + }, + "scope": 889, + "src": "1335:150:5", + "stateMutability": "view", + "superFunction": 1072, + "visibility": "public" + }, + { + "body": { + "id": 520, + "nodeType": "Block", + "src": "1704:60:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 512, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1133, + "src": "1720: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": "1720:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 514, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 504, + "src": "1732:2:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 515, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 506, + "src": "1736: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": 511, + "name": "_transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 759, + "src": "1710: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": "1710:32:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 517, + "nodeType": "ExpressionStatement", + "src": "1710:32:5" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 518, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1755:4:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 510, + "id": 519, + "nodeType": "Return", + "src": "1748: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, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 507, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 504, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 521, + "src": "1655:10:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 503, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1655:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 506, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 521, + "src": "1667:13:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 505, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1667:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1654:27:5" + }, + "payable": false, + "returnParameters": { + "id": 510, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 509, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 521, + "src": "1698:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 508, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1698:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1697:6:5" + }, + "scope": 889, + "src": "1637:127:5", + "stateMutability": "nonpayable", + "superFunction": 1081, + "visibility": "public" + }, + { + "body": { + "id": 556, + "nodeType": "Block", + "src": "2451:149: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": "2465: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": "2484: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": "2476: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": "2476:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2465:21:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 530, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1136, + 1137 + ], + "referencedDeclaration": 1136, + "src": "2457: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": "2457:30:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 537, + "nodeType": "ExpressionStatement", + "src": "2457: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": "2494: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": 1133, + "src": "2503: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": "2503:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2494: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": "2515:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2494:29:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 544, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 525, + "src": "2526:5:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2494:37:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 546, + "nodeType": "ExpressionStatement", + "src": "2494:37:5" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 548, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1133, + "src": "2551: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": "2551:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 550, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 523, + "src": "2563:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 551, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 525, + "src": "2572: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": 547, + "name": "Approval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1117, + "src": "2542: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": "2542:36:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 553, + "nodeType": "EmitStatement", + "src": "2537:41:5" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 554, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2591:4:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 529, + "id": 555, + "nodeType": "Return", + "src": "2584: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, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 526, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 523, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 557, + "src": "2397:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 522, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2397:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 525, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 557, + "src": "2414:13:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 524, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2414:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2396:32:5" + }, + "payable": false, + "returnParameters": { + "id": 529, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 528, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 557, + "src": "2445:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 527, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2445:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2444:6:5" + }, + "scope": 889, + "src": "2380:220:5", + "stateMutability": "nonpayable", + "superFunction": 1090, + "visibility": "public" + }, + { + "body": { + "id": 604, + "nodeType": "Block", + "src": "2983:177:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 576, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 569, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 563, + "src": "2997:5:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 570, + "name": "_allowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 464, + "src": "3006: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": 571, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 559, + "src": "3015:4:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3006:14:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 575, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 573, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1133, + "src": "3021:3:5", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 574, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3021:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3006:26:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2997:35:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 568, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1136, + 1137 + ], + "referencedDeclaration": 1136, + "src": "2989:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 577, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2989:44:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 578, + "nodeType": "ExpressionStatement", + "src": "2989:44:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 594, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 579, + "name": "_allowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 464, + "src": "3040:8:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 583, + "indexExpression": { + "argumentTypes": null, + "id": 580, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 559, + "src": "3049:4:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3040:14:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 584, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 581, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1133, + "src": "3055:3:5", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 582, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3055:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3040:26:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 592, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 563, + "src": "3100: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": 585, + "name": "_allowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 464, + "src": "3069:8:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 587, + "indexExpression": { + "argumentTypes": null, + "id": 586, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 559, + "src": "3078:4:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3069:14:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 590, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 588, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1133, + "src": "3084:3:5", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 589, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3084:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3069:26:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 591, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 400, + "src": "3069: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": 593, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3069:37:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3040:66:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 595, + "nodeType": "ExpressionStatement", + "src": "3040:66:5" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 597, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 559, + "src": "3122:4:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 598, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 561, + "src": "3128:2:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 599, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 563, + "src": "3132: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": 596, + "name": "_transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 759, + "src": "3112:9:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 600, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3112:26:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 601, + "nodeType": "ExpressionStatement", + "src": "3112:26:5" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 602, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3151:4:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 567, + "id": 603, + "nodeType": "Return", + "src": "3144:11:5" + } + ] + }, + "documentation": "@dev Transfer tokens from one address to another\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": 605, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 564, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 559, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 605, + "src": "2899:12:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 558, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2899:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 561, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 605, + "src": "2917:10:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 560, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2917:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 563, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 605, + "src": "2933:13:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 562, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2933:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2893:57:5" + }, + "payable": false, + "returnParameters": { + "id": 567, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 566, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 605, + "src": "2975:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 565, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2975:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2974:6:5" + }, + "scope": 889, + "src": "2872:288:5", + "stateMutability": "nonpayable", + "superFunction": 1101, + "visibility": "public" + }, + { + "body": { + "id": 654, + "nodeType": "Block", + "src": "3719:222:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 619, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 615, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 607, + "src": "3733:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 617, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3752: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": 616, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3744:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 618, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3744:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3733:21:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 614, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1136, + 1137 + ], + "referencedDeclaration": 1136, + "src": "3725:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 620, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3725:30:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 621, + "nodeType": "ExpressionStatement", + "src": "3725: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": 622, + "name": "_allowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 464, + "src": "3762:8:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 626, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 623, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1133, + "src": "3771:3:5", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 624, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3771:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3762:20:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 627, + "indexExpression": { + "argumentTypes": null, + "id": 625, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 607, + "src": "3783:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3762:29:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 635, + "name": "addedValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 609, + "src": "3836: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": 628, + "name": "_allowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 464, + "src": "3802:8:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 631, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 629, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1133, + "src": "3811:3:5", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 630, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3811:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3802:20:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 633, + "indexExpression": { + "argumentTypes": null, + "id": 632, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 607, + "src": "3823:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3802:29:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 634, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 424, + "src": "3802: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": 636, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3802:45:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 637, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "3794:54:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3762:86:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 639, + "nodeType": "ExpressionStatement", + "src": "3762:86:5" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 641, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1133, + "src": "3868: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": "3868:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 643, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 607, + "src": "3880: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": "3889: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": 1133, + "src": "3898: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": "3898:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3889: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": 607, + "src": "3910:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3889:29: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": 640, + "name": "Approval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1117, + "src": "3859: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": "3859:60:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 651, + "nodeType": "EmitStatement", + "src": "3854:65:5" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 652, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3932:4:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 613, + "id": 653, + "nodeType": "Return", + "src": "3925: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\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, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "increaseAllowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 610, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 607, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 655, + "src": "3643:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 606, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3643:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 609, + "name": "addedValue", + "nodeType": "VariableDeclaration", + "scope": 655, + "src": "3664:18:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 608, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3664:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3637:49:5" + }, + "payable": false, + "returnParameters": { + "id": 613, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 612, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 655, + "src": "3711:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 611, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3711:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3710:6:5" + }, + "scope": 889, + "src": "3611:330:5", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 704, + "nodeType": "Block", + "src": "4510:227: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": "4524: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": "4543: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": "4535: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": "4535:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "4524:21:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 664, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1136, + 1137 + ], + "referencedDeclaration": 1136, + "src": "4516: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": "4516:30:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 671, + "nodeType": "ExpressionStatement", + "src": "4516:30:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 688, + "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": "4553: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": 1133, + "src": "4562: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": "4562:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4553: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": "4574:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4553:29:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 685, + "name": "subtractedValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 659, + "src": "4627: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": "4593: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": 1133, + "src": "4602: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": "4602:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4593: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": "4614:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4593: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": "4593: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": "4593:50:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 687, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "4585:59:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4553:91:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 689, + "nodeType": "ExpressionStatement", + "src": "4553:91:5" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 691, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1133, + "src": "4664:3:5", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 692, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4664:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 693, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 657, + "src": "4676:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 694, + "name": "_allowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 464, + "src": "4685:8:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 697, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 695, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1133, + "src": "4694:3:5", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 696, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4694:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4685:20:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 699, + "indexExpression": { + "argumentTypes": null, + "id": 698, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 657, + "src": "4706:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4685:29: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": 690, + "name": "Approval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1117, + "src": "4655:8:5", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 700, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4655:60:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 701, + "nodeType": "EmitStatement", + "src": "4650:65:5" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 702, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4728:4:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 663, + "id": 703, + "nodeType": "Return", + "src": "4721: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\n@param spender The address which will spend the funds.\n@param subtractedValue The amount of tokens to decrease the allowance by.", + "id": 705, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "decreaseAllowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 660, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 657, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 705, + "src": "4429:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 656, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4429:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 659, + "name": "subtractedValue", + "nodeType": "VariableDeclaration", + "scope": 705, + "src": "4450:23:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 658, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4450:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4423:54:5" + }, + "payable": false, + "returnParameters": { + "id": 663, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 662, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 705, + "src": "4502:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 661, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4502:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4501:6:5" + }, + "scope": 889, + "src": "4397:340:5", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 758, + "nodeType": "Block", + "src": "5006:208:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 719, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 715, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 711, + "src": "5020:5:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 716, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 458, + "src": "5029:9:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 718, + "indexExpression": { + "argumentTypes": null, + "id": 717, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 707, + "src": "5039:4:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5029:15:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5020:24:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 714, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1136, + 1137 + ], + "referencedDeclaration": 1136, + "src": "5012:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 720, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5012:33:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 721, + "nodeType": "ExpressionStatement", + "src": "5012:33:5" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 727, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 723, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 709, + "src": "5059:2:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 725, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5073: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": 724, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5065:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 726, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5065:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "5059:16:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 722, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1136, + 1137 + ], + "referencedDeclaration": 1136, + "src": "5051:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 728, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5051:25:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 729, + "nodeType": "ExpressionStatement", + "src": "5051:25:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 739, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 730, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 458, + "src": "5083:9:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 732, + "indexExpression": { + "argumentTypes": null, + "id": 731, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 707, + "src": "5093:4:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5083:15:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 737, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 711, + "src": "5121:5:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 733, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 458, + "src": "5101:9:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 735, + "indexExpression": { + "argumentTypes": null, + "id": 734, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 707, + "src": "5111:4:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5101:15:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 736, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 400, + "src": "5101: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": 738, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5101:26:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5083:44:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 740, + "nodeType": "ExpressionStatement", + "src": "5083:44:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 750, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 741, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 458, + "src": "5133:9:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 743, + "indexExpression": { + "argumentTypes": null, + "id": 742, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 709, + "src": "5143:2:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5133:13:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 748, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 711, + "src": "5167:5:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 744, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 458, + "src": "5149:9:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 746, + "indexExpression": { + "argumentTypes": null, + "id": 745, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 709, + "src": "5159:2:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5149:13:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 747, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 424, + "src": "5149: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": 749, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5149:24:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5133:40:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 751, + "nodeType": "ExpressionStatement", + "src": "5133:40:5" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 753, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 707, + "src": "5193:4:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 754, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 709, + "src": "5199:2:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 755, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 711, + "src": "5203: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": 752, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1109, + "src": "5184:8:5", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 756, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5184:25:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 757, + "nodeType": "EmitStatement", + "src": "5179: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": 759, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "_transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 712, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 707, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 759, + "src": "4956:12:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 706, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4956:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 709, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 759, + "src": "4970:10:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 708, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4970:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 711, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 759, + "src": "4982:13:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 710, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4982:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4955:41:5" + }, + "payable": false, + "returnParameters": { + "id": 713, + "nodeType": "ParameterList", + "parameters": [], + "src": "5006:0:5" + }, + "scope": 889, + "src": "4937:277:5", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 798, + "nodeType": "Block", + "src": "5597:179:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 769, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 767, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "5611:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 768, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5622:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "5611:12:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 766, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1136, + 1137 + ], + "referencedDeclaration": 1136, + "src": "5603:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 770, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5603:21:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 771, + "nodeType": "ExpressionStatement", + "src": "5603:21:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 777, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 772, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 466, + "src": "5630:12:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 775, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 763, + "src": "5662:5:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 773, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 466, + "src": "5645:12:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 774, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 424, + "src": "5645: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": 776, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5645:23:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5630:38:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 778, + "nodeType": "ExpressionStatement", + "src": "5630:38:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 788, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 779, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 458, + "src": "5674:9:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 781, + "indexExpression": { + "argumentTypes": null, + "id": 780, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "5684:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5674:18:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 786, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 763, + "src": "5718:5:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 782, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 458, + "src": "5695:9:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 784, + "indexExpression": { + "argumentTypes": null, + "id": 783, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "5705:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5695:18:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 785, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 424, + "src": "5695: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": 787, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5695:29:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5674:50:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 789, + "nodeType": "ExpressionStatement", + "src": "5674:50:5" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 792, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5752: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": 791, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5744:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 793, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5744:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 794, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 761, + "src": "5756:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 795, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 763, + "src": "5765: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": 790, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1109, + "src": "5735:8:5", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 796, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5735:36:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 797, + "nodeType": "EmitStatement", + "src": "5730: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": 799, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "_mint", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 764, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 761, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 799, + "src": "5556:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 760, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5556:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 763, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 799, + "src": "5573:13:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 762, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5573:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5555:32:5" + }, + "payable": false, + "returnParameters": { + "id": 765, + "nodeType": "ParameterList", + "parameters": [], + "src": "5597:0:5" + }, + "scope": 889, + "src": "5541:235:5", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 846, + "nodeType": "Block", + "src": "6044:222:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 809, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 807, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 801, + "src": "6058:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 808, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6069:1:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "6058:12:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 806, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1136, + 1137 + ], + "referencedDeclaration": 1136, + "src": "6050:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 810, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6050:21:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 811, + "nodeType": "ExpressionStatement", + "src": "6050:21:5" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 817, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 813, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 803, + "src": "6085:5:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 814, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 458, + "src": "6094: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": 801, + "src": "6104:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6094:18:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6085:27:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 812, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1136, + 1137 + ], + "referencedDeclaration": 1136, + "src": "6077:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 818, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6077:36:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 819, + "nodeType": "ExpressionStatement", + "src": "6077:36:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 825, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 820, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 466, + "src": "6120:12:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 823, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 803, + "src": "6152:5:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 821, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 466, + "src": "6135:12:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 822, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 400, + "src": "6135: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": 824, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6135:23:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6120:38:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 826, + "nodeType": "ExpressionStatement", + "src": "6120:38:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 836, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 827, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 458, + "src": "6164:9:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 829, + "indexExpression": { + "argumentTypes": null, + "id": 828, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 801, + "src": "6174:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6164:18:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 834, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 803, + "src": "6208:5:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 830, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 458, + "src": "6185:9:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 832, + "indexExpression": { + "argumentTypes": null, + "id": 831, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 801, + "src": "6195:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6185:18:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 833, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 400, + "src": "6185: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": 835, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6185:29:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6164:50:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 837, + "nodeType": "ExpressionStatement", + "src": "6164:50:5" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 839, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 801, + "src": "6234:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 841, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6251: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": 840, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6243:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 842, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6243:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 843, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 803, + "src": "6255: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": 838, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1109, + "src": "6225:8:5", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 844, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6225:36:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 845, + "nodeType": "EmitStatement", + "src": "6220: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": 847, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "_burn", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 804, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 801, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 847, + "src": "6003:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 800, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6003:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 803, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 847, + "src": "6020:13:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 802, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6020:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6002:32:5" + }, + "payable": false, + "returnParameters": { + "id": 805, + "nodeType": "ParameterList", + "parameters": [], + "src": "6044:0:5" + }, + "scope": 889, + "src": "5988:278:5", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 887, + "nodeType": "Block", + "src": "6632:330:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 862, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 855, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 851, + "src": "6646:5:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 856, + "name": "_allowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 464, + "src": "6655:8:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 858, + "indexExpression": { + "argumentTypes": null, + "id": 857, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 849, + "src": "6664:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6655:17:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 861, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 859, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1133, + "src": "6673:3:5", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 860, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6673:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6655:29:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6646:38:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 854, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1136, + 1137 + ], + "referencedDeclaration": 1136, + "src": "6638:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 863, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6638:47:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 864, + "nodeType": "ExpressionStatement", + "src": "6638:47:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 880, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 865, + "name": "_allowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 464, + "src": "6851: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": 866, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 849, + "src": "6860:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6851:17:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 870, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 867, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1133, + "src": "6869:3:5", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 868, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6869:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6851:29:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 878, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 851, + "src": "6924: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": 871, + "name": "_allowed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 464, + "src": "6883:8:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 873, + "indexExpression": { + "argumentTypes": null, + "id": 872, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 849, + "src": "6892:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6883:17:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 876, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 874, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1133, + "src": "6901:3:5", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 875, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6901:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6883:29:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 877, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 400, + "src": "6883: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": 879, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6883:47:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6851:79:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 881, + "nodeType": "ExpressionStatement", + "src": "6851:79:5" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 883, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 849, + "src": "6942:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 884, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 851, + "src": "6951:5:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 882, + "name": "_burn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 847, + "src": "6936:5:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 885, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6936:21:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 886, + "nodeType": "ExpressionStatement", + "src": "6936:21: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.\n@param account The account whose tokens will be burnt.\n@param value The amount that will be burnt.", + "id": 888, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "_burnFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 852, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 849, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 888, + "src": "6591:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 848, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6591:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 851, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 888, + "src": "6608:13:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 850, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6608:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6590:32:5" + }, + "payable": false, + "returnParameters": { + "id": 853, + "nodeType": "ParameterList", + "parameters": [], + "src": "6632:0:5" + }, + "scope": 889, + "src": "6572:390:5", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 890, + "src": "369:6595:5" + } + ], + "src": "0:6965: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": [ + 947 + ] + }, + "id": 948, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 891, + "literals": [ + "solidity", + "^", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:24: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": 892, + "nodeType": "ImportDirective", + "scope": 948, + "sourceUnit": 1119, + "src": "26:22:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 893, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1118, + "src": "309:6:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$1118", + "typeString": "contract IERC20" + } + }, + "id": 894, + "nodeType": "InheritanceSpecifier", + "src": "309:6:6" + } + ], + "contractDependencies": [ + 1118 + ], + "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": 947, + "linearizedBaseContracts": [ + 947, + 1118 + ], + "name": "ERC20Detailed", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 896, + "name": "_name", + "nodeType": "VariableDeclaration", + "scope": 947, + "src": "320:20:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 895, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "320:6:6", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 898, + "name": "_symbol", + "nodeType": "VariableDeclaration", + "scope": 947, + "src": "344:22:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 897, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "344:6:6", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 900, + "name": "_decimals", + "nodeType": "VariableDeclaration", + "scope": 947, + "src": "370:23:6", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 899, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "370:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 921, + "nodeType": "Block", + "src": "461:71:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 911, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 909, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 896, + "src": "467:5:6", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 910, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 902, + "src": "475:4:6", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "467:12:6", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 912, + "nodeType": "ExpressionStatement", + "src": "467:12:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 915, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 913, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 898, + "src": "485:7:6", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 914, + "name": "symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 904, + "src": "495:6:6", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "485:16:6", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 916, + "nodeType": "ExpressionStatement", + "src": "485:16:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 919, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 917, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 900, + "src": "507:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 918, + "name": "decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 906, + "src": "519:8:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "507:20:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 920, + "nodeType": "ExpressionStatement", + "src": "507:20:6" + } + ] + }, + "documentation": null, + "id": 922, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 907, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 902, + "name": "name", + "nodeType": "VariableDeclaration", + "scope": 922, + "src": "410:11:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 901, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "410:6:6", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 904, + "name": "symbol", + "nodeType": "VariableDeclaration", + "scope": 922, + "src": "423:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 903, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "423:6:6", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 906, + "name": "decimals", + "nodeType": "VariableDeclaration", + "scope": 922, + "src": "438:14:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 905, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "438:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "409:44:6" + }, + "payable": false, + "returnParameters": { + "id": 908, + "nodeType": "ParameterList", + "parameters": [], + "src": "461:0:6" + }, + "scope": 947, + "src": "398:134:6", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 929, + "nodeType": "Block", + "src": "628:23:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 927, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 896, + "src": "641:5:6", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "functionReturnParameters": 926, + "id": 928, + "nodeType": "Return", + "src": "634:12:6" + } + ] + }, + "documentation": "@return the name of the token.", + "id": 930, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "name", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 923, + "nodeType": "ParameterList", + "parameters": [], + "src": "597:2:6" + }, + "payable": false, + "returnParameters": { + "id": 926, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 925, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 930, + "src": "620:6:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 924, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "620:6:6", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "619:8:6" + }, + "scope": 947, + "src": "584:67:6", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 937, + "nodeType": "Block", + "src": "751:25:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 935, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 898, + "src": "764:7:6", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "functionReturnParameters": 934, + "id": 936, + "nodeType": "Return", + "src": "757:14:6" + } + ] + }, + "documentation": "@return the symbol of the token.", + "id": 938, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "symbol", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 931, + "nodeType": "ParameterList", + "parameters": [], + "src": "720:2:6" + }, + "payable": false, + "returnParameters": { + "id": 934, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 933, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 938, + "src": "743:6:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 932, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "743:6:6", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "742:8:6" + }, + "scope": 947, + "src": "705:71:6", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 945, + "nodeType": "Block", + "src": "889:27:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 943, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 900, + "src": "902:9:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "functionReturnParameters": 942, + "id": 944, + "nodeType": "Return", + "src": "895:16:6" + } + ] + }, + "documentation": "@return the number of decimals of the token.", + "id": 946, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "decimals", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 939, + "nodeType": "ParameterList", + "parameters": [], + "src": "859:2:6" + }, + "payable": false, + "returnParameters": { + "id": 942, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 941, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 946, + "src": "882:5:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 940, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "882:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "881:7:6" + }, + "scope": 947, + "src": "842:74:6", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 948, + "src": "283:635:6" + } + ], + "src": "0:919: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": [ + 1049 + ] + }, + "id": 1050, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 949, + "literals": [ + "solidity", + "^", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:24: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": 950, + "nodeType": "ImportDirective", + "scope": 1050, + "sourceUnit": 890, + "src": "26: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": 951, + "nodeType": "ImportDirective", + "scope": 1050, + "sourceUnit": 318, + "src": "48:38:7", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 952, + "name": "ERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 889, + "src": "196:5:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20_$889", + "typeString": "contract ERC20" + } + }, + "id": 953, + "nodeType": "InheritanceSpecifier", + "src": "196:5:7" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 954, + "name": "Pausable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 317, + "src": "203:8:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Pausable_$317", + "typeString": "contract Pausable" + } + }, + "id": 955, + "nodeType": "InheritanceSpecifier", + "src": "203:8:7" + } + ], + "contractDependencies": [ + 234, + 317, + 889, + 1118 + ], + "contractKind": "contract", + "documentation": "@title Pausable token\n@dev ERC20 modified with pausable transfers.*", + "fullyImplemented": true, + "id": 1049, + "linearizedBaseContracts": [ + 1049, + 317, + 234, + 889, + 1118 + ], + "name": "ERC20Pausable", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 972, + "nodeType": "Block", + "src": "324:43:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 968, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 957, + "src": "352:2:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 969, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 959, + "src": "356:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 966, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1161, + "src": "337:5:7", + "typeDescriptions": { + "typeIdentifier": "t_super$_ERC20Pausable_$1049", + "typeString": "contract super ERC20Pausable" + } + }, + "id": 967, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 521, + "src": "337:14:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) returns (bool)" + } + }, + "id": 970, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "337:25:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 965, + "id": 971, + "nodeType": "Return", + "src": "330:32:7" + } + ] + }, + "documentation": null, + "id": 973, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 962, + "modifierName": { + "argumentTypes": null, + "id": 961, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 274, + "src": "289:13:7", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "289:13:7" + } + ], + "name": "transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 960, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 957, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 973, + "src": "240:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 956, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "240:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 959, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 973, + "src": "256:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 958, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "256:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "234:39:7" + }, + "payable": false, + "returnParameters": { + "id": 965, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 964, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 973, + "src": "316:4:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 963, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "316:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "315:6:7" + }, + "scope": 1049, + "src": "217:150:7", + "stateMutability": "nonpayable", + "superFunction": 521, + "visibility": "public" + }, + { + "body": { + "id": 993, + "nodeType": "Block", + "src": "500:53:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 988, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 975, + "src": "532:4:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 989, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 977, + "src": "538:2:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 990, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 979, + "src": "542: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": 986, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1161, + "src": "513:5:7", + "typeDescriptions": { + "typeIdentifier": "t_super$_ERC20Pausable_$1049", + "typeString": "contract super ERC20Pausable" + } + }, + "id": 987, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 605, + "src": "513: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": 991, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "513:35:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 985, + "id": 992, + "nodeType": "Return", + "src": "506:42:7" + } + ] + }, + "documentation": null, + "id": 994, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 982, + "modifierName": { + "argumentTypes": null, + "id": 981, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 274, + "src": "465:13:7", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "465:13:7" + } + ], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 980, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 975, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 994, + "src": "398:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 974, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "398:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 977, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 994, + "src": "416:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 976, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "416:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 979, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 994, + "src": "432:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 978, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "432:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "392:57:7" + }, + "payable": false, + "returnParameters": { + "id": 985, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 984, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 994, + "src": "492:4:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 983, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "492:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "491:6:7" + }, + "scope": 1049, + "src": "371:182:7", + "stateMutability": "nonpayable", + "superFunction": 605, + "visibility": "public" + }, + { + "body": { + "id": 1011, + "nodeType": "Block", + "src": "668:47:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1007, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 996, + "src": "695:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1008, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 998, + "src": "704:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1005, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1161, + "src": "681:5:7", + "typeDescriptions": { + "typeIdentifier": "t_super$_ERC20Pausable_$1049", + "typeString": "contract super ERC20Pausable" + } + }, + "id": 1006, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "approve", + "nodeType": "MemberAccess", + "referencedDeclaration": 557, + "src": "681:13:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) returns (bool)" + } + }, + "id": 1009, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "681:29:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1004, + "id": 1010, + "nodeType": "Return", + "src": "674:36:7" + } + ] + }, + "documentation": null, + "id": 1012, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 1001, + "modifierName": { + "argumentTypes": null, + "id": 1000, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 274, + "src": "633:13:7", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "633:13:7" + } + ], + "name": "approve", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 999, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 996, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1012, + "src": "579:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 995, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "579:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 998, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1012, + "src": "600:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 997, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "600:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "573:44:7" + }, + "payable": false, + "returnParameters": { + "id": 1004, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1003, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1012, + "src": "660:4:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1002, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "660:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "659:6:7" + }, + "scope": 1049, + "src": "557:158:7", + "stateMutability": "nonpayable", + "superFunction": 557, + "visibility": "public" + }, + { + "body": { + "id": 1029, + "nodeType": "Block", + "src": "850:62:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1025, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1014, + "src": "887:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1026, + "name": "addedValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1016, + "src": "896:10:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1023, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1161, + "src": "863:5:7", + "typeDescriptions": { + "typeIdentifier": "t_super$_ERC20Pausable_$1049", + "typeString": "contract super ERC20Pausable" + } + }, + "id": 1024, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "increaseAllowance", + "nodeType": "MemberAccess", + "referencedDeclaration": 655, + "src": "863:23:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) returns (bool)" + } + }, + "id": 1027, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "863:44:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1022, + "id": 1028, + "nodeType": "Return", + "src": "856:51:7" + } + ] + }, + "documentation": null, + "id": 1030, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 1019, + "modifierName": { + "argumentTypes": null, + "id": 1018, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 274, + "src": "807:13:7", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "807:13:7" + } + ], + "name": "increaseAllowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1017, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1014, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1030, + "src": "751:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1013, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "751:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1016, + "name": "addedValue", + "nodeType": "VariableDeclaration", + "scope": 1030, + "src": "772:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1015, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "772:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "745:46:7" + }, + "payable": false, + "returnParameters": { + "id": 1022, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1021, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1030, + "src": "834:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1020, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "834:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "833:14:7" + }, + "scope": 1049, + "src": "719:193:7", + "stateMutability": "nonpayable", + "superFunction": 655, + "visibility": "public" + }, + { + "body": { + "id": 1047, + "nodeType": "Block", + "src": "1052:67:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1043, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1032, + "src": "1089:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1044, + "name": "subtractedValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1034, + "src": "1098:15:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1041, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1161, + "src": "1065:5:7", + "typeDescriptions": { + "typeIdentifier": "t_super$_ERC20Pausable_$1049", + "typeString": "contract super ERC20Pausable" + } + }, + "id": 1042, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "decreaseAllowance", + "nodeType": "MemberAccess", + "referencedDeclaration": 705, + "src": "1065:23:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) returns (bool)" + } + }, + "id": 1045, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1065:49:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 1040, + "id": 1046, + "nodeType": "Return", + "src": "1058:56:7" + } + ] + }, + "documentation": null, + "id": 1048, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 1037, + "modifierName": { + "argumentTypes": null, + "id": 1036, + "name": "whenNotPaused", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 274, + "src": "1009:13:7", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1009:13:7" + } + ], + "name": "decreaseAllowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1035, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1032, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1048, + "src": "948:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1031, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "948:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1034, + "name": "subtractedValue", + "nodeType": "VariableDeclaration", + "scope": 1048, + "src": "969:20:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1033, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "969:4:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "942:51:7" + }, + "payable": false, + "returnParameters": { + "id": 1040, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1039, + "name": "success", + "nodeType": "VariableDeclaration", + "scope": 1048, + "src": "1036:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1038, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1036:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1035:14:7" + }, + "scope": 1049, + "src": "916:203:7", + "stateMutability": "nonpayable", + "superFunction": 705, + "visibility": "public" + } + ], + "scope": 1050, + "src": "170:951:7" + } + ], + "src": "0:1122: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": [ + 1118 + ] + }, + "id": 1119, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1051, + "literals": [ + "solidity", + "^", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:24:8" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "interface", + "documentation": "@title ERC20 interface\n@dev see https://github.com/ethereum/EIPs/issues/20", + "fullyImplemented": false, + "id": 1118, + "linearizedBaseContracts": [ + 1118 + ], + "name": "IERC20", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "id": 1056, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "totalSupply", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1052, + "nodeType": "ParameterList", + "parameters": [], + "src": "156:2:8" + }, + "payable": false, + "returnParameters": { + "id": 1055, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1054, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1056, + "src": "182:7:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1053, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "182:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "181:9:8" + }, + "scope": 1118, + "src": "136:55:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 1063, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "balanceOf", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1059, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1058, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 1063, + "src": "214:11:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1057, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "214:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "213:13:8" + }, + "payable": false, + "returnParameters": { + "id": 1062, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1061, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1063, + "src": "250:7:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1060, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "250:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "249:9:8" + }, + "scope": 1118, + "src": "195:64:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 1072, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "allowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1068, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1065, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 1072, + "src": "282:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1064, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "282:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1067, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1072, + "src": "297:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1066, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "297:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "281:32:8" + }, + "payable": false, + "returnParameters": { + "id": 1071, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1070, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1072, + "src": "341:7:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1069, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "341:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "340:9:8" + }, + "scope": 1118, + "src": "263:87:8", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 1081, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1077, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1074, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1081, + "src": "372:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1073, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "372:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1076, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1081, + "src": "384:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1075, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "384:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "371:27:8" + }, + "payable": false, + "returnParameters": { + "id": 1080, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1079, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1081, + "src": "417:4:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1078, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "417:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "416:6:8" + }, + "scope": 1118, + "src": "354:69:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 1090, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1086, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1083, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1090, + "src": "444:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1082, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "444:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1085, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1090, + "src": "461:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1084, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "461:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "443:32:8" + }, + "payable": false, + "returnParameters": { + "id": 1089, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1088, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1090, + "src": "498:4:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1087, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "498:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "497:6:8" + }, + "scope": 1118, + "src": "427:77:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 1101, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1097, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1092, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 1101, + "src": "530:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1091, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "530:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1094, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1101, + "src": "544:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1093, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "544:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1096, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1101, + "src": "556:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1095, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "556:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "529:41:8" + }, + "payable": false, + "returnParameters": { + "id": 1100, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1099, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1101, + "src": "593:4:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1098, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "593:4:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "592:6:8" + }, + "scope": 1118, + "src": "508:91:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "anonymous": false, + "documentation": null, + "id": 1109, + "name": "Transfer", + "nodeType": "EventDefinition", + "parameters": { + "id": 1108, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1103, + "indexed": true, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 1109, + "src": "623:20:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1102, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "623:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1105, + "indexed": true, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1109, + "src": "649:18:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1104, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "649:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1107, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1109, + "src": "673:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1106, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "673:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "617:73:8" + }, + "src": "603:88:8" + }, + { + "anonymous": false, + "documentation": null, + "id": 1117, + "name": "Approval", + "nodeType": "EventDefinition", + "parameters": { + "id": 1116, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1111, + "indexed": true, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 1117, + "src": "715:21:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1110, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "715:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1113, + "indexed": true, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1117, + "src": "742:23:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1112, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "742:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1115, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1117, + "src": "771:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1114, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "771:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "709:79:8" + }, + "src": "695:94:8" + } + ], + "scope": 1119, + "src": "115:676:8" + } + ], + "src": "0:792:8" + }, + "id": 8 + } + } +} \ No newline at end of file diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/bin/AlgoTokenV1.abi b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/bin/AlgoTokenV1.abi similarity index 100% rename from labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/bin/AlgoTokenV1.abi rename to labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/bin/AlgoTokenV1.abi diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/bin/AlgoTokenV1.bin b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/bin/AlgoTokenV1.bin similarity index 98% rename from labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/bin/AlgoTokenV1.bin rename to labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/bin/AlgoTokenV1.bin index 12c6b6a7a..a78738611 100644 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token/SmartContracts/src/bin/AlgoTokenV1.bin +++ b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/bin/AlgoTokenV1.bin @@ -1 +1 @@ -60806040523480156200001157600080fd5b50604080518082018252600581527f416c676f7300000000000000000000000000000000000000000000000000000060208083019182528351808501909452600484527f414c474f00000000000000000000000000000000000000000000000000000000908401528151919291601291620000909160039190620002c1565b508151620000a6906004906020850190620002c1565b506005805460ff191660ff9290921691909117905550620000d290503364010000000062000103810204565b6007805460ff19169055620000fd336b033b2e3c9fd0803ce800000064010000000062000155810204565b62000366565b6200011e60068264010000000062000b226200021482021704565b604051600160a060020a038216907f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f890600090a250565b600160a060020a03821615156200016b57600080fd5b60025462000188908264010000000062000ac46200026f82021704565b600255600160a060020a038216600090815260208190526040902054620001be908264010000000062000ac46200026f82021704565b600160a060020a0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b600160a060020a03811615156200022a57600080fd5b6200023f828264010000000062000289810204565b156200024a57600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b6000828201838110156200028257600080fd5b9392505050565b6000600160a060020a0382161515620002a157600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200030457805160ff191683800117855562000334565b8280016001018555821562000334579182015b828111156200033457825182559160200191906001019062000317565b506200034292915062000346565b5090565b6200036391905b808211156200034257600081556001016200034d565b90565b610b9c80620003766000396000f3006080604052600436106100fb5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610100578063095ea7b31461018a57806318160ddd146101c257806323b872dd146101e95780632ff2e9dc14610213578063313ce5671461022857806339509351146102535780633f4ba83a1461027757806346fbf68e1461028e5780635c975abb146102af5780636ef8d66d146102c457806370a08231146102d957806382dc1ec4146102fa5780638456cb591461031b57806395d89b4114610330578063a457c2d714610345578063a9059cbb14610369578063dd62ed3e1461038d575b600080fd5b34801561010c57600080fd5b506101156103b4565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561014f578181015183820152602001610137565b50505050905090810190601f16801561017c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561019657600080fd5b506101ae600160a060020a036004351660243561044a565b604080519115158252519081900360200190f35b3480156101ce57600080fd5b506101d761046e565b60408051918252519081900360200190f35b3480156101f557600080fd5b506101ae600160a060020a0360043581169060243516604435610474565b34801561021f57600080fd5b506101d761049a565b34801561023457600080fd5b5061023d6104aa565b6040805160ff9092168252519081900360200190f35b34801561025f57600080fd5b506101ae600160a060020a03600435166024356104b3565b34801561028357600080fd5b5061028c6104d0565b005b34801561029a57600080fd5b506101ae600160a060020a0360043516610534565b3480156102bb57600080fd5b506101ae61054d565b3480156102d057600080fd5b5061028c610556565b3480156102e557600080fd5b506101d7600160a060020a0360043516610561565b34801561030657600080fd5b5061028c600160a060020a036004351661057c565b34801561032757600080fd5b5061028c61059c565b34801561033c57600080fd5b50610115610602565b34801561035157600080fd5b506101ae600160a060020a0360043516602435610663565b34801561037557600080fd5b506101ae600160a060020a0360043516602435610680565b34801561039957600080fd5b506101d7600160a060020a036004358116906024351661069d565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104405780601f1061041557610100808354040283529160200191610440565b820191906000526020600020905b81548152906001019060200180831161042357829003601f168201915b5050505050905090565b60075460009060ff161561045d57600080fd5b61046783836106c8565b9392505050565b60025490565b60075460009060ff161561048757600080fd5b610492848484610746565b949350505050565b6b033b2e3c9fd0803ce800000081565b60055460ff1690565b60075460009060ff16156104c657600080fd5b61046783836107e3565b6104d933610534565b15156104e457600080fd5b60075460ff1615156104f557600080fd5b6007805460ff191690556040805133815290517f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa9181900360200190a1565b600061054760068363ffffffff61089316565b92915050565b60075460ff1690565b61055f336108ca565b565b600160a060020a031660009081526020819052604090205490565b61058533610534565b151561059057600080fd5b61059981610912565b50565b6105a533610534565b15156105b057600080fd5b60075460ff16156105c057600080fd5b6007805460ff191660011790556040805133815290517f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2589181900360200190a1565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104405780601f1061041557610100808354040283529160200191610440565b60075460009060ff161561067657600080fd5b610467838361095a565b60075460009060ff161561069357600080fd5b61046783836109a5565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6000600160a060020a03831615156106df57600080fd5b336000818152600160209081526040808320600160a060020a03881680855290835292819020869055805186815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a350600192915050565b600160a060020a038316600090815260016020908152604080832033845290915281205482111561077657600080fd5b600160a060020a03841660009081526001602090815260408083203384529091529020546107aa908363ffffffff6109bb16565b600160a060020a03851660009081526001602090815260408083203384529091529020556107d98484846109d2565b5060019392505050565b6000600160a060020a03831615156107fa57600080fd5b336000908152600160209081526040808320600160a060020a038716845290915290205461082e908363ffffffff610ac416565b336000818152600160209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b6000600160a060020a03821615156108aa57600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b6108db60068263ffffffff610ad616565b604051600160a060020a038216907fcd265ebaf09df2871cc7bd4133404a235ba12eff2041bb89d9c714a2621c7c7e90600090a250565b61092360068263ffffffff610b2216565b604051600160a060020a038216907f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f890600090a250565b6000600160a060020a038316151561097157600080fd5b336000908152600160209081526040808320600160a060020a038716845290915290205461082e908363ffffffff6109bb16565b60006109b23384846109d2565b50600192915050565b600080838311156109cb57600080fd5b5050900390565b600160a060020a0383166000908152602081905260409020548111156109f757600080fd5b600160a060020a0382161515610a0c57600080fd5b600160a060020a038316600090815260208190526040902054610a35908263ffffffff6109bb16565b600160a060020a038085166000908152602081905260408082209390935590841681522054610a6a908263ffffffff610ac416565b600160a060020a038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008282018381101561046757600080fd5b600160a060020a0381161515610aeb57600080fd5b610af58282610893565b1515610b0057600080fd5b600160a060020a0316600090815260209190915260409020805460ff19169055565b600160a060020a0381161515610b3757600080fd5b610b418282610893565b15610b4b57600080fd5b600160a060020a0316600090815260209190915260409020805460ff191660011790555600a165627a7a723058202dd18facb88fce52397143655484bd6bb04ca8578eb8c0779511f9e8d97c55f20029 \ No newline at end of file +60806040523480156200001157600080fd5b50604080518082018252600581527f416c676f7300000000000000000000000000000000000000000000000000000060208083019182528351808501909452600484527f414c474f00000000000000000000000000000000000000000000000000000000908401528151919291601291620000909160039190620002c1565b508151620000a6906004906020850190620002c1565b506005805460ff191660ff9290921691909117905550620000d290503364010000000062000103810204565b6007805460ff19169055620000fd336b033b2e3c9fd0803ce800000064010000000062000155810204565b62000366565b6200011e60068264010000000062000b226200021482021704565b604051600160a060020a038216907f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f890600090a250565b600160a060020a03821615156200016b57600080fd5b60025462000188908264010000000062000ac46200026f82021704565b600255600160a060020a038216600090815260208190526040902054620001be908264010000000062000ac46200026f82021704565b600160a060020a0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b600160a060020a03811615156200022a57600080fd5b6200023f828264010000000062000289810204565b156200024a57600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b6000828201838110156200028257600080fd5b9392505050565b6000600160a060020a0382161515620002a157600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200030457805160ff191683800117855562000334565b8280016001018555821562000334579182015b828111156200033457825182559160200191906001019062000317565b506200034292915062000346565b5090565b6200036391905b808211156200034257600081556001016200034d565b90565b610b9c80620003766000396000f3006080604052600436106100fb5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610100578063095ea7b31461018a57806318160ddd146101c257806323b872dd146101e95780632ff2e9dc14610213578063313ce5671461022857806339509351146102535780633f4ba83a1461027757806346fbf68e1461028e5780635c975abb146102af5780636ef8d66d146102c457806370a08231146102d957806382dc1ec4146102fa5780638456cb591461031b57806395d89b4114610330578063a457c2d714610345578063a9059cbb14610369578063dd62ed3e1461038d575b600080fd5b34801561010c57600080fd5b506101156103b4565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561014f578181015183820152602001610137565b50505050905090810190601f16801561017c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561019657600080fd5b506101ae600160a060020a036004351660243561044a565b604080519115158252519081900360200190f35b3480156101ce57600080fd5b506101d761046e565b60408051918252519081900360200190f35b3480156101f557600080fd5b506101ae600160a060020a0360043581169060243516604435610474565b34801561021f57600080fd5b506101d761049a565b34801561023457600080fd5b5061023d6104aa565b6040805160ff9092168252519081900360200190f35b34801561025f57600080fd5b506101ae600160a060020a03600435166024356104b3565b34801561028357600080fd5b5061028c6104d0565b005b34801561029a57600080fd5b506101ae600160a060020a0360043516610534565b3480156102bb57600080fd5b506101ae61054d565b3480156102d057600080fd5b5061028c610556565b3480156102e557600080fd5b506101d7600160a060020a0360043516610561565b34801561030657600080fd5b5061028c600160a060020a036004351661057c565b34801561032757600080fd5b5061028c61059c565b34801561033c57600080fd5b50610115610602565b34801561035157600080fd5b506101ae600160a060020a0360043516602435610663565b34801561037557600080fd5b506101ae600160a060020a0360043516602435610680565b34801561039957600080fd5b506101d7600160a060020a036004358116906024351661069d565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104405780601f1061041557610100808354040283529160200191610440565b820191906000526020600020905b81548152906001019060200180831161042357829003601f168201915b5050505050905090565b60075460009060ff161561045d57600080fd5b61046783836106c8565b9392505050565b60025490565b60075460009060ff161561048757600080fd5b610492848484610746565b949350505050565b6b033b2e3c9fd0803ce800000081565b60055460ff1690565b60075460009060ff16156104c657600080fd5b61046783836107e3565b6104d933610534565b15156104e457600080fd5b60075460ff1615156104f557600080fd5b6007805460ff191690556040805133815290517f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa9181900360200190a1565b600061054760068363ffffffff61089316565b92915050565b60075460ff1690565b61055f336108ca565b565b600160a060020a031660009081526020819052604090205490565b61058533610534565b151561059057600080fd5b61059981610912565b50565b6105a533610534565b15156105b057600080fd5b60075460ff16156105c057600080fd5b6007805460ff191660011790556040805133815290517f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2589181900360200190a1565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104405780601f1061041557610100808354040283529160200191610440565b60075460009060ff161561067657600080fd5b610467838361095a565b60075460009060ff161561069357600080fd5b61046783836109a5565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6000600160a060020a03831615156106df57600080fd5b336000818152600160209081526040808320600160a060020a03881680855290835292819020869055805186815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a350600192915050565b600160a060020a038316600090815260016020908152604080832033845290915281205482111561077657600080fd5b600160a060020a03841660009081526001602090815260408083203384529091529020546107aa908363ffffffff6109bb16565b600160a060020a03851660009081526001602090815260408083203384529091529020556107d98484846109d2565b5060019392505050565b6000600160a060020a03831615156107fa57600080fd5b336000908152600160209081526040808320600160a060020a038716845290915290205461082e908363ffffffff610ac416565b336000818152600160209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b6000600160a060020a03821615156108aa57600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b6108db60068263ffffffff610ad616565b604051600160a060020a038216907fcd265ebaf09df2871cc7bd4133404a235ba12eff2041bb89d9c714a2621c7c7e90600090a250565b61092360068263ffffffff610b2216565b604051600160a060020a038216907f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f890600090a250565b6000600160a060020a038316151561097157600080fd5b336000908152600160209081526040808320600160a060020a038716845290915290205461082e908363ffffffff6109bb16565b60006109b23384846109d2565b50600192915050565b600080838311156109cb57600080fd5b5050900390565b600160a060020a0383166000908152602081905260409020548111156109f757600080fd5b600160a060020a0382161515610a0c57600080fd5b600160a060020a038316600090815260208190526040902054610a35908263ffffffff6109bb16565b600160a060020a038085166000908152602081905260408082209390935590841681522054610a6a908263ffffffff610ac416565b600160a060020a038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008282018381101561046757600080fd5b600160a060020a0381161515610aeb57600080fd5b610af58282610893565b1515610b0057600080fd5b600160a060020a0316600090815260209190915260409020805460ff19169055565b600160a060020a0381161515610b3757600080fd5b610b418282610893565b15610b4b57600080fd5b600160a060020a0316600090815260209190915260409020805460ff191660011790555600a165627a7a7230582061a190b3074a6fa0ab1f995699a75a855141c91dd51eb835ef565d0c7739360d0029 \ 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..35d25c374 --- /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": "60806040523480156200001157600080fd5b50604080518082018252600581527f416c676f7300000000000000000000000000000000000000000000000000000060208083019182528351808501909452600484527f414c474f00000000000000000000000000000000000000000000000000000000908401528151919291601291620000909160039190620002c1565b508151620000a6906004906020850190620002c1565b506005805460ff191660ff9290921691909117905550620000d290503364010000000062000103810204565b6007805460ff19169055620000fd336b033b2e3c9fd0803ce800000064010000000062000155810204565b62000366565b6200011e60068264010000000062000b226200021482021704565b604051600160a060020a038216907f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f890600090a250565b600160a060020a03821615156200016b57600080fd5b60025462000188908264010000000062000ac46200026f82021704565b600255600160a060020a038216600090815260208190526040902054620001be908264010000000062000ac46200026f82021704565b600160a060020a0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b600160a060020a03811615156200022a57600080fd5b6200023f828264010000000062000289810204565b156200024a57600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b6000828201838110156200028257600080fd5b9392505050565b6000600160a060020a0382161515620002a157600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200030457805160ff191683800117855562000334565b8280016001018555821562000334579182015b828111156200033457825182559160200191906001019062000317565b506200034292915062000346565b5090565b6200036391905b808211156200034257600081556001016200034d565b90565b610b9c80620003766000396000f3006080604052600436106100fb5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610100578063095ea7b31461018a57806318160ddd146101c257806323b872dd146101e95780632ff2e9dc14610213578063313ce5671461022857806339509351146102535780633f4ba83a1461027757806346fbf68e1461028e5780635c975abb146102af5780636ef8d66d146102c457806370a08231146102d957806382dc1ec4146102fa5780638456cb591461031b57806395d89b4114610330578063a457c2d714610345578063a9059cbb14610369578063dd62ed3e1461038d575b600080fd5b34801561010c57600080fd5b506101156103b4565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561014f578181015183820152602001610137565b50505050905090810190601f16801561017c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561019657600080fd5b506101ae600160a060020a036004351660243561044a565b604080519115158252519081900360200190f35b3480156101ce57600080fd5b506101d761046e565b60408051918252519081900360200190f35b3480156101f557600080fd5b506101ae600160a060020a0360043581169060243516604435610474565b34801561021f57600080fd5b506101d761049a565b34801561023457600080fd5b5061023d6104aa565b6040805160ff9092168252519081900360200190f35b34801561025f57600080fd5b506101ae600160a060020a03600435166024356104b3565b34801561028357600080fd5b5061028c6104d0565b005b34801561029a57600080fd5b506101ae600160a060020a0360043516610534565b3480156102bb57600080fd5b506101ae61054d565b3480156102d057600080fd5b5061028c610556565b3480156102e557600080fd5b506101d7600160a060020a0360043516610561565b34801561030657600080fd5b5061028c600160a060020a036004351661057c565b34801561032757600080fd5b5061028c61059c565b34801561033c57600080fd5b50610115610602565b34801561035157600080fd5b506101ae600160a060020a0360043516602435610663565b34801561037557600080fd5b506101ae600160a060020a0360043516602435610680565b34801561039957600080fd5b506101d7600160a060020a036004358116906024351661069d565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104405780601f1061041557610100808354040283529160200191610440565b820191906000526020600020905b81548152906001019060200180831161042357829003601f168201915b5050505050905090565b60075460009060ff161561045d57600080fd5b61046783836106c8565b9392505050565b60025490565b60075460009060ff161561048757600080fd5b610492848484610746565b949350505050565b6b033b2e3c9fd0803ce800000081565b60055460ff1690565b60075460009060ff16156104c657600080fd5b61046783836107e3565b6104d933610534565b15156104e457600080fd5b60075460ff1615156104f557600080fd5b6007805460ff191690556040805133815290517f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa9181900360200190a1565b600061054760068363ffffffff61089316565b92915050565b60075460ff1690565b61055f336108ca565b565b600160a060020a031660009081526020819052604090205490565b61058533610534565b151561059057600080fd5b61059981610912565b50565b6105a533610534565b15156105b057600080fd5b60075460ff16156105c057600080fd5b6007805460ff191660011790556040805133815290517f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2589181900360200190a1565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104405780601f1061041557610100808354040283529160200191610440565b60075460009060ff161561067657600080fd5b610467838361095a565b60075460009060ff161561069357600080fd5b61046783836109a5565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b6000600160a060020a03831615156106df57600080fd5b336000818152600160209081526040808320600160a060020a03881680855290835292819020869055805186815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a350600192915050565b600160a060020a038316600090815260016020908152604080832033845290915281205482111561077657600080fd5b600160a060020a03841660009081526001602090815260408083203384529091529020546107aa908363ffffffff6109bb16565b600160a060020a03851660009081526001602090815260408083203384529091529020556107d98484846109d2565b5060019392505050565b6000600160a060020a03831615156107fa57600080fd5b336000908152600160209081526040808320600160a060020a038716845290915290205461082e908363ffffffff610ac416565b336000818152600160209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b6000600160a060020a03821615156108aa57600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b6108db60068263ffffffff610ad616565b604051600160a060020a038216907fcd265ebaf09df2871cc7bd4133404a235ba12eff2041bb89d9c714a2621c7c7e90600090a250565b61092360068263ffffffff610b2216565b604051600160a060020a038216907f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f890600090a250565b6000600160a060020a038316151561097157600080fd5b336000908152600160209081526040808320600160a060020a038716845290915290205461082e908363ffffffff6109bb16565b60006109b23384846109d2565b50600192915050565b600080838311156109cb57600080fd5b5050900390565b600160a060020a0383166000908152602081905260409020548111156109f757600080fd5b600160a060020a0382161515610a0c57600080fd5b600160a060020a038316600090815260208190526040902054610a35908263ffffffff6109bb16565b600160a060020a038085166000908152602081905260408082209390935590841681522054610a6a908263ffffffff610ac416565b600160a060020a038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008282018381101561046757600080fd5b600160a060020a0381161515610aeb57600080fd5b610af58282610893565b1515610b0057600080fd5b600160a060020a0316600090815260209190915260409020805460ff19169055565b600160a060020a0381161515610b3757600080fd5b610b418282610893565b15610b4b57600080fd5b600160a060020a0316600090815260209190915260409020805460ff191660011790555600a165627a7a7230582061a190b3074a6fa0ab1f995699a75a855141c91dd51eb835ef565d0c7739360d0029", + "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": "594400", + "executionCost": "infinite", + "totalCost": "infinite" + }, + "external": { + "INITIAL_SUPPLY()": "272", + "addPauser(address)": "infinite", + "allowance(address,address)": "1082", + "approve(address,uint256)": "22732", + "balanceOf(address)": "851", + "decimals()": "509", + "decreaseAllowance(address,uint256)": "infinite", + "increaseAllowance(address,uint256)": "infinite", + "isPauser(address)": "infinite", + "name()": "infinite", + "pause()": "infinite", + "paused()": "594", + "renouncePauser()": "infinite", + "symbol()": "infinite", + "totalSupply()": "428", + "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..4273dd66c --- /dev/null +++ b/labs/algo-erc20-token/src/AdvancedAlgos.AlgoToken.AlgoErc20Token/SmartContracts/src/package-lock.json @@ -0,0 +1,495 @@ +{ + "name": "algo-erc20-token", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "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" + } + }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=" + }, + "camelcase": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=" + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "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=" + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^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==" + }, + "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==" + }, + "hosted-git-info": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", + "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==" + }, + "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-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" + }, + "is-builtin-module": { + "version": "1.0.0", + "resolved": "http://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", + "requires": { + "builtin-modules": "^1.0.0" + } + }, + "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" + } + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=" + }, + "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" + } + }, + "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" + } + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + } + }, + "lodash.assign": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz", + "integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=" + }, + "memorystream": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", + "integrity": "sha1-htcJCzDORV1j+64S3aUaR93K+bI=" + }, + "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" + } + }, + "normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "requires": { + "hosted-git-info": "^2.1.4", + "is-builtin-module": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "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.0.0", + "resolved": "https://registry.npmjs.org/openzeppelin-solidity/-/openzeppelin-solidity-2.0.0.tgz", + "integrity": "sha512-SolpxQFArtiYnlSNg3dZ9sz0WVlKtPqSOcJkXRllaZp4+Lpfqz3vxF0yoh7g75TszKPyadqoJmU7+GM/vwh9SA==" + }, + "os-locale": { + "version": "1.4.0", + "resolved": "http://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "requires": { + "lcid": "^1.0.0" + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "requires": { + "error-ex": "^1.2.0" + } + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "requires": { + "pinkie-promise": "^2.0.0" + } + }, + "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-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "requires": { + "pinkie": "^2.0.0" + } + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "requires": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "requires": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + } + }, + "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": "1.2.1", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-1.2.1.tgz", + "integrity": "sha1-UpyczvJzgK3+yaL5ZbZJu+5jZBg=" + }, + "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.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "requires": { + "glob": "^7.0.5" + } + }, + "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=" + }, + "solc": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/solc/-/solc-0.4.24.tgz", + "integrity": "sha512-2xd7Cf1HeVwrIb6Bu1cwY2/TaLRodrppCq3l7rhLimFQgmxptXhTC3+/wesVLpB09F1A2kZgvbMOgH7wvhFnBQ==", + "requires": { + "fs-extra": "^0.30.0", + "memorystream": "^0.3.1", + "require-from-string": "^1.1.0", + "semver": "^5.3.0", + "yargs": "^4.7.1" + } + }, + "spdx-correct": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.2.tgz", + "integrity": "sha512-q9hedtzyXHr5S0A1vEPoK/7l8NpfkFYTq6iCY+Pno2ZbdZR6WexZFtqeVGkGxW3TEJMN914Z55EnAGMmenlIQQ==", + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", + "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==" + }, + "spdx-expression-parse": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.2.tgz", + "integrity": "sha512-qky9CVt0lVIECkEsYbNILVnPvycuEBkXoMFLRWsREkomQLevYhtRKC+R91a5TOAQ3bCMjikRwhyaRqj1VYatYg==" + }, + "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": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "requires": { + "is-utf8": "^0.2.0" + } + }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "which-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", + "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=" + }, + "window-size": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.2.0.tgz", + "integrity": "sha1-tDFbtCFKPXBY6+7okuE/ok2YsHU=" + }, + "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" + } + }, + "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=" + }, + "yargs": { + "version": "4.8.1", + "resolved": "http://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz", + "integrity": "sha1-wMQpJMpKqmsObaFznfshZDn53cA=", + "requires": { + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "get-caller-file": "^1.0.1", + "lodash.assign": "^4.0.3", + "os-locale": "^1.4.0", + "read-pkg-up": "^1.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^1.0.1", + "which-module": "^1.0.0", + "window-size": "^0.2.0", + "y18n": "^3.2.1", + "yargs-parser": "^2.4.1" + } + }, + "yargs-parser": { + "version": "2.4.1", + "resolved": "http://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.1.tgz", + "integrity": "sha1-hVaN488VD/SfpRgl8DqMiA3cxcQ=", + "requires": { + "camelcase": "^3.0.0", + "lodash.assign": "^4.0.6" + } + } + } +} 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..2d72520d7 --- /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.0.0", + "solc": "^0.4.24" + } +} diff --git a/labs/algo-erc20-token/test/AdvancedAlgos.AlgoErc20Token.IntegrationTests/AlgoTokenV1Tests.cs b/labs/algo-erc20-token/test/AdvancedAlgos.AlgoErc20Token.IntegrationTests/AlgoTokenV1Tests.cs deleted file mode 100644 index ec61b0cc6..000000000 --- a/labs/algo-erc20-token/test/AdvancedAlgos.AlgoErc20Token.IntegrationTests/AlgoTokenV1Tests.cs +++ /dev/null @@ -1,74 +0,0 @@ -using System; -using System.Numerics; -using System.Threading.Tasks; -using AdvancedAlgos.AlgoErc20Token.EthClientExtensions; -using AdvancedAlgos.AlgoErc20Token.EthClientExtensions.Exceptions; -using Nethereum.Web3; -using Nethereum.Web3.Accounts; -using Xunit; - -namespace AdvancedAlgos.AlgoErc20Token.IntegrationTests -{ - public class AlgoTokenV1Tests - { - private const long INITIAL_SUPPLY = 1000000000; - private const byte TOKEN_DECIMALS = 18; - - private static BigInteger _tokenFactor = BigInteger.Pow(10, TOKEN_DECIMALS); - - [Fact] - public async Task DeployContractAndTransferTokensTest() - { - EthNetwork.UseGethTestNet(); - - var account1 = new Account(EthNetwork.Instance.PrefundedPrivateKey); - var account2 = EthAccountFactory.Create(); - - var web3 = new Web3(account1, EthNetwork.Instance.Url); - - var contract = new AlgoTokenV1(); - - await contract.DeployAsync(web3, EthNetwork.Instance.GasPrice); - - Assert.Equal(INITIAL_SUPPLY.Algo(), await contract.BalanceOfAsync(account1.Address)); - - await contract.TransferAsync(EthNetwork.Instance.GasPrice, account2.Address, 2.Algo()); - - Assert.Equal(2.Algo(), await contract.BalanceOfAsync(account2.Address)); - } - - [Fact] - public async Task PausableFeatureTest() - { - EthNetwork.UseGethTestNet(); - - var account1 = new Account(EthNetwork.Instance.PrefundedPrivateKey); - var account2 = EthAccountFactory.Create(); - - var web3 = new Web3(account1, EthNetwork.Instance.Url); - - var contract = new AlgoTokenV1(); - - await contract.DeployAsync(web3, EthNetwork.Instance.GasPrice); - - await contract.TransferAsync(EthNetwork.Instance.GasPrice, account2.Address, 2.Algo()); - - Assert.Equal(2.Algo(), await contract.BalanceOfAsync(account2.Address)); - - await contract.PauseAsync(EthNetwork.Instance.GasPrice); - - await Assert.ThrowsAsync( - () => contract.TransferAsync(EthNetwork.Instance.GasPrice, account2.Address, 2.Algo())); - - Assert.Equal(2.Algo(), await contract.BalanceOfAsync(account2.Address)); - - await contract.UnpauseAsync(EthNetwork.Instance.GasPrice); - - Assert.Equal(2.Algo(), await contract.BalanceOfAsync(account2.Address)); - - await contract.TransferAsync(EthNetwork.Instance.GasPrice, account2.Address, 2.Algo()); - - Assert.Equal(4.Algo(), await contract.BalanceOfAsync(account2.Address)); - } - } -} diff --git a/labs/algo-erc20-token/test/AdvancedAlgos.AlgoErc20Token.IntegrationTests/AdvancedAlgos.AlgoErc20Token.IntegrationTests.csproj b/labs/algo-erc20-token/test/AdvancedAlgos.AlgoToken.AlgoErc20Token.IntegrationTests/AdvancedAlgos.AlgoToken.AlgoErc20Token.IntegrationTests.csproj similarity index 54% rename from labs/algo-erc20-token/test/AdvancedAlgos.AlgoErc20Token.IntegrationTests/AdvancedAlgos.AlgoErc20Token.IntegrationTests.csproj rename to labs/algo-erc20-token/test/AdvancedAlgos.AlgoToken.AlgoErc20Token.IntegrationTests/AdvancedAlgos.AlgoToken.AlgoErc20Token.IntegrationTests.csproj index b7afbca3b..a32a8a284 100644 --- a/labs/algo-erc20-token/test/AdvancedAlgos.AlgoErc20Token.IntegrationTests/AdvancedAlgos.AlgoErc20Token.IntegrationTests.csproj +++ b/labs/algo-erc20-token/test/AdvancedAlgos.AlgoToken.AlgoErc20Token.IntegrationTests/AdvancedAlgos.AlgoToken.AlgoErc20Token.IntegrationTests.csproj @@ -2,8 +2,8 @@ netcoreapp2.1 - false latest + false @@ -14,7 +14,9 @@ - + + + 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..f19264bde --- /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.UseGanacheTestNet(); + + 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.UseGanacheTestNet(); + + 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..fcd5029c3 --- /dev/null +++ b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/AdvancedAlgos.AlgoToken.AlgoTokenDistribution.csproj @@ -0,0 +1,24 @@ + + + + netcoreapp2.1 + latest + + + + + + + + + + + + + + + + + + + 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..e128472b4 --- /dev/null +++ b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/AlgoMiner.cs @@ -0,0 +1,97 @@ +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 _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 => 1200000; + + public Task DeployAsync(ushort minerType, byte category, string ownerAddress, string tokenAddress) + => base.DeployAsync(minerType, category, ownerAddress, 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"); + + _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) => + InvokeAsync(_resetMiner, 900000, newOwnerAddress); + + public Task StartMiningAsync() => + InvokeAsync(_startMining, 900000); + + public Task StopMiningAsync() => + InvokeAsync(_stopMining, 900000); + + public Task MineAsync() => + InvokeAsync(_mine, 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..2e6d95c61 --- /dev/null +++ b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/AlgoPool.cs @@ -0,0 +1,35 @@ +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 _trasferToMiner; + + 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(ushort poolType, string tokenAddress) + => base.DeployAsync(poolType, tokenAddress); + + protected override void Initialize(Contract contractDescriptor) + { + _trasferToMiner = contractDescriptor.GetFunction("trasferToMiner"); + } + + public Task TrasferToMinerAsync(string minerAddress) => + InvokeAsync(_trasferToMiner, 900000, minerAddress); + } +} 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/AlgoCoreTeamRole.sol b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoCoreTeamRole.sol new file mode 100644 index 000000000..7c147587d --- /dev/null +++ b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoCoreTeamRole.sol @@ -0,0 +1,38 @@ +pragma solidity ^0.4.24; + +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/AlgoMiner.sol b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoMiner.sol new file mode 100644 index 000000000..69263a732 --- /dev/null +++ b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoMiner.sol @@ -0,0 +1,147 @@ +pragma solidity 0.4.24; + +import "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol"; +import "openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol"; + +import "./IAlgoMiner.sol"; +import "./AlgoSystemRole.sol"; +import "./AlgoCoreTeamRole.sol"; +import "./AlgoSupervisorRole.sol"; + +contract AlgoMiner is AlgoSystemRole, AlgoCoreTeamRole, AlgoSupervisorRole, IAlgoMiner { + using SafeERC20 for IERC20; + + uint256 public constant DAYS_PER_YEAR = 365; + + enum MinerState { + Deactivated, + Activated, + Suspended, + Stopped + } + + uint16 private _minerType; + uint8 private _category; + address private _miner; + IERC20 private _token; + + MinerState private _state; + bool private _mining; + uint8 private _currentYear; + uint16 private _currentDay; + uint256 private _currentYearSupply; + + constructor(uint16 minerType, uint8 category, address ownerAddress, address tokenAddress) + AlgoSystemRole() + AlgoCoreTeamRole() + AlgoSupervisorRole() + public { + + _minerType = minerType; + _category = category; + _miner = ownerAddress; + _token = IERC20(tokenAddress); + } + + modifier onlyMiner() { + require(msg.sender == _miner); + _; + } + + function activateMiner() public onlyCoreTeam { + require(_state == MinerState.Deactivated); + + if(_currentYearSupply == 0) { + uint256 currentBalance = _token.balanceOf(address(this)); + + require(currentBalance != 0); + + _currentYearSupply = currentBalance / 2; + } + + _state = MinerState.Activated; + } + + function deactivateMiner() public 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 onlySupervisor { + require(_state == MinerState.Activated); + + _state = MinerState.Suspended; + } + + function resumeMining() public onlySupervisor { + require(_state == MinerState.Suspended); + + _state = MinerState.Activated; + } + + function stopAndRemoveOwnership() public onlySupervisor { + require(_state != MinerState.Stopped); + + _state = MinerState.Stopped; + _mining = false; + _miner = address(0); + } + + function resetMiner(address newOwnerAddress) public onlySupervisor { + require(_state == MinerState.Stopped); + + _state = MinerState.Activated; + _miner = newOwnerAddress; + } + + function startMining() public onlyMiner { + require(_state == MinerState.Activated); + require(!_mining); + + _mining = true; + } + + function stopMining() public onlyMiner { + require(_state == MinerState.Activated); + require(_mining); + + _mining = false; + } + + function mine() public onlySystem { + 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 tokens = _currentYearSupply / DAYS_PER_YEAR; + + _token.safeTransfer(_miner, tokens); + } + + function isAlgoMiner() public pure returns (bool) { + return true; + } + + function getCategory() public view returns (uint8) { + return _category; + } +} 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..2ac21b48f --- /dev/null +++ b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoPool.sol @@ -0,0 +1,59 @@ +pragma solidity 0.4.24; + +import "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol"; +import "openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol"; + +import "./IAlgoMiner.sol"; +import "./AlgoCoreTeamRole.sol"; + +contract AlgoPool is AlgoCoreTeamRole { + using SafeERC20 for IERC20; + + uint256 public constant TOKEN_FACTOR = 10 ** uint256(18); + uint256 public constant CAT_0_VALUE = 100000 * TOKEN_FACTOR; + uint256 public constant CAT_1_VALUE = 1000000 * TOKEN_FACTOR; + uint256 public constant CAT_2_VALUE = 2 * 1000000 * TOKEN_FACTOR; + uint256 public constant CAT_3_VALUE = 3 * 1000000 * TOKEN_FACTOR; + uint256 public constant CAT_4_VALUE = 4 * 1000000 * TOKEN_FACTOR; + uint256 public constant CAT_5_VALUE = 5 * 1000000 * TOKEN_FACTOR; + + uint16 private _poolType; + IERC20 private _token; + + constructor(uint16 poolType, address tokenAddress) + AlgoCoreTeamRole() + public { + _poolType = poolType; + _token = IERC20(tokenAddress); + } + + function trasferToMiner(address minerAddress) public onlyCoreTeam { + IAlgoMiner algoMiner = IAlgoMiner(minerAddress); + + require(algoMiner.isAlgoMiner()); + + uint8 minerCategory = algoMiner.getCategory(); + + require(minerCategory >= 0 && minerCategory <= 5); + + uint256 value = 0; + + if(minerCategory == 0) { + value = CAT_0_VALUE; + } else if(minerCategory == 1) { + value = CAT_1_VALUE; + } else if(minerCategory == 2) { + value = CAT_2_VALUE; + } else if(minerCategory == 3) { + value = CAT_3_VALUE; + } else if(minerCategory == 4) { + value = CAT_4_VALUE; + } else if(minerCategory == 5) { + value = CAT_5_VALUE; + } + + require(value > 0); + + _token.safeTransfer(minerAddress, value); + } +} 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..5e6d5d7c1 --- /dev/null +++ b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoSupervisorRole.sol @@ -0,0 +1,38 @@ +pragma solidity ^0.4.24; + +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..5cf39703c --- /dev/null +++ b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoSystemRole.sol @@ -0,0 +1,38 @@ +pragma solidity ^0.4.24; + +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/IAlgoMiner.sol b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/IAlgoMiner.sol new file mode 100644 index 000000000..cc98a0c6a --- /dev/null +++ b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/IAlgoMiner.sol @@ -0,0 +1,6 @@ +pragma solidity 0.4.24; + +contract IAlgoMiner { + function isAlgoMiner() public pure returns (bool); + function getCategory() public view returns (uint8); +} \ 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..55865265d --- /dev/null +++ b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/bin/AlgoMiner-sol-output.json @@ -0,0 +1,14983 @@ +{ + "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/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": 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": 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": 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": "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" + }, + { + "constant": false, + "inputs": [], + "name": "renounceSystem", + "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": "60806040523480156200001157600080fd5b5060405160808062000fb883398101604090815281516020830151918301516060909301519092906200004d33640100000000620000de810204565b6200006133640100000000620000fc810204565b620000753364010000000062000117810204565b6003805461ffff191661ffff959095169490941762ff000019166201000060ff949094169390930292909217630100000060b860020a0319166301000000600160a060020a03928316021790925560048054600160a060020a03191691909216179055620001c5565b620000f960008264010000000062000d1d6200013282021704565b50565b620000f960018264010000000062000d1d6200013282021704565b620000f960028264010000000062000d1d6200013282021704565b600160a060020a03811615156200014857600080fd5b6200015d82826401000000006200018d810204565b156200016857600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b6000600160a060020a0382161515620001a557600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b610de380620001d56000396000f3006080604052600436106101275763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663162f986d811461012c5780631777fb4b1461014357806321b79d981461016c578063231d4e2a1461018157806329d10b6e146101a25780632e6b6849146101c357806334cdcf26146101e4578063363aa6c714610205578063427534a41461021a578063608d3d3d1461022f57806374be75921461025057806380258e471461027157806381a244591461029c57806399f4b251146102bd5780639e614ca0146102d2578063ada436e9146102e7578063b2a32cd514610308578063be9524941461031d578063c6846ef814610332578063d43acc7914610359578063da4086791461036e578063e9d6185914610383575b600080fd5b34801561013857600080fd5b50610141610398565b005b34801561014f57600080fd5b506101586103fe565b604080519115158252519081900360200190f35b34801561017857600080fd5b50610141610403565b34801561018d57600080fd5b50610141600160a060020a03600435166104a7565b3480156101ae57600080fd5b50610141600160a060020a0360043516610593565b3480156101cf57600080fd5b50610141600160a060020a03600435166105b0565b3480156101f057600080fd5b50610158600160a060020a03600435166105cd565b34801561021157600080fd5b506101416105e5565b34801561022657600080fd5b5061014161068e565b34801561023b57600080fd5b50610158600160a060020a03600435166106f1565b34801561025c57600080fd5b50610141600160a060020a0360043516610704565b34801561027d57600080fd5b50610286610721565b6040805160ff9092168252519081900360200190f35b3480156102a857600080fd5b50610158600160a060020a0360043516610730565b3480156102c957600080fd5b50610141610743565b3480156102de57600080fd5b50610141610915565b3480156102f357600080fd5b50610141600160a060020a036004351661096f565b34801561031457600080fd5b50610141610a05565b34801561032957600080fd5b50610141610b18565b34801561033e57600080fd5b50610347610b23565b60408051918252519081900360200190f35b34801561036557600080fd5b50610141610b29565b34801561037a57600080fd5b50610141610b32565b34801561038f57600080fd5b50610141610bbf565b6103a133610730565b15156103ac57600080fd5b600160045460a060020a900460ff1660038111156103c657fe5b146103d057600080fd5b600480546002919074ff0000000000000000000000000000000000000000191660a060020a835b0217905550565b600190565b60035463010000009004600160a060020a0316331461042157600080fd5b600160045460a060020a900460ff16600381111561043b57fe5b1461044557600080fd5b6004547501000000000000000000000000000000000000000000900460ff161561046e57600080fd5b6004805475ff00000000000000000000000000000000000000000019167501000000000000000000000000000000000000000000179055565b6104b0336106f1565b15156104bb57600080fd5b600060045460a060020a900460ff1660038111156104d557fe5b146104df57600080fd5b60048054604080517f70a08231000000000000000000000000000000000000000000000000000000008152309381019390935251610590928492600160a060020a0316916370a08231916024808201926020929091908290030181600087803b15801561054b57600080fd5b505af115801561055f573d6000803e3d6000fd5b505050506040513d602081101561057557600080fd5b5051600454600160a060020a0316919063ffffffff610bc816565b50565b61059c33610730565b15156105a757600080fd5b61059081610c80565b6105b9336106f1565b15156105c457600080fd5b61059081610c91565b60006105df818363ffffffff610ca216565b92915050565b6105ee33610730565b15156105f957600080fd5b600360045460a060020a900460ff16600381111561061357fe5b141561061e57600080fd5b6004805474ff00000000000000000000000000000000000000001916740300000000000000000000000000000000000000001775ff000000000000000000000000000000000000000000191690556003805476ffffffffffffffffffffffffffffffffffffffff00000019169055565b61069733610730565b15156106a257600080fd5b600260045460a060020a900460ff1660038111156106bc57fe5b146106c657600080fd5b600480546001919074ff0000000000000000000000000000000000000000191660a060020a836103f7565b60006105df60018363ffffffff610ca216565b61070d336105cd565b151561071857600080fd5b61059081610cd9565b60035462010000900460ff1690565b60006105df60028363ffffffff610ca216565b600061074e336105cd565b151561075957600080fd5b600160045460a060020a900460ff16600381111561077357fe5b1461077d57600080fd5b6004547501000000000000000000000000000000000000000000900460ff1615156107a757600080fd5b60045460b860020a900461ffff16151561081d576004805478ffff00000000000000000000000000000000000000000000001976ff0000000000000000000000000000000000000000000019909116760100000000000000000000000000000000000000000000171660b860020a1790556108e5565b60048054600161ffff60b860020a8084048216929092018116820278ffff00000000000000000000000000000000000000000000001990931692909217928390559091041661016e14156108e5576004805478ffff000000000000000000000000000000000000000000000019600160ff760100000000000000000000000000000000000000000000808504821692909201160276ff0000000000000000000000000000000000000000000019909216919091171660b860020a179055600554600290046005555b5060055460035460045461016d9092049161059091600160a060020a039182169163010000009091041683610bc8565b61091e336106f1565b151561092957600080fd5b600060045460a060020a900460ff16600381111561094357fe5b141561094e57600080fd5b6004805475ffff000000000000000000000000000000000000000019169055565b61097833610730565b151561098357600080fd5b600360045460a060020a900460ff16600381111561099d57fe5b146109a757600080fd5b6004805474ff0000000000000000000000000000000000000000191660a060020a17905560038054600160a060020a039290921663010000000276ffffffffffffffffffffffffffffffffffffffff00000019909216919091179055565b6000610a10336106f1565b1515610a1b57600080fd5b600060045460a060020a900460ff166003811115610a3557fe5b14610a3f57600080fd5b6005541515610af15760048054604080517f70a08231000000000000000000000000000000000000000000000000000000008152309381019390935251600160a060020a03909116916370a082319160248083019260209291908290030181600087803b158015610aaf57600080fd5b505af1158015610ac3573d6000803e3d6000fd5b505050506040513d6020811015610ad957600080fd5b50519050801515610ae957600080fd5b600281046005555b506004805474ff0000000000000000000000000000000000000000191660a060020a179055565b610b2133610cea565b565b61016d81565b610b2133610cfb565b60035463010000009004600160a060020a03163314610b5057600080fd5b600160045460a060020a900460ff166003811115610b6a57fe5b14610b7457600080fd5b6004547501000000000000000000000000000000000000000000900460ff161515610b9e57600080fd5b6004805475ff00000000000000000000000000000000000000000019169055565b610b2133610d0c565b82600160a060020a031663a9059cbb83836040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b158015610c4457600080fd5b505af1158015610c58573d6000803e3d6000fd5b505050506040513d6020811015610c6e57600080fd5b50511515610c7b57600080fd5b505050565b61059060028263ffffffff610d1d16565b61059060018263ffffffff610d1d16565b6000600160a060020a0382161515610cb957600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b61059060008263ffffffff610d1d16565b61059060028263ffffffff610d6b16565b61059060018263ffffffff610d6b16565b61059060008263ffffffff610d6b16565b600160a060020a0381161515610d3257600080fd5b610d3c8282610ca2565b15610d4657600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b600160a060020a0381161515610d8057600080fd5b610d8a8282610ca2565b1515610d9557600080fd5b600160a060020a0316600090815260209190915260409020805460ff191690555600a165627a7a72305820346733bed0f72b16c5bb967042b5930d38e536cc6adf26f0a2b6cc22aaa8069d0029", + "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH3 0x11 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH1 0x80 DUP1 PUSH3 0xFB8 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 PUSH3 0x4D CALLER PUSH5 0x100000000 PUSH3 0xDE DUP2 MUL DIV JUMP JUMPDEST PUSH3 0x61 CALLER PUSH5 0x100000000 PUSH3 0xFC DUP2 MUL DIV JUMP JUMPDEST PUSH3 0x75 CALLER PUSH5 0x100000000 PUSH3 0x117 DUP2 MUL DIV JUMP JUMPDEST PUSH1 0x3 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 0x4 DUP1 SLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB NOT AND SWAP2 SWAP1 SWAP3 AND OR SWAP1 SSTORE PUSH3 0x1C5 JUMP JUMPDEST PUSH3 0xF9 PUSH1 0x0 DUP3 PUSH5 0x100000000 PUSH3 0xD1D PUSH3 0x132 DUP3 MUL OR DIV JUMP JUMPDEST POP JUMP JUMPDEST PUSH3 0xF9 PUSH1 0x1 DUP3 PUSH5 0x100000000 PUSH3 0xD1D PUSH3 0x132 DUP3 MUL OR DIV JUMP JUMPDEST PUSH3 0xF9 PUSH1 0x2 DUP3 PUSH5 0x100000000 PUSH3 0xD1D PUSH3 0x132 DUP3 MUL OR DIV JUMP JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP2 AND ISZERO ISZERO PUSH3 0x148 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH3 0x15D DUP3 DUP3 PUSH5 0x100000000 PUSH3 0x18D DUP2 MUL DIV JUMP JUMPDEST ISZERO PUSH3 0x168 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 0x1A5 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 0xDE3 DUP1 PUSH3 0x1D5 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN STOP PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH2 0x127 JUMPI PUSH4 0xFFFFFFFF PUSH29 0x100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 CALLDATALOAD DIV AND PUSH4 0x162F986D DUP2 EQ PUSH2 0x12C JUMPI DUP1 PUSH4 0x1777FB4B EQ PUSH2 0x143 JUMPI DUP1 PUSH4 0x21B79D98 EQ PUSH2 0x16C JUMPI DUP1 PUSH4 0x231D4E2A EQ PUSH2 0x181 JUMPI DUP1 PUSH4 0x29D10B6E EQ PUSH2 0x1A2 JUMPI DUP1 PUSH4 0x2E6B6849 EQ PUSH2 0x1C3 JUMPI DUP1 PUSH4 0x34CDCF26 EQ PUSH2 0x1E4 JUMPI DUP1 PUSH4 0x363AA6C7 EQ PUSH2 0x205 JUMPI DUP1 PUSH4 0x427534A4 EQ PUSH2 0x21A JUMPI DUP1 PUSH4 0x608D3D3D EQ PUSH2 0x22F JUMPI DUP1 PUSH4 0x74BE7592 EQ PUSH2 0x250 JUMPI DUP1 PUSH4 0x80258E47 EQ PUSH2 0x271 JUMPI DUP1 PUSH4 0x81A24459 EQ PUSH2 0x29C JUMPI DUP1 PUSH4 0x99F4B251 EQ PUSH2 0x2BD JUMPI DUP1 PUSH4 0x9E614CA0 EQ PUSH2 0x2D2 JUMPI DUP1 PUSH4 0xADA436E9 EQ PUSH2 0x2E7 JUMPI DUP1 PUSH4 0xB2A32CD5 EQ PUSH2 0x308 JUMPI DUP1 PUSH4 0xBE952494 EQ PUSH2 0x31D JUMPI DUP1 PUSH4 0xC6846EF8 EQ PUSH2 0x332 JUMPI DUP1 PUSH4 0xD43ACC79 EQ PUSH2 0x359 JUMPI DUP1 PUSH4 0xDA408679 EQ PUSH2 0x36E JUMPI DUP1 PUSH4 0xE9D61859 EQ PUSH2 0x383 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x138 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x141 PUSH2 0x398 JUMP JUMPDEST STOP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x14F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x158 PUSH2 0x3FE 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 0x178 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x141 PUSH2 0x403 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x18D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x141 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB PUSH1 0x4 CALLDATALOAD AND PUSH2 0x4A7 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x1AE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x141 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB PUSH1 0x4 CALLDATALOAD AND PUSH2 0x593 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x1CF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x141 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB PUSH1 0x4 CALLDATALOAD AND PUSH2 0x5B0 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x1F0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x158 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB PUSH1 0x4 CALLDATALOAD AND PUSH2 0x5CD JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x211 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x141 PUSH2 0x5E5 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x226 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x141 PUSH2 0x68E JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x23B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x158 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB PUSH1 0x4 CALLDATALOAD AND PUSH2 0x6F1 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x25C JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x141 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB PUSH1 0x4 CALLDATALOAD AND PUSH2 0x704 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x27D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x286 PUSH2 0x721 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 0x2A8 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x158 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB PUSH1 0x4 CALLDATALOAD AND PUSH2 0x730 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x2C9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x141 PUSH2 0x743 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x2DE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x141 PUSH2 0x915 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x2F3 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x141 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB PUSH1 0x4 CALLDATALOAD AND PUSH2 0x96F JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x314 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x141 PUSH2 0xA05 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x329 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x141 PUSH2 0xB18 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x33E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x347 PUSH2 0xB23 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x365 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x141 PUSH2 0xB29 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x37A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x141 PUSH2 0xB32 JUMP JUMPDEST CALLVALUE DUP1 ISZERO PUSH2 0x38F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x141 PUSH2 0xBBF JUMP JUMPDEST PUSH2 0x3A1 CALLER PUSH2 0x730 JUMP JUMPDEST ISZERO ISZERO PUSH2 0x3AC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x4 SLOAD PUSH1 0xA0 PUSH1 0x2 EXP SWAP1 DIV PUSH1 0xFF AND PUSH1 0x3 DUP2 GT ISZERO PUSH2 0x3C6 JUMPI INVALID JUMPDEST EQ PUSH2 0x3D0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x4 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 0x3 SLOAD PUSH4 0x1000000 SWAP1 DIV PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND CALLER EQ PUSH2 0x421 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x4 SLOAD PUSH1 0xA0 PUSH1 0x2 EXP SWAP1 DIV PUSH1 0xFF AND PUSH1 0x3 DUP2 GT ISZERO PUSH2 0x43B JUMPI INVALID JUMPDEST EQ PUSH2 0x445 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x4 SLOAD PUSH22 0x1000000000000000000000000000000000000000000 SWAP1 DIV PUSH1 0xFF AND ISZERO PUSH2 0x46E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x4 DUP1 SLOAD PUSH22 0xFF000000000000000000000000000000000000000000 NOT AND PUSH22 0x1000000000000000000000000000000000000000000 OR SWAP1 SSTORE JUMP JUMPDEST PUSH2 0x4B0 CALLER PUSH2 0x6F1 JUMP JUMPDEST ISZERO ISZERO PUSH2 0x4BB JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x4 SLOAD PUSH1 0xA0 PUSH1 0x2 EXP SWAP1 DIV PUSH1 0xFF AND PUSH1 0x3 DUP2 GT ISZERO PUSH2 0x4D5 JUMPI INVALID JUMPDEST EQ PUSH2 0x4DF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x4 DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH32 0x70A0823100000000000000000000000000000000000000000000000000000000 DUP2 MSTORE ADDRESS SWAP4 DUP2 ADD SWAP4 SWAP1 SWAP4 MSTORE MLOAD PUSH2 0x590 SWAP3 DUP5 SWAP3 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB 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 0x54B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0x55F 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 0x575 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP MLOAD PUSH1 0x4 SLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND SWAP2 SWAP1 PUSH4 0xFFFFFFFF PUSH2 0xBC8 AND JUMP JUMPDEST POP JUMP JUMPDEST PUSH2 0x59C CALLER PUSH2 0x730 JUMP JUMPDEST ISZERO ISZERO PUSH2 0x5A7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x590 DUP2 PUSH2 0xC80 JUMP JUMPDEST PUSH2 0x5B9 CALLER PUSH2 0x6F1 JUMP JUMPDEST ISZERO ISZERO PUSH2 0x5C4 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x590 DUP2 PUSH2 0xC91 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x5DF DUP2 DUP4 PUSH4 0xFFFFFFFF PUSH2 0xCA2 AND JUMP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH2 0x5EE CALLER PUSH2 0x730 JUMP JUMPDEST ISZERO ISZERO PUSH2 0x5F9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x3 PUSH1 0x4 SLOAD PUSH1 0xA0 PUSH1 0x2 EXP SWAP1 DIV PUSH1 0xFF AND PUSH1 0x3 DUP2 GT ISZERO PUSH2 0x613 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x61E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x4 DUP1 SLOAD PUSH21 0xFF0000000000000000000000000000000000000000 NOT AND PUSH21 0x30000000000000000000000000000000000000000 OR PUSH22 0xFF000000000000000000000000000000000000000000 NOT AND SWAP1 SSTORE PUSH1 0x3 DUP1 SLOAD PUSH23 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000 NOT AND SWAP1 SSTORE JUMP JUMPDEST PUSH2 0x697 CALLER PUSH2 0x730 JUMP JUMPDEST ISZERO ISZERO PUSH2 0x6A2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x2 PUSH1 0x4 SLOAD PUSH1 0xA0 PUSH1 0x2 EXP SWAP1 DIV PUSH1 0xFF AND PUSH1 0x3 DUP2 GT ISZERO PUSH2 0x6BC JUMPI INVALID JUMPDEST EQ PUSH2 0x6C6 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x4 DUP1 SLOAD PUSH1 0x1 SWAP2 SWAP1 PUSH21 0xFF0000000000000000000000000000000000000000 NOT AND PUSH1 0xA0 PUSH1 0x2 EXP DUP4 PUSH2 0x3F7 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x5DF PUSH1 0x1 DUP4 PUSH4 0xFFFFFFFF PUSH2 0xCA2 AND JUMP JUMPDEST PUSH2 0x70D CALLER PUSH2 0x5CD JUMP JUMPDEST ISZERO ISZERO PUSH2 0x718 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x590 DUP2 PUSH2 0xCD9 JUMP JUMPDEST PUSH1 0x3 SLOAD PUSH3 0x10000 SWAP1 DIV PUSH1 0xFF AND SWAP1 JUMP JUMPDEST PUSH1 0x0 PUSH2 0x5DF PUSH1 0x2 DUP4 PUSH4 0xFFFFFFFF PUSH2 0xCA2 AND JUMP JUMPDEST PUSH1 0x0 PUSH2 0x74E CALLER PUSH2 0x5CD JUMP JUMPDEST ISZERO ISZERO PUSH2 0x759 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x4 SLOAD PUSH1 0xA0 PUSH1 0x2 EXP SWAP1 DIV PUSH1 0xFF AND PUSH1 0x3 DUP2 GT ISZERO PUSH2 0x773 JUMPI INVALID JUMPDEST EQ PUSH2 0x77D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x4 SLOAD PUSH22 0x1000000000000000000000000000000000000000000 SWAP1 DIV PUSH1 0xFF AND ISZERO ISZERO PUSH2 0x7A7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x4 SLOAD PUSH1 0xB8 PUSH1 0x2 EXP SWAP1 DIV PUSH2 0xFFFF AND ISZERO ISZERO PUSH2 0x81D JUMPI PUSH1 0x4 DUP1 SLOAD PUSH25 0xFFFF0000000000000000000000000000000000000000000000 NOT PUSH23 0xFF00000000000000000000000000000000000000000000 NOT SWAP1 SWAP2 AND PUSH23 0x100000000000000000000000000000000000000000000 OR AND PUSH1 0xB8 PUSH1 0x2 EXP OR SWAP1 SSTORE PUSH2 0x8E5 JUMP JUMPDEST PUSH1 0x4 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 0x8E5 JUMPI PUSH1 0x4 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 0x5 SLOAD PUSH1 0x2 SWAP1 DIV PUSH1 0x5 SSTORE JUMPDEST POP PUSH1 0x5 SLOAD PUSH1 0x3 SLOAD PUSH1 0x4 SLOAD PUSH2 0x16D SWAP1 SWAP3 DIV SWAP2 PUSH2 0x590 SWAP2 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB SWAP2 DUP3 AND SWAP2 PUSH4 0x1000000 SWAP1 SWAP2 DIV AND DUP4 PUSH2 0xBC8 JUMP JUMPDEST PUSH2 0x91E CALLER PUSH2 0x6F1 JUMP JUMPDEST ISZERO ISZERO PUSH2 0x929 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x4 SLOAD PUSH1 0xA0 PUSH1 0x2 EXP SWAP1 DIV PUSH1 0xFF AND PUSH1 0x3 DUP2 GT ISZERO PUSH2 0x943 JUMPI INVALID JUMPDEST EQ ISZERO PUSH2 0x94E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x4 DUP1 SLOAD PUSH22 0xFFFF0000000000000000000000000000000000000000 NOT AND SWAP1 SSTORE JUMP JUMPDEST PUSH2 0x978 CALLER PUSH2 0x730 JUMP JUMPDEST ISZERO ISZERO PUSH2 0x983 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x3 PUSH1 0x4 SLOAD PUSH1 0xA0 PUSH1 0x2 EXP SWAP1 DIV PUSH1 0xFF AND PUSH1 0x3 DUP2 GT ISZERO PUSH2 0x99D JUMPI INVALID JUMPDEST EQ PUSH2 0x9A7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x4 DUP1 SLOAD PUSH21 0xFF0000000000000000000000000000000000000000 NOT AND PUSH1 0xA0 PUSH1 0x2 EXP OR SWAP1 SSTORE PUSH1 0x3 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 0xA10 CALLER PUSH2 0x6F1 JUMP JUMPDEST ISZERO ISZERO PUSH2 0xA1B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x4 SLOAD PUSH1 0xA0 PUSH1 0x2 EXP SWAP1 DIV PUSH1 0xFF AND PUSH1 0x3 DUP2 GT ISZERO PUSH2 0xA35 JUMPI INVALID JUMPDEST EQ PUSH2 0xA3F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x5 SLOAD ISZERO ISZERO PUSH2 0xAF1 JUMPI PUSH1 0x4 DUP1 SLOAD PUSH1 0x40 DUP1 MLOAD PUSH32 0x70A0823100000000000000000000000000000000000000000000000000000000 DUP2 MSTORE ADDRESS SWAP4 DUP2 ADD SWAP4 SWAP1 SWAP4 MSTORE MLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB SWAP1 SWAP2 AND SWAP2 PUSH4 0x70A08231 SWAP2 PUSH1 0x24 DUP1 DUP4 ADD SWAP3 PUSH1 0x20 SWAP3 SWAP2 SWAP1 DUP3 SWAP1 SUB ADD DUP2 PUSH1 0x0 DUP8 DUP1 EXTCODESIZE ISZERO DUP1 ISZERO PUSH2 0xAAF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0xAC3 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 0xAD9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP MLOAD SWAP1 POP DUP1 ISZERO ISZERO PUSH2 0xAE9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x2 DUP2 DIV PUSH1 0x5 SSTORE JUMPDEST POP PUSH1 0x4 DUP1 SLOAD PUSH21 0xFF0000000000000000000000000000000000000000 NOT AND PUSH1 0xA0 PUSH1 0x2 EXP OR SWAP1 SSTORE JUMP JUMPDEST PUSH2 0xB21 CALLER PUSH2 0xCEA JUMP JUMPDEST JUMP JUMPDEST PUSH2 0x16D DUP2 JUMP JUMPDEST PUSH2 0xB21 CALLER PUSH2 0xCFB JUMP JUMPDEST PUSH1 0x3 SLOAD PUSH4 0x1000000 SWAP1 DIV PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB AND CALLER EQ PUSH2 0xB50 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x1 PUSH1 0x4 SLOAD PUSH1 0xA0 PUSH1 0x2 EXP SWAP1 DIV PUSH1 0xFF AND PUSH1 0x3 DUP2 GT ISZERO PUSH2 0xB6A JUMPI INVALID JUMPDEST EQ PUSH2 0xB74 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x4 SLOAD PUSH22 0x1000000000000000000000000000000000000000000 SWAP1 DIV PUSH1 0xFF AND ISZERO ISZERO PUSH2 0xB9E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x4 DUP1 SLOAD PUSH22 0xFF000000000000000000000000000000000000000000 NOT AND SWAP1 SSTORE JUMP JUMPDEST PUSH2 0xB21 CALLER PUSH2 0xD0C 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 0xC44 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP GAS CALL ISZERO DUP1 ISZERO PUSH2 0xC58 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 0xC6E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP MLOAD ISZERO ISZERO PUSH2 0xC7B JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP POP POP JUMP JUMPDEST PUSH2 0x590 PUSH1 0x2 DUP3 PUSH4 0xFFFFFFFF PUSH2 0xD1D AND JUMP JUMPDEST PUSH2 0x590 PUSH1 0x1 DUP3 PUSH4 0xFFFFFFFF PUSH2 0xD1D AND JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP3 AND ISZERO ISZERO PUSH2 0xCB9 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 0x590 PUSH1 0x0 DUP3 PUSH4 0xFFFFFFFF PUSH2 0xD1D AND JUMP JUMPDEST PUSH2 0x590 PUSH1 0x2 DUP3 PUSH4 0xFFFFFFFF PUSH2 0xD6B AND JUMP JUMPDEST PUSH2 0x590 PUSH1 0x1 DUP3 PUSH4 0xFFFFFFFF PUSH2 0xD6B AND JUMP JUMPDEST PUSH2 0x590 PUSH1 0x0 DUP3 PUSH4 0xFFFFFFFF PUSH2 0xD6B AND JUMP JUMPDEST PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB DUP2 AND ISZERO ISZERO PUSH2 0xD32 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xD3C DUP3 DUP3 PUSH2 0xCA2 JUMP JUMPDEST ISZERO PUSH2 0xD46 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 0xD80 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xD8A DUP3 DUP3 PUSH2 0xCA2 JUMP JUMPDEST ISZERO ISZERO PUSH2 0xD95 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 CALLVALUE PUSH8 0x33BED0F72B16C5BB SWAP7 PUSH17 0x42B5930D38E536CC6ADF26F0A2B6CC22AA 0xa8 MOD SWAP14 STOP 0x29 ", + "sourceMap": "558:3657:1:-;;;1139:336;8:9:-1;5:2;;;30:1;27;20:12;5:2;1139:336:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;364:22:3;375:10;364;;;;:22;:::i;:::-;368:24:0;381:10;368:12;;;;:24;:::i;:::-;366:26:2;381:10;366:14;;;;:26;:::i;:::-;1342:10:1;:22;;-1:-1:-1;;1342:22:1;;;;;;;;;;-1:-1:-1;;1375:20:1;;;;;;;;;;;;;;;-1:-1:-1;;;;;;1406:21:1;;-1:-1:-1;;;;;1406:21:1;;;;;;;;1438:6;:29;;-1:-1:-1;;;;;;1438:29:1;;;;;;;;558:3657;;800:92:3;857:27;:14;876:7;857:18;;;;;;:27;:::i;:::-;800:92;:::o;824:96:0:-;883:29;:16;904:7;883:20;;;;;;:29;:::i;836:94:2:-;897:25;:12;914:7;897:16;;;;;;:25;:::i;244:167:5:-;-1:-1:-1;;;;;316:21:5;;;;308:30;;;;;;353:18;357:4;363:7;353:3;;;;:18;:::i;:::-;352:19;344:28;;;;;;-1:-1:-1;;;;;379:20:5;:11;:20;;;;;;;;;;;:27;;-1:-1:-1;;379:27:5;402:4;379:27;;;244:167::o;725:166::-;809:4;-1:-1:-1;;;;;831:21:5;;;;823:30;;;;;;-1:-1:-1;;;;;;866:20:5;:11;:20;;;;;;;;;;;;;;;725:166::o;558:3657:1:-;;;;;;;" + }, + "gasEstimates": { + "creation": { + "codeDepositCost": "711000", + "executionCost": "infinite", + "totalCost": "infinite" + }, + "external": { + "DAYS_PER_YEAR()": "580", + "activateMiner()": "infinite", + "addCoreTeam(address)": "infinite", + "addSupervisor(address)": "infinite", + "addSystem(address)": "infinite", + "deactivateMiner()": "infinite", + "getCategory()": "652", + "isAlgoMiner()": "212", + "isCoreTeam(address)": "infinite", + "isSupervisor(address)": "infinite", + "isSystem(address)": "infinite", + "migrateMiner(address)": "infinite", + "mine()": "infinite", + "pauseMining()": "infinite", + "renounceCoreTeam()": "infinite", + "renounceSupervisor()": "infinite", + "renounceSystem()": "infinite", + "resetMiner(address)": "infinite", + "resumeMining()": "infinite", + "startMining()": "21272", + "stopAndRemoveOwnership()": "infinite", + "stopMining()": "21665" + } + }, + "methodIdentifiers": { + "DAYS_PER_YEAR()": "c6846ef8", + "activateMiner()": "b2a32cd5", + "addCoreTeam(address)": "2e6b6849", + "addSupervisor(address)": "29d10b6e", + "addSystem(address)": "74be7592", + "deactivateMiner()": "9e614ca0", + "getCategory()": "80258e47", + "isAlgoMiner()": "1777fb4b", + "isCoreTeam(address)": "608d3d3d", + "isSupervisor(address)": "81a24459", + "isSystem(address)": "34cdcf26", + "migrateMiner(address)": "231d4e2a", + "mine()": "99f4b251", + "pauseMining()": "162f986d", + "renounceCoreTeam()": "d43acc79", + "renounceSupervisor()": "be952494", + "renounceSystem()": "e9d61859", + "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\":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\":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\":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\":\"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\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceSystem\",\"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/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/AlgoCoreTeamRole.sol\":{\"keccak256\":\"0xe6fc9b275c7a4c4f00337d2a388cc97a64ad82e5a23c24c59a4593e85a05b08a\",\"urls\":[\"bzzr://40c7674b2a3543a2b2606c70df215a876bd1a064d249e658d2bbd6fe25969c2e\"]},\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoMiner.sol\":{\"keccak256\":\"0xe5a1ae438e7d54f613a381816bda4959884722adfbf3976f99b7d7d35b5377c3\",\"urls\":[\"bzzr://e96b24515fcb5324ccbabb61424fbc290ace1636afa28f479a1e666bb06abc42\"]},\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoSupervisorRole.sol\":{\"keccak256\":\"0x20955eaf60f79f885c941d97e208320c9e0bc1f05b8121342f8187f9a39fd46b\",\"urls\":[\"bzzr://8e30e53aa0322307873f8c0a4fc3c58b7562a0fde92a0921a52bdef4e129ec4b\"]},\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoSystemRole.sol\":{\"keccak256\":\"0x6fffe504e6805d95ca42269cc995a3de9401a12bc037068b056c186ce8569d8d\",\"urls\":[\"bzzr://a0923a2d2b1e4992f552ce49638b19d6d8328950c1d5dc1395f0d625daf21c68\"]},\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/IAlgoMiner.sol\":{\"keccak256\":\"0xb457e39e512b5475c3e70193ab0a751f6626a50417954247f0cf47c7ca15eff7\",\"urls\":[\"bzzr://3b585a4055121fee393f2b691538036c87f56556f43f0b6e851a88de7b8275e6\"]},\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol\":{\"keccak256\":\"0xa6e47d62e68903c8fff23500d80e7cc8085b9127995803478d9982cd8a6d49e4\",\"urls\":[\"bzzr://7c87eb3c145fe7592c97baa287501faff7e81c1965333c9b042ffb6b387e94a1\"]},\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0xdd18f05c74536a06166c90a17ec3c6932853764f292bed314ceb23e730ff83af\",\"urls\":[\"bzzr://1d8a608339978ac18782f7051816cf23b4072d8814979e3ef74788cc6025cca0\"]},\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xc8a7f15fa44eb10057f8bcb58418d3aed6f5267d211d18f93f3d4e0293e3da44\",\"urls\":[\"bzzr://8825e2508348b01a091ff47b8525e583b6e5604f6679684f805d67a9a6a2a7e9\"]},\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol\":{\"keccak256\":\"0x0a172a0ef8681d4a7d8034d003670a9b1968d914b0bfa64e13ddca289a85d24a\",\"urls\":[\"bzzr://733b6203c967b44d6de90b5c6b144e58a380a3f29befb2dc70e765dae2f1ca18\"]}},\"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/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/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol": { + "Roles": { + "abi": [], + "devdoc": { + "methods": {}, + "title": "Roles" + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a72305820ba9d82b11504517181f938ed511f09c0a22046ef39e2e32460a2175b508e16a80029", + "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 0xba SWAP14 DUP3 0xb1 ISZERO DIV MLOAD PUSH18 0x81F938ED511F09C0A22046EF39E2E32460A2 OR JUMPDEST POP DUP15 AND 0xa8 STOP 0x29 ", + "sourceMap": "109:784: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(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/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\":\"0xa6e47d62e68903c8fff23500d80e7cc8085b9127995803478d9982cd8a6d49e4\",\"urls\":[\"bzzr://7c87eb3c145fe7592c97baa287501faff7e81c1965333c9b042ffb6b387e94a1\"]}},\"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": { + "methods": {}, + "title": "SafeMath" + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a72305820da2bd0dd3588878574232c2d13f92e16f4b0e8ad94ede9adb0d087f862d4f8cf0029", + "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 0xda 0x2b 0xd0 0xdd CALLDATALOAD DUP9 DUP8 DUP6 PUSH21 0x232C2D13F92E16F4B0E8AD94EDE9ADB0D087F862D4 0xf8 0xcf STOP 0x29 ", + "sourceMap": "117:1531: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(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/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\":\"0xdd18f05c74536a06166c90a17ec3c6932853764f292bed314ceb23e730ff83af\",\"urls\":[\"bzzr://1d8a608339978ac18782f7051816cf23b4072d8814979e3ef74788cc6025cca0\"]}},\"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": { + "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": { + "methods": {}, + "title": "SafeERC20" + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a72305820c0f55d8db2bd761049fa5ba6b6c207a4d595b758946aba3715580373517606710029", + "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 0xc0 0xf5 0x5d DUP14 0xb2 0xbd PUSH23 0x1049FA5BA6B6C207A4D595B758946ABA37155803735176 MOD PUSH18 0x2900000000000000000000000000000000 ", + "sourceMap": "353:1296: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": { + "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/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\":\"0xdd18f05c74536a06166c90a17ec3c6932853764f292bed314ceb23e730ff83af\",\"urls\":[\"bzzr://1d8a608339978ac18782f7051816cf23b4072d8814979e3ef74788cc6025cca0\"]},\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xc8a7f15fa44eb10057f8bcb58418d3aed6f5267d211d18f93f3d4e0293e3da44\",\"urls\":[\"bzzr://8825e2508348b01a091ff47b8525e583b6e5604f6679684f805d67a9a6a2a7e9\"]},\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol\":{\"keccak256\":\"0x0a172a0ef8681d4a7d8034d003670a9b1968d914b0bfa64e13ddca289a85d24a\",\"urls\":[\"bzzr://733b6203c967b44d6de90b5c6b144e58a380a3f29befb2dc70e765dae2f1ca18\"]}},\"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.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:24: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": 769, + "src": "28: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": 768, + "src": "260:5:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Roles_$768", + "typeString": "library Roles" + } + }, + "nodeType": "UsingForDirective", + "src": "254:27:0", + "typeName": { + "contractScope": null, + "id": 4, + "name": "Roles.Role", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 681, + "src": "270:10:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$681_storage_ptr", + "typeString": "struct Roles.Role" + } + } + }, + { + "constant": false, + "id": 7, + "name": "_coreTeamMembers", + "nodeType": "VariableDeclaration", + "scope": 86, + "src": "289:35:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$681_storage", + "typeString": "struct Roles.Role" + }, + "typeName": { + "contractScope": null, + "id": 6, + "name": "Roles.Role", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 681, + "src": "289:10:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$681_storage_ptr", + "typeString": "struct Roles.Role" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 15, + "nodeType": "Block", + "src": "357:43:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1124, + "src": "381: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": "381: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": "368: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": "368:24:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14, + "nodeType": "ExpressionStatement", + "src": "368:24:0" + } + ] + }, + "documentation": null, + "id": 16, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 8, + "nodeType": "ParameterList", + "parameters": [], + "src": "345:2:0" + }, + "payable": false, + "returnParameters": { + "id": 9, + "nodeType": "ParameterList", + "parameters": [], + "src": "357:0:0" + }, + "scope": 86, + "src": "333:67:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 26, + "nodeType": "Block", + "src": "432:62:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 20, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1124, + "src": "462: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": "462: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": "451: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": "451:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 18, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1127, + 1128 + ], + "referencedDeclaration": 1127, + "src": "443: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": "443:31:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 24, + "nodeType": "ExpressionStatement", + "src": "443:31:0" + }, + { + "id": 25, + "nodeType": "PlaceholderStatement", + "src": "485:1:0" + } + ] + }, + "documentation": null, + "id": 27, + "name": "onlyCoreTeam", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 17, + "nodeType": "ParameterList", + "parameters": [], + "src": "429:2:0" + }, + "src": "408:86:0", + "visibility": "internal" + }, + { + "body": { + "id": 39, + "nodeType": "Block", + "src": "566:55:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 36, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 29, + "src": "605: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": "584:16:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$681_storage", + "typeString": "struct Roles.Role storage ref" + } + }, + "id": 35, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "has", + "nodeType": "MemberAccess", + "referencedDeclaration": 767, + "src": "584:20:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Role_$681_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Role_$681_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": "584:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 33, + "id": 38, + "nodeType": "Return", + "src": "577: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": "522:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 28, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "522:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "521:17:0" + }, + "payable": false, + "returnParameters": { + "id": 33, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 32, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 40, + "src": "560:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 31, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "560:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "559:6:0" + }, + "scope": 86, + "src": "502:119:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 51, + "nodeType": "Block", + "src": "687:40:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 48, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 42, + "src": "711: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": "698: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": "698:21:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 50, + "nodeType": "ExpressionStatement", + "src": "698: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": "674:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "674:12:0" + } + ], + "name": "addCoreTeam", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 43, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 42, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 52, + "src": "650:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 41, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "650:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "649:17:0" + }, + "payable": false, + "returnParameters": { + "id": 46, + "nodeType": "ParameterList", + "parameters": [], + "src": "687:0:0" + }, + "scope": 86, + "src": "629:98:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 60, + "nodeType": "Block", + "src": "770:46:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 56, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1124, + "src": "797: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": "797: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": "781: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": "781:27:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 59, + "nodeType": "ExpressionStatement", + "src": "781:27:0" + } + ] + }, + "documentation": null, + "id": 61, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "renounceCoreTeam", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 53, + "nodeType": "ParameterList", + "parameters": [], + "src": "760:2:0" + }, + "payable": false, + "returnParameters": { + "id": 54, + "nodeType": "ParameterList", + "parameters": [], + "src": "770:0:0" + }, + "scope": 86, + "src": "735:81:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 72, + "nodeType": "Block", + "src": "872:48:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 69, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 63, + "src": "904: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": "883:16:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$681_storage", + "typeString": "struct Roles.Role storage ref" + } + }, + "id": 68, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 713, + "src": "883:20:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Role_$681_storage_ptr_$_t_address_$returns$__$bound_to$_t_struct$_Role_$681_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": "883:29:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 71, + "nodeType": "ExpressionStatement", + "src": "883: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": "846:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 62, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "846:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "845:17:0" + }, + "payable": false, + "returnParameters": { + "id": 65, + "nodeType": "ParameterList", + "parameters": [], + "src": "872:0:0" + }, + "scope": 86, + "src": "824:96:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 84, + "nodeType": "Block", + "src": "979:51:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 81, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 75, + "src": "1014: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": "990:16:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$681_storage", + "typeString": "struct Roles.Role storage ref" + } + }, + "id": 80, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "remove", + "nodeType": "MemberAccess", + "referencedDeclaration": 744, + "src": "990:23:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Role_$681_storage_ptr_$_t_address_$returns$__$bound_to$_t_struct$_Role_$681_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": "990:32:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 83, + "nodeType": "ExpressionStatement", + "src": "990: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": "953:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 74, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "953:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "952:17:0" + }, + "payable": false, + "returnParameters": { + "id": 77, + "nodeType": "ParameterList", + "parameters": [], + "src": "979:0:0" + }, + "scope": 86, + "src": "928:102:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 87, + "src": "221:812:0" + } + ], + "src": "0:1035:0" + }, + "id": 0 + }, + "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": [ + 487 + ] + }, + "id": 488, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 88, + "literals": [ + "solidity", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:23: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": 488, + "sourceUnit": 966, + "src": "27: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": 488, + "sourceUnit": 1110, + "src": "224: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": 488, + "sourceUnit": 675, + "src": "426:26:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoSystemRole.sol", + "file": "./AlgoSystemRole.sol", + "id": 92, + "nodeType": "ImportDirective", + "scope": 488, + "sourceUnit": 662, + "src": "454:30:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoCoreTeamRole.sol", + "file": "./AlgoCoreTeamRole.sol", + "id": 93, + "nodeType": "ImportDirective", + "scope": 488, + "sourceUnit": 87, + "src": "486:32:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoSupervisorRole.sol", + "file": "./AlgoSupervisorRole.sol", + "id": 94, + "nodeType": "ImportDirective", + "scope": 488, + "sourceUnit": 575, + "src": "520:34:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 95, + "name": "AlgoSystemRole", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 661, + "src": "580:14:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_AlgoSystemRole_$661", + "typeString": "contract AlgoSystemRole" + } + }, + "id": 96, + "nodeType": "InheritanceSpecifier", + "src": "580:14:1" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 97, + "name": "AlgoCoreTeamRole", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 86, + "src": "596:16:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_AlgoCoreTeamRole_$86", + "typeString": "contract AlgoCoreTeamRole" + } + }, + "id": 98, + "nodeType": "InheritanceSpecifier", + "src": "596:16:1" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 99, + "name": "AlgoSupervisorRole", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 574, + "src": "614:18:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_AlgoSupervisorRole_$574", + "typeString": "contract AlgoSupervisorRole" + } + }, + "id": 100, + "nodeType": "InheritanceSpecifier", + "src": "614:18:1" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 101, + "name": "IAlgoMiner", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 674, + "src": "634:10:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IAlgoMiner_$674", + "typeString": "contract IAlgoMiner" + } + }, + "id": 102, + "nodeType": "InheritanceSpecifier", + "src": "634:10:1" + } + ], + "contractDependencies": [ + 86, + 574, + 661, + 674 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 487, + "linearizedBaseContracts": [ + 487, + 674, + 574, + 86, + 661 + ], + "name": "AlgoMiner", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 105, + "libraryName": { + "contractScope": null, + "id": 103, + "name": "SafeERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1109, + "src": "658:9:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeERC20_$1109", + "typeString": "library SafeERC20" + } + }, + "nodeType": "UsingForDirective", + "src": "652:27:1", + "typeName": { + "contractScope": null, + "id": 104, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 965, + "src": "672:6:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$965", + "typeString": "contract IERC20" + } + } + }, + { + "constant": true, + "id": 108, + "name": "DAYS_PER_YEAR", + "nodeType": "VariableDeclaration", + "scope": 487, + "src": "687:43:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 106, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "687:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "333635", + "id": 107, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "727:3:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_365_by_1", + "typeString": "int_const 365" + }, + "value": "365" + }, + "visibility": "public" + }, + { + "canonicalName": "AlgoMiner.MinerState", + "id": 113, + "members": [ + { + "id": 109, + "name": "Deactivated", + "nodeType": "EnumValue", + "src": "766:11:1" + }, + { + "id": 110, + "name": "Activated", + "nodeType": "EnumValue", + "src": "788:9:1" + }, + { + "id": 111, + "name": "Suspended", + "nodeType": "EnumValue", + "src": "808:9:1" + }, + { + "id": 112, + "name": "Stopped", + "nodeType": "EnumValue", + "src": "828:7:1" + } + ], + "name": "MinerState", + "nodeType": "EnumDefinition", + "src": "739:103:1" + }, + { + "constant": false, + "id": 115, + "name": "_minerType", + "nodeType": "VariableDeclaration", + "scope": 487, + "src": "850:25:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 114, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "850:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 117, + "name": "_category", + "nodeType": "VariableDeclaration", + "scope": 487, + "src": "882:23:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 116, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "882:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 119, + "name": "_miner", + "nodeType": "VariableDeclaration", + "scope": 487, + "src": "912:22:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 118, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "912:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 121, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 487, + "src": "941:21:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$965", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 120, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 965, + "src": "941:6:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$965", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 123, + "name": "_state", + "nodeType": "VariableDeclaration", + "scope": 487, + "src": "971:25:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$113", + "typeString": "enum AlgoMiner.MinerState" + }, + "typeName": { + "contractScope": null, + "id": 122, + "name": "MinerState", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 113, + "src": "971:10:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$113", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 125, + "name": "_mining", + "nodeType": "VariableDeclaration", + "scope": 487, + "src": "1003:20:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 124, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1003:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 127, + "name": "_currentYear", + "nodeType": "VariableDeclaration", + "scope": 487, + "src": "1030:26:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 126, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1030:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 129, + "name": "_currentDay", + "nodeType": "VariableDeclaration", + "scope": 487, + "src": "1063:26:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 128, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "1063:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 131, + "name": "_currentYearSupply", + "nodeType": "VariableDeclaration", + "scope": 487, + "src": "1096:34:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 130, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1096:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 166, + "nodeType": "Block", + "src": "1329:146:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 148, + "name": "_minerType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 115, + "src": "1342:10:1", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 149, + "name": "minerType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 133, + "src": "1355:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "src": "1342:22:1", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "id": 151, + "nodeType": "ExpressionStatement", + "src": "1342:22:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 154, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 152, + "name": "_category", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 117, + "src": "1375:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 153, + "name": "category", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 135, + "src": "1387:8:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "1375:20:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 155, + "nodeType": "ExpressionStatement", + "src": "1375:20:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 158, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 156, + "name": "_miner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 119, + "src": "1406:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 157, + "name": "ownerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 137, + "src": "1415:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1406:21:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 159, + "nodeType": "ExpressionStatement", + "src": "1406:21:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 164, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 160, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 121, + "src": "1438:6:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$965", + "typeString": "contract IERC20" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 162, + "name": "tokenAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 139, + "src": "1454:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 161, + "name": "IERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 965, + "src": "1447:6:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IERC20_$965_$", + "typeString": "type(contract IERC20)" + } + }, + "id": 163, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1447:20:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$965", + "typeString": "contract IERC20" + } + }, + "src": "1438:29:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$965", + "typeString": "contract IERC20" + } + }, + "id": 165, + "nodeType": "ExpressionStatement", + "src": "1438:29:1" + } + ] + }, + "documentation": null, + "id": 167, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 142, + "modifierName": { + "argumentTypes": null, + "id": 141, + "name": "AlgoSystemRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 661, + "src": "1238:14:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AlgoSystemRole_$661_$", + "typeString": "type(contract AlgoSystemRole)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1238:16:1" + }, + { + "arguments": [], + "id": 144, + "modifierName": { + "argumentTypes": null, + "id": 143, + "name": "AlgoCoreTeamRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 86, + "src": "1264:16:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AlgoCoreTeamRole_$86_$", + "typeString": "type(contract AlgoCoreTeamRole)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1264:18:1" + }, + { + "arguments": [], + "id": 146, + "modifierName": { + "argumentTypes": null, + "id": 145, + "name": "AlgoSupervisorRole", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 574, + "src": "1292:18:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AlgoSupervisorRole_$574_$", + "typeString": "type(contract AlgoSupervisorRole)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1292:20:1" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 140, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 133, + "name": "minerType", + "nodeType": "VariableDeclaration", + "scope": 167, + "src": "1151:16:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 132, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "1151:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 135, + "name": "category", + "nodeType": "VariableDeclaration", + "scope": 167, + "src": "1169:14:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 134, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1169:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 137, + "name": "ownerAddress", + "nodeType": "VariableDeclaration", + "scope": 167, + "src": "1185:20:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 136, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1185:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 139, + "name": "tokenAddress", + "nodeType": "VariableDeclaration", + "scope": 167, + "src": "1207:20:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 138, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1207:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1150:78:1" + }, + "payable": false, + "returnParameters": { + "id": 147, + "nodeType": "ParameterList", + "parameters": [], + "src": "1329:0:1" + }, + "scope": 487, + "src": "1139:336:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 177, + "nodeType": "Block", + "src": "1504:60:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 173, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 170, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1124, + "src": "1523:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 171, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1523:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 172, + "name": "_miner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 119, + "src": "1537:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1523:20:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 169, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1127, + 1128 + ], + "referencedDeclaration": 1127, + "src": "1515:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 174, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1515:29:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 175, + "nodeType": "ExpressionStatement", + "src": "1515:29:1" + }, + { + "id": 176, + "nodeType": "PlaceholderStatement", + "src": "1555:1:1" + } + ] + }, + "documentation": null, + "id": 178, + "name": "onlyMiner", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 168, + "nodeType": "ParameterList", + "parameters": [], + "src": "1501:2:1" + }, + "src": "1483:81:1", + "visibility": "internal" + }, + { + "body": { + "id": 221, + "nodeType": "Block", + "src": "1621:326:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_enum$_MinerState_$113", + "typeString": "enum AlgoMiner.MinerState" + }, + "id": 187, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 184, + "name": "_state", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 123, + "src": "1640:6:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$113", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 185, + "name": "MinerState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 113, + "src": "1650:10:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_MinerState_$113_$", + "typeString": "type(enum AlgoMiner.MinerState)" + } + }, + "id": 186, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Deactivated", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1650:22:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$113", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "src": "1640:32:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 183, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1127, + 1128 + ], + "referencedDeclaration": 1127, + "src": "1632:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 188, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1632:41:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 189, + "nodeType": "ExpressionStatement", + "src": "1632:41:1" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 192, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 190, + "name": "_currentYearSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 131, + "src": "1689:18:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 191, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1711:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1689:23:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 215, + "nodeType": "IfStatement", + "src": "1686:212:1", + "trueBody": { + "id": 214, + "nodeType": "Block", + "src": "1714:184:1", + "statements": [ + { + "assignments": [ + 194 + ], + "declarations": [ + { + "constant": false, + "id": 194, + "name": "currentBalance", + "nodeType": "VariableDeclaration", + "scope": 222, + "src": "1729:22:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 193, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1729:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 201, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 198, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1153, + "src": "1779:4:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_AlgoMiner_$487", + "typeString": "contract AlgoMiner" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_AlgoMiner_$487", + "typeString": "contract AlgoMiner" + } + ], + "id": 197, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1771:7:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 199, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1771:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 195, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 121, + "src": "1754:6:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$965", + "typeString": "contract IERC20" + } + }, + "id": 196, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 910, + "src": "1754:16:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 200, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1754:31:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1729:56:1" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 205, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 203, + "name": "currentBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 194, + "src": "1810:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 204, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1828:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1810:19:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 202, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1127, + 1128 + ], + "referencedDeclaration": 1127, + "src": "1802:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 206, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1802:28:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 207, + "nodeType": "ExpressionStatement", + "src": "1802:28:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 212, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 208, + "name": "_currentYearSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 131, + "src": "1847:18:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 211, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 209, + "name": "currentBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 194, + "src": "1868:14:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 210, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1885:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "1868:18:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1847:39:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 213, + "nodeType": "ExpressionStatement", + "src": "1847:39:1" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "id": 219, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 216, + "name": "_state", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 123, + "src": "1910:6:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$113", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 217, + "name": "MinerState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 113, + "src": "1919:10:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_MinerState_$113_$", + "typeString": "type(enum AlgoMiner.MinerState)" + } + }, + "id": 218, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Activated", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1919:20:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$113", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "src": "1910:29:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$113", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "id": 220, + "nodeType": "ExpressionStatement", + "src": "1910:29:1" + } + ] + }, + "documentation": null, + "id": 222, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 181, + "modifierName": { + "argumentTypes": null, + "id": 180, + "name": "onlyCoreTeam", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27, + "src": "1608:12:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1608:12:1" + } + ], + "name": "activateMiner", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 179, + "nodeType": "ParameterList", + "parameters": [], + "src": "1598:2:1" + }, + "payable": false, + "returnParameters": { + "id": 182, + "nodeType": "ParameterList", + "parameters": [], + "src": "1621:0:1" + }, + "scope": 487, + "src": "1576:371:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 243, + "nodeType": "Block", + "src": "2002:138:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_enum$_MinerState_$113", + "typeString": "enum AlgoMiner.MinerState" + }, + "id": 231, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 228, + "name": "_state", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 123, + "src": "2021:6:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$113", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 229, + "name": "MinerState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 113, + "src": "2031:10:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_MinerState_$113_$", + "typeString": "type(enum AlgoMiner.MinerState)" + } + }, + "id": 230, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Deactivated", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2031:22:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$113", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "src": "2021:32:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 227, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1127, + 1128 + ], + "referencedDeclaration": 1127, + "src": "2013:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 232, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2013:41:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 233, + "nodeType": "ExpressionStatement", + "src": "2013:41:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 237, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 234, + "name": "_state", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 123, + "src": "2075:6:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$113", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 235, + "name": "MinerState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 113, + "src": "2084:10:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_MinerState_$113_$", + "typeString": "type(enum AlgoMiner.MinerState)" + } + }, + "id": 236, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Deactivated", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2084:22:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$113", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "src": "2075:31:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$113", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "id": 238, + "nodeType": "ExpressionStatement", + "src": "2075:31:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 241, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 239, + "name": "_mining", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 125, + "src": "2117:7:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 240, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2127:5:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "2117:15:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 242, + "nodeType": "ExpressionStatement", + "src": "2117:15:1" + } + ] + }, + "documentation": null, + "id": 244, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 225, + "modifierName": { + "argumentTypes": null, + "id": 224, + "name": "onlyCoreTeam", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27, + "src": "1989:12:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1989:12:1" + } + ], + "name": "deactivateMiner", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 223, + "nodeType": "ParameterList", + "parameters": [], + "src": "1979:2:1" + }, + "payable": false, + "returnParameters": { + "id": 226, + "nodeType": "ParameterList", + "parameters": [], + "src": "2002:0:1" + }, + "scope": 487, + "src": "1955:185:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 270, + "nodeType": "Block", + "src": "2215:142:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_enum$_MinerState_$113", + "typeString": "enum AlgoMiner.MinerState" + }, + "id": 255, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 252, + "name": "_state", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 123, + "src": "2234:6:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$113", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 253, + "name": "MinerState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 113, + "src": "2244:10:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_MinerState_$113_$", + "typeString": "type(enum AlgoMiner.MinerState)" + } + }, + "id": 254, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Deactivated", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2244:22:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$113", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "src": "2234:32:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 251, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1127, + 1128 + ], + "referencedDeclaration": 1127, + "src": "2226:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 256, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2226:41:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 257, + "nodeType": "ExpressionStatement", + "src": "2226:41:1" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 261, + "name": "newMinerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 246, + "src": "2300:15:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 265, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1153, + "src": "2342:4:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_AlgoMiner_$487", + "typeString": "contract AlgoMiner" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_AlgoMiner_$487", + "typeString": "contract AlgoMiner" + } + ], + "id": 264, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2334:7:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 266, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2334:13:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 262, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 121, + "src": "2317:6:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$965", + "typeString": "contract IERC20" + } + }, + "id": 263, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 910, + "src": "2317:16:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 267, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2317:31:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 258, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 121, + "src": "2280:6:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$965", + "typeString": "contract IERC20" + } + }, + "id": 260, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeTransfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 990, + "src": "2280:19:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$965_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$965_$", + "typeString": "function (contract IERC20,address,uint256)" + } + }, + "id": 268, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2280:69:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 269, + "nodeType": "ExpressionStatement", + "src": "2280:69:1" + } + ] + }, + "documentation": null, + "id": 271, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 249, + "modifierName": { + "argumentTypes": null, + "id": 248, + "name": "onlyCoreTeam", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27, + "src": "2202:12:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2202:12:1" + } + ], + "name": "migrateMiner", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 247, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 246, + "name": "newMinerAddress", + "nodeType": "VariableDeclaration", + "scope": 271, + "src": "2170:23:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 245, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2170:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2169:25:1" + }, + "payable": false, + "returnParameters": { + "id": 250, + "nodeType": "ParameterList", + "parameters": [], + "src": "2215:0:1" + }, + "scope": 487, + "src": "2148:209:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 288, + "nodeType": "Block", + "src": "2410:108:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_enum$_MinerState_$113", + "typeString": "enum AlgoMiner.MinerState" + }, + "id": 280, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 277, + "name": "_state", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 123, + "src": "2429:6:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$113", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 278, + "name": "MinerState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 113, + "src": "2439:10:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_MinerState_$113_$", + "typeString": "type(enum AlgoMiner.MinerState)" + } + }, + "id": 279, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Activated", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2439:20:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$113", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "src": "2429:30:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 276, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1127, + 1128 + ], + "referencedDeclaration": 1127, + "src": "2421:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 281, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2421:39:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 282, + "nodeType": "ExpressionStatement", + "src": "2421:39:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 286, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 283, + "name": "_state", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 123, + "src": "2481:6:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$113", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 284, + "name": "MinerState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 113, + "src": "2490:10:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_MinerState_$113_$", + "typeString": "type(enum AlgoMiner.MinerState)" + } + }, + "id": 285, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Suspended", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2490:20:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$113", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "src": "2481:29:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$113", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "id": 287, + "nodeType": "ExpressionStatement", + "src": "2481:29:1" + } + ] + }, + "documentation": null, + "id": 289, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 274, + "modifierName": { + "argumentTypes": null, + "id": 273, + "name": "onlySupervisor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 515, + "src": "2395:14:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2395:14:1" + } + ], + "name": "pauseMining", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 272, + "nodeType": "ParameterList", + "parameters": [], + "src": "2385:2:1" + }, + "payable": false, + "returnParameters": { + "id": 275, + "nodeType": "ParameterList", + "parameters": [], + "src": "2410:0:1" + }, + "scope": 487, + "src": "2365:153:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 306, + "nodeType": "Block", + "src": "2572:100:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_enum$_MinerState_$113", + "typeString": "enum AlgoMiner.MinerState" + }, + "id": 298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 295, + "name": "_state", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 123, + "src": "2591:6:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$113", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 296, + "name": "MinerState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 113, + "src": "2601:10:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_MinerState_$113_$", + "typeString": "type(enum AlgoMiner.MinerState)" + } + }, + "id": 297, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Suspended", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2601:20:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$113", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "src": "2591:30:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 294, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1127, + 1128 + ], + "referencedDeclaration": 1127, + "src": "2583:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 299, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2583:39:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 300, + "nodeType": "ExpressionStatement", + "src": "2583:39:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 304, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 301, + "name": "_state", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 123, + "src": "2635:6:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$113", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 302, + "name": "MinerState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 113, + "src": "2644:10:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_MinerState_$113_$", + "typeString": "type(enum AlgoMiner.MinerState)" + } + }, + "id": 303, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Activated", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2644:20:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$113", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "src": "2635:29:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$113", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "id": 305, + "nodeType": "ExpressionStatement", + "src": "2635:29:1" + } + ] + }, + "documentation": null, + "id": 307, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 292, + "modifierName": { + "argumentTypes": null, + "id": 291, + "name": "onlySupervisor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 515, + "src": "2557:14:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2557:14:1" + } + ], + "name": "resumeMining", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 290, + "nodeType": "ParameterList", + "parameters": [], + "src": "2547:2:1" + }, + "payable": false, + "returnParameters": { + "id": 293, + "nodeType": "ParameterList", + "parameters": [], + "src": "2572:0:1" + }, + "scope": 487, + "src": "2526:146:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 334, + "nodeType": "Block", + "src": "2736:160:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_enum$_MinerState_$113", + "typeString": "enum AlgoMiner.MinerState" + }, + "id": 316, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 313, + "name": "_state", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 123, + "src": "2755:6:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$113", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 314, + "name": "MinerState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 113, + "src": "2765:10:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_MinerState_$113_$", + "typeString": "type(enum AlgoMiner.MinerState)" + } + }, + "id": 315, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Stopped", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2765:18:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$113", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "src": "2755:28:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 312, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1127, + 1128 + ], + "referencedDeclaration": 1127, + "src": "2747:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 317, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2747:37:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 318, + "nodeType": "ExpressionStatement", + "src": "2747:37:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 319, + "name": "_state", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 123, + "src": "2805:6:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$113", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 320, + "name": "MinerState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 113, + "src": "2814:10:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_MinerState_$113_$", + "typeString": "type(enum AlgoMiner.MinerState)" + } + }, + "id": 321, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Stopped", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2814:18:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$113", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "src": "2805:27:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$113", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "id": 323, + "nodeType": "ExpressionStatement", + "src": "2805:27:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 326, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 324, + "name": "_mining", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 125, + "src": "2843:7:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 325, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2853:5:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "2843:15:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 327, + "nodeType": "ExpressionStatement", + "src": "2843:15:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 332, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 328, + "name": "_miner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 119, + "src": "2869:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 330, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2886: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": 329, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2878:7:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 331, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2878:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2869:19:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 333, + "nodeType": "ExpressionStatement", + "src": "2869:19:1" + } + ] + }, + "documentation": null, + "id": 335, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 310, + "modifierName": { + "argumentTypes": null, + "id": 309, + "name": "onlySupervisor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 515, + "src": "2721:14:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2721:14:1" + } + ], + "name": "stopAndRemoveOwnership", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 308, + "nodeType": "ParameterList", + "parameters": [], + "src": "2711:2:1" + }, + "payable": false, + "returnParameters": { + "id": 311, + "nodeType": "ParameterList", + "parameters": [], + "src": "2736:0:1" + }, + "scope": 487, + "src": "2680:216:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 358, + "nodeType": "Block", + "src": "2971:133:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_enum$_MinerState_$113", + "typeString": "enum AlgoMiner.MinerState" + }, + "id": 346, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 343, + "name": "_state", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 123, + "src": "2990:6:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$113", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 344, + "name": "MinerState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 113, + "src": "3000:10:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_MinerState_$113_$", + "typeString": "type(enum AlgoMiner.MinerState)" + } + }, + "id": 345, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Stopped", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3000:18:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$113", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "src": "2990:28:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 342, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1127, + 1128 + ], + "referencedDeclaration": 1127, + "src": "2982:7:1", + "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": "2982:37:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 348, + "nodeType": "ExpressionStatement", + "src": "2982:37:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 352, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 349, + "name": "_state", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 123, + "src": "3032:6:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$113", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 350, + "name": "MinerState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 113, + "src": "3041:10:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_MinerState_$113_$", + "typeString": "type(enum AlgoMiner.MinerState)" + } + }, + "id": 351, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Activated", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3041:20:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$113", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "src": "3032:29:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$113", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "id": 353, + "nodeType": "ExpressionStatement", + "src": "3032:29:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 356, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 354, + "name": "_miner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 119, + "src": "3072:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 355, + "name": "newOwnerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 337, + "src": "3081:15:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "3072:24:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 357, + "nodeType": "ExpressionStatement", + "src": "3072:24:1" + } + ] + }, + "documentation": null, + "id": 359, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 340, + "modifierName": { + "argumentTypes": null, + "id": 339, + "name": "onlySupervisor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 515, + "src": "2956:14:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2956:14:1" + } + ], + "name": "resetMiner", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 338, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 337, + "name": "newOwnerAddress", + "nodeType": "VariableDeclaration", + "scope": 359, + "src": "2924:23:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 336, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2924:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2923:25:1" + }, + "payable": false, + "returnParameters": { + "id": 341, + "nodeType": "ParameterList", + "parameters": [], + "src": "2971:0:1" + }, + "scope": 487, + "src": "2904:200:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 380, + "nodeType": "Block", + "src": "3152:121:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_enum$_MinerState_$113", + "typeString": "enum AlgoMiner.MinerState" + }, + "id": 368, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 365, + "name": "_state", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 123, + "src": "3171:6:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$113", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 366, + "name": "MinerState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 113, + "src": "3181:10:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_MinerState_$113_$", + "typeString": "type(enum AlgoMiner.MinerState)" + } + }, + "id": 367, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Activated", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3181:20:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$113", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "src": "3171:30:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 364, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1127, + 1128 + ], + "referencedDeclaration": 1127, + "src": "3163: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": "3163:39:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 370, + "nodeType": "ExpressionStatement", + "src": "3163:39:1" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 373, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "3221:8:1", + "subExpression": { + "argumentTypes": null, + "id": 372, + "name": "_mining", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 125, + "src": "3222:7:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 371, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1127, + 1128 + ], + "referencedDeclaration": 1127, + "src": "3213:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 374, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3213:17:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 375, + "nodeType": "ExpressionStatement", + "src": "3213:17:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 378, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 376, + "name": "_mining", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 125, + "src": "3251:7:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 377, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3261:4:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "3251:14:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 379, + "nodeType": "ExpressionStatement", + "src": "3251:14:1" + } + ] + }, + "documentation": null, + "id": 381, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 362, + "modifierName": { + "argumentTypes": null, + "id": 361, + "name": "onlyMiner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 178, + "src": "3142:9:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3142:9:1" + } + ], + "name": "startMining", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 360, + "nodeType": "ParameterList", + "parameters": [], + "src": "3132:2:1" + }, + "payable": false, + "returnParameters": { + "id": 363, + "nodeType": "ParameterList", + "parameters": [], + "src": "3152:0:1" + }, + "scope": 487, + "src": "3112:161:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 401, + "nodeType": "Block", + "src": "3320:121:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_enum$_MinerState_$113", + "typeString": "enum AlgoMiner.MinerState" + }, + "id": 390, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 387, + "name": "_state", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 123, + "src": "3339:6:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$113", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 388, + "name": "MinerState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 113, + "src": "3349:10:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_MinerState_$113_$", + "typeString": "type(enum AlgoMiner.MinerState)" + } + }, + "id": 389, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Activated", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3349:20:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$113", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "src": "3339:30:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 386, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1127, + 1128 + ], + "referencedDeclaration": 1127, + "src": "3331:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 391, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3331:39:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 392, + "nodeType": "ExpressionStatement", + "src": "3331:39:1" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 394, + "name": "_mining", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 125, + "src": "3389:7:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 393, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1127, + 1128 + ], + "referencedDeclaration": 1127, + "src": "3381:7:1", + "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": "3381:16:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 396, + "nodeType": "ExpressionStatement", + "src": "3381:16:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 399, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 397, + "name": "_mining", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 125, + "src": "3418:7:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 398, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3428:5:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "3418:15:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 400, + "nodeType": "ExpressionStatement", + "src": "3418:15:1" + } + ] + }, + "documentation": null, + "id": 402, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 384, + "modifierName": { + "argumentTypes": null, + "id": 383, + "name": "onlyMiner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 178, + "src": "3310:9:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3310:9:1" + } + ], + "name": "stopMining", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 382, + "nodeType": "ParameterList", + "parameters": [], + "src": "3300:2:1" + }, + "payable": false, + "returnParameters": { + "id": 385, + "nodeType": "ParameterList", + "parameters": [], + "src": "3320:0:1" + }, + "scope": 487, + "src": "3281:160:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 469, + "nodeType": "Block", + "src": "3483:547:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_enum$_MinerState_$113", + "typeString": "enum AlgoMiner.MinerState" + }, + "id": 411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 408, + "name": "_state", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 123, + "src": "3502:6:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$113", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 409, + "name": "MinerState", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 113, + "src": "3512:10:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_enum$_MinerState_$113_$", + "typeString": "type(enum AlgoMiner.MinerState)" + } + }, + "id": 410, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "Activated", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3512:20:1", + "typeDescriptions": { + "typeIdentifier": "t_enum$_MinerState_$113", + "typeString": "enum AlgoMiner.MinerState" + } + }, + "src": "3502:30:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 407, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1127, + 1128 + ], + "referencedDeclaration": 1127, + "src": "3494:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 412, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3494:39:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 413, + "nodeType": "ExpressionStatement", + "src": "3494:39:1" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 415, + "name": "_mining", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 125, + "src": "3552:7:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 414, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1127, + 1128 + ], + "referencedDeclaration": 1127, + "src": "3544:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 416, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3544:16:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 417, + "nodeType": "ExpressionStatement", + "src": "3544:16:1" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "id": 420, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 418, + "name": "_currentDay", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 129, + "src": "3576:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 419, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3591:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3576:16:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 454, + "nodeType": "Block", + "src": "3673:238:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 431, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "3688:13:1", + "subExpression": { + "argumentTypes": null, + "id": 430, + "name": "_currentDay", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 129, + "src": "3688:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "id": 432, + "nodeType": "ExpressionStatement", + "src": "3688:13:1" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 438, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 433, + "name": "_currentDay", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 129, + "src": "3719:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 436, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 434, + "name": "DAYS_PER_YEAR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 108, + "src": "3735:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 435, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3751:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "3735:17:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 437, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "3734:19:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3719:34:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 453, + "nodeType": "IfStatement", + "src": "3716:184:1", + "trueBody": { + "id": 452, + "nodeType": "Block", + "src": "3755:145:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 440, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "3774:14:1", + "subExpression": { + "argumentTypes": null, + "id": 439, + "name": "_currentYear", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 127, + "src": "3774:12:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 441, + "nodeType": "ExpressionStatement", + "src": "3774:14:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 444, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 442, + "name": "_currentDay", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 129, + "src": "3807:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "31", + "id": 443, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3821:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "3807:15:1", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "id": 445, + "nodeType": "ExpressionStatement", + "src": "3807:15:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 450, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 446, + "name": "_currentYearSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 131, + "src": "3841:18:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 449, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 447, + "name": "_currentYearSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 131, + "src": "3862:18:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 448, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3883:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "3862:22:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3841:43:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 451, + "nodeType": "ExpressionStatement", + "src": "3841:43:1" + } + ] + } + } + ] + }, + "id": 455, + "nodeType": "IfStatement", + "src": "3573:338:1", + "trueBody": { + "id": 429, + "nodeType": "Block", + "src": "3594:73:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 423, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 421, + "name": "_currentYear", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 127, + "src": "3609:12:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "31", + "id": 422, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3624:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "3609:16:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 424, + "nodeType": "ExpressionStatement", + "src": "3609:16:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 427, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 425, + "name": "_currentDay", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 129, + "src": "3640:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "31", + "id": 426, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3654:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "3640:15:1", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "id": 428, + "nodeType": "ExpressionStatement", + "src": "3640:15:1" + } + ] + } + }, + { + "assignments": [ + 457 + ], + "declarations": [ + { + "constant": false, + "id": 457, + "name": "tokens", + "nodeType": "VariableDeclaration", + "scope": 470, + "src": "3923:14:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 456, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3923:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 461, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 458, + "name": "_currentYearSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 131, + "src": "3940:18:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 459, + "name": "DAYS_PER_YEAR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 108, + "src": "3961:13:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3940:34:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3923:51:1" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 465, + "name": "_miner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 119, + "src": "4007:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 466, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 457, + "src": "4015:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 462, + "name": "_token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 121, + "src": "3987:6:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$965", + "typeString": "contract IERC20" + } + }, + "id": 464, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeTransfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 990, + "src": "3987:19:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$965_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$965_$", + "typeString": "function (contract IERC20,address,uint256)" + } + }, + "id": 467, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3987:35:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 468, + "nodeType": "ExpressionStatement", + "src": "3987:35:1" + } + ] + }, + "documentation": null, + "id": 470, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 405, + "modifierName": { + "argumentTypes": null, + "id": 404, + "name": "onlySystem", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 602, + "src": "3472:10:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3472:10:1" + } + ], + "name": "mine", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 403, + "nodeType": "ParameterList", + "parameters": [], + "src": "3462:2:1" + }, + "payable": false, + "returnParameters": { + "id": 406, + "nodeType": "ParameterList", + "parameters": [], + "src": "3483:0:1" + }, + "scope": 487, + "src": "3449:581:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 477, + "nodeType": "Block", + "src": "4088:30:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 475, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4106:4:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 474, + "id": 476, + "nodeType": "Return", + "src": "4099:11:1" + } + ] + }, + "documentation": null, + "id": 478, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "isAlgoMiner", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 471, + "nodeType": "ParameterList", + "parameters": [], + "src": "4058:2:1" + }, + "payable": false, + "returnParameters": { + "id": 474, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 473, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 478, + "src": "4082:4:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 472, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4082:4:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4081:6:1" + }, + "scope": 487, + "src": "4038:80:1", + "stateMutability": "pure", + "superFunction": 668, + "visibility": "public" + }, + { + "body": { + "id": 485, + "nodeType": "Block", + "src": "4177:35:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 483, + "name": "_category", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 117, + "src": "4195:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "functionReturnParameters": 482, + "id": 484, + "nodeType": "Return", + "src": "4188:16:1" + } + ] + }, + "documentation": null, + "id": 486, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getCategory", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 479, + "nodeType": "ParameterList", + "parameters": [], + "src": "4146:2:1" + }, + "payable": false, + "returnParameters": { + "id": 482, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 481, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 486, + "src": "4170:5:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 480, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "4170:5:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4169:7:1" + }, + "scope": 487, + "src": "4126:86:1", + "stateMutability": "view", + "superFunction": 673, + "visibility": "public" + } + ], + "scope": 488, + "src": "558:3657:1" + } + ], + "src": "0:4217:1" + }, + "id": 1 + }, + "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": [ + 574 + ] + }, + "id": 575, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 489, + "literals": [ + "solidity", + "^", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:24: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": 490, + "nodeType": "ImportDirective", + "scope": 575, + "sourceUnit": 769, + "src": "28:189:2", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 574, + "linearizedBaseContracts": [ + 574 + ], + "name": "AlgoSupervisorRole", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 493, + "libraryName": { + "contractScope": null, + "id": 491, + "name": "Roles", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 768, + "src": "262:5:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Roles_$768", + "typeString": "library Roles" + } + }, + "nodeType": "UsingForDirective", + "src": "256:27:2", + "typeName": { + "contractScope": null, + "id": 492, + "name": "Roles.Role", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 681, + "src": "272:10:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$681_storage_ptr", + "typeString": "struct Roles.Role" + } + } + }, + { + "constant": false, + "id": 495, + "name": "_supervisors", + "nodeType": "VariableDeclaration", + "scope": 574, + "src": "291:31:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$681_storage", + "typeString": "struct Roles.Role" + }, + "typeName": { + "contractScope": null, + "id": 494, + "name": "Roles.Role", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 681, + "src": "291:10:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$681_storage_ptr", + "typeString": "struct Roles.Role" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 503, + "nodeType": "Block", + "src": "355:45:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 499, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1124, + "src": "381:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 500, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "381:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 498, + "name": "_addSupervisor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 561, + "src": "366:14:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 501, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "366:26:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 502, + "nodeType": "ExpressionStatement", + "src": "366:26:2" + } + ] + }, + "documentation": null, + "id": 504, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 496, + "nodeType": "ParameterList", + "parameters": [], + "src": "343:2:2" + }, + "payable": false, + "returnParameters": { + "id": 497, + "nodeType": "ParameterList", + "parameters": [], + "src": "355:0:2" + }, + "scope": 574, + "src": "331:69:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 514, + "nodeType": "Block", + "src": "434:64:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 508, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1124, + "src": "466:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 509, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "466:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 507, + "name": "isSupervisor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 528, + "src": "453:12:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 510, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "453:24:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 506, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1127, + 1128 + ], + "referencedDeclaration": 1127, + "src": "445:7:2", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 511, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "445:33:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 512, + "nodeType": "ExpressionStatement", + "src": "445:33:2" + }, + { + "id": 513, + "nodeType": "PlaceholderStatement", + "src": "489:1:2" + } + ] + }, + "documentation": null, + "id": 515, + "name": "onlySupervisor", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 505, + "nodeType": "ParameterList", + "parameters": [], + "src": "431:2:2" + }, + "src": "408:90:2", + "visibility": "internal" + }, + { + "body": { + "id": 527, + "nodeType": "Block", + "src": "572:51:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 524, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 517, + "src": "607:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 522, + "name": "_supervisors", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 495, + "src": "590:12:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$681_storage", + "typeString": "struct Roles.Role storage ref" + } + }, + "id": 523, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "has", + "nodeType": "MemberAccess", + "referencedDeclaration": 767, + "src": "590:16:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Role_$681_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Role_$681_storage_ptr_$", + "typeString": "function (struct Roles.Role storage pointer,address) view returns (bool)" + } + }, + "id": 525, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "590:25:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 521, + "id": 526, + "nodeType": "Return", + "src": "583:32:2" + } + ] + }, + "documentation": null, + "id": 528, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "isSupervisor", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 518, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 517, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 528, + "src": "528:15:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 516, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "528:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "527:17:2" + }, + "payable": false, + "returnParameters": { + "id": 521, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 520, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 528, + "src": "566:4:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 519, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "566:4:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "565:6:2" + }, + "scope": 574, + "src": "506:117:2", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 539, + "nodeType": "Block", + "src": "693:42:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 536, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 530, + "src": "719:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 535, + "name": "_addSupervisor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 561, + "src": "704:14:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 537, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "704:23:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 538, + "nodeType": "ExpressionStatement", + "src": "704:23:2" + } + ] + }, + "documentation": null, + "id": 540, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 533, + "modifierName": { + "argumentTypes": null, + "id": 532, + "name": "onlySupervisor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 515, + "src": "678:14:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "678:14:2" + } + ], + "name": "addSupervisor", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 531, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 530, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 540, + "src": "654:15:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 529, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "654:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "653:17:2" + }, + "payable": false, + "returnParameters": { + "id": 534, + "nodeType": "ParameterList", + "parameters": [], + "src": "693:0:2" + }, + "scope": 574, + "src": "631:104:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 548, + "nodeType": "Block", + "src": "780:48:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 544, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1124, + "src": "809:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 545, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "809:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 543, + "name": "_removeSupervisor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 573, + "src": "791:17:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 546, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "791:29:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 547, + "nodeType": "ExpressionStatement", + "src": "791:29:2" + } + ] + }, + "documentation": null, + "id": 549, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "renounceSupervisor", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 541, + "nodeType": "ParameterList", + "parameters": [], + "src": "770:2:2" + }, + "payable": false, + "returnParameters": { + "id": 542, + "nodeType": "ParameterList", + "parameters": [], + "src": "780:0:2" + }, + "scope": 574, + "src": "743:85:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 560, + "nodeType": "Block", + "src": "886:44:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 557, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 551, + "src": "914:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 554, + "name": "_supervisors", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 495, + "src": "897:12:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$681_storage", + "typeString": "struct Roles.Role storage ref" + } + }, + "id": 556, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 713, + "src": "897:16:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Role_$681_storage_ptr_$_t_address_$returns$__$bound_to$_t_struct$_Role_$681_storage_ptr_$", + "typeString": "function (struct Roles.Role storage pointer,address)" + } + }, + "id": 558, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "897:25:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 559, + "nodeType": "ExpressionStatement", + "src": "897:25:2" + } + ] + }, + "documentation": null, + "id": 561, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "_addSupervisor", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 552, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 551, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 561, + "src": "860:15:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 550, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "860:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "859:17:2" + }, + "payable": false, + "returnParameters": { + "id": 553, + "nodeType": "ParameterList", + "parameters": [], + "src": "886:0:2" + }, + "scope": 574, + "src": "836:94:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 572, + "nodeType": "Block", + "src": "991:47:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 569, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 563, + "src": "1022:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 566, + "name": "_supervisors", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 495, + "src": "1002:12:2", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$681_storage", + "typeString": "struct Roles.Role storage ref" + } + }, + "id": 568, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "remove", + "nodeType": "MemberAccess", + "referencedDeclaration": 744, + "src": "1002:19:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Role_$681_storage_ptr_$_t_address_$returns$__$bound_to$_t_struct$_Role_$681_storage_ptr_$", + "typeString": "function (struct Roles.Role storage pointer,address)" + } + }, + "id": 570, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1002:28:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 571, + "nodeType": "ExpressionStatement", + "src": "1002:28:2" + } + ] + }, + "documentation": null, + "id": 573, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "_removeSupervisor", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 564, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 563, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 573, + "src": "965:15:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 562, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "965:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "964:17:2" + }, + "payable": false, + "returnParameters": { + "id": 565, + "nodeType": "ParameterList", + "parameters": [], + "src": "991:0:2" + }, + "scope": 574, + "src": "938:100:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 575, + "src": "221:820:2" + } + ], + "src": "0:1043:2" + }, + "id": 2 + }, + "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": [ + 661 + ] + }, + "id": 662, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 576, + "literals": [ + "solidity", + "^", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:24: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": 577, + "nodeType": "ImportDirective", + "scope": 662, + "sourceUnit": 769, + "src": "28:189:3", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 661, + "linearizedBaseContracts": [ + 661 + ], + "name": "AlgoSystemRole", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 580, + "libraryName": { + "contractScope": null, + "id": 578, + "name": "Roles", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 768, + "src": "258:5:3", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Roles_$768", + "typeString": "library Roles" + } + }, + "nodeType": "UsingForDirective", + "src": "252:27:3", + "typeName": { + "contractScope": null, + "id": 579, + "name": "Roles.Role", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 681, + "src": "268:10:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$681_storage_ptr", + "typeString": "struct Roles.Role" + } + } + }, + { + "constant": false, + "id": 582, + "name": "_systemMembers", + "nodeType": "VariableDeclaration", + "scope": 661, + "src": "287:33:3", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$681_storage", + "typeString": "struct Roles.Role" + }, + "typeName": { + "contractScope": null, + "id": 581, + "name": "Roles.Role", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 681, + "src": "287:10:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$681_storage_ptr", + "typeString": "struct Roles.Role" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 590, + "nodeType": "Block", + "src": "353:41:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 586, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1124, + "src": "375:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 587, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "375:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 585, + "name": "_addSystem", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 648, + "src": "364:10:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 588, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "364:22:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 589, + "nodeType": "ExpressionStatement", + "src": "364:22:3" + } + ] + }, + "documentation": null, + "id": 591, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 583, + "nodeType": "ParameterList", + "parameters": [], + "src": "341:2:3" + }, + "payable": false, + "returnParameters": { + "id": 584, + "nodeType": "ParameterList", + "parameters": [], + "src": "353:0:3" + }, + "scope": 661, + "src": "329:65:3", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 601, + "nodeType": "Block", + "src": "424:60:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 595, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1124, + "src": "452:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 596, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "452:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 594, + "name": "isSystem", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 615, + "src": "443:8:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 597, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "443:20:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 593, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1127, + 1128 + ], + "referencedDeclaration": 1127, + "src": "435:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 598, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "435:29:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 599, + "nodeType": "ExpressionStatement", + "src": "435:29:3" + }, + { + "id": 600, + "nodeType": "PlaceholderStatement", + "src": "475:1:3" + } + ] + }, + "documentation": null, + "id": 602, + "name": "onlySystem", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 592, + "nodeType": "ParameterList", + "parameters": [], + "src": "421:2:3" + }, + "src": "402:82:3", + "visibility": "internal" + }, + { + "body": { + "id": 614, + "nodeType": "Block", + "src": "554:53:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 611, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 604, + "src": "591:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 609, + "name": "_systemMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 582, + "src": "572:14:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$681_storage", + "typeString": "struct Roles.Role storage ref" + } + }, + "id": 610, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "has", + "nodeType": "MemberAccess", + "referencedDeclaration": 767, + "src": "572:18:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Role_$681_storage_ptr_$_t_address_$returns$_t_bool_$bound_to$_t_struct$_Role_$681_storage_ptr_$", + "typeString": "function (struct Roles.Role storage pointer,address) view returns (bool)" + } + }, + "id": 612, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "572:27:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 608, + "id": 613, + "nodeType": "Return", + "src": "565:34:3" + } + ] + }, + "documentation": null, + "id": 615, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "isSystem", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 605, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 604, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 615, + "src": "510:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 603, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "510:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "509:17:3" + }, + "payable": false, + "returnParameters": { + "id": 608, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 607, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 615, + "src": "548:4:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 606, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "548:4:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "547:6:3" + }, + "scope": 661, + "src": "492:115:3", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 626, + "nodeType": "Block", + "src": "669:38:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 623, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 617, + "src": "691:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 622, + "name": "_addSystem", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 648, + "src": "680:10:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 624, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "680:19:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 625, + "nodeType": "ExpressionStatement", + "src": "680:19:3" + } + ] + }, + "documentation": null, + "id": 627, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 620, + "modifierName": { + "argumentTypes": null, + "id": 619, + "name": "onlySystem", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 602, + "src": "658:10:3", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "658:10:3" + } + ], + "name": "addSystem", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 618, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 617, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 627, + "src": "634:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 616, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "634:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "633:17:3" + }, + "payable": false, + "returnParameters": { + "id": 621, + "nodeType": "ParameterList", + "parameters": [], + "src": "669:0:3" + }, + "scope": 661, + "src": "615:92:3", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 635, + "nodeType": "Block", + "src": "748:44:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 631, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1124, + "src": "773:3:3", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 632, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "773:10:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 630, + "name": "_removeSystem", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 660, + "src": "759:13:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", + "typeString": "function (address)" + } + }, + "id": 633, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "759:25:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 634, + "nodeType": "ExpressionStatement", + "src": "759:25:3" + } + ] + }, + "documentation": null, + "id": 636, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "renounceSystem", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 628, + "nodeType": "ParameterList", + "parameters": [], + "src": "738:2:3" + }, + "payable": false, + "returnParameters": { + "id": 629, + "nodeType": "ParameterList", + "parameters": [], + "src": "748:0:3" + }, + "scope": 661, + "src": "715:77:3", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 647, + "nodeType": "Block", + "src": "846:46:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 644, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 638, + "src": "876:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 641, + "name": "_systemMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 582, + "src": "857:14:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$681_storage", + "typeString": "struct Roles.Role storage ref" + } + }, + "id": 643, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 713, + "src": "857:18:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Role_$681_storage_ptr_$_t_address_$returns$__$bound_to$_t_struct$_Role_$681_storage_ptr_$", + "typeString": "function (struct Roles.Role storage pointer,address)" + } + }, + "id": 645, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "857:27:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 646, + "nodeType": "ExpressionStatement", + "src": "857:27:3" + } + ] + }, + "documentation": null, + "id": 648, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "_addSystem", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 639, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 638, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 648, + "src": "820:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 637, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "820:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "819:17:3" + }, + "payable": false, + "returnParameters": { + "id": 640, + "nodeType": "ParameterList", + "parameters": [], + "src": "846:0:3" + }, + "scope": 661, + "src": "800:92:3", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 659, + "nodeType": "Block", + "src": "949:49:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 656, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 650, + "src": "982:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 653, + "name": "_systemMembers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 582, + "src": "960:14:3", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$681_storage", + "typeString": "struct Roles.Role storage ref" + } + }, + "id": 655, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "remove", + "nodeType": "MemberAccess", + "referencedDeclaration": 744, + "src": "960:21:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Role_$681_storage_ptr_$_t_address_$returns$__$bound_to$_t_struct$_Role_$681_storage_ptr_$", + "typeString": "function (struct Roles.Role storage pointer,address)" + } + }, + "id": 657, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "960:30:3", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 658, + "nodeType": "ExpressionStatement", + "src": "960:30:3" + } + ] + }, + "documentation": null, + "id": 660, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "_removeSystem", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 651, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 650, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 660, + "src": "923:15:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 649, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "923:7:3", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "922:17:3" + }, + "payable": false, + "returnParameters": { + "id": 652, + "nodeType": "ParameterList", + "parameters": [], + "src": "949:0:3" + }, + "scope": 661, + "src": "900:98:3", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 662, + "src": "221:780:3" + } + ], + "src": "0:1003: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": [ + 674 + ] + }, + "id": 675, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 663, + "literals": [ + "solidity", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:23:4" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": false, + "id": 674, + "linearizedBaseContracts": [ + 674 + ], + "name": "IAlgoMiner", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "id": 668, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "isAlgoMiner", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 664, + "nodeType": "ParameterList", + "parameters": [], + "src": "74:2:4" + }, + "payable": false, + "returnParameters": { + "id": 667, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 666, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 668, + "src": "98:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 665, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "98:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "97:6:4" + }, + "scope": 674, + "src": "54:50:4", + "stateMutability": "pure", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 673, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getCategory", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 669, + "nodeType": "ParameterList", + "parameters": [], + "src": "130:2:4" + }, + "payable": false, + "returnParameters": { + "id": 672, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 671, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 673, + "src": "154:5:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 670, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "154:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "153:7:4" + }, + "scope": 674, + "src": "110:51:4", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 675, + "src": "27:137:4" + } + ], + "src": "0:164:4" + }, + "id": 4 + }, + "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": [ + 768 + ] + }, + "id": 769, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 676, + "literals": [ + "solidity", + "^", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:24:5" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": "@title Roles\n@dev Library for managing addresses assigned to a Role.", + "fullyImplemented": true, + "id": 768, + "linearizedBaseContracts": [ + 768 + ], + "name": "Roles", + "nodeType": "ContractDefinition", + "nodes": [ + { + "canonicalName": "Roles.Role", + "id": 681, + "members": [ + { + "constant": false, + "id": 680, + "name": "bearer", + "nodeType": "VariableDeclaration", + "scope": 681, + "src": "145:32:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "typeName": { + "id": 679, + "keyType": { + "id": 677, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "154:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "145:25:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "valueType": { + "id": 678, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "165:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Role", + "nodeType": "StructDefinition", + "scope": 768, + "src": "127:55:5", + "visibility": "public" + }, + { + "body": { + "id": 712, + "nodeType": "Block", + "src": "302:109:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 693, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 689, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 685, + "src": "316:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 691, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "335: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": 690, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "327:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 692, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "327:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "316:21:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 688, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1127, + 1128 + ], + "referencedDeclaration": 1127, + "src": "308:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 694, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "308:30:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 695, + "nodeType": "ExpressionStatement", + "src": "308:30:5" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 701, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "352:19:5", + "subExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 698, + "name": "role", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 683, + "src": "357:4:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$681_storage_ptr", + "typeString": "struct Roles.Role storage pointer" + } + }, + { + "argumentTypes": null, + "id": 699, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 685, + "src": "363:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Role_$681_storage_ptr", + "typeString": "struct Roles.Role storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 697, + "name": "has", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 767, + "src": "353:3:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Role_$681_storage_ptr_$_t_address_$returns$_t_bool_$", + "typeString": "function (struct Roles.Role storage pointer,address) view returns (bool)" + } + }, + "id": 700, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "353:18:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 696, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1127, + 1128 + ], + "referencedDeclaration": 1127, + "src": "344:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 702, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "344:28:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 703, + "nodeType": "ExpressionStatement", + "src": "344:28:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 710, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 704, + "name": "role", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 683, + "src": "379:4:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$681_storage_ptr", + "typeString": "struct Roles.Role storage pointer" + } + }, + "id": 707, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "bearer", + "nodeType": "MemberAccess", + "referencedDeclaration": 680, + "src": "379:11:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 708, + "indexExpression": { + "argumentTypes": null, + "id": 706, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 685, + "src": "391:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "379:20:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 709, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "402:4:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "379:27:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 711, + "nodeType": "ExpressionStatement", + "src": "379:27:5" + } + ] + }, + "documentation": "@dev give an account access to this role", + "id": 713, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "add", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 686, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 683, + "name": "role", + "nodeType": "VariableDeclaration", + "scope": 713, + "src": "257:17:5", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$681_storage_ptr", + "typeString": "struct Roles.Role" + }, + "typeName": { + "contractScope": null, + "id": 682, + "name": "Role", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 681, + "src": "257:4:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$681_storage_ptr", + "typeString": "struct Roles.Role" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 685, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 713, + "src": "276:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 684, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "276:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "256:36:5" + }, + "payable": false, + "returnParameters": { + "id": 687, + "nodeType": "ParameterList", + "parameters": [], + "src": "302:0:5" + }, + "scope": 768, + "src": "244:167:5", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 743, + "nodeType": "Block", + "src": "538:109:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 725, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 721, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 717, + "src": "552:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 723, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "571: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": 722, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "563:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 724, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "563:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "552:21:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 720, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1127, + 1128 + ], + "referencedDeclaration": 1127, + "src": "544:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 726, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "544:30:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 727, + "nodeType": "ExpressionStatement", + "src": "544:30:5" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 730, + "name": "role", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 715, + "src": "592:4:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$681_storage_ptr", + "typeString": "struct Roles.Role storage pointer" + } + }, + { + "argumentTypes": null, + "id": 731, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 717, + "src": "598:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Role_$681_storage_ptr", + "typeString": "struct Roles.Role storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 729, + "name": "has", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 767, + "src": "588:3:5", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Role_$681_storage_ptr_$_t_address_$returns$_t_bool_$", + "typeString": "function (struct Roles.Role storage pointer,address) view returns (bool)" + } + }, + "id": 732, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "588:18:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 728, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1127, + 1128 + ], + "referencedDeclaration": 1127, + "src": "580:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 733, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "580:27:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 734, + "nodeType": "ExpressionStatement", + "src": "580:27:5" + }, + { + "expression": { + "argumentTypes": null, + "id": 741, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 735, + "name": "role", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 715, + "src": "614:4:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$681_storage_ptr", + "typeString": "struct Roles.Role storage pointer" + } + }, + "id": 738, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "bearer", + "nodeType": "MemberAccess", + "referencedDeclaration": 680, + "src": "614:11:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 739, + "indexExpression": { + "argumentTypes": null, + "id": 737, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 717, + "src": "626:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "614:20:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 740, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "637:5:5", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "614:28:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 742, + "nodeType": "ExpressionStatement", + "src": "614:28:5" + } + ] + }, + "documentation": "@dev remove an account's access to this role", + "id": 744, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "remove", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 718, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 715, + "name": "role", + "nodeType": "VariableDeclaration", + "scope": 744, + "src": "493:17:5", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$681_storage_ptr", + "typeString": "struct Roles.Role" + }, + "typeName": { + "contractScope": null, + "id": 714, + "name": "Role", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 681, + "src": "493:4:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$681_storage_ptr", + "typeString": "struct Roles.Role" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 717, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 744, + "src": "512:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 716, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "512:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "492:36:5" + }, + "payable": false, + "returnParameters": { + "id": 719, + "nodeType": "ParameterList", + "parameters": [], + "src": "538:0:5" + }, + "scope": 768, + "src": "477:170:5", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 766, + "nodeType": "Block", + "src": "817:74:5", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 758, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 754, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 748, + "src": "831:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 756, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "850: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": 755, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "842:7:5", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 757, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "842:10:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "831:21:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 753, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1127, + 1128 + ], + "referencedDeclaration": 1127, + "src": "823:7:5", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 759, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "823:30:5", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 760, + "nodeType": "ExpressionStatement", + "src": "823:30:5" + }, + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 761, + "name": "role", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 746, + "src": "866:4:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$681_storage_ptr", + "typeString": "struct Roles.Role storage pointer" + } + }, + "id": 762, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "bearer", + "nodeType": "MemberAccess", + "referencedDeclaration": 680, + "src": "866:11:5", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 764, + "indexExpression": { + "argumentTypes": null, + "id": 763, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 748, + "src": "878:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "866:20:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 752, + "id": 765, + "nodeType": "Return", + "src": "859:27:5" + } + ] + }, + "documentation": "@dev check if an account has this role\n@return bool", + "id": 767, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "has", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 749, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 746, + "name": "role", + "nodeType": "VariableDeclaration", + "scope": 767, + "src": "738:17:5", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$681_storage_ptr", + "typeString": "struct Roles.Role" + }, + "typeName": { + "contractScope": null, + "id": 745, + "name": "Role", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 681, + "src": "738:4:5", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$681_storage_ptr", + "typeString": "struct Roles.Role" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 748, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 767, + "src": "757:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 747, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "757:7:5", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "737:36:5" + }, + "payable": false, + "returnParameters": { + "id": 752, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 751, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 767, + "src": "809:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 750, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "809:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "808:6:5" + }, + "scope": 768, + "src": "725:166:5", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 769, + "src": "109:784:5" + } + ], + "src": "0:894:5" + }, + "id": 5 + }, + "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": [ + 896 + ] + }, + "id": 897, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 770, + "literals": [ + "solidity", + "^", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:24:6" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": "@title SafeMath\n@dev Math operations with safety checks that revert on error", + "fullyImplemented": true, + "id": 896, + "linearizedBaseContracts": [ + 896 + ], + "name": "SafeMath", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 802, + "nodeType": "Block", + "src": "271:314:6", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 781, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 779, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 772, + "src": "486:1:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 780, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "491:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "486:6:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 785, + "nodeType": "IfStatement", + "src": "482:35:6", + "trueBody": { + "id": 784, + "nodeType": "Block", + "src": "494:23:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "30", + "id": 782, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "509:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "functionReturnParameters": 778, + "id": 783, + "nodeType": "Return", + "src": "502:8:6" + } + ] + } + }, + { + "assignments": [ + 787 + ], + "declarations": [ + { + "constant": false, + "id": 787, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 803, + "src": "523:9:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 786, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "523:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 791, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 790, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 788, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 772, + "src": "535:1:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 789, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 774, + "src": "539:1:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "535:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "523:17:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 797, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 795, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 793, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 787, + "src": "554:1:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 794, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 772, + "src": "558:1:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "554:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 796, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 774, + "src": "563:1:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "554:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 792, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1127, + 1128 + ], + "referencedDeclaration": 1127, + "src": "546:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 798, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "546:19:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 799, + "nodeType": "ExpressionStatement", + "src": "546:19:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 800, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 787, + "src": "579:1:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 778, + "id": 801, + "nodeType": "Return", + "src": "572:8:6" + } + ] + }, + "documentation": "@dev Multiplies two numbers, reverts on overflow.", + "id": 803, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "mul", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 775, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 772, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 803, + "src": "217:9:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 771, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "217:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 774, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 803, + "src": "228:9:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 773, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "228:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "216:22:6" + }, + "payable": false, + "returnParameters": { + "id": 778, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 777, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 803, + "src": "262:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 776, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "262:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "261:9:6" + }, + "scope": 896, + "src": "204:381:6", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 826, + "nodeType": "Block", + "src": "762:203:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 815, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 813, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 807, + "src": "776:1:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 814, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "780:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "776:5:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 812, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1127, + 1128 + ], + "referencedDeclaration": 1127, + "src": "768:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 816, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "768:14:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 817, + "nodeType": "ExpressionStatement", + "src": "768:14:6" + }, + { + "assignments": [ + 819 + ], + "declarations": [ + { + "constant": false, + "id": 819, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 827, + "src": "846:9:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 818, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "846:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 823, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 822, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 820, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 805, + "src": "858:1:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 821, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 807, + "src": "862:1:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "858:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "846:17:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 824, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 819, + "src": "959:1:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 811, + "id": 825, + "nodeType": "Return", + "src": "952:8:6" + } + ] + }, + "documentation": "@dev Integer division of two numbers truncating the quotient, reverts on division by zero.", + "id": 827, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "div", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 808, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 805, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 827, + "src": "708:9:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 804, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "708:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 807, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 827, + "src": "719:9:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 806, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "719:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "707:22:6" + }, + "payable": false, + "returnParameters": { + "id": 811, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 810, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 827, + "src": "753:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 809, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "753:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "752:9:6" + }, + "scope": 896, + "src": "695:270:6", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 850, + "nodeType": "Block", + "src": "1145:64:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 839, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 837, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 831, + "src": "1159:1:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 838, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 829, + "src": "1164:1:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1159:6:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 836, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1127, + 1128 + ], + "referencedDeclaration": 1127, + "src": "1151:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 840, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1151:15:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 841, + "nodeType": "ExpressionStatement", + "src": "1151:15:6" + }, + { + "assignments": [ + 843 + ], + "declarations": [ + { + "constant": false, + "id": 843, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 851, + "src": "1172:9:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 842, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1172:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 847, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 846, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 844, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 829, + "src": "1184:1:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 845, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 831, + "src": "1188:1:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1184:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1172:17:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 848, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 843, + "src": "1203:1:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 835, + "id": 849, + "nodeType": "Return", + "src": "1196:8:6" + } + ] + }, + "documentation": "@dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend).", + "id": 851, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "sub", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 832, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 829, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 851, + "src": "1091:9:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 828, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1091:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 831, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 851, + "src": "1102:9:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 830, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1102:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1090:22:6" + }, + "payable": false, + "returnParameters": { + "id": 835, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 834, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 851, + "src": "1136:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 833, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1136:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1135:9:6" + }, + "scope": 896, + "src": "1078:131:6", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 874, + "nodeType": "Block", + "src": "1339:64:6", + "statements": [ + { + "assignments": [ + 861 + ], + "declarations": [ + { + "constant": false, + "id": 861, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 875, + "src": "1345:9:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 860, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1345:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 865, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 864, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 862, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 853, + "src": "1357:1:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 863, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 855, + "src": "1361:1:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1357:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1345:17:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 869, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 867, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 861, + "src": "1376:1:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 868, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 853, + "src": "1381:1:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1376:6:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 866, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1127, + 1128 + ], + "referencedDeclaration": 1127, + "src": "1368:7:6", + "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": "1368:15:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 871, + "nodeType": "ExpressionStatement", + "src": "1368:15:6" + }, + { + "expression": { + "argumentTypes": null, + "id": 872, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 861, + "src": "1397:1:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 859, + "id": 873, + "nodeType": "Return", + "src": "1390:8:6" + } + ] + }, + "documentation": "@dev Adds two numbers, reverts on overflow.", + "id": 875, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "add", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 856, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 853, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 875, + "src": "1285:9:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 852, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1285:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 855, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 875, + "src": "1296:9:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 854, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1296:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1284:22:6" + }, + "payable": false, + "returnParameters": { + "id": 859, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 858, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 875, + "src": "1330:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 857, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1330:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1329:9:6" + }, + "scope": 896, + "src": "1272:131:6", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 894, + "nodeType": "Block", + "src": "1602:44:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 887, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 885, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 879, + "src": "1616:1:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 886, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1621:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1616:6:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 884, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1127, + 1128 + ], + "referencedDeclaration": 1127, + "src": "1608:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 888, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1608:15:6", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 889, + "nodeType": "ExpressionStatement", + "src": "1608:15:6" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 892, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 890, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 877, + "src": "1636:1:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "%", + "rightExpression": { + "argumentTypes": null, + "id": 891, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 879, + "src": "1640:1:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1636:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 883, + "id": 893, + "nodeType": "Return", + "src": "1629:12:6" + } + ] + }, + "documentation": "@dev Divides two numbers and returns the remainder (unsigned integer modulo),\nreverts when dividing by zero.", + "id": 895, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "mod", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 880, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 877, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 895, + "src": "1548:9:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 876, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1548:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 879, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 895, + "src": "1559:9:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 878, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1559:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1547:22:6" + }, + "payable": false, + "returnParameters": { + "id": 883, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 882, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 895, + "src": "1593:7:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 881, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1593:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1592:9:6" + }, + "scope": 896, + "src": "1535:111:6", + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 897, + "src": "117:1531:6" + } + ], + "src": "0:1649:6" + }, + "id": 6 + }, + "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": [ + 965 + ] + }, + "id": 966, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 898, + "literals": [ + "solidity", + "^", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:24:7" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "interface", + "documentation": "@title ERC20 interface\n@dev see https://github.com/ethereum/EIPs/issues/20", + "fullyImplemented": false, + "id": 965, + "linearizedBaseContracts": [ + 965 + ], + "name": "IERC20", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "id": 903, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "totalSupply", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 899, + "nodeType": "ParameterList", + "parameters": [], + "src": "156:2:7" + }, + "payable": false, + "returnParameters": { + "id": 902, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 901, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 903, + "src": "182:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 900, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "182:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "181:9:7" + }, + "scope": 965, + "src": "136:55:7", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 910, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "balanceOf", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 906, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 905, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 910, + "src": "214:11:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 904, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "214:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "213:13:7" + }, + "payable": false, + "returnParameters": { + "id": 909, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 908, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 910, + "src": "250:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 907, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "250:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "249:9:7" + }, + "scope": 965, + "src": "195:64:7", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 919, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "allowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 915, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 912, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 919, + "src": "282:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 911, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "282:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 914, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 919, + "src": "297:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 913, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "297:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "281:32:7" + }, + "payable": false, + "returnParameters": { + "id": 918, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 917, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 919, + "src": "341:7:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 916, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "341:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "340:9:7" + }, + "scope": 965, + "src": "263:87:7", + "stateMutability": "view", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 928, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 924, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 921, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 928, + "src": "372:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 920, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "372:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 923, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 928, + "src": "384:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 922, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "384:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "371:27:7" + }, + "payable": false, + "returnParameters": { + "id": 927, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 926, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 928, + "src": "417:4:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 925, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "417:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "416:6:7" + }, + "scope": 965, + "src": "354:69:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 937, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 933, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 930, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 937, + "src": "444:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 929, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "444:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 932, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 937, + "src": "461:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 931, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "461:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "443:32:7" + }, + "payable": false, + "returnParameters": { + "id": 936, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 935, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 937, + "src": "498:4:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 934, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "498:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "497:6:7" + }, + "scope": 965, + "src": "427:77:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "id": 948, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 944, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 939, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 948, + "src": "530:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 938, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "530:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 941, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 948, + "src": "544:10:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 940, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "544:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 943, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 948, + "src": "556:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 942, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "556:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "529:41:7" + }, + "payable": false, + "returnParameters": { + "id": 947, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 946, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 948, + "src": "593:4:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 945, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "593:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "592:6:7" + }, + "scope": 965, + "src": "508:91:7", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "external" + }, + { + "anonymous": false, + "documentation": null, + "id": 956, + "name": "Transfer", + "nodeType": "EventDefinition", + "parameters": { + "id": 955, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 950, + "indexed": true, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 956, + "src": "623:20:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 949, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "623:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 952, + "indexed": true, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 956, + "src": "649:18:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 951, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "649:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 954, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 956, + "src": "673:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 953, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "673:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "617:73:7" + }, + "src": "603:88:7" + }, + { + "anonymous": false, + "documentation": null, + "id": 964, + "name": "Approval", + "nodeType": "EventDefinition", + "parameters": { + "id": 963, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 958, + "indexed": true, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 964, + "src": "715:21:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 957, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "715:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 960, + "indexed": true, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 964, + "src": "742:23:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 959, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "742:7:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 962, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 964, + "src": "771:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 961, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "771:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "709:79:7" + }, + "src": "695:94:7" + } + ], + "scope": 966, + "src": "115:676:7" + } + ], + "src": "0:792:7" + }, + "id": 7 + }, + "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": [ + 1109 + ] + }, + "id": 1110, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 967, + "literals": [ + "solidity", + "^", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:24:8" + }, + { + "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": 968, + "nodeType": "ImportDirective", + "scope": 1110, + "sourceUnit": 966, + "src": "26:22:8", + "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": 969, + "nodeType": "ImportDirective", + "scope": 1110, + "sourceUnit": 897, + "src": "49:33:8", + "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": 1109, + "linearizedBaseContracts": [ + 1109 + ], + "name": "SafeERC20", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 972, + "libraryName": { + "contractScope": null, + "id": 970, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 896, + "src": "382:8:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$896", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "376:27:8", + "typeName": { + "id": 971, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "395:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "body": { + "id": 989, + "nodeType": "Block", + "src": "501:45:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 984, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 976, + "src": "530:2:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 985, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 978, + "src": "534:5:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 982, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 974, + "src": "515:5:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$965", + "typeString": "contract IERC20" + } + }, + "id": 983, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 928, + "src": "515:14:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 986, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "515:25:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 981, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1127, + 1128 + ], + "referencedDeclaration": 1127, + "src": "507:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 987, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "507:34:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 988, + "nodeType": "ExpressionStatement", + "src": "507:34:8" + } + ] + }, + "documentation": null, + "id": 990, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "safeTransfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 979, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 974, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 990, + "src": "434:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$965", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 973, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 965, + "src": "434:6:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$965", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 976, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 990, + "src": "452:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 975, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "452:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 978, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 990, + "src": "468:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 977, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "468:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "428:57:8" + }, + "payable": false, + "returnParameters": { + "id": 980, + "nodeType": "ParameterList", + "parameters": [], + "src": "501:0:8" + }, + "scope": 1109, + "src": "407:139:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1010, + "nodeType": "Block", + "src": "666:55:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1004, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 994, + "src": "699:4:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1005, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 996, + "src": "705:2:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1006, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 998, + "src": "709:5:8", + "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": 1002, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 992, + "src": "680:5:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$965", + "typeString": "contract IERC20" + } + }, + "id": 1003, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 948, + "src": "680:18:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,address,uint256) external returns (bool)" + } + }, + "id": 1007, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "680:35:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1001, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1127, + 1128 + ], + "referencedDeclaration": 1127, + "src": "672:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1008, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "672:44:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1009, + "nodeType": "ExpressionStatement", + "src": "672:44:8" + } + ] + }, + "documentation": null, + "id": 1011, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "safeTransferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 999, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 992, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 1011, + "src": "581:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$965", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 991, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 965, + "src": "581:6:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$965", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 994, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 1011, + "src": "599:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 993, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "599:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 996, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1011, + "src": "617:10:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 995, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "617:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 998, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1011, + "src": "633:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 997, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "633:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "575:75:8" + }, + "payable": false, + "returnParameters": { + "id": 1000, + "nodeType": "ParameterList", + "parameters": [], + "src": "666:0:8" + }, + "scope": 1109, + "src": "550:171:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1045, + "nodeType": "Block", + "src": "823:330:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1034, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1023, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1021, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1017, + "src": "1045:5:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1022, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1054:1:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1045:10:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 1024, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "1044:12:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1032, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1027, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1124, + "src": "1077:3:8", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1028, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1077:10:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1029, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1015, + "src": "1089:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1025, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1013, + "src": "1061:5:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$965", + "typeString": "contract IERC20" + } + }, + "id": 1026, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "allowance", + "nodeType": "MemberAccess", + "referencedDeclaration": 919, + "src": "1061:15:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", + "typeString": "function (address,address) view external returns (uint256)" + } + }, + "id": 1030, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1061:36:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1031, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1101:1:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1061:41:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 1033, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "1060:43:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1044:59:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1020, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1127, + 1128 + ], + "referencedDeclaration": 1127, + "src": "1036:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1035, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1036:68:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1036, + "nodeType": "ExpressionStatement", + "src": "1036:68:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1040, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1015, + "src": "1132:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1041, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1017, + "src": "1141:5:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1038, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1013, + "src": "1118:5:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$965", + "typeString": "contract IERC20" + } + }, + "id": 1039, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "approve", + "nodeType": "MemberAccess", + "referencedDeclaration": 937, + "src": "1118:13:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 1042, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1118:29:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1037, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1127, + 1128 + ], + "referencedDeclaration": 1127, + "src": "1110:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1043, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1110:38:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1044, + "nodeType": "ExpressionStatement", + "src": "1110:38:8" + } + ] + }, + "documentation": null, + "id": 1046, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "safeApprove", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1018, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1013, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 1046, + "src": "751:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$965", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 1012, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 965, + "src": "751:6:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$965", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1015, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1046, + "src": "769:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1014, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "769:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1017, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1046, + "src": "790:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1016, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "790:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "745:62:8" + }, + "payable": false, + "returnParameters": { + "id": 1019, + "nodeType": "ParameterList", + "parameters": [], + "src": "823:0:8" + }, + "scope": 1109, + "src": "725:428:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1076, + "nodeType": "Block", + "src": "1265:135:8", + "statements": [ + { + "assignments": [ + 1056 + ], + "declarations": [ + { + "constant": false, + "id": 1056, + "name": "newAllowance", + "nodeType": "VariableDeclaration", + "scope": 1077, + "src": "1271:20:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1055, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1271:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1067, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1065, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1052, + "src": "1338:5:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1060, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1145, + "src": "1318:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeERC20_$1109", + "typeString": "library SafeERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_SafeERC20_$1109", + "typeString": "library SafeERC20" + } + ], + "id": 1059, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1310:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1061, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1310:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1062, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1050, + "src": "1325:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1057, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1048, + "src": "1294:5:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$965", + "typeString": "contract IERC20" + } + }, + "id": 1058, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "allowance", + "nodeType": "MemberAccess", + "referencedDeclaration": 919, + "src": "1294:15:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", + "typeString": "function (address,address) view external returns (uint256)" + } + }, + "id": 1063, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1294:39:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1064, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 875, + "src": "1294:43:8", + "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": 1066, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1294:50:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1271:73:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1071, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1050, + "src": "1372:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1072, + "name": "newAllowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1056, + "src": "1381:12:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1069, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1048, + "src": "1358:5:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$965", + "typeString": "contract IERC20" + } + }, + "id": 1070, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "approve", + "nodeType": "MemberAccess", + "referencedDeclaration": 937, + "src": "1358:13:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 1073, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1358:36:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1068, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1127, + 1128 + ], + "referencedDeclaration": 1127, + "src": "1350:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1074, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1350:45:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1075, + "nodeType": "ExpressionStatement", + "src": "1350:45:8" + } + ] + }, + "documentation": null, + "id": 1077, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "safeIncreaseAllowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1053, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1048, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 1077, + "src": "1193:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$965", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 1047, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 965, + "src": "1193:6:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$965", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1050, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1077, + "src": "1211:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1049, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1211:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1052, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1077, + "src": "1232:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1051, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1232:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1187:62:8" + }, + "payable": false, + "returnParameters": { + "id": 1054, + "nodeType": "ParameterList", + "parameters": [], + "src": "1265:0:8" + }, + "scope": 1109, + "src": "1157:243:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1107, + "nodeType": "Block", + "src": "1512:135:8", + "statements": [ + { + "assignments": [ + 1087 + ], + "declarations": [ + { + "constant": false, + "id": 1087, + "name": "newAllowance", + "nodeType": "VariableDeclaration", + "scope": 1108, + "src": "1518:20:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1086, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1518:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1098, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1096, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1083, + "src": "1585:5:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1091, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1145, + "src": "1565:4:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeERC20_$1109", + "typeString": "library SafeERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_SafeERC20_$1109", + "typeString": "library SafeERC20" + } + ], + "id": 1090, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1557:7:8", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 1092, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1557:13:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1093, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1081, + "src": "1572:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1088, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1079, + "src": "1541:5:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$965", + "typeString": "contract IERC20" + } + }, + "id": 1089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "allowance", + "nodeType": "MemberAccess", + "referencedDeclaration": 919, + "src": "1541:15:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", + "typeString": "function (address,address) view external returns (uint256)" + } + }, + "id": 1094, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1541:39:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1095, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 851, + "src": "1541:43:8", + "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": 1097, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1541:50:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1518:73:8" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1102, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1081, + "src": "1619:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1103, + "name": "newAllowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1087, + "src": "1628:12:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1100, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1079, + "src": "1605:5:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$965", + "typeString": "contract IERC20" + } + }, + "id": 1101, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "approve", + "nodeType": "MemberAccess", + "referencedDeclaration": 937, + "src": "1605:13:8", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 1104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1605:36:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1099, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1127, + 1128 + ], + "referencedDeclaration": 1127, + "src": "1597:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1105, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1597:45:8", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1106, + "nodeType": "ExpressionStatement", + "src": "1597:45:8" + } + ] + }, + "documentation": null, + "id": 1108, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "safeDecreaseAllowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1084, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1079, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 1108, + "src": "1440:12:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$965", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 1078, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 965, + "src": "1440:6:8", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$965", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1081, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1108, + "src": "1458:15:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1080, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1458:7:8", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1083, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1108, + "src": "1479:13:8", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1082, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1479:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1434:62:8" + }, + "payable": false, + "returnParameters": { + "id": 1085, + "nodeType": "ParameterList", + "parameters": [], + "src": "1512:0:8" + }, + "scope": 1109, + "src": "1404:243:8", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 1110, + "src": "353:1296:8" + } + ], + "src": "0:1650:8" + }, + "id": 8 + } + } +} \ 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..e8b771402 --- /dev/null +++ b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/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":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":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":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":"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"},{"constant":false,"inputs":[],"name":"renounceSystem","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-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..14cb72e69 --- /dev/null +++ b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/bin/AlgoMiner.bin @@ -0,0 +1 @@ +60806040523480156200001157600080fd5b5060405160808062000fb883398101604090815281516020830151918301516060909301519092906200004d33640100000000620000de810204565b6200006133640100000000620000fc810204565b620000753364010000000062000117810204565b6003805461ffff191661ffff959095169490941762ff000019166201000060ff949094169390930292909217630100000060b860020a0319166301000000600160a060020a03928316021790925560048054600160a060020a03191691909216179055620001c5565b620000f960008264010000000062000d1d6200013282021704565b50565b620000f960018264010000000062000d1d6200013282021704565b620000f960028264010000000062000d1d6200013282021704565b600160a060020a03811615156200014857600080fd5b6200015d82826401000000006200018d810204565b156200016857600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b6000600160a060020a0382161515620001a557600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b610de380620001d56000396000f3006080604052600436106101275763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663162f986d811461012c5780631777fb4b1461014357806321b79d981461016c578063231d4e2a1461018157806329d10b6e146101a25780632e6b6849146101c357806334cdcf26146101e4578063363aa6c714610205578063427534a41461021a578063608d3d3d1461022f57806374be75921461025057806380258e471461027157806381a244591461029c57806399f4b251146102bd5780639e614ca0146102d2578063ada436e9146102e7578063b2a32cd514610308578063be9524941461031d578063c6846ef814610332578063d43acc7914610359578063da4086791461036e578063e9d6185914610383575b600080fd5b34801561013857600080fd5b50610141610398565b005b34801561014f57600080fd5b506101586103fe565b604080519115158252519081900360200190f35b34801561017857600080fd5b50610141610403565b34801561018d57600080fd5b50610141600160a060020a03600435166104a7565b3480156101ae57600080fd5b50610141600160a060020a0360043516610593565b3480156101cf57600080fd5b50610141600160a060020a03600435166105b0565b3480156101f057600080fd5b50610158600160a060020a03600435166105cd565b34801561021157600080fd5b506101416105e5565b34801561022657600080fd5b5061014161068e565b34801561023b57600080fd5b50610158600160a060020a03600435166106f1565b34801561025c57600080fd5b50610141600160a060020a0360043516610704565b34801561027d57600080fd5b50610286610721565b6040805160ff9092168252519081900360200190f35b3480156102a857600080fd5b50610158600160a060020a0360043516610730565b3480156102c957600080fd5b50610141610743565b3480156102de57600080fd5b50610141610915565b3480156102f357600080fd5b50610141600160a060020a036004351661096f565b34801561031457600080fd5b50610141610a05565b34801561032957600080fd5b50610141610b18565b34801561033e57600080fd5b50610347610b23565b60408051918252519081900360200190f35b34801561036557600080fd5b50610141610b29565b34801561037a57600080fd5b50610141610b32565b34801561038f57600080fd5b50610141610bbf565b6103a133610730565b15156103ac57600080fd5b600160045460a060020a900460ff1660038111156103c657fe5b146103d057600080fd5b600480546002919074ff0000000000000000000000000000000000000000191660a060020a835b0217905550565b600190565b60035463010000009004600160a060020a0316331461042157600080fd5b600160045460a060020a900460ff16600381111561043b57fe5b1461044557600080fd5b6004547501000000000000000000000000000000000000000000900460ff161561046e57600080fd5b6004805475ff00000000000000000000000000000000000000000019167501000000000000000000000000000000000000000000179055565b6104b0336106f1565b15156104bb57600080fd5b600060045460a060020a900460ff1660038111156104d557fe5b146104df57600080fd5b60048054604080517f70a08231000000000000000000000000000000000000000000000000000000008152309381019390935251610590928492600160a060020a0316916370a08231916024808201926020929091908290030181600087803b15801561054b57600080fd5b505af115801561055f573d6000803e3d6000fd5b505050506040513d602081101561057557600080fd5b5051600454600160a060020a0316919063ffffffff610bc816565b50565b61059c33610730565b15156105a757600080fd5b61059081610c80565b6105b9336106f1565b15156105c457600080fd5b61059081610c91565b60006105df818363ffffffff610ca216565b92915050565b6105ee33610730565b15156105f957600080fd5b600360045460a060020a900460ff16600381111561061357fe5b141561061e57600080fd5b6004805474ff00000000000000000000000000000000000000001916740300000000000000000000000000000000000000001775ff000000000000000000000000000000000000000000191690556003805476ffffffffffffffffffffffffffffffffffffffff00000019169055565b61069733610730565b15156106a257600080fd5b600260045460a060020a900460ff1660038111156106bc57fe5b146106c657600080fd5b600480546001919074ff0000000000000000000000000000000000000000191660a060020a836103f7565b60006105df60018363ffffffff610ca216565b61070d336105cd565b151561071857600080fd5b61059081610cd9565b60035462010000900460ff1690565b60006105df60028363ffffffff610ca216565b600061074e336105cd565b151561075957600080fd5b600160045460a060020a900460ff16600381111561077357fe5b1461077d57600080fd5b6004547501000000000000000000000000000000000000000000900460ff1615156107a757600080fd5b60045460b860020a900461ffff16151561081d576004805478ffff00000000000000000000000000000000000000000000001976ff0000000000000000000000000000000000000000000019909116760100000000000000000000000000000000000000000000171660b860020a1790556108e5565b60048054600161ffff60b860020a8084048216929092018116820278ffff00000000000000000000000000000000000000000000001990931692909217928390559091041661016e14156108e5576004805478ffff000000000000000000000000000000000000000000000019600160ff760100000000000000000000000000000000000000000000808504821692909201160276ff0000000000000000000000000000000000000000000019909216919091171660b860020a179055600554600290046005555b5060055460035460045461016d9092049161059091600160a060020a039182169163010000009091041683610bc8565b61091e336106f1565b151561092957600080fd5b600060045460a060020a900460ff16600381111561094357fe5b141561094e57600080fd5b6004805475ffff000000000000000000000000000000000000000019169055565b61097833610730565b151561098357600080fd5b600360045460a060020a900460ff16600381111561099d57fe5b146109a757600080fd5b6004805474ff0000000000000000000000000000000000000000191660a060020a17905560038054600160a060020a039290921663010000000276ffffffffffffffffffffffffffffffffffffffff00000019909216919091179055565b6000610a10336106f1565b1515610a1b57600080fd5b600060045460a060020a900460ff166003811115610a3557fe5b14610a3f57600080fd5b6005541515610af15760048054604080517f70a08231000000000000000000000000000000000000000000000000000000008152309381019390935251600160a060020a03909116916370a082319160248083019260209291908290030181600087803b158015610aaf57600080fd5b505af1158015610ac3573d6000803e3d6000fd5b505050506040513d6020811015610ad957600080fd5b50519050801515610ae957600080fd5b600281046005555b506004805474ff0000000000000000000000000000000000000000191660a060020a179055565b610b2133610cea565b565b61016d81565b610b2133610cfb565b60035463010000009004600160a060020a03163314610b5057600080fd5b600160045460a060020a900460ff166003811115610b6a57fe5b14610b7457600080fd5b6004547501000000000000000000000000000000000000000000900460ff161515610b9e57600080fd5b6004805475ff00000000000000000000000000000000000000000019169055565b610b2133610d0c565b82600160a060020a031663a9059cbb83836040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b158015610c4457600080fd5b505af1158015610c58573d6000803e3d6000fd5b505050506040513d6020811015610c6e57600080fd5b50511515610c7b57600080fd5b505050565b61059060028263ffffffff610d1d16565b61059060018263ffffffff610d1d16565b6000600160a060020a0382161515610cb957600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b61059060008263ffffffff610d1d16565b61059060028263ffffffff610d6b16565b61059060018263ffffffff610d6b16565b61059060008263ffffffff610d6b16565b600160a060020a0381161515610d3257600080fd5b610d3c8282610ca2565b15610d4657600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b600160a060020a0381161515610d8057600080fd5b610d8a8282610ca2565b1515610d9557600080fd5b600160a060020a0316600090815260209190915260409020805460ff191690555600a165627a7a72305820346733bed0f72b16c5bb967042b5930d38e536cc6adf26f0a2b6cc22aaa8069d0029 \ 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..d56d737c5 --- /dev/null +++ b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/bin/AlgoMiner.json @@ -0,0 +1,351 @@ +{ + "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": 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": 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": 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": "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" + }, + { + "constant": false, + "inputs": [], + "name": "renounceSystem", + "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": "60806040523480156200001157600080fd5b5060405160808062000fb883398101604090815281516020830151918301516060909301519092906200004d33640100000000620000de810204565b6200006133640100000000620000fc810204565b620000753364010000000062000117810204565b6003805461ffff191661ffff959095169490941762ff000019166201000060ff949094169390930292909217630100000060b860020a0319166301000000600160a060020a03928316021790925560048054600160a060020a03191691909216179055620001c5565b620000f960008264010000000062000d1d6200013282021704565b50565b620000f960018264010000000062000d1d6200013282021704565b620000f960028264010000000062000d1d6200013282021704565b600160a060020a03811615156200014857600080fd5b6200015d82826401000000006200018d810204565b156200016857600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b6000600160a060020a0382161515620001a557600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b610de380620001d56000396000f3006080604052600436106101275763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663162f986d811461012c5780631777fb4b1461014357806321b79d981461016c578063231d4e2a1461018157806329d10b6e146101a25780632e6b6849146101c357806334cdcf26146101e4578063363aa6c714610205578063427534a41461021a578063608d3d3d1461022f57806374be75921461025057806380258e471461027157806381a244591461029c57806399f4b251146102bd5780639e614ca0146102d2578063ada436e9146102e7578063b2a32cd514610308578063be9524941461031d578063c6846ef814610332578063d43acc7914610359578063da4086791461036e578063e9d6185914610383575b600080fd5b34801561013857600080fd5b50610141610398565b005b34801561014f57600080fd5b506101586103fe565b604080519115158252519081900360200190f35b34801561017857600080fd5b50610141610403565b34801561018d57600080fd5b50610141600160a060020a03600435166104a7565b3480156101ae57600080fd5b50610141600160a060020a0360043516610593565b3480156101cf57600080fd5b50610141600160a060020a03600435166105b0565b3480156101f057600080fd5b50610158600160a060020a03600435166105cd565b34801561021157600080fd5b506101416105e5565b34801561022657600080fd5b5061014161068e565b34801561023b57600080fd5b50610158600160a060020a03600435166106f1565b34801561025c57600080fd5b50610141600160a060020a0360043516610704565b34801561027d57600080fd5b50610286610721565b6040805160ff9092168252519081900360200190f35b3480156102a857600080fd5b50610158600160a060020a0360043516610730565b3480156102c957600080fd5b50610141610743565b3480156102de57600080fd5b50610141610915565b3480156102f357600080fd5b50610141600160a060020a036004351661096f565b34801561031457600080fd5b50610141610a05565b34801561032957600080fd5b50610141610b18565b34801561033e57600080fd5b50610347610b23565b60408051918252519081900360200190f35b34801561036557600080fd5b50610141610b29565b34801561037a57600080fd5b50610141610b32565b34801561038f57600080fd5b50610141610bbf565b6103a133610730565b15156103ac57600080fd5b600160045460a060020a900460ff1660038111156103c657fe5b146103d057600080fd5b600480546002919074ff0000000000000000000000000000000000000000191660a060020a835b0217905550565b600190565b60035463010000009004600160a060020a0316331461042157600080fd5b600160045460a060020a900460ff16600381111561043b57fe5b1461044557600080fd5b6004547501000000000000000000000000000000000000000000900460ff161561046e57600080fd5b6004805475ff00000000000000000000000000000000000000000019167501000000000000000000000000000000000000000000179055565b6104b0336106f1565b15156104bb57600080fd5b600060045460a060020a900460ff1660038111156104d557fe5b146104df57600080fd5b60048054604080517f70a08231000000000000000000000000000000000000000000000000000000008152309381019390935251610590928492600160a060020a0316916370a08231916024808201926020929091908290030181600087803b15801561054b57600080fd5b505af115801561055f573d6000803e3d6000fd5b505050506040513d602081101561057557600080fd5b5051600454600160a060020a0316919063ffffffff610bc816565b50565b61059c33610730565b15156105a757600080fd5b61059081610c80565b6105b9336106f1565b15156105c457600080fd5b61059081610c91565b60006105df818363ffffffff610ca216565b92915050565b6105ee33610730565b15156105f957600080fd5b600360045460a060020a900460ff16600381111561061357fe5b141561061e57600080fd5b6004805474ff00000000000000000000000000000000000000001916740300000000000000000000000000000000000000001775ff000000000000000000000000000000000000000000191690556003805476ffffffffffffffffffffffffffffffffffffffff00000019169055565b61069733610730565b15156106a257600080fd5b600260045460a060020a900460ff1660038111156106bc57fe5b146106c657600080fd5b600480546001919074ff0000000000000000000000000000000000000000191660a060020a836103f7565b60006105df60018363ffffffff610ca216565b61070d336105cd565b151561071857600080fd5b61059081610cd9565b60035462010000900460ff1690565b60006105df60028363ffffffff610ca216565b600061074e336105cd565b151561075957600080fd5b600160045460a060020a900460ff16600381111561077357fe5b1461077d57600080fd5b6004547501000000000000000000000000000000000000000000900460ff1615156107a757600080fd5b60045460b860020a900461ffff16151561081d576004805478ffff00000000000000000000000000000000000000000000001976ff0000000000000000000000000000000000000000000019909116760100000000000000000000000000000000000000000000171660b860020a1790556108e5565b60048054600161ffff60b860020a8084048216929092018116820278ffff00000000000000000000000000000000000000000000001990931692909217928390559091041661016e14156108e5576004805478ffff000000000000000000000000000000000000000000000019600160ff760100000000000000000000000000000000000000000000808504821692909201160276ff0000000000000000000000000000000000000000000019909216919091171660b860020a179055600554600290046005555b5060055460035460045461016d9092049161059091600160a060020a039182169163010000009091041683610bc8565b61091e336106f1565b151561092957600080fd5b600060045460a060020a900460ff16600381111561094357fe5b141561094e57600080fd5b6004805475ffff000000000000000000000000000000000000000019169055565b61097833610730565b151561098357600080fd5b600360045460a060020a900460ff16600381111561099d57fe5b146109a757600080fd5b6004805474ff0000000000000000000000000000000000000000191660a060020a17905560038054600160a060020a039290921663010000000276ffffffffffffffffffffffffffffffffffffffff00000019909216919091179055565b6000610a10336106f1565b1515610a1b57600080fd5b600060045460a060020a900460ff166003811115610a3557fe5b14610a3f57600080fd5b6005541515610af15760048054604080517f70a08231000000000000000000000000000000000000000000000000000000008152309381019390935251600160a060020a03909116916370a082319160248083019260209291908290030181600087803b158015610aaf57600080fd5b505af1158015610ac3573d6000803e3d6000fd5b505050506040513d6020811015610ad957600080fd5b50519050801515610ae957600080fd5b600281046005555b506004805474ff0000000000000000000000000000000000000000191660a060020a179055565b610b2133610cea565b565b61016d81565b610b2133610cfb565b60035463010000009004600160a060020a03163314610b5057600080fd5b600160045460a060020a900460ff166003811115610b6a57fe5b14610b7457600080fd5b6004547501000000000000000000000000000000000000000000900460ff161515610b9e57600080fd5b6004805475ff00000000000000000000000000000000000000000019169055565b610b2133610d0c565b82600160a060020a031663a9059cbb83836040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b158015610c4457600080fd5b505af1158015610c58573d6000803e3d6000fd5b505050506040513d6020811015610c6e57600080fd5b50511515610c7b57600080fd5b505050565b61059060028263ffffffff610d1d16565b61059060018263ffffffff610d1d16565b6000600160a060020a0382161515610cb957600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b61059060008263ffffffff610d1d16565b61059060028263ffffffff610d6b16565b61059060018263ffffffff610d6b16565b61059060008263ffffffff610d6b16565b600160a060020a0381161515610d3257600080fd5b610d3c8282610ca2565b15610d4657600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b600160a060020a0381161515610d8057600080fd5b610d8a8282610ca2565b1515610d9557600080fd5b600160a060020a0316600090815260209190915260409020805460ff191690555600a165627a7a72305820346733bed0f72b16c5bb967042b5930d38e536cc6adf26f0a2b6cc22aaa8069d0029", + "functionHashes": { + "DAYS_PER_YEAR()": "c6846ef8", + "activateMiner()": "b2a32cd5", + "addCoreTeam(address)": "2e6b6849", + "addSupervisor(address)": "29d10b6e", + "addSystem(address)": "74be7592", + "deactivateMiner()": "9e614ca0", + "getCategory()": "80258e47", + "isAlgoMiner()": "1777fb4b", + "isCoreTeam(address)": "608d3d3d", + "isSupervisor(address)": "81a24459", + "isSystem(address)": "34cdcf26", + "migrateMiner(address)": "231d4e2a", + "mine()": "99f4b251", + "pauseMining()": "162f986d", + "renounceCoreTeam()": "d43acc79", + "renounceSupervisor()": "be952494", + "renounceSystem()": "e9d61859", + "resetMiner(address)": "ada436e9", + "resumeMining()": "427534a4", + "startMining()": "21b79d98", + "stopAndRemoveOwnership()": "363aa6c7", + "stopMining()": "da408679" + }, + "gasEstimates": { + "creation": { + "codeDepositCost": "711000", + "executionCost": "infinite", + "totalCost": "infinite" + }, + "external": { + "DAYS_PER_YEAR()": "580", + "activateMiner()": "infinite", + "addCoreTeam(address)": "infinite", + "addSupervisor(address)": "infinite", + "addSystem(address)": "infinite", + "deactivateMiner()": "infinite", + "getCategory()": "652", + "isAlgoMiner()": "212", + "isCoreTeam(address)": "infinite", + "isSupervisor(address)": "infinite", + "isSystem(address)": "infinite", + "migrateMiner(address)": "infinite", + "mine()": "infinite", + "pauseMining()": "infinite", + "renounceCoreTeam()": "infinite", + "renounceSupervisor()": "infinite", + "renounceSystem()": "infinite", + "resetMiner(address)": "infinite", + "resumeMining()": "infinite", + "startMining()": "21272", + "stopAndRemoveOwnership()": "infinite", + "stopMining()": "21665" + } + } +} \ 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..15b41cc7a --- /dev/null +++ b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/bin/AlgoPool-sol-output.json @@ -0,0 +1,10176 @@ +{ + "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/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": "608060405234801561001057600080fd5b5060405160408061076083398101604052805160209091015161003b33640100000000610077810204565b60018054600160a060020a0390921662010000026201000060b060020a031961ffff90941661ffff199093169290921792909216179055610120565b61008f60008264010000000061056b61009282021704565b50565b600160a060020a03811615156100a757600080fd5b6100ba82826401000000006100e9810204565b156100c457600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b6000600160a060020a038216151561010057600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b6106318061012f6000396000f3006080604052600436106100955763ffffffff60e060020a6000350416632296f4c7811461009a57806325109e8b146100bd5780632e6b6849146100e4578063455acbcd14610105578063492fba841461011a57806349dc9ed01461012f578063608d3d3d146101445780639fc3c98314610179578063a89febb21461018e578063aed6183f146101a3578063d43acc79146101b8575b600080fd5b3480156100a657600080fd5b506100bb600160a060020a03600435166101cd565b005b3480156100c957600080fd5b506100d26103cc565b60408051918252519081900360200190f35b3480156100f057600080fd5b506100bb600160a060020a03600435166103d8565b34801561011157600080fd5b506100d26103f8565b34801561012657600080fd5b506100d2610407565b34801561013b57600080fd5b506100d2610415565b34801561015057600080fd5b50610165600160a060020a0360043516610424565b604080519115158252519081900360200190f35b34801561018557600080fd5b506100d261043c565b34801561019a57600080fd5b506100d261044a565b3480156101af57600080fd5b506100d2610459565b3480156101c457600080fd5b506100bb610468565b60008060006101db33610424565b15156101e657600080fd5b83925082600160a060020a0316631777fb4b6040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561022757600080fd5b505af115801561023b573d6000803e3d6000fd5b505050506040513d602081101561025157600080fd5b5051151561025e57600080fd5b82600160a060020a03166380258e476040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561029c57600080fd5b505af11580156102b0573d6000803e3d6000fd5b505050506040513d60208110156102c657600080fd5b50519150600060ff8316108015906102e2575060058260ff1611155b15156102ed57600080fd5b50600060ff8216151561030b575069152d02c7e14af680000061039c565b8160ff1660011415610328575069d3c21bcecceda100000061039c565b8160ff166002141561034657506a01a784379d99db4200000061039c565b8160ff166003141561036457506a027b46536c66c8e300000061039c565b8160ff166004141561038257506a034f086f3b33b68400000061039c565b8160ff166005141561039c57506a0422ca8b0a00a4250000005b600081116103a957600080fd5b6001546103c690620100009004600160a060020a03168583610473565b50505050565b670de0b6b3a764000081565b6103e133610424565b15156103ec57600080fd5b6103f581610512565b50565b6a034f086f3b33b68400000081565b69d3c21bcecceda100000081565b6a027b46536c66c8e300000081565b6000610436818363ffffffff61052316565b92915050565b69152d02c7e14af680000081565b6a0422ca8b0a00a42500000081565b6a01a784379d99db4200000081565b6104713361055a565b565b82600160a060020a031663a9059cbb83836040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b1580156104d657600080fd5b505af11580156104ea573d6000803e3d6000fd5b505050506040513d602081101561050057600080fd5b5051151561050d57600080fd5b505050565b6103f560008263ffffffff61056b16565b6000600160a060020a038216151561053a57600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b6103f560008263ffffffff6105b916565b600160a060020a038116151561058057600080fd5b61058a8282610523565b1561059457600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b600160a060020a03811615156105ce57600080fd5b6105d88282610523565b15156105e357600080fd5b600160a060020a0316600090815260209190915260409020805460ff191690555600a165627a7a72305820fcd1665b524606952d86f870d91a6ad5ceaed631661ee3cc8731e992b464993a0029", + "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 0xfc 0xd1 PUSH7 0x5B524606952D86 0xf8 PUSH17 0xD91A6AD5CEAED631661EE3CC8731E992B4 PUSH5 0x993A002900 ", + "sourceMap": "490:1691:1:-;;;1113:174;8:9:-1;5:2;;;30:1;27;20:12;5:2;1113:174:1;;;;;;;;;;;;;;;;;;;368:24:0;381:10;368:12;;;;:24;:::i;:::-;1219:9:1;:20;;-1:-1:-1;;;;;1250:29:1;;;;;-1:-1:-1;;;;;;1219:20:1;;;;-1:-1:-1;;1219:20:1;;;;;;;1250:29;;;;;;;490:1691;;824:96:0;883:29;:16;904:7;883:20;;;;;;:29;:::i;:::-;824: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;490: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/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/AlgoCoreTeamRole.sol\":{\"keccak256\":\"0xe6fc9b275c7a4c4f00337d2a388cc97a64ad82e5a23c24c59a4593e85a05b08a\",\"urls\":[\"bzzr://40c7674b2a3543a2b2606c70df215a876bd1a064d249e658d2bbd6fe25969c2e\"]},\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoPool.sol\":{\"keccak256\":\"0xaa20972ee94e17902a4362885750505af52aeaa2e0cae1bf259b4ba3c3923d32\",\"urls\":[\"bzzr://cb35cac4a863c851295ac8608f3076d82cb1661797bed96740ef01d558ccfb61\"]},\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/IAlgoMiner.sol\":{\"keccak256\":\"0xb457e39e512b5475c3e70193ab0a751f6626a50417954247f0cf47c7ca15eff7\",\"urls\":[\"bzzr://3b585a4055121fee393f2b691538036c87f56556f43f0b6e851a88de7b8275e6\"]},\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol\":{\"keccak256\":\"0xa6e47d62e68903c8fff23500d80e7cc8085b9127995803478d9982cd8a6d49e4\",\"urls\":[\"bzzr://7c87eb3c145fe7592c97baa287501faff7e81c1965333c9b042ffb6b387e94a1\"]},\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0xdd18f05c74536a06166c90a17ec3c6932853764f292bed314ceb23e730ff83af\",\"urls\":[\"bzzr://1d8a608339978ac18782f7051816cf23b4072d8814979e3ef74788cc6025cca0\"]},\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xc8a7f15fa44eb10057f8bcb58418d3aed6f5267d211d18f93f3d4e0293e3da44\",\"urls\":[\"bzzr://8825e2508348b01a091ff47b8525e583b6e5604f6679684f805d67a9a6a2a7e9\"]},\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol\":{\"keccak256\":\"0x0a172a0ef8681d4a7d8034d003670a9b1968d914b0bfa64e13ddca289a85d24a\",\"urls\":[\"bzzr://733b6203c967b44d6de90b5c6b144e58a380a3f29befb2dc70e765dae2f1ca18\"]}},\"version\":1}", + "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": "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/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/access/Roles.sol": { + "Roles": { + "abi": [], + "devdoc": { + "methods": {}, + "title": "Roles" + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a72305820ba9d82b11504517181f938ed511f09c0a22046ef39e2e32460a2175b508e16a80029", + "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 0xba SWAP14 DUP3 0xb1 ISZERO DIV MLOAD PUSH18 0x81F938ED511F09C0A22046EF39E2E32460A2 OR JUMPDEST POP DUP15 AND 0xa8 STOP 0x29 ", + "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/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\":\"0xa6e47d62e68903c8fff23500d80e7cc8085b9127995803478d9982cd8a6d49e4\",\"urls\":[\"bzzr://7c87eb3c145fe7592c97baa287501faff7e81c1965333c9b042ffb6b387e94a1\"]}},\"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": { + "methods": {}, + "title": "SafeMath" + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a72305820da2bd0dd3588878574232c2d13f92e16f4b0e8ad94ede9adb0d087f862d4f8cf0029", + "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 0xda 0x2b 0xd0 0xdd CALLDATALOAD DUP9 DUP8 DUP6 PUSH21 0x232C2D13F92E16F4B0E8AD94EDE9ADB0D087F862D4 0xf8 0xcf STOP 0x29 ", + "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/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\":\"0xdd18f05c74536a06166c90a17ec3c6932853764f292bed314ceb23e730ff83af\",\"urls\":[\"bzzr://1d8a608339978ac18782f7051816cf23b4072d8814979e3ef74788cc6025cca0\"]}},\"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": { + "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": { + "methods": {}, + "title": "SafeERC20" + }, + "evm": { + "bytecode": { + "linkReferences": {}, + "object": "604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a72305820c0f55d8db2bd761049fa5ba6b6c207a4d595b758946aba3715580373517606710029", + "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 0xc0 0xf5 0x5d DUP14 0xb2 0xbd PUSH23 0x1049FA5BA6B6C207A4D595B758946ABA37155803735176 MOD PUSH18 0x2900000000000000000000000000000000 ", + "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/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\":\"0xdd18f05c74536a06166c90a17ec3c6932853764f292bed314ceb23e730ff83af\",\"urls\":[\"bzzr://1d8a608339978ac18782f7051816cf23b4072d8814979e3ef74788cc6025cca0\"]},\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xc8a7f15fa44eb10057f8bcb58418d3aed6f5267d211d18f93f3d4e0293e3da44\",\"urls\":[\"bzzr://8825e2508348b01a091ff47b8525e583b6e5604f6679684f805d67a9a6a2a7e9\"]},\"d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/node_modules/openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol\":{\"keccak256\":\"0x0a172a0ef8681d4a7d8034d003670a9b1968d914b0bfa64e13ddca289a85d24a\",\"urls\":[\"bzzr://733b6203c967b44d6de90b5c6b144e58a380a3f29befb2dc70e765dae2f1ca18\"]}},\"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.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:24: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": 382, + "src": "28: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": 381, + "src": "260:5:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Roles_$381", + "typeString": "library Roles" + } + }, + "nodeType": "UsingForDirective", + "src": "254:27:0", + "typeName": { + "contractScope": null, + "id": 4, + "name": "Roles.Role", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 294, + "src": "270: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": "289: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": "289:10:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Role_$294_storage_ptr", + "typeString": "struct Roles.Role" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 15, + "nodeType": "Block", + "src": "357:43:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 11, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 737, + "src": "381: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": "381: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": "368: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": "368:24:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 14, + "nodeType": "ExpressionStatement", + "src": "368:24:0" + } + ] + }, + "documentation": null, + "id": 16, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 8, + "nodeType": "ParameterList", + "parameters": [], + "src": "345:2:0" + }, + "payable": false, + "returnParameters": { + "id": 9, + "nodeType": "ParameterList", + "parameters": [], + "src": "357:0:0" + }, + "scope": 86, + "src": "333:67:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 26, + "nodeType": "Block", + "src": "432: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": "462: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": "462: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": "451: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": "451: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": "443: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": "443:31:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 24, + "nodeType": "ExpressionStatement", + "src": "443:31:0" + }, + { + "id": 25, + "nodeType": "PlaceholderStatement", + "src": "485:1:0" + } + ] + }, + "documentation": null, + "id": 27, + "name": "onlyCoreTeam", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 17, + "nodeType": "ParameterList", + "parameters": [], + "src": "429:2:0" + }, + "src": "408:86:0", + "visibility": "internal" + }, + { + "body": { + "id": 39, + "nodeType": "Block", + "src": "566:55:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 36, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 29, + "src": "605: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": "584: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": "584: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": "584:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 33, + "id": 38, + "nodeType": "Return", + "src": "577: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": "522:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 28, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "522:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "521:17:0" + }, + "payable": false, + "returnParameters": { + "id": 33, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 32, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 40, + "src": "560:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 31, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "560:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "559:6:0" + }, + "scope": 86, + "src": "502:119:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 51, + "nodeType": "Block", + "src": "687:40:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 48, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 42, + "src": "711: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": "698: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": "698:21:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 50, + "nodeType": "ExpressionStatement", + "src": "698: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": "674:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "674:12:0" + } + ], + "name": "addCoreTeam", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 43, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 42, + "name": "account", + "nodeType": "VariableDeclaration", + "scope": 52, + "src": "650:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 41, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "650:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "649:17:0" + }, + "payable": false, + "returnParameters": { + "id": 46, + "nodeType": "ParameterList", + "parameters": [], + "src": "687:0:0" + }, + "scope": 86, + "src": "629:98:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 60, + "nodeType": "Block", + "src": "770:46:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 56, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 737, + "src": "797: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": "797: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": "781: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": "781:27:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 59, + "nodeType": "ExpressionStatement", + "src": "781:27:0" + } + ] + }, + "documentation": null, + "id": 61, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "renounceCoreTeam", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 53, + "nodeType": "ParameterList", + "parameters": [], + "src": "760:2:0" + }, + "payable": false, + "returnParameters": { + "id": 54, + "nodeType": "ParameterList", + "parameters": [], + "src": "770:0:0" + }, + "scope": 86, + "src": "735:81:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 72, + "nodeType": "Block", + "src": "872:48:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 69, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 63, + "src": "904: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": "883: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": "883: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": "883:29:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 71, + "nodeType": "ExpressionStatement", + "src": "883: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": "846:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 62, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "846:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "845:17:0" + }, + "payable": false, + "returnParameters": { + "id": 65, + "nodeType": "ParameterList", + "parameters": [], + "src": "872:0:0" + }, + "scope": 86, + "src": "824:96:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 84, + "nodeType": "Block", + "src": "979:51:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 81, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 75, + "src": "1014: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": "990: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": "990: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": "990:32:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 83, + "nodeType": "ExpressionStatement", + "src": "990: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": "953:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 74, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "953:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "952:17:0" + }, + "payable": false, + "returnParameters": { + "id": 77, + "nodeType": "ParameterList", + "parameters": [], + "src": "979:0:0" + }, + "scope": 86, + "src": "928:102:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 87, + "src": "221:812:0" + } + ], + "src": "0:1035:0" + }, + "id": 0 + }, + "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": [ + 274 + ] + }, + "id": 275, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 88, + "literals": [ + "solidity", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:23: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": 275, + "sourceUnit": 579, + "src": "27: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": 275, + "sourceUnit": 723, + "src": "224: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": 275, + "sourceUnit": 288, + "src": "426:26:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "d:/GitHub/ALGOToken/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/AlgoCoreTeamRole.sol", + "file": "./AlgoCoreTeamRole.sol", + "id": 92, + "nodeType": "ImportDirective", + "scope": 275, + "sourceUnit": 87, + "src": "454:32:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 93, + "name": "AlgoCoreTeamRole", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 86, + "src": "511:16:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_AlgoCoreTeamRole_$86", + "typeString": "contract AlgoCoreTeamRole" + } + }, + "id": 94, + "nodeType": "InheritanceSpecifier", + "src": "511: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": "541:9:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeERC20_$722", + "typeString": "library SafeERC20" + } + }, + "nodeType": "UsingForDirective", + "src": "535:27:1", + "typeName": { + "contractScope": null, + "id": 96, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 578, + "src": "555:6:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$578", + "typeString": "contract IERC20" + } + } + }, + { + "constant": true, + "id": 104, + "name": "TOKEN_FACTOR", + "nodeType": "VariableDeclaration", + "scope": 274, + "src": "570:56:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 98, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "570: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": "609: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": "623: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": "615: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": "615:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "609:17:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "public" + }, + { + "constant": true, + "id": 109, + "name": "CAT_0_VALUE", + "nodeType": "VariableDeclaration", + "scope": 274, + "src": "633:59:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 105, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "633: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": "671: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": "680:12:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "671:21:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "public" + }, + { + "constant": true, + "id": 114, + "name": "CAT_1_VALUE", + "nodeType": "VariableDeclaration", + "scope": 274, + "src": "699:60:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 110, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "699: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": "737: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": "747:12:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "737:22:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "public" + }, + { + "constant": true, + "id": 121, + "name": "CAT_2_VALUE", + "nodeType": "VariableDeclaration", + "scope": 274, + "src": "766:64:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 115, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "766: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": "804: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": "808:7:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000_by_1", + "typeString": "int_const 1000000" + }, + "value": "1000000" + }, + "src": "804: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": "818:12:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "804:26:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "public" + }, + { + "constant": true, + "id": 128, + "name": "CAT_3_VALUE", + "nodeType": "VariableDeclaration", + "scope": 274, + "src": "837:64:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 122, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "837: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": "875: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": "879:7:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000_by_1", + "typeString": "int_const 1000000" + }, + "value": "1000000" + }, + "src": "875: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": "889:12:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "875:26:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "public" + }, + { + "constant": true, + "id": 135, + "name": "CAT_4_VALUE", + "nodeType": "VariableDeclaration", + "scope": 274, + "src": "908:64:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 129, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "908: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": "946: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": "950:7:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000_by_1", + "typeString": "int_const 1000000" + }, + "value": "1000000" + }, + "src": "946: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": "960:12:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "946:26:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "public" + }, + { + "constant": true, + "id": 142, + "name": "CAT_5_VALUE", + "nodeType": "VariableDeclaration", + "scope": 274, + "src": "979:64:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 136, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "979: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": "1017: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": "1021:7:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000_by_1", + "typeString": "int_const 1000000" + }, + "value": "1000000" + }, + "src": "1017: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": "1031:12:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1017:26:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "public" + }, + { + "constant": false, + "id": 144, + "name": "_poolType", + "nodeType": "VariableDeclaration", + "scope": 274, + "src": "1052:24:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 143, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "1052:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 146, + "name": "_token", + "nodeType": "VariableDeclaration", + "scope": 274, + "src": "1083: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": "1083:6:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$578", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 165, + "nodeType": "Block", + "src": "1208: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": "1219:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 156, + "name": "poolType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 148, + "src": "1231:8:1", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "src": "1219:20:1", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "id": 158, + "nodeType": "ExpressionStatement", + "src": "1219: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": "1250: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": "1266: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": "1259: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": "1259:20:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$578", + "typeString": "contract IERC20" + } + }, + "src": "1250:29:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$578", + "typeString": "contract IERC20" + } + }, + "id": 164, + "nodeType": "ExpressionStatement", + "src": "1250: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": "1173:16:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_AlgoCoreTeamRole_$86_$", + "typeString": "type(contract AlgoCoreTeamRole)" + } + }, + "nodeType": "ModifierInvocation", + "src": "1173:18:1" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 151, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 148, + "name": "poolType", + "nodeType": "VariableDeclaration", + "scope": 166, + "src": "1125:15:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + }, + "typeName": { + "id": 147, + "name": "uint16", + "nodeType": "ElementaryTypeName", + "src": "1125:6:1", + "typeDescriptions": { + "typeIdentifier": "t_uint16", + "typeString": "uint16" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 150, + "name": "tokenAddress", + "nodeType": "VariableDeclaration", + "scope": 166, + "src": "1142:20:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 149, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1142:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1124:39:1" + }, + "payable": false, + "returnParameters": { + "id": 154, + "nodeType": "ParameterList", + "parameters": [], + "src": "1208:0:1" + }, + "scope": 274, + "src": "1113:174:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 272, + "nodeType": "Block", + "src": "1361:817:1", + "statements": [ + { + "assignments": [ + 174 + ], + "declarations": [ + { + "constant": false, + "id": 174, + "name": "algoMiner", + "nodeType": "VariableDeclaration", + "scope": 273, + "src": "1372: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": "1372: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": "1406: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": "1395: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": "1395:24:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IAlgoMiner_$287", + "typeString": "contract IAlgoMiner" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1372:47:1" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 180, + "name": "algoMiner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 174, + "src": "1448: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": "1448: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": "1448: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": "1440: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": "1440:32:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 184, + "nodeType": "ExpressionStatement", + "src": "1440:32:1" + }, + { + "assignments": [ + 186 + ], + "declarations": [ + { + "constant": false, + "id": 186, + "name": "minerCategory", + "nodeType": "VariableDeclaration", + "scope": 273, + "src": "1493:19:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 185, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1493: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": "1515: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": "1515: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": "1515:23:1", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1493: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": "1559: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": "1576:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1559: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": "1581: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": "1598:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "src": "1581:18:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1559: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": "1551: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": "1551:49:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 200, + "nodeType": "ExpressionStatement", + "src": "1551:49:1" + }, + { + "assignments": [ + 202 + ], + "declarations": [ + { + "constant": false, + "id": 202, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 273, + "src": "1613:13:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 201, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1613: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": "1629:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "1613: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": "1646: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": "1663:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1646: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": "1721: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": "1738:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "1721: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": "1796: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": "1813:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "1796: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": "1871: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": "1888:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "src": "1871: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": "1946: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": "1963:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "src": "1946: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": "2021: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": "2038:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "src": "2021:18:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 253, + "nodeType": "IfStatement", + "src": "2018:69:1", + "trueBody": { + "id": 252, + "nodeType": "Block", + "src": "2041: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": "2056: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": "2064:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2056:19:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 251, + "nodeType": "ExpressionStatement", + "src": "2056:19:1" + } + ] + } + }, + "id": 254, + "nodeType": "IfStatement", + "src": "1943:144:1", + "trueBody": { + "id": 244, + "nodeType": "Block", + "src": "1966: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": "1981: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": "1989:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1981:19:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 243, + "nodeType": "ExpressionStatement", + "src": "1981:19:1" + } + ] + } + }, + "id": 255, + "nodeType": "IfStatement", + "src": "1868:219:1", + "trueBody": { + "id": 236, + "nodeType": "Block", + "src": "1891: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": "1906: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": "1914:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1906:19:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 235, + "nodeType": "ExpressionStatement", + "src": "1906:19:1" + } + ] + } + }, + "id": 256, + "nodeType": "IfStatement", + "src": "1793:294:1", + "trueBody": { + "id": 228, + "nodeType": "Block", + "src": "1816: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": "1831: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": "1839:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1831:19:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 227, + "nodeType": "ExpressionStatement", + "src": "1831:19:1" + } + ] + } + }, + "id": 257, + "nodeType": "IfStatement", + "src": "1718:369:1", + "trueBody": { + "id": 220, + "nodeType": "Block", + "src": "1741: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": "1756: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": "1764:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1756:19:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 219, + "nodeType": "ExpressionStatement", + "src": "1756:19:1" + } + ] + } + }, + "id": 258, + "nodeType": "IfStatement", + "src": "1643:444:1", + "trueBody": { + "id": 212, + "nodeType": "Block", + "src": "1666: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": "1681: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": "1689:11:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1681:19:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 211, + "nodeType": "ExpressionStatement", + "src": "1681: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": "2107: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": "2115:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2107: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": "2099: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": "2099:18:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 264, + "nodeType": "ExpressionStatement", + "src": "2099:18:1" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 268, + "name": "minerAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 168, + "src": "2150:12:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 269, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 202, + "src": "2164: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": "2130: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": "2130: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": "2130:40:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 271, + "nodeType": "ExpressionStatement", + "src": "2130: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": "1348:12:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1348:12:1" + } + ], + "name": "trasferToMiner", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 169, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 168, + "name": "minerAddress", + "nodeType": "VariableDeclaration", + "scope": 273, + "src": "1319:20:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 167, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1319:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1318:22:1" + }, + "payable": false, + "returnParameters": { + "id": 172, + "nodeType": "ParameterList", + "parameters": [], + "src": "1361:0:1" + }, + "scope": 274, + "src": "1295:883:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 275, + "src": "490:1691:1" + } + ], + "src": "0:2183:1" + }, + "id": 1 + }, + "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": [ + 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/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": [ + 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/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": [ + 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/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": [ + 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/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": [ + 722 + ] + }, + "id": 723, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 580, + "literals": [ + "solidity", + "^", + "0.4", + ".24" + ], + "nodeType": "PragmaDirective", + "src": "0:24:6" + }, + { + "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": 581, + "nodeType": "ImportDirective", + "scope": 723, + "sourceUnit": 579, + "src": "26:22:6", + "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": 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-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..38dd233d4 --- /dev/null +++ b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/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-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..d3f811a9f --- /dev/null +++ b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/bin/AlgoPool.bin @@ -0,0 +1 @@ +608060405234801561001057600080fd5b5060405160408061076083398101604052805160209091015161003b33640100000000610077810204565b60018054600160a060020a0390921662010000026201000060b060020a031961ffff90941661ffff199093169290921792909216179055610120565b61008f60008264010000000061056b61009282021704565b50565b600160a060020a03811615156100a757600080fd5b6100ba82826401000000006100e9810204565b156100c457600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b6000600160a060020a038216151561010057600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b6106318061012f6000396000f3006080604052600436106100955763ffffffff60e060020a6000350416632296f4c7811461009a57806325109e8b146100bd5780632e6b6849146100e4578063455acbcd14610105578063492fba841461011a57806349dc9ed01461012f578063608d3d3d146101445780639fc3c98314610179578063a89febb21461018e578063aed6183f146101a3578063d43acc79146101b8575b600080fd5b3480156100a657600080fd5b506100bb600160a060020a03600435166101cd565b005b3480156100c957600080fd5b506100d26103cc565b60408051918252519081900360200190f35b3480156100f057600080fd5b506100bb600160a060020a03600435166103d8565b34801561011157600080fd5b506100d26103f8565b34801561012657600080fd5b506100d2610407565b34801561013b57600080fd5b506100d2610415565b34801561015057600080fd5b50610165600160a060020a0360043516610424565b604080519115158252519081900360200190f35b34801561018557600080fd5b506100d261043c565b34801561019a57600080fd5b506100d261044a565b3480156101af57600080fd5b506100d2610459565b3480156101c457600080fd5b506100bb610468565b60008060006101db33610424565b15156101e657600080fd5b83925082600160a060020a0316631777fb4b6040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561022757600080fd5b505af115801561023b573d6000803e3d6000fd5b505050506040513d602081101561025157600080fd5b5051151561025e57600080fd5b82600160a060020a03166380258e476040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561029c57600080fd5b505af11580156102b0573d6000803e3d6000fd5b505050506040513d60208110156102c657600080fd5b50519150600060ff8316108015906102e2575060058260ff1611155b15156102ed57600080fd5b50600060ff8216151561030b575069152d02c7e14af680000061039c565b8160ff1660011415610328575069d3c21bcecceda100000061039c565b8160ff166002141561034657506a01a784379d99db4200000061039c565b8160ff166003141561036457506a027b46536c66c8e300000061039c565b8160ff166004141561038257506a034f086f3b33b68400000061039c565b8160ff166005141561039c57506a0422ca8b0a00a4250000005b600081116103a957600080fd5b6001546103c690620100009004600160a060020a03168583610473565b50505050565b670de0b6b3a764000081565b6103e133610424565b15156103ec57600080fd5b6103f581610512565b50565b6a034f086f3b33b68400000081565b69d3c21bcecceda100000081565b6a027b46536c66c8e300000081565b6000610436818363ffffffff61052316565b92915050565b69152d02c7e14af680000081565b6a0422ca8b0a00a42500000081565b6a01a784379d99db4200000081565b6104713361055a565b565b82600160a060020a031663a9059cbb83836040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b1580156104d657600080fd5b505af11580156104ea573d6000803e3d6000fd5b505050506040513d602081101561050057600080fd5b5051151561050d57600080fd5b505050565b6103f560008263ffffffff61056b16565b6000600160a060020a038216151561053a57600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b6103f560008263ffffffff6105b916565b600160a060020a038116151561058057600080fd5b61058a8282610523565b1561059457600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b600160a060020a03811615156105ce57600080fd5b6105d88282610523565b15156105e357600080fd5b600160a060020a0316600090815260209190915260409020805460ff191690555600a165627a7a72305820fcd1665b524606952d86f870d91a6ad5ceaed631661ee3cc8731e992b464993a0029 \ 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..6491b1282 --- /dev/null +++ b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/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": "608060405234801561001057600080fd5b5060405160408061076083398101604052805160209091015161003b33640100000000610077810204565b60018054600160a060020a0390921662010000026201000060b060020a031961ffff90941661ffff199093169290921792909216179055610120565b61008f60008264010000000061056b61009282021704565b50565b600160a060020a03811615156100a757600080fd5b6100ba82826401000000006100e9810204565b156100c457600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b6000600160a060020a038216151561010057600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b6106318061012f6000396000f3006080604052600436106100955763ffffffff60e060020a6000350416632296f4c7811461009a57806325109e8b146100bd5780632e6b6849146100e4578063455acbcd14610105578063492fba841461011a57806349dc9ed01461012f578063608d3d3d146101445780639fc3c98314610179578063a89febb21461018e578063aed6183f146101a3578063d43acc79146101b8575b600080fd5b3480156100a657600080fd5b506100bb600160a060020a03600435166101cd565b005b3480156100c957600080fd5b506100d26103cc565b60408051918252519081900360200190f35b3480156100f057600080fd5b506100bb600160a060020a03600435166103d8565b34801561011157600080fd5b506100d26103f8565b34801561012657600080fd5b506100d2610407565b34801561013b57600080fd5b506100d2610415565b34801561015057600080fd5b50610165600160a060020a0360043516610424565b604080519115158252519081900360200190f35b34801561018557600080fd5b506100d261043c565b34801561019a57600080fd5b506100d261044a565b3480156101af57600080fd5b506100d2610459565b3480156101c457600080fd5b506100bb610468565b60008060006101db33610424565b15156101e657600080fd5b83925082600160a060020a0316631777fb4b6040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561022757600080fd5b505af115801561023b573d6000803e3d6000fd5b505050506040513d602081101561025157600080fd5b5051151561025e57600080fd5b82600160a060020a03166380258e476040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561029c57600080fd5b505af11580156102b0573d6000803e3d6000fd5b505050506040513d60208110156102c657600080fd5b50519150600060ff8316108015906102e2575060058260ff1611155b15156102ed57600080fd5b50600060ff8216151561030b575069152d02c7e14af680000061039c565b8160ff1660011415610328575069d3c21bcecceda100000061039c565b8160ff166002141561034657506a01a784379d99db4200000061039c565b8160ff166003141561036457506a027b46536c66c8e300000061039c565b8160ff166004141561038257506a034f086f3b33b68400000061039c565b8160ff166005141561039c57506a0422ca8b0a00a4250000005b600081116103a957600080fd5b6001546103c690620100009004600160a060020a03168583610473565b50505050565b670de0b6b3a764000081565b6103e133610424565b15156103ec57600080fd5b6103f581610512565b50565b6a034f086f3b33b68400000081565b69d3c21bcecceda100000081565b6a027b46536c66c8e300000081565b6000610436818363ffffffff61052316565b92915050565b69152d02c7e14af680000081565b6a0422ca8b0a00a42500000081565b6a01a784379d99db4200000081565b6104713361055a565b565b82600160a060020a031663a9059cbb83836040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b1580156104d657600080fd5b505af11580156104ea573d6000803e3d6000fd5b505050506040513d602081101561050057600080fd5b5051151561050d57600080fd5b505050565b6103f560008263ffffffff61056b16565b6000600160a060020a038216151561053a57600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b6103f560008263ffffffff6105b916565b600160a060020a038116151561058057600080fd5b61058a8282610523565b1561059457600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b600160a060020a03811615156105ce57600080fd5b6105d88282610523565b15156105e357600080fd5b600160a060020a0316600090815260209190915260409020805460ff191690555600a165627a7a72305820fcd1665b524606952d86f870d91a6ad5ceaed631661ee3cc8731e992b464993a0029", + "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-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..6ca2c08a4 --- /dev/null +++ b/labs/algo-token-distribution/src/AdvancedAlgos.AlgoToken.AlgoTokenDistribution/SmartContracts/src/package-lock.json @@ -0,0 +1,495 @@ +{ + "name": "algo-token-distribution", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "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" + } + }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=" + }, + "camelcase": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=" + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "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=" + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^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==" + }, + "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==" + }, + "hosted-git-info": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", + "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==" + }, + "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-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" + }, + "is-builtin-module": { + "version": "1.0.0", + "resolved": "http://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", + "requires": { + "builtin-modules": "^1.0.0" + } + }, + "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" + } + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=" + }, + "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" + } + }, + "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" + } + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + } + }, + "lodash.assign": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz", + "integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=" + }, + "memorystream": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", + "integrity": "sha1-htcJCzDORV1j+64S3aUaR93K+bI=" + }, + "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" + } + }, + "normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "requires": { + "hosted-git-info": "^2.1.4", + "is-builtin-module": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "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.0.0", + "resolved": "https://registry.npmjs.org/openzeppelin-solidity/-/openzeppelin-solidity-2.0.0.tgz", + "integrity": "sha512-SolpxQFArtiYnlSNg3dZ9sz0WVlKtPqSOcJkXRllaZp4+Lpfqz3vxF0yoh7g75TszKPyadqoJmU7+GM/vwh9SA==" + }, + "os-locale": { + "version": "1.4.0", + "resolved": "http://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "requires": { + "lcid": "^1.0.0" + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "requires": { + "error-ex": "^1.2.0" + } + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "requires": { + "pinkie-promise": "^2.0.0" + } + }, + "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-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "requires": { + "pinkie": "^2.0.0" + } + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "requires": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "requires": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + } + }, + "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": "1.2.1", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-1.2.1.tgz", + "integrity": "sha1-UpyczvJzgK3+yaL5ZbZJu+5jZBg=" + }, + "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.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "requires": { + "glob": "^7.0.5" + } + }, + "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=" + }, + "solc": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/solc/-/solc-0.4.24.tgz", + "integrity": "sha512-2xd7Cf1HeVwrIb6Bu1cwY2/TaLRodrppCq3l7rhLimFQgmxptXhTC3+/wesVLpB09F1A2kZgvbMOgH7wvhFnBQ==", + "requires": { + "fs-extra": "^0.30.0", + "memorystream": "^0.3.1", + "require-from-string": "^1.1.0", + "semver": "^5.3.0", + "yargs": "^4.7.1" + } + }, + "spdx-correct": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.2.tgz", + "integrity": "sha512-q9hedtzyXHr5S0A1vEPoK/7l8NpfkFYTq6iCY+Pno2ZbdZR6WexZFtqeVGkGxW3TEJMN914Z55EnAGMmenlIQQ==", + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", + "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==" + }, + "spdx-expression-parse": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.2.tgz", + "integrity": "sha512-qky9CVt0lVIECkEsYbNILVnPvycuEBkXoMFLRWsREkomQLevYhtRKC+R91a5TOAQ3bCMjikRwhyaRqj1VYatYg==" + }, + "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": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "requires": { + "is-utf8": "^0.2.0" + } + }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "which-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", + "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=" + }, + "window-size": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.2.0.tgz", + "integrity": "sha1-tDFbtCFKPXBY6+7okuE/ok2YsHU=" + }, + "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" + } + }, + "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=" + }, + "yargs": { + "version": "4.8.1", + "resolved": "http://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz", + "integrity": "sha1-wMQpJMpKqmsObaFznfshZDn53cA=", + "requires": { + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "get-caller-file": "^1.0.1", + "lodash.assign": "^4.0.3", + "os-locale": "^1.4.0", + "read-pkg-up": "^1.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^1.0.1", + "which-module": "^1.0.0", + "window-size": "^0.2.0", + "y18n": "^3.2.1", + "yargs-parser": "^2.4.1" + } + }, + "yargs-parser": { + "version": "2.4.1", + "resolved": "http://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.1.tgz", + "integrity": "sha1-hVaN488VD/SfpRgl8DqMiA3cxcQ=", + "requires": { + "camelcase": "^3.0.0", + "lodash.assign": "^4.0.6" + } + } + } +} 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..7cc030dcd --- /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.0.0", + "solc": "^0.4.24" + } +} 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..362f1c46a --- /dev/null +++ b/labs/algo-token-distribution/test/AdvancedAlgos.AlgoToken.AlgoTokenDistribution.IntegrationTests/AdvancedAlgos.AlgoToken.AlgoTokenDistribution.IntegrationTests.csproj @@ -0,0 +1,23 @@ + + + + netcoreapp2.1 + latest + false + + + + + + + + + + + + + + + + + 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..11715109f --- /dev/null +++ b/labs/algo-token-distribution/test/AdvancedAlgos.AlgoToken.AlgoTokenDistribution.IntegrationTests/AlgoMinerTests.cs @@ -0,0 +1,108 @@ +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 + { + private const long INITIAL_SUPPLY = 1000000000; + + [Fact] + public async Task BasicMinerWorkfloWTest() + { + EthNetwork.UseGanacheTestNet(); + + 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(); + + 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 a pool... + var pool1 = new AlgoPool(EthNetwork.Instance.GetWeb3(coreTeamAccount), EthNetwork.Instance.GasPriceProvider); + + await pool1.DeployAsync(10, token.ContractAddress); + + // Transfer some tokens to the pool... + await token.TransferAsync(pool1.ContractAddress, 100.MAlgo()); + + // Create a miner category 2... + var miner1 = new AlgoMiner(EthNetwork.Instance.GetWeb3(coreTeamAccount), EthNetwork.Instance.GasPriceProvider); + await miner1.DeployAsync(5, 2, minerAccount.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.TrasferToMinerAsync(miner1.ContractAddress); + + // Ensure the miner received the tokens according to its category 2. + Assert.Equal(2.MAlgo(), 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; + + for (int i = 0; i < 5; i++) + { + await miner1.MineAsync(); + expectedMinerBalance += paymentPerDay; + + Assert.Equal(expectedMinerBalance, await token.BalanceOfAsync(minerAccount.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; + + Assert.Equal(expectedMinerBalance, await token.BalanceOfAsync(minerAccount.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..ebef49f56 --- /dev/null +++ b/labs/algo-token-distribution/test/AdvancedAlgos.AlgoToken.AlgoTokenDistribution.IntegrationTests/AlgoPoolTests.cs @@ -0,0 +1,70 @@ +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 TransferToMinerTest() + { + EthNetwork.UseGanacheTestNet(); + + var prefundedAccount = new Account(EthNetwork.Instance.PrefundedPrivateKey); + + var tokenOwnerAccount = EthAccountFactory.Create(); + var coreTeamAccount = EthAccountFactory.Create(); + var minerAccounts = 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(10, 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 (int i = 0; i <= 5; i++) + { + // Create an account for the miner... + minerAccounts[i] = EthAccountFactory.Create(); + + // Create the miner... + miners[i] = new AlgoMiner(EthNetwork.Instance.GetWeb3(coreTeamAccount), EthNetwork.Instance.GasPriceProvider); + await miners[i].DeployAsync((ushort)i, (byte)i, minerAccounts[i].Address, token.ContractAddress); + } + + // Transfer tokens from the pool to the miners... + for (int i = 0; i <= 5; i++) + { + await pool1.TrasferToMinerAsync(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)); + } + } +} 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-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/script.md b/labs/algo-token-playground/script.md new file mode 100644 index 000000000..e4fc98581 --- /dev/null +++ b/labs/algo-token-playground/script.md @@ -0,0 +1,19 @@ +new-account -n miner_1_account +import-account 0936af475d2701538aad321f87e0a51f2b297634653393e8cab7290a674009a5 -n prefunded +eth-transfer miner_1_account 1eth +eth-getbalance miner_1_account +deploy-algotoken -n token +deploy-algopool 1 token -n dev_pool +token.algotoken-transfer dev_pool 100m +token.algotoken-balanceof dev_pool +deploy-algominer 1 2 miner_1_account token -n miner_1 +dev_pool.algopool-trasfertominer 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 +miner_1.algominer-mine +token.algotoken-balanceof miner_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..f86ca587b --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/AdvancedAlgos.AlgoToken.AlgoTokenPlayground.csproj @@ -0,0 +1,20 @@ + + + + Exe + netcoreapp2.1 + 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/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..e4b29288b --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoMinerContract/AlgoMinerDeployCommand.cs @@ -0,0 +1,32 @@ +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 ushort MinerType { get; set; } + public byte Category { get; set; } + public string OwnerAddress { 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(OwnerAddress), + 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..f66dde831 --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoMinerContract/AlgoMinerResetMinerCommand.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 AlgoMinerResetMinerCommand : EthInvokeTransactionalFunctionCommand + { + public string NewOwnerAddress { 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)); + } + } +} 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/AlgoPoolContract/AlgoPoolDeployCommand.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoPoolContract/AlgoPoolDeployCommand.cs new file mode 100644 index 000000000..e2ca14b22 --- /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 ushort 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/AlgoPoolTrasferToMinerCommand.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoPoolContract/AlgoPoolTrasferToMinerCommand.cs new file mode 100644 index 000000000..6dd2fd989 --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/AlgoPoolContract/AlgoPoolTrasferToMinerCommand.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 AlgoPoolTrasferToMinerCommand : 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.TrasferToMinerAsync(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/EthNetwork/ListEnvironmentCommand.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/EthNetwork/ListEnvironmentCommand.cs new file mode 100644 index 000000000..b269fccfd --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Commands/EthNetwork/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.EthNetwork +{ + 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/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/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/AlgoMinerParsers.cs b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Parsers/AlgoMinerParsers.cs new file mode 100644 index 000000000..b0988f086 --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Parsers/AlgoMinerParsers.cs @@ -0,0 +1,117 @@ +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.IntegerValue + from category in CommonParsers.IntegerValue + from ownerAddress 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 = (ushort)minerType, + Category = (byte)category, + OwnerAddress = ownerAddress, + 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 + select new AlgoMinerResetMinerCommand + { + ContractReference = contractReference, + NewOwnerAddress = newOwnerAddress + }).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-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..abb30cee0 --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Parsers/AlgoPoolParsers.cs @@ -0,0 +1,33 @@ +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.IntegerValue + from tokenAddress in CommonParsers.StringValue + from name in CommonParsers.Switch('n', "name", CommonParsers.Identifier).Optional() + select new AlgoPoolDeployCommand + { + Name = name.GetOrDefault(), + PoolType = (ushort)poolType, + TokenAddress = tokenAddress + }).Register(); + + (from contractReference in CommonParsers.Invoke("algopool-trasfertominer") + from minerAddress in CommonParsers.StringValue + select new AlgoPoolTrasferToMinerCommand + { + ContractReference = contractReference, + MinerAddress = minerAddress + }).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..67ffea648 --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Parsers/CommonParsers.cs @@ -0,0 +1,77 @@ +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 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..2a28224a9 --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Parsers/ContractManagementParsers.cs @@ -0,0 +1,18 @@ +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("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..822ea6f46 --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Parsers/EthNetworkParsers.cs @@ -0,0 +1,32 @@ +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(); + + (from command in CommonParsers.Token("list-env") + select new ListEnvironmentCommand() + ).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/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..5755c8eff --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/REPL.cs @@ -0,0 +1,97 @@ +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() + { + EthNetworkParsers.Register(); + EthTransactionsParsers.Register(); + AccountManagementParsers.Register(); + ContractManagementParsers.Register(); + AlgoTokenParsers.Register(); + AlgoPoolParsers.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..1a7cb66e0 --- /dev/null +++ b/labs/algo-token-playground/src/AdvancedAlgos.AlgoToken.AlgoTokenPlayground/Runtime/RuntimeContext.cs @@ -0,0 +1,83 @@ +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; } = new Dictionary(StringComparer.OrdinalIgnoreCase); + public Dictionary Contracts { get; } = new Dictionary(StringComparer.OrdinalIgnoreCase); + public StaticGasPriceProvider GasPriceProvider { get; } = new StaticGasPriceProvider(); + + public string ResolveAccountReference(string reference) + { + 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/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..ccbb08c19 --- /dev/null +++ b/labs/framework/src/AdvancedAlgos.AlgoToken.Framework.Ethereum.IntegrationTest/AdvancedAlgos.AlgoToken.Framework.Ethereum.IntegrationTest.csproj @@ -0,0 +1,16 @@ + + + + netcoreapp2.1 + latest + + + + + + + + + + + diff --git a/labs/algo-erc20-token/test/AdvancedAlgos.AlgoErc20Token.IntegrationTests/EthNetwork.cs b/labs/framework/src/AdvancedAlgos.AlgoToken.Framework.Ethereum.IntegrationTest/EthNetwork.cs similarity index 81% rename from labs/algo-erc20-token/test/AdvancedAlgos.AlgoErc20Token.IntegrationTests/EthNetwork.cs rename to labs/framework/src/AdvancedAlgos.AlgoToken.Framework.Ethereum.IntegrationTest/EthNetwork.cs index b34dbe31d..8f1675e54 100644 --- a/labs/algo-erc20-token/test/AdvancedAlgos.AlgoErc20Token.IntegrationTests/EthNetwork.cs +++ b/labs/framework/src/AdvancedAlgos.AlgoToken.Framework.Ethereum.IntegrationTest/EthNetwork.cs @@ -10,7 +10,7 @@ using Nethereum.Util; using Nethereum.Web3; using Nethereum.Web3.Accounts; -namespace AdvancedAlgos.AlgoErc20Token.IntegrationTests +namespace AdvancedAlgos.AlgoToken.Framework.Ethereum.IntegrationTest { public class EthNetwork { @@ -23,8 +23,8 @@ namespace AdvancedAlgos.AlgoErc20Token.IntegrationTests public string Url { get; private set; } public string PrefundedAddress { get; private set; } public string PrefundedPrivateKey { get; private set; } - public BigInteger GasPrice { get; private set; } - public BigInteger TxBaseFeeWei => GasPrice * TRANSACTION_BASE_FEE; + public IGasPriceProvider GasPriceProvider { get; private set; } + public BigInteger TxBaseFeeWei => GasPriceProvider.GetGasPrice() * TRANSACTION_BASE_FEE; public static void UseGanacheTestNet() { @@ -33,7 +33,7 @@ namespace AdvancedAlgos.AlgoErc20Token.IntegrationTests Url = "http://127.0.0.1:8545", PrefundedAddress = "0x06bB4674A4b08d07186b721378C7e241eD85443b", PrefundedPrivateKey = "0936af475d2701538aad321f87e0a51f2b297634653393e8cab7290a674009a5", - GasPrice = 2000000000 + GasPriceProvider = new StaticGasPriceProvider(2000000000) }; } @@ -44,10 +44,13 @@ namespace AdvancedAlgos.AlgoErc20Token.IntegrationTests Url = "http://10.4.0.4:8545", PrefundedAddress = "0x88474Ec3cfddfC943d3E42C94763D43f181A5a83", PrefundedPrivateKey = "0x69970bd6c1b6cfbffea16656c27ff7b330b751ed5e46c1644b54a642871f4bbb", - GasPrice = 2000000000 + 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)); 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/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token.EthClientExtensions/AdvancedAlgos.AlgoErc20Token.EthClientExtensions.csproj b/labs/framework/src/AdvancedAlgos.AlgoToken.Framework.Ethereum/AdvancedAlgos.AlgoToken.Framework.Ethereum.csproj similarity index 100% rename from labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token.EthClientExtensions/AdvancedAlgos.AlgoErc20Token.EthClientExtensions.csproj rename to labs/framework/src/AdvancedAlgos.AlgoToken.Framework.Ethereum/AdvancedAlgos.AlgoToken.Framework.Ethereum.csproj diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token.EthClientExtensions/EthAccountFactory.cs b/labs/framework/src/AdvancedAlgos.AlgoToken.Framework.Ethereum/EthAccountFactory.cs similarity index 88% rename from labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token.EthClientExtensions/EthAccountFactory.cs rename to labs/framework/src/AdvancedAlgos.AlgoToken.Framework.Ethereum/EthAccountFactory.cs index 6e022fdde..c3933ce1b 100644 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token.EthClientExtensions/EthAccountFactory.cs +++ b/labs/framework/src/AdvancedAlgos.AlgoToken.Framework.Ethereum/EthAccountFactory.cs @@ -5,7 +5,7 @@ using Nethereum.Hex.HexConvertors.Extensions; using Nethereum.Signer; using Nethereum.Web3.Accounts; -namespace AdvancedAlgos.AlgoErc20Token.EthClientExtensions +namespace AdvancedAlgos.AlgoToken.Framework.Ethereum { public static class EthAccountFactory { 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/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token.EthClientExtensions/Exceptions/TransactionRejectedException.cs b/labs/framework/src/AdvancedAlgos.AlgoToken.Framework.Ethereum/Exceptions/TransactionRejectedException.cs similarity index 80% rename from labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token.EthClientExtensions/Exceptions/TransactionRejectedException.cs rename to labs/framework/src/AdvancedAlgos.AlgoToken.Framework.Ethereum/Exceptions/TransactionRejectedException.cs index c18a8c0bf..7aaf4592f 100644 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token.EthClientExtensions/Exceptions/TransactionRejectedException.cs +++ b/labs/framework/src/AdvancedAlgos.AlgoToken.Framework.Ethereum/Exceptions/TransactionRejectedException.cs @@ -5,11 +5,11 @@ using System.Collections.Generic; using System.Text; using Nethereum.RPC.Eth.DTOs; -namespace AdvancedAlgos.AlgoErc20Token.EthClientExtensions.Exceptions +namespace AdvancedAlgos.AlgoToken.Framework.Ethereum.Exceptions { public class TransactionRejectedException : Exception { - private const string ERROR_MESSAGE = "Failed to execute the transaction."; + private const string ERROR_MESSAGE = "The transaction was rejected."; public TransactionRejectedException(TransactionReceipt transactionReceipt) : base(ERROR_MESSAGE) diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token.EthClientExtensions/Extensions/TransactionReceiptExtensions.cs b/labs/framework/src/AdvancedAlgos.AlgoToken.Framework.Ethereum/Extensions/TransactionReceiptExtensions.cs similarity index 74% rename from labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token.EthClientExtensions/Extensions/TransactionReceiptExtensions.cs rename to labs/framework/src/AdvancedAlgos.AlgoToken.Framework.Ethereum/Extensions/TransactionReceiptExtensions.cs index 2ce8dec83..47d5ebc24 100644 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token.EthClientExtensions/Extensions/TransactionReceiptExtensions.cs +++ b/labs/framework/src/AdvancedAlgos.AlgoToken.Framework.Ethereum/Extensions/TransactionReceiptExtensions.cs @@ -2,9 +2,9 @@ using System.Collections.Generic; using System.Text; using Nethereum.RPC.Eth.DTOs; -using AdvancedAlgos.AlgoErc20Token.EthClientExtensions.Exceptions; +using AdvancedAlgos.AlgoToken.Framework.Ethereum.Exceptions; -namespace AdvancedAlgos.AlgoErc20Token.EthClientExtensions.Extensions +namespace AdvancedAlgos.AlgoToken.Framework.Ethereum.Extensions { public static class TransactionReceiptExtensions { 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/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token.EthClientExtensions/Reflection/AssemblyExtensions.cs b/labs/framework/src/AdvancedAlgos.AlgoToken.Framework.Ethereum/Reflection/AssemblyExtensions.cs similarity index 89% rename from labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token.EthClientExtensions/Reflection/AssemblyExtensions.cs rename to labs/framework/src/AdvancedAlgos.AlgoToken.Framework.Ethereum/Reflection/AssemblyExtensions.cs index 219d7160b..9fc668554 100644 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token.EthClientExtensions/Reflection/AssemblyExtensions.cs +++ b/labs/framework/src/AdvancedAlgos.AlgoToken.Framework.Ethereum/Reflection/AssemblyExtensions.cs @@ -4,7 +4,7 @@ using System.IO; using System.Reflection; using System.Text; -namespace AdvancedAlgos.AlgoErc20Token.EthClientExtensions.Reflection +namespace AdvancedAlgos.AlgoToken.Framework.Ethereum.Reflection { public static class AssemblyExtensions { diff --git a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token.EthClientExtensions/SmartContract.cs b/labs/framework/src/AdvancedAlgos.AlgoToken.Framework.Ethereum/SmartContract.cs similarity index 55% rename from labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token.EthClientExtensions/SmartContract.cs rename to labs/framework/src/AdvancedAlgos.AlgoToken.Framework.Ethereum/SmartContract.cs index a2bebbef4..deed26c1e 100644 --- a/labs/algo-erc20-token/src/AdvancedAlgos.AlgoErc20Token.EthClientExtensions/SmartContract.cs +++ b/labs/framework/src/AdvancedAlgos.AlgoToken.Framework.Ethereum/SmartContract.cs @@ -1,79 +1,91 @@ using System; using System.Numerics; using System.Threading.Tasks; -using AdvancedAlgos.AlgoErc20Token.EthClientExtensions.Extensions; -using AdvancedAlgos.AlgoErc20Token.EthClientExtensions.Reflection; +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.AlgoErc20Token.EthClientExtensions +namespace AdvancedAlgos.AlgoToken.Framework.Ethereum { - public abstract class SmartContract where TContract : SmartContract, new() + 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; } - protected virtual void Initialize(Contract contractDescriptor) { } - - public static TContract Get(Web3 web3, string contractAddress) + public void Bind(Web3 web3) { - var contractInstance = new TContract(); + Web3 = web3 ?? throw new ArgumentNullException(nameof(web3)); - contractInstance.LoadAbiAndBin(); + var contractDescriptor = Web3.Eth.GetContract(_abi, ContractAddress); - contractInstance.Web3 = web3; - contractInstance.ContractAddress = contractAddress; - - var contractDescriptor = web3.Eth.GetContract(_abi, contractAddress); - - contractInstance.Initialize(contractDescriptor); - - return contractInstance; + Initialize(contractDescriptor); } - public async Task DeployAsync(Web3 web3, BigInteger gasPrice, params object[] constructorParameters) - { - LoadAbiAndBin(); + protected virtual void Initialize(Contract contractDescriptor) { } - var transactionReceipt = await web3.Eth.DeployContract.SendRequestAndWaitForReceiptAsync( + protected async Task DeployAsync(params object[] constructorParameters) + { + var transactionReceipt = await Web3.Eth.DeployContract.SendRequestAndWaitForReceiptAsync( _abi, _bin, - web3.TransactionManager.Account.Address, + Web3.TransactionManager.Account.Address, new HexBigInteger(DeploymentGasUnits), - new HexBigInteger(gasPrice), + new HexBigInteger(GasPriceProvider.GetGasPrice()), null, null, constructorParameters); transactionReceipt.EnsureSucceededStatus(); - var contractDescriptor = web3.Eth.GetContract(_abi, transactionReceipt.ContractAddress); + var contractDescriptor = Web3.Eth.GetContract(_abi, transactionReceipt.ContractAddress); Initialize(contractDescriptor); - Web3 = web3; ContractAddress = transactionReceipt.ContractAddress; return transactionReceipt; } - protected async Task InvokeAsync(Function function, BigInteger gasUnits, BigInteger gasPrice, params object[] parameters) + 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(gasPrice), + new HexBigInteger(GasPriceProvider.GetGasPrice()), null, null, parameters);