From 5601b967796b2d387944da8039b3c70c0b471356 Mon Sep 17 00:00:00 2001 From: L-H Merino Date: Tue, 12 Dec 2023 21:46:30 +0100 Subject: [PATCH] Updated --- asset-manifest.json | 6 +++--- index.html | 2 +- static/js/main.0c23d573.chunk.js | 2 -- static/js/main.96438fcf.chunk.js | 2 ++ ...ain.0c23d573.chunk.js.map => main.96438fcf.chunk.js.map} | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) delete mode 100644 static/js/main.0c23d573.chunk.js create mode 100644 static/js/main.96438fcf.chunk.js rename static/js/{main.0c23d573.chunk.js.map => main.96438fcf.chunk.js.map} (92%) diff --git a/asset-manifest.json b/asset-manifest.json index 85278b7..a75a9c7 100644 --- a/asset-manifest.json +++ b/asset-manifest.json @@ -1,8 +1,8 @@ { "files": { "main.css": "/cs234-public/static/css/main.fe5bbdb5.chunk.css", - "main.js": "/cs234-public/static/js/main.0c23d573.chunk.js", - "main.js.map": "/cs234-public/static/js/main.0c23d573.chunk.js.map", + "main.js": "/cs234-public/static/js/main.96438fcf.chunk.js", + "main.js.map": "/cs234-public/static/js/main.96438fcf.chunk.js.map", "runtime-main.js": "/cs234-public/static/js/runtime-main.079eacac.js", "runtime-main.js.map": "/cs234-public/static/js/runtime-main.079eacac.js.map", "static/js/2.fdf14b64.chunk.js": "/cs234-public/static/js/2.fdf14b64.chunk.js", @@ -15,6 +15,6 @@ "static/js/runtime-main.079eacac.js", "static/js/2.fdf14b64.chunk.js", "static/css/main.fe5bbdb5.chunk.css", - "static/js/main.0c23d573.chunk.js" + "static/js/main.96438fcf.chunk.js" ] } \ No newline at end of file diff --git a/index.html b/index.html index b34a297..168572d 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -Animal Vote
\ No newline at end of file +Animal Vote
\ No newline at end of file diff --git a/static/js/main.0c23d573.chunk.js b/static/js/main.0c23d573.chunk.js deleted file mode 100644 index 1d08ed8..0000000 --- a/static/js/main.0c23d573.chunk.js +++ /dev/null @@ -1,2 +0,0 @@ -(this.webpackJsonpclient=this.webpackJsonpclient||[]).push([[0],{15:function(e,t,n){},26:function(e,t,n){"use strict";n.r(t);var i=n(0),s=n(2),r=n.n(s),a=n(7),f=n.n(a),p=(n(15),n(1));function l(){return Object(i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 0 24 24",width:"24",fill:"currentColor",children:[Object(i.jsx)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(i.jsx)("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM10 17l-3.5-3.5 1.41-1.41L10 14.17 15.18 9l1.41 1.41L10 17z"})]})}function o(){return Object(i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 0 24 24",width:"24",fill:"currentColor",children:[Object(i.jsx)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(i.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"})]})}function d(){return Object(i.jsxs)("div",{className:"self-building-square-spinner",children:[Object(i.jsx)("div",{className:"square"}),Object(i.jsx)("div",{className:"square"}),Object(i.jsx)("div",{className:"square"}),Object(i.jsx)("div",{className:"square clear"}),Object(i.jsx)("div",{className:"square"}),Object(i.jsx)("div",{className:"square"}),Object(i.jsx)("div",{className:"square clear"}),Object(i.jsx)("div",{className:"square"}),Object(i.jsx)("div",{className:"square"})]})}const u=["Nothing","Dog","Cat","Penguin","Monkey","Koala","Rabbit","Panda"];function y({account:e}){return Object(i.jsxs)("div",{className:"space-y-2",children:[Object(i.jsx)("h2",{className:"text-gray-800 text-xl font-bold",children:"My Account"}),Object(i.jsx)("p",{className:"text-gray-700 font-mono text-xs sm:text-base",children:e})]})}function c({myTokens:e}){const{useCacheSend:t}=p.drizzleReactHooks.useDrizzle(),{send:n}=t("Proposals","resetMyVotes");return Object(i.jsxs)("div",{className:"space-y-6",children:[Object(i.jsxs)("p",{className:"text-gray-800 text-2xl",children:[Object(i.jsx)("span",{className:"font-bold",children:e})," animal tokens"]}),Object(i.jsx)("button",{onClick:()=>n(),className:"motion-reduce:transition-none transition-colors duration-300 ease-in-out bg-indigo-500 hover:bg-red-500 text-white text-lg font-bold px-2 py-1 rounded",children:"Reset Votes"})]})}function m({account:e,myTokens:t}){return Object(i.jsxs)("div",{className:"bg-white p-4 shadow rounded-md space-y-2",children:[Object(i.jsx)(y,{account:e}),Object(i.jsx)(c,{myTokens:t})]})}function g({account:e}){const[t,n]=s.useState(""),{useCacheSend:r}=p.drizzleReactHooks.useDrizzle(),{send:a}=r("Proposals","setupStudent");return Object(i.jsxs)("div",{className:"bg-white p-4 rounded-md shadow space-y-6 text-gray-800",children:[Object(i.jsx)("h2",{className:"text-2xl font-bold",children:"Owner's Section"}),Object(i.jsxs)("div",{className:"space-y-3",children:[Object(i.jsx)("input",{type:"text",placeholder:"Ethereum Address",value:t,onChange:e=>n(e.target.value),className:"shadow-inner text-base sm:text-xl px-2 bg-gray-50 rounded-md placeholder-gray-700 font-mono w-full"}),Object(i.jsx)("button",{onClick:()=>a(t),className:"transition-colors duration-300 ease-in-out text-white rounded text-lg shadow font-bold py-1 px-2 bg-indigo-500 hover:bg-blue-400",children:"Initialize Student"})]})]})}function _(e){const t=[...e];return t.sort(((e,t)=>t.votes-e.votes)),t}function T(e,t){const n=[];for(let i=e;i=2*t+1}function D({tid:e,status:t}){let n=Object(i.jsx)(d,{}),s="text-blue-600";return"success"===t?(n=Object(i.jsx)(l,{}),s="text-green-600"):"error"===t&&(n=Object(i.jsx)(o,{}),s="text-red-600"),Object(i.jsxs)("li",{className:"flex space-x-4 items-center ".concat(s," space-y-2"),children:[Object(i.jsx)("div",{className:"w-6",children:n}),Object(i.jsx)("div",{className:"font-bold pb-1",children:e})]})}function I({transactions:e}){const t=[...Object.entries(e)];return t.reverse(),0==t.length?Object(i.jsx)(i.Fragment,{}):Object(i.jsx)("ul",{className:"bg-white rounded shadow-md p-4",children:t.map((([e,{status:t}])=>(console.log("first key",e),Object(i.jsx)(D,{tid:e,status:t},e))))})}function S({name:e}){const{useCacheSend:t}=p.drizzleReactHooks.useDrizzle(),[n,r]=s.useState("0"),{send:a}=t("Proposals","setVotes");return Object(i.jsxs)("div",{className:"pl-16 flex items-end space-x-4",children:[Object(i.jsx)("input",{type:"number",value:n,className:"w-12 rounded shadow-inner px-1 bg-gray-50",onChange:e=>r(e.target.value)}),Object(i.jsx)("button",{className:"transition-colors text-white text-sm p-1 font-bold bg-indigo-500 hover:bg-blue-400 rounded",onClick:()=>(()=>{const t=parseInt(n);isNaN(t)||a(e,t)})(),children:"Set Votes"})]})}function V({myTokens:e,admin:t}){const{useCacheCall:n,useCacheSend:s}=p.drizzleReactHooks.useDrizzle(),r=n(["Proposals"],(e=>u.map(((t,n)=>({name:t,votes:e("Proposals","proposals",n),myVotes:e("Proposals","myVotes",t)}))))),{send:a}=s("Proposals","voteFor");return Object(i.jsx)("ul",{className:"bg-white p-4 rounded shadow-md text-xl text-gray-800",children:_(r).map((({name:n,votes:s,myVotes:r})=>Object(i.jsxs)("li",{className:"flex items-center space-x-4",children:[Object(i.jsx)("div",{className:"text-2xl w-1/3",children:n}),Object(i.jsxs)("div",{className:"flex items-center space-x-4 justify-between",children:[Object(i.jsxs)("div",{className:"text-gray-700 w-24",children:[Object(i.jsx)("span",{className:"font-bold",children:s})," ",1==s?"vote":"votes"]}),Object(i.jsxs)("div",{className:"flex items-center flex-grow space-x-2",children:[T(0,r).map((e=>Object(i.jsx)("div",{className:"w-6 h-6 bg-gradient-to-r from-indigo-500 to-blue-500 rounded"},e))),Object(i.jsx)("button",{onClick:()=>a(n),disabled:!b(e,r),className:"transition-colors border-2 border-dashed w-6 h-6 ".concat(b(e,r)?"border-indigo-500 hover:border-blue-400":"border-red-500")})]})]}),t?Object(i.jsx)(S,{name:n}):Object(i.jsx)(i.Fragment,{})]},n)))})}function x(){const{account:e,transactions:t}=p.drizzleReactHooks.useDrizzleState((e=>({account:e.accounts[0],transactions:e.transactions}))),{useCacheCall:n}=p.drizzleReactHooks.useDrizzle(),s=n("Proposals","tokens",e),r=n("Proposals","owner")===e;return Object(i.jsxs)("div",{className:"lg:flex flex-wrap space-y-6 lg:space-y-0 lg:space-x-8 mx-auto px-4 sm:px-0 sm:w-10/12",children:[Object(i.jsxs)("div",{className:"space-y-6",children:[r?Object(i.jsx)(g,{account:e}):null,Object(i.jsx)(m,{account:e,myTokens:s})]}),Object(i.jsxs)("div",{className:"flex flex-col lg:flex-grow space-y-2",children:[Object(i.jsx)(V,{myTokens:s,admin:r}),Object(i.jsx)(I,{transactions:t})]})]})}function v(){return Object(i.jsx)("nav",{className:"bg-gradient-to-r from-indigo-500 to-blue-500 h-16 flex items-center text-white font-bold text-3xl mb-8 shadow-md",children:Object(i.jsx)("div",{className:"mx-8",children:"Animal Vote"})})}function L(e){return Object(i.jsxs)(i.Fragment,{children:[Object(i.jsx)(v,{}),Object(i.jsx)("main",{children:e.children})]})}var P=n(3);function $(){return Object(i.jsxs)("div",{className:"text-lg text-blue-800 flex flex-col items-center max-auto",children:[Object(i.jsx)(d,{}),Object(i.jsxs)("p",{children:["Currently loading the DAPP application",Object(i.jsx)("br",{}),"If this is taking a while, make sure that MetaMask is using the ",Object(i.jsx)("b",{children:"Ropsten "}),"network."]})]})}const h={contracts:[n(9)],web3:{fallback:{type:"ws",url:"ws://127.0.0.1:9545"}}},E=Object(P.generateStore)(h),C=new P.Drizzle(h,E);f.a.render(Object(i.jsx)(r.a.StrictMode,{children:Object(i.jsx)(L,{children:Object(i.jsx)(p.drizzleReactHooks.DrizzleProvider,{drizzle:C,children:Object(i.jsx)(p.drizzleReactHooks.Initializer,{error:"There was an error.",loadingContractsAndAccounts:Object(i.jsx)($,{}),loadingWeb3:Object(i.jsx)($,{}),children:Object(i.jsx)(x,{})})})})}),document.getElementById("root"))},9:function(e){e.exports=JSON.parse('{"contractName":"Proposals","abi":[{"inputs":[{"internalType":"uint32","name":"studentCount","type":"uint32"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"string","name":"","type":"string"}],"name":"proposalIndices","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint32","name":"","type":"uint32"}],"name":"proposals","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"tokens","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"string","name":"proposal","type":"string"},{"internalType":"uint32","name":"amount","type":"uint32"}],"name":"setVotes","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"setupStudent","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"string","name":"proposal","type":"string"}],"name":"voteFor","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"resetMyVotes","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"string","name":"proposal","type":"string"}],"name":"myVotes","outputs":[{"internalType":"uint32","name":"votes","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"}],"metadata":"{\\"compiler\\":{\\"version\\":\\"0.5.16+commit.9c3226ce\\"},\\"language\\":\\"Solidity\\",\\"output\\":{\\"abi\\":[{\\"inputs\\":[{\\"internalType\\":\\"uint32\\",\\"name\\":\\"studentCount\\",\\"type\\":\\"uint32\\"}],\\"payable\\":false,\\"stateMutability\\":\\"nonpayable\\",\\"type\\":\\"constructor\\"},{\\"constant\\":true,\\"inputs\\":[{\\"internalType\\":\\"string\\",\\"name\\":\\"proposal\\",\\"type\\":\\"string\\"}],\\"name\\":\\"myVotes\\",\\"outputs\\":[{\\"internalType\\":\\"uint32\\",\\"name\\":\\"votes\\",\\"type\\":\\"uint32\\"}],\\"payable\\":false,\\"stateMutability\\":\\"view\\",\\"type\\":\\"function\\"},{\\"constant\\":true,\\"inputs\\":[],\\"name\\":\\"owner\\",\\"outputs\\":[{\\"internalType\\":\\"address\\",\\"name\\":\\"\\",\\"type\\":\\"address\\"}],\\"payable\\":false,\\"stateMutability\\":\\"view\\",\\"type\\":\\"function\\"},{\\"constant\\":true,\\"inputs\\":[{\\"internalType\\":\\"string\\",\\"name\\":\\"\\",\\"type\\":\\"string\\"}],\\"name\\":\\"proposalIndices\\",\\"outputs\\":[{\\"internalType\\":\\"uint32\\",\\"name\\":\\"\\",\\"type\\":\\"uint32\\"}],\\"payable\\":false,\\"stateMutability\\":\\"view\\",\\"type\\":\\"function\\"},{\\"constant\\":true,\\"inputs\\":[{\\"internalType\\":\\"uint32\\",\\"name\\":\\"\\",\\"type\\":\\"uint32\\"}],\\"name\\":\\"proposals\\",\\"outputs\\":[{\\"internalType\\":\\"uint32\\",\\"name\\":\\"\\",\\"type\\":\\"uint32\\"}],\\"payable\\":false,\\"stateMutability\\":\\"view\\",\\"type\\":\\"function\\"},{\\"constant\\":false,\\"inputs\\":[],\\"name\\":\\"resetMyVotes\\",\\"outputs\\":[],\\"payable\\":false,\\"stateMutability\\":\\"nonpayable\\",\\"type\\":\\"function\\"},{\\"constant\\":false,\\"inputs\\":[{\\"internalType\\":\\"string\\",\\"name\\":\\"proposal\\",\\"type\\":\\"string\\"},{\\"internalType\\":\\"uint32\\",\\"name\\":\\"amount\\",\\"type\\":\\"uint32\\"}],\\"name\\":\\"setVotes\\",\\"outputs\\":[],\\"payable\\":false,\\"stateMutability\\":\\"nonpayable\\",\\"type\\":\\"function\\"},{\\"constant\\":false,\\"inputs\\":[{\\"internalType\\":\\"address\\",\\"name\\":\\"addr\\",\\"type\\":\\"address\\"}],\\"name\\":\\"setupStudent\\",\\"outputs\\":[],\\"payable\\":false,\\"stateMutability\\":\\"nonpayable\\",\\"type\\":\\"function\\"},{\\"constant\\":true,\\"inputs\\":[{\\"internalType\\":\\"address\\",\\"name\\":\\"\\",\\"type\\":\\"address\\"}],\\"name\\":\\"tokens\\",\\"outputs\\":[{\\"internalType\\":\\"uint32\\",\\"name\\":\\"\\",\\"type\\":\\"uint32\\"}],\\"payable\\":false,\\"stateMutability\\":\\"view\\",\\"type\\":\\"function\\"},{\\"constant\\":false,\\"inputs\\":[{\\"internalType\\":\\"string\\",\\"name\\":\\"proposal\\",\\"type\\":\\"string\\"}],\\"name\\":\\"voteFor\\",\\"outputs\\":[],\\"payable\\":false,\\"stateMutability\\":\\"nonpayable\\",\\"type\\":\\"function\\"}],\\"devdoc\\":{\\"methods\\":{}},\\"userdoc\\":{\\"methods\\":{}}},\\"settings\\":{\\"compilationTarget\\":{\\"/Users/mac/Drive/Documents/Academia/EPFL/TA/cs234/DAO-Interactive/contracts/Proposals.sol\\":\\"Proposals\\"},\\"evmVersion\\":\\"istanbul\\",\\"libraries\\":{},\\"optimizer\\":{\\"enabled\\":false,\\"runs\\":200},\\"remappings\\":[]},\\"sources\\":{\\"/Users/mac/Drive/Documents/Academia/EPFL/TA/cs234/DAO-Interactive/contracts/Proposals.sol\\":{\\"keccak256\\":\\"0x38841ef8b8a06d913d8b59b2e2b1e86a5e34b2d25a7aa06008d544a23676893b\\",\\"urls\\":[\\"bzz-raw://4cdfa81d07604fb40cc93e181a6dd0f19d3e4d409f680ee2d0df804f030a59e2\\",\\"dweb:/ipfs/QmXp1JCahHVeLXMvHjrPJ7HTRJZ8aNz6i95541KBKEHANJ\\"]}},\\"version\\":1}","bytecode":"0x60806040526008600260006101000a81548163ffffffff021916908363ffffffff16021790555034801561003257600080fd5b506040516113e13803806113e18339818101604052602081101561005557600080fd5b8101908080519060200190929190505050336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600160405180807f4e6f7468696e67000000000000000000000000000000000000000000000000008152506007019050908152602001604051809103902060006101000a81548163ffffffff021916908363ffffffff16021790555060018060405180807f446f6700000000000000000000000000000000000000000000000000000000008152506003019050908152602001604051809103902060006101000a81548163ffffffff021916908363ffffffff1602179055506002600160405180807f43617400000000000000000000000000000000000000000000000000000000008152506003019050908152602001604051809103902060006101000a81548163ffffffff021916908363ffffffff1602179055506003600160405180807f50656e6775696e000000000000000000000000000000000000000000000000008152506007019050908152602001604051809103902060006101000a81548163ffffffff021916908363ffffffff1602179055506004600160405180807f4d6f6e6b657900000000000000000000000000000000000000000000000000008152506006019050908152602001604051809103902060006101000a81548163ffffffff021916908363ffffffff1602179055506005600160405180807f4b6f616c610000000000000000000000000000000000000000000000000000008152506005019050908152602001604051809103902060006101000a81548163ffffffff021916908363ffffffff1602179055506006600160405180807f52616262697400000000000000000000000000000000000000000000000000008152506006019050908152602001604051809103902060006101000a81548163ffffffff021916908363ffffffff1602179055506007600160405180807f50616e64610000000000000000000000000000000000000000000000000000008152506005019050908152602001604051809103902060006101000a81548163ffffffff021916908363ffffffff160217905550600060046003830263ffffffff16816103aa57fe5b04905060008183039050600181600202836003020103600460008063ffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff1602179055506000600190505b600260009054906101000a900463ffffffff1663ffffffff168163ffffffff16101561046e576001600460008363ffffffff1663ffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff1602179055508060010190506103fe565b50505050610f60806104816000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c80635ba3aed5116100665780635ba3aed51461029c5780638da5cb5b146102e0578063b49b0a311461032a578063c04752d814610405578063e4860339146104c057610093565b80630b3de1f3146100985780632295a8e5146100a25780632a4910ab1461016d5780633cb9269e146101c1575b600080fd5b6100a0610524565b005b61016b600480360360408110156100b857600080fd5b81019080803590602001906401000000008111156100d557600080fd5b8201836020820111156100e757600080fd5b8035906020019184600183028401116401000000008311171561010957600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290803563ffffffff169060200190929190505050610714565b005b61019f6004803603602081101561018357600080fd5b81019080803563ffffffff16906020019092919050505061087a565b604051808263ffffffff1663ffffffff16815260200191505060405180910390f35b61027a600480360360208110156101d757600080fd5b81019080803590602001906401000000008111156101f457600080fd5b82018360208201111561020657600080fd5b8035906020019184600183028401116401000000008311171561022857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929050505061089d565b604051808263ffffffff1663ffffffff16815260200191505060405180910390f35b6102de600480360360208110156102b257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108d6565b005b6102e86109dd565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103e36004803603602081101561034057600080fd5b810190808035906020019064010000000081111561035d57600080fd5b82018360208201111561036f57600080fd5b8035906020019184600183028401116401000000008311171561039157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610a02565b604051808263ffffffff1663ffffffff16815260200191505060405180910390f35b6104be6004803603602081101561041b57600080fd5b810190808035906020019064010000000081111561043857600080fd5b82018360208201111561044a57600080fd5b8035906020019184600183028401116401000000008311171561046c57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610af6565b005b610502600480360360208110156104d657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ebb565b604051808263ffffffff1663ffffffff16815260200191505060405180910390f35b60008090505b600260009054906101000a900463ffffffff1663ffffffff168163ffffffff161015610711576000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008363ffffffff1663ffffffff16815260200190815260200160002060009054906101000a900463ffffffff169050808102600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282829054906101000a900463ffffffff160192506101000a81548163ffffffff021916908363ffffffff16021790555080600460008463ffffffff1663ffffffff16815260200190815260200160002060008282829054906101000a900463ffffffff160392506101000a81548163ffffffff021916908363ffffffff1602179055506000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008463ffffffff1663ffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff1602179055505080600101905061052a565b50565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146107b9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180610f046028913960400191505060405180910390fd5b60006001836040518082805190602001908083835b602083106107f157805182526020820191506020810190506020830392506107ce565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900463ffffffff16905081600460008363ffffffff1663ffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff160217905550505050565b60046020528060005260406000206000915054906101000a900463ffffffff1681565b6001818051602081018201805184825260208301602085012081835280955050505050506000915054906101000a900463ffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461097b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180610f046028913960400191505060405180910390fd5b6009600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff16021790555050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806001836040518082805190602001908083835b60208310610a3b5780518252602082019150602081019050602083039250610a18565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900463ffffffff169050600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008263ffffffff1663ffffffff16815260200190815260200160002060009054906101000a900463ffffffff16915050919050565b60006001826040518082805190602001908083835b60208310610b2e5780518252602082019150602081019050602083039250610b0b565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900463ffffffff1690506001600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900463ffffffff1663ffffffff161015610c23576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180610edf6025913960400191505060405180910390fd5b60006001600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008463ffffffff1663ffffffff16815260200190815260200160002060009054906101000a900463ffffffff1601905060006001826002020390508063ffffffff16600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900463ffffffff1663ffffffff161015610d73576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f496e73756666696369656e7420746f6b656e730000000000000000000000000081525060200191505060405180910390fd5b80600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282829054906101000a900463ffffffff160392506101000a81548163ffffffff021916908363ffffffff16021790555081600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008563ffffffff1663ffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff1602179055506001600460008563ffffffff1663ffffffff16815260200190815260200160002060008282829054906101000a900463ffffffff160192506101000a81548163ffffffff021916908363ffffffff16021790555050505050565b60036020528060005260406000206000915054906101000a900463ffffffff168156fe596f75206e65656420746f2068617665206120746f6b656e20746f20766f74652077697468546869732066756e6374696f6e206973207265737472696374656420746f20746865206f776e6572a265627a7a72315820c1b12cac3bf91cb886f15f44bb4fb21825b151965b55aee404e6f602d2ba393b64736f6c63430005100032","deployedBytecode":"0x608060405234801561001057600080fd5b50600436106100935760003560e01c80635ba3aed5116100665780635ba3aed51461029c5780638da5cb5b146102e0578063b49b0a311461032a578063c04752d814610405578063e4860339146104c057610093565b80630b3de1f3146100985780632295a8e5146100a25780632a4910ab1461016d5780633cb9269e146101c1575b600080fd5b6100a0610524565b005b61016b600480360360408110156100b857600080fd5b81019080803590602001906401000000008111156100d557600080fd5b8201836020820111156100e757600080fd5b8035906020019184600183028401116401000000008311171561010957600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290803563ffffffff169060200190929190505050610714565b005b61019f6004803603602081101561018357600080fd5b81019080803563ffffffff16906020019092919050505061087a565b604051808263ffffffff1663ffffffff16815260200191505060405180910390f35b61027a600480360360208110156101d757600080fd5b81019080803590602001906401000000008111156101f457600080fd5b82018360208201111561020657600080fd5b8035906020019184600183028401116401000000008311171561022857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929050505061089d565b604051808263ffffffff1663ffffffff16815260200191505060405180910390f35b6102de600480360360208110156102b257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108d6565b005b6102e86109dd565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103e36004803603602081101561034057600080fd5b810190808035906020019064010000000081111561035d57600080fd5b82018360208201111561036f57600080fd5b8035906020019184600183028401116401000000008311171561039157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610a02565b604051808263ffffffff1663ffffffff16815260200191505060405180910390f35b6104be6004803603602081101561041b57600080fd5b810190808035906020019064010000000081111561043857600080fd5b82018360208201111561044a57600080fd5b8035906020019184600183028401116401000000008311171561046c57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610af6565b005b610502600480360360208110156104d657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ebb565b604051808263ffffffff1663ffffffff16815260200191505060405180910390f35b60008090505b600260009054906101000a900463ffffffff1663ffffffff168163ffffffff161015610711576000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008363ffffffff1663ffffffff16815260200190815260200160002060009054906101000a900463ffffffff169050808102600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282829054906101000a900463ffffffff160192506101000a81548163ffffffff021916908363ffffffff16021790555080600460008463ffffffff1663ffffffff16815260200190815260200160002060008282829054906101000a900463ffffffff160392506101000a81548163ffffffff021916908363ffffffff1602179055506000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008463ffffffff1663ffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff1602179055505080600101905061052a565b50565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146107b9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180610f046028913960400191505060405180910390fd5b60006001836040518082805190602001908083835b602083106107f157805182526020820191506020810190506020830392506107ce565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900463ffffffff16905081600460008363ffffffff1663ffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff160217905550505050565b60046020528060005260406000206000915054906101000a900463ffffffff1681565b6001818051602081018201805184825260208301602085012081835280955050505050506000915054906101000a900463ffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461097b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180610f046028913960400191505060405180910390fd5b6009600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff16021790555050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806001836040518082805190602001908083835b60208310610a3b5780518252602082019150602081019050602083039250610a18565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900463ffffffff169050600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008263ffffffff1663ffffffff16815260200190815260200160002060009054906101000a900463ffffffff16915050919050565b60006001826040518082805190602001908083835b60208310610b2e5780518252602082019150602081019050602083039250610b0b565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900463ffffffff1690506001600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900463ffffffff1663ffffffff161015610c23576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180610edf6025913960400191505060405180910390fd5b60006001600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008463ffffffff1663ffffffff16815260200190815260200160002060009054906101000a900463ffffffff1601905060006001826002020390508063ffffffff16600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900463ffffffff1663ffffffff161015610d73576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f496e73756666696369656e7420746f6b656e730000000000000000000000000081525060200191505060405180910390fd5b80600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282829054906101000a900463ffffffff160392506101000a81548163ffffffff021916908363ffffffff16021790555081600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008563ffffffff1663ffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff1602179055506001600460008563ffffffff1663ffffffff16815260200190815260200160002060008282829054906101000a900463ffffffff160192506101000a81548163ffffffff021916908363ffffffff16021790555050505050565b60036020528060005260406000206000915054906101000a900463ffffffff168156fe596f75206e65656420746f2068617665206120746f6b656e20746f20766f74652077697468546869732066756e6374696f6e206973207265737472696374656420746f20746865206f776e6572a265627a7a72315820c1b12cac3bf91cb886f15f44bb4fb21825b151965b55aee404e6f602d2ba393b64736f6c63430005100032","sourceMap":"28:2723:0:-;;;155:1;133:23;;;;;;;;;;;;;;;;;;;;615:679;8:9:-1;5:2;;;30:1;27;20:12;5:2;615:679:0;;;;;;;;;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;615:679:0;;;;;;;;;;;;;;;;673:10;665:5;;:18;;;;;;;;;;;;;;;;;;723:1;694:15;:26;;;;;;;;;;;;;;;;;;;;;;;;;:30;;;;;;;;;;;;;;;;;;759:1;734:15;:22;;;;;;;;;;;;;;;;;;;;;;;;;:26;;;;;;;;;;;;;;;;;;795:1;770:15;:22;;;;;;;;;;;;;;;;;;;;;;;;;:26;;;;;;;;;;;;;;;;;;835:1;806:15;:26;;;;;;;;;;;;;;;;;;;;;;;;;:30;;;;;;;;;;;;;;;;;;874:1;846:15;:25;;;;;;;;;;;;;;;;;;;;;;;;;:29;;;;;;;;;;;;;;;;;;912:1;885:15;:24;;;;;;;;;;;;;;;;;;;;;;;;;:28;;;;;;;;;;;;;;;;;;951:1;923:15;:25;;;;;;;;;;;;;;;;;;;;;;;;;:29;;;;;;;;;;;;;;;;;;989:1;962:15;:24;;;;;;;;;;;;;;;;;;;;;;;;;:28;;;;;;;;;;;;;;;;;;1001:25;1050:1;1045;1030:12;:16;1029:22;;;;;;;;1001:50;;1061:23;1102:18;1087:12;:33;1061:59;;1193:1;1174:16;1170:1;:20;1149:18;1145:1;:22;:45;:49;1130:9;:12;1140:1;1130:12;;;;;;;;;;;;;;:64;;;;;;;;;;;;;;;;;;1210:8;1221:1;1210:12;;1205:83;1228:12;;;;;;;;;;;1224:16;;:1;:16;;;1205:83;;;1276:1;1261:9;:12;1271:1;1261:12;;;;;;;;;;;;;;;;:16;;;;;;;;;;;;;;;;;;1242:3;;;;;1205:83;;;;615:679;;;28:2723;;;;;;","deployedSourceMap":"28:2723:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;28:2723:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2308:265;;;:::i;:::-;;1300:159;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1300:159:0;;;;;;;;;;21:11:-1;8;5:28;2:2;;;46:1;43;36:12;2:2;1300:159:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;1300:159:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;1300:159:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;93:3;85:6;81:16;74:27;137:4;133:9;126:4;121:3;117:14;113:30;106:37;;169:3;161:6;157:16;147:26;;1300:159:0;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;305:42;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;305:42:0;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;79:48;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;79:48:0;;;;;;;;;;21:11:-1;8;5:28;2:2;;;46:1;43;36:12;2:2;79:48:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;79:48:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;79:48:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;93:3;85:6;81:16;74:27;137:4;133:9;126:4;121:3;117:14;113:30;106:37;;169:3;161:6;157:16;147:26;;79:48:0;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;1465:143;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1465:143:0;;;;;;;;;;;;;;;;;;;:::i;:::-;;53:20;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;2579:170;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2579:170:0;;;;;;;;;;21:11:-1;8;5:28;2:2;;;46:1;43;36:12;2:2;2579:170:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;2579:170:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;2579:170:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;93:3;85:6;81:16;74:27;137:4;133:9;126:4;121:3;117:14;113:30;106:37;;169:3;161:6;157:16;147:26;;2579:170:0;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;1614:616;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1614:616:0;;;;;;;;;;21:11:-1;8;5:28;2:2;;;46:1;43;36:12;2:2;1614:616:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;1614:616:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;1614:616:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;93:3;85:6;81:16;74:27;137:4;133:9;126:4;121:3;117:14;113:30;106:37;;169:3;161:6;157:16;147:26;;1614:616:0;;;;;;;;;;;;;;;:::i;:::-;;212:40;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;212:40:0;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;2308:265;2354:8;2365:1;2354:12;;2349:218;2372:12;;;;;;;;;;;2368:16;;:1;:16;;;2349:218;;;2405:8;2416:10;:22;2427:10;2416:22;;;;;;;;;;;;;;;:25;2439:1;2416:25;;;;;;;;;;;;;;;;;;;;;;;;;2405:36;;2481:1;2477;:5;2455:6;:18;2462:10;2455:18;;;;;;;;;;;;;;;;:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2512:1;2496:9;:12;2506:1;2496:12;;;;;;;;;;;;;;;;:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2555:1;2527:10;:22;2538:10;2527:22;;;;;;;;;;;;;;;:25;2550:1;2527:25;;;;;;;;;;;;;;;;:29;;;;;;;;;;;;;;;;;;2349:218;2386:3;;;;;2349:218;;;;2308:265::o;1300:159::-;483:5;;;;;;;;;;;469:19;;:10;:19;;;448:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1385:8;1396:15;1412:8;1396:25;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;182:3;176:10;171:3;164:23;98:2;93:3;89:12;82:19;;123:2;118:3;114:12;107:19;;148:2;143:3;139:12;132:19;;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;1396:25:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1385:36;;1446:6;1431:9;:12;1441:1;1431:12;;;;;;;;;;;;;;;;:21;;;;;;;;;;;;;;;;;;564:1;1300:159;;:::o;305:42::-;;;;;;;;;;;;;;;;;;;;;;:::o;79:48::-;;;28:7:-1;22:14;169:4;160:7;156:18;147:7;143:32;204:13;198:20;246:8;231:13;224:31;316:4;307:7;303:18;296:4;287:7;283:18;273:49;350:9;335:13;328:32;378:4;366:16;;0:388;;;;79:48:0;;;;;;;;;;;;;:::o;1465:143::-;483:5;;;;;;;;;;;469:19;;:10;:19;;;448:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1600:1;1585:6;:12;1592:4;1585:12;;;;;;;;;;;;;;;;:16;;;;;;;;;;;;;;;;;;1465:143;:::o;53:20::-;;;;;;;;;;;;;:::o;2579:170::-;2640:12;2664:8;2675:15;2691:8;2675:25;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;182:3;176:10;171:3;164:23;98:2;93:3;89:12;82:19;;123:2;118:3;114:12;107:19;;148:2;143:3;139:12;132:19;;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;2675:25:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2664:36;;2717:10;:22;2728:10;2717:22;;;;;;;;;;;;;;;:25;2740:1;2717:25;;;;;;;;;;;;;;;;;;;;;;;;;2710:32;;;2579:170;;;:::o;1614:616::-;1714:8;1725:15;1741:8;1725:25;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;182:3;176:10;171:3;164:23;98:2;93:3;89:12;82:19;;123:2;118:3;114:12;107:19;;148:2;143:3;139:12;132:19;;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;1725:25:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1714:36;;1803:1;1781:6;:18;1788:10;1781:18;;;;;;;;;;;;;;;;;;;;;;;;;:23;;;;1760:107;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1877:8;1916:1;1888:10;:22;1899:10;1888:22;;;;;;;;;;;;;;;:25;1911:1;1888:25;;;;;;;;;;;;;;;;;;;;;;;;;:29;1877:40;;2017:15;2043:1;2039;2035;:5;:9;2017:27;;2084:8;2062:30;;:6;:18;2069:10;2062:18;;;;;;;;;;;;;;;;;;;;;;;;;:30;;;;2054:62;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2149:8;2127:6;:18;2134:10;2127:18;;;;;;;;;;;;;;;;:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2195:1;2167:10;:22;2178:10;2167:22;;;;;;;;;;;;;;;:25;2190:1;2167:25;;;;;;;;;;;;;;;;:29;;;;;;;;;;;;;;;;;;2222:1;2206:9;:12;2216:1;2206:12;;;;;;;;;;;;;;;;:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1614:616;;;;:::o;212:40::-;;;;;;;;;;;;;;;;;;;;;;:::o","source":"pragma solidity >=0.4.22;\\n\\n\\ncontract Proposals {\\n address public owner;\\n mapping(string => uint32) public proposalIndices;\\n uint32 numProposals = 8;\\n // The tokens we\'ve given to each participant\\n mapping(address => uint32) public tokens;\\n // The votes that each proposal has gotten\\n mapping(uint32 => uint32) public proposals;\\n mapping(address => mapping(uint32 => uint32)) votesByFor;\\n\\n modifier restricted() {\\n require(\\n msg.sender == owner,\\n \\"This function is restricted to the owner\\"\\n );\\n _;\\n }\\n\\n // Truffle needs the public here\\n constructor(uint32 studentCount) public {\\n owner = msg.sender;\\n\\n proposalIndices[\\"Nothing\\"] = 0;\\n proposalIndices[\\"Dog\\"] = 1;\\n proposalIndices[\\"Cat\\"] = 2;\\n proposalIndices[\\"Penguin\\"] = 3;\\n proposalIndices[\\"Monkey\\"] = 4;\\n proposalIndices[\\"Koala\\"] = 5;\\n proposalIndices[\\"Rabbit\\"] = 6;\\n proposalIndices[\\"Panda\\"] = 7;\\n\\n uint32 threeTokenStudents = (studentCount * 3) / 4;\\n uint32 twoTokenStudents = studentCount - threeTokenStudents;\\n proposals[0] = 3 * threeTokenStudents + 2 * twoTokenStudents - 1;\\n\\n for (uint32 i = 1; i < numProposals; ++i) {\\n proposals[i] = 1;\\n }\\n }\\n\\n function setVotes(string memory proposal, uint32 amount) public restricted {\\n uint32 i = proposalIndices[proposal];\\n proposals[i] = amount;\\n }\\n\\n function setupStudent(address addr) public restricted {\\n // Enough to vote 3 times for a single proposal\\n tokens[addr] = 9;\\n }\\n\\n function voteFor(string memory proposal) public {\\n // Will be Nothing if not present\\n uint32 i = proposalIndices[proposal];\\n require(\\n tokens[msg.sender] >= 1,\\n \\"You need to have a token to vote with\\"\\n );\\n uint32 n = votesByFor[msg.sender][i] + 1;\\n // This makes it so that for N votes, we need to have spent a total of N^2 tokens\\n uint32 required = 2 * n - 1;\\n require(tokens[msg.sender] >= required, \\"Insufficient tokens\\");\\n\\n tokens[msg.sender] -= required;\\n votesByFor[msg.sender][i] = n;\\n proposals[i] += 1;\\n }\\n\\n // This will take away all votes that the user has allocated so far\\n function resetMyVotes() public {\\n for (uint32 i = 0; i < numProposals; ++i) {\\n uint32 n = votesByFor[msg.sender][i];\\n tokens[msg.sender] += n * n;\\n proposals[i] -= n;\\n votesByFor[msg.sender][i] = 0;\\n }\\n }\\n\\n function myVotes(string memory proposal) public view returns(uint32 votes) {\\n uint32 i = proposalIndices[proposal];\\n return votesByFor[msg.sender][i];\\n }\\n}\\n","sourcePath":"/Users/mac/Drive/Documents/Academia/EPFL/TA/cs234/DAO-Interactive/contracts/Proposals.sol","ast":{"absolutePath":"/Users/mac/Drive/Documents/Academia/EPFL/TA/cs234/DAO-Interactive/contracts/Proposals.sol","exportedSymbols":{"Proposals":[322]},"id":323,"nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity",">=","0.4",".22"],"nodeType":"PragmaDirective","src":"0:25:0"},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":322,"linearizedBaseContracts":[322],"name":"Proposals","nodeType":"ContractDefinition","nodes":[{"constant":false,"id":3,"name":"owner","nodeType":"VariableDeclaration","scope":322,"src":"53:20:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":2,"name":"address","nodeType":"ElementaryTypeName","src":"53:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"public"},{"constant":false,"id":7,"name":"proposalIndices","nodeType":"VariableDeclaration","scope":322,"src":"79:48:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_string_memory_$_t_uint32_$","typeString":"mapping(string => uint32)"},"typeName":{"id":6,"keyType":{"id":4,"name":"string","nodeType":"ElementaryTypeName","src":"87:6:0","typeDescriptions":{"typeIdentifier":"t_string_storage_ptr","typeString":"string"}},"nodeType":"Mapping","src":"79:25:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_string_memory_$_t_uint32_$","typeString":"mapping(string => uint32)"},"valueType":{"id":5,"name":"uint32","nodeType":"ElementaryTypeName","src":"97:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}}},"value":null,"visibility":"public"},{"constant":false,"id":10,"name":"numProposals","nodeType":"VariableDeclaration","scope":322,"src":"133:23:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":8,"name":"uint32","nodeType":"ElementaryTypeName","src":"133:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":{"argumentTypes":null,"hexValue":"38","id":9,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"155:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_8_by_1","typeString":"int_const 8"},"value":"8"},"visibility":"internal"},{"constant":false,"id":14,"name":"tokens","nodeType":"VariableDeclaration","scope":322,"src":"212:40:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint32_$","typeString":"mapping(address => uint32)"},"typeName":{"id":13,"keyType":{"id":11,"name":"address","nodeType":"ElementaryTypeName","src":"220:7:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Mapping","src":"212:26:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint32_$","typeString":"mapping(address => uint32)"},"valueType":{"id":12,"name":"uint32","nodeType":"ElementaryTypeName","src":"231:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}}},"value":null,"visibility":"public"},{"constant":false,"id":18,"name":"proposals","nodeType":"VariableDeclaration","scope":322,"src":"305:42:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint32_$_t_uint32_$","typeString":"mapping(uint32 => uint32)"},"typeName":{"id":17,"keyType":{"id":15,"name":"uint32","nodeType":"ElementaryTypeName","src":"313:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Mapping","src":"305:25:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint32_$_t_uint32_$","typeString":"mapping(uint32 => uint32)"},"valueType":{"id":16,"name":"uint32","nodeType":"ElementaryTypeName","src":"323:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}}},"value":null,"visibility":"public"},{"constant":false,"id":24,"name":"votesByFor","nodeType":"VariableDeclaration","scope":322,"src":"353:56:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_uint32_$_$","typeString":"mapping(address => mapping(uint32 => uint32))"},"typeName":{"id":23,"keyType":{"id":19,"name":"address","nodeType":"ElementaryTypeName","src":"361:7:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Mapping","src":"353:45:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_uint32_$_$","typeString":"mapping(address => mapping(uint32 => uint32))"},"valueType":{"id":22,"keyType":{"id":20,"name":"uint32","nodeType":"ElementaryTypeName","src":"380:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Mapping","src":"372:25:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint32_$_t_uint32_$","typeString":"mapping(uint32 => uint32)"},"valueType":{"id":21,"name":"uint32","nodeType":"ElementaryTypeName","src":"390:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}}}},"value":null,"visibility":"internal"},{"body":{"id":35,"nodeType":"Block","src":"438:134:0","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":30,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":27,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":337,"src":"469:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":28,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"469:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":29,"name":"owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3,"src":"483:5:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"469:19:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},{"argumentTypes":null,"hexValue":"546869732066756e6374696f6e206973207265737472696374656420746f20746865206f776e6572","id":31,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"502:42:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_f5132e684ff59c4f69cfd3e5048a139c5e9dfc67213b9635f1b469112c0afb2e","typeString":"literal_string \\"This function is restricted to the owner\\""},"value":"This function is restricted to the owner"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"},{"typeIdentifier":"t_stringliteral_f5132e684ff59c4f69cfd3e5048a139c5e9dfc67213b9635f1b469112c0afb2e","typeString":"literal_string \\"This function is restricted to the owner\\""}],"id":26,"name":"require","nodeType":"Identifier","overloadedDeclarations":[340,341],"referencedDeclaration":341,"src":"448:7:0","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$","typeString":"function (bool,string memory) pure"}},"id":32,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"448:106:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":33,"nodeType":"ExpressionStatement","src":"448:106:0"},{"id":34,"nodeType":"PlaceholderStatement","src":"564:1:0"}]},"documentation":null,"id":36,"name":"restricted","nodeType":"ModifierDefinition","parameters":{"id":25,"nodeType":"ParameterList","parameters":[],"src":"435:2:0"},"src":"416:156:0","visibility":"internal"},{"body":{"id":141,"nodeType":"Block","src":"655:639:0","statements":[{"expression":{"argumentTypes":null,"id":44,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":41,"name":"owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3,"src":"665:5:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":42,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":337,"src":"673:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":43,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"673:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},"src":"665:18:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":45,"nodeType":"ExpressionStatement","src":"665:18:0"},{"expression":{"argumentTypes":null,"id":50,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":46,"name":"proposalIndices","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7,"src":"694:15:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_string_memory_$_t_uint32_$","typeString":"mapping(string memory => uint32)"}},"id":48,"indexExpression":{"argumentTypes":null,"hexValue":"4e6f7468696e67","id":47,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"710:9:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_27d9ba80d77827936415bb0556f4b381deb8a23dc7c74e317212ea0a6b965eb5","typeString":"literal_string \\"Nothing\\""},"value":"Nothing"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"694:26:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"30","id":49,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"723:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"694:30:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":51,"nodeType":"ExpressionStatement","src":"694:30:0"},{"expression":{"argumentTypes":null,"id":56,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":52,"name":"proposalIndices","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7,"src":"734:15:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_string_memory_$_t_uint32_$","typeString":"mapping(string memory => uint32)"}},"id":54,"indexExpression":{"argumentTypes":null,"hexValue":"446f67","id":53,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"750:5:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_87856bd34916bb0e621c2c2aae95a8318405c51a55def4f451f4738d93e03771","typeString":"literal_string \\"Dog\\""},"value":"Dog"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"734:22:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"31","id":55,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"759:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"734:26:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":57,"nodeType":"ExpressionStatement","src":"734:26:0"},{"expression":{"argumentTypes":null,"id":62,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":58,"name":"proposalIndices","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7,"src":"770:15:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_string_memory_$_t_uint32_$","typeString":"mapping(string memory => uint32)"}},"id":60,"indexExpression":{"argumentTypes":null,"hexValue":"436174","id":59,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"786:5:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_d25f1cb268e7212783aa2330ac94ff078b1182c7819977d67e23a42dd800b873","typeString":"literal_string \\"Cat\\""},"value":"Cat"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"770:22:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"32","id":61,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"795:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"770:26:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":63,"nodeType":"ExpressionStatement","src":"770:26:0"},{"expression":{"argumentTypes":null,"id":68,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":64,"name":"proposalIndices","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7,"src":"806:15:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_string_memory_$_t_uint32_$","typeString":"mapping(string memory => uint32)"}},"id":66,"indexExpression":{"argumentTypes":null,"hexValue":"50656e6775696e","id":65,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"822:9:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_1b154774b575e0c8ceddd9bf9a5201b990df2d11828d5f07688d80863cb78bc1","typeString":"literal_string \\"Penguin\\""},"value":"Penguin"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"806:26:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"33","id":67,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"835:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_3_by_1","typeString":"int_const 3"},"value":"3"},"src":"806:30:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":69,"nodeType":"ExpressionStatement","src":"806:30:0"},{"expression":{"argumentTypes":null,"id":74,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":70,"name":"proposalIndices","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7,"src":"846:15:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_string_memory_$_t_uint32_$","typeString":"mapping(string memory => uint32)"}},"id":72,"indexExpression":{"argumentTypes":null,"hexValue":"4d6f6e6b6579","id":71,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"862:8:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_23e53e14c39ea81a150d444ba901cfbfd0dae3a380f9c5a725f3e3bc66f37ff9","typeString":"literal_string \\"Monkey\\""},"value":"Monkey"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"846:25:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"34","id":73,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"874:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_4_by_1","typeString":"int_const 4"},"value":"4"},"src":"846:29:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":75,"nodeType":"ExpressionStatement","src":"846:29:0"},{"expression":{"argumentTypes":null,"id":80,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":76,"name":"proposalIndices","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7,"src":"885:15:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_string_memory_$_t_uint32_$","typeString":"mapping(string memory => uint32)"}},"id":78,"indexExpression":{"argumentTypes":null,"hexValue":"4b6f616c61","id":77,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"901:7:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_c568372dce760513cef13c41234bb9741bc174998420762ee0ef86f58c6e7ed8","typeString":"literal_string \\"Koala\\""},"value":"Koala"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"885:24:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"35","id":79,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"912:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_5_by_1","typeString":"int_const 5"},"value":"5"},"src":"885:28:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":81,"nodeType":"ExpressionStatement","src":"885:28:0"},{"expression":{"argumentTypes":null,"id":86,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":82,"name":"proposalIndices","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7,"src":"923:15:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_string_memory_$_t_uint32_$","typeString":"mapping(string memory => uint32)"}},"id":84,"indexExpression":{"argumentTypes":null,"hexValue":"526162626974","id":83,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"939:8:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_570759eae85e7fee44c8d9fb913ed2a16bc6453194784112f709053fbb4e860b","typeString":"literal_string \\"Rabbit\\""},"value":"Rabbit"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"923:25:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"36","id":85,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"951:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_6_by_1","typeString":"int_const 6"},"value":"6"},"src":"923:29:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":87,"nodeType":"ExpressionStatement","src":"923:29:0"},{"expression":{"argumentTypes":null,"id":92,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":88,"name":"proposalIndices","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7,"src":"962:15:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_string_memory_$_t_uint32_$","typeString":"mapping(string memory => uint32)"}},"id":90,"indexExpression":{"argumentTypes":null,"hexValue":"50616e6461","id":89,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"978:7:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_0d9ce105e2c8d4ce6fe95eb24a154ece6dd0d8c2c1ae10c942e10eae4c0920ad","typeString":"literal_string \\"Panda\\""},"value":"Panda"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"962:24:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"37","id":91,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"989:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_7_by_1","typeString":"int_const 7"},"value":"7"},"src":"962:28:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":93,"nodeType":"ExpressionStatement","src":"962:28:0"},{"assignments":[95],"declarations":[{"constant":false,"id":95,"name":"threeTokenStudents","nodeType":"VariableDeclaration","scope":141,"src":"1001:25:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":94,"name":"uint32","nodeType":"ElementaryTypeName","src":"1001:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":null,"visibility":"internal"}],"id":102,"initialValue":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":101,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":98,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":96,"name":"studentCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":38,"src":"1030:12:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"hexValue":"33","id":97,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1045:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_3_by_1","typeString":"int_const 3"},"value":"3"},"src":"1030:16:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}}],"id":99,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"1029:18:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"hexValue":"34","id":100,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1050:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_4_by_1","typeString":"int_const 4"},"value":"4"},"src":"1029:22:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"VariableDeclarationStatement","src":"1001:50:0"},{"assignments":[104],"declarations":[{"constant":false,"id":104,"name":"twoTokenStudents","nodeType":"VariableDeclaration","scope":141,"src":"1061:23:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":103,"name":"uint32","nodeType":"ElementaryTypeName","src":"1061:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":null,"visibility":"internal"}],"id":108,"initialValue":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":107,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":105,"name":"studentCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":38,"src":"1087:12:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":106,"name":"threeTokenStudents","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":95,"src":"1102:18:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"1087:33:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"VariableDeclarationStatement","src":"1061:59:0"},{"expression":{"argumentTypes":null,"id":121,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":109,"name":"proposals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":18,"src":"1130:9:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint32_$_t_uint32_$","typeString":"mapping(uint32 => uint32)"}},"id":111,"indexExpression":{"argumentTypes":null,"hexValue":"30","id":110,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1140:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1130:12:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":120,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":118,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":114,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"33","id":112,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1145:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_3_by_1","typeString":"int_const 3"},"value":"3"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":113,"name":"threeTokenStudents","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":95,"src":"1149:18:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"1145:22:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":117,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"32","id":115,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1170:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":116,"name":"twoTokenStudents","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":104,"src":"1174:16:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"1170:20:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"1145:45:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"31","id":119,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1193:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"1145:49:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"1130:64:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":122,"nodeType":"ExpressionStatement","src":"1130:64:0"},{"body":{"id":139,"nodeType":"Block","src":"1247:41:0","statements":[{"expression":{"argumentTypes":null,"id":137,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":133,"name":"proposals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":18,"src":"1261:9:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint32_$_t_uint32_$","typeString":"mapping(uint32 => uint32)"}},"id":135,"indexExpression":{"argumentTypes":null,"id":134,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":124,"src":"1271:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1261:12:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"31","id":136,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1276:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"1261:16:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":138,"nodeType":"ExpressionStatement","src":"1261:16:0"}]},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":129,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":127,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":124,"src":"1224:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":128,"name":"numProposals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":10,"src":"1228:12:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"1224:16:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":140,"initializationExpression":{"assignments":[124],"declarations":[{"constant":false,"id":124,"name":"i","nodeType":"VariableDeclaration","scope":140,"src":"1210:8:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":123,"name":"uint32","nodeType":"ElementaryTypeName","src":"1210:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":null,"visibility":"internal"}],"id":126,"initialValue":{"argumentTypes":null,"hexValue":"31","id":125,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1221:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"nodeType":"VariableDeclarationStatement","src":"1210:12:0"},"loopExpression":{"expression":{"argumentTypes":null,"id":131,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":true,"src":"1242:3:0","subExpression":{"argumentTypes":null,"id":130,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":124,"src":"1244:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":132,"nodeType":"ExpressionStatement","src":"1242:3:0"},"nodeType":"ForStatement","src":"1205:83:0"}]},"documentation":null,"id":142,"implemented":true,"kind":"constructor","modifiers":[],"name":"","nodeType":"FunctionDefinition","parameters":{"id":39,"nodeType":"ParameterList","parameters":[{"constant":false,"id":38,"name":"studentCount","nodeType":"VariableDeclaration","scope":142,"src":"627:19:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":37,"name":"uint32","nodeType":"ElementaryTypeName","src":"627:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":null,"visibility":"internal"}],"src":"626:21:0"},"returnParameters":{"id":40,"nodeType":"ParameterList","parameters":[],"src":"655:0:0"},"scope":322,"src":"615:679:0","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":163,"nodeType":"Block","src":"1375:84:0","statements":[{"assignments":[152],"declarations":[{"constant":false,"id":152,"name":"i","nodeType":"VariableDeclaration","scope":163,"src":"1385:8:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":151,"name":"uint32","nodeType":"ElementaryTypeName","src":"1385:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":null,"visibility":"internal"}],"id":156,"initialValue":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":153,"name":"proposalIndices","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7,"src":"1396:15:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_string_memory_$_t_uint32_$","typeString":"mapping(string memory => uint32)"}},"id":155,"indexExpression":{"argumentTypes":null,"id":154,"name":"proposal","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":144,"src":"1412:8:0","typeDescriptions":{"typeIdentifier":"t_string_memory_ptr","typeString":"string memory"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1396:25:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"VariableDeclarationStatement","src":"1385:36:0"},{"expression":{"argumentTypes":null,"id":161,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":157,"name":"proposals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":18,"src":"1431:9:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint32_$_t_uint32_$","typeString":"mapping(uint32 => uint32)"}},"id":159,"indexExpression":{"argumentTypes":null,"id":158,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":152,"src":"1441:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1431:12:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":160,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":146,"src":"1446:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"1431:21:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":162,"nodeType":"ExpressionStatement","src":"1431:21:0"}]},"documentation":null,"id":164,"implemented":true,"kind":"function","modifiers":[{"arguments":null,"id":149,"modifierName":{"argumentTypes":null,"id":148,"name":"restricted","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":36,"src":"1364:10:0","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"1364:10:0"}],"name":"setVotes","nodeType":"FunctionDefinition","parameters":{"id":147,"nodeType":"ParameterList","parameters":[{"constant":false,"id":144,"name":"proposal","nodeType":"VariableDeclaration","scope":164,"src":"1318:22:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_string_memory_ptr","typeString":"string"},"typeName":{"id":143,"name":"string","nodeType":"ElementaryTypeName","src":"1318:6:0","typeDescriptions":{"typeIdentifier":"t_string_storage_ptr","typeString":"string"}},"value":null,"visibility":"internal"},{"constant":false,"id":146,"name":"amount","nodeType":"VariableDeclaration","scope":164,"src":"1342:13:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":145,"name":"uint32","nodeType":"ElementaryTypeName","src":"1342:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":null,"visibility":"internal"}],"src":"1317:39:0"},"returnParameters":{"id":150,"nodeType":"ParameterList","parameters":[],"src":"1375:0:0"},"scope":322,"src":"1300:159:0","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":177,"nodeType":"Block","src":"1519:89:0","statements":[{"expression":{"argumentTypes":null,"id":175,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":171,"name":"tokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":14,"src":"1585:6:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint32_$","typeString":"mapping(address => uint32)"}},"id":173,"indexExpression":{"argumentTypes":null,"id":172,"name":"addr","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":166,"src":"1592:4:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1585:12:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"39","id":174,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1600:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_9_by_1","typeString":"int_const 9"},"value":"9"},"src":"1585:16:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":176,"nodeType":"ExpressionStatement","src":"1585:16:0"}]},"documentation":null,"id":178,"implemented":true,"kind":"function","modifiers":[{"arguments":null,"id":169,"modifierName":{"argumentTypes":null,"id":168,"name":"restricted","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":36,"src":"1508:10:0","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"1508:10:0"}],"name":"setupStudent","nodeType":"FunctionDefinition","parameters":{"id":167,"nodeType":"ParameterList","parameters":[{"constant":false,"id":166,"name":"addr","nodeType":"VariableDeclaration","scope":178,"src":"1487:12:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":165,"name":"address","nodeType":"ElementaryTypeName","src":"1487:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"}],"src":"1486:14:0"},"returnParameters":{"id":170,"nodeType":"ParameterList","parameters":[],"src":"1519:0:0"},"scope":322,"src":"1465:143:0","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":250,"nodeType":"Block","src":"1662:568:0","statements":[{"assignments":[184],"declarations":[{"constant":false,"id":184,"name":"i","nodeType":"VariableDeclaration","scope":250,"src":"1714:8:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":183,"name":"uint32","nodeType":"ElementaryTypeName","src":"1714:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":null,"visibility":"internal"}],"id":188,"initialValue":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":185,"name":"proposalIndices","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7,"src":"1725:15:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_string_memory_$_t_uint32_$","typeString":"mapping(string memory => uint32)"}},"id":187,"indexExpression":{"argumentTypes":null,"id":186,"name":"proposal","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":180,"src":"1741:8:0","typeDescriptions":{"typeIdentifier":"t_string_memory_ptr","typeString":"string memory"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1725:25:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"VariableDeclarationStatement","src":"1714:36:0"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":195,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":190,"name":"tokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":14,"src":"1781:6:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint32_$","typeString":"mapping(address => uint32)"}},"id":193,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":191,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":337,"src":"1788:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":192,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1788:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1781:18:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"31","id":194,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1803:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"1781:23:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},{"argumentTypes":null,"hexValue":"596f75206e65656420746f2068617665206120746f6b656e20746f20766f74652077697468","id":196,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"1818:39:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_ecd3486d568e69ccf13825a905009c74303486ae004973a1978e24ff6c4d65b2","typeString":"literal_string \\"You need to have a token to vote with\\""},"value":"You need to have a token to vote with"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"},{"typeIdentifier":"t_stringliteral_ecd3486d568e69ccf13825a905009c74303486ae004973a1978e24ff6c4d65b2","typeString":"literal_string \\"You need to have a token to vote with\\""}],"id":189,"name":"require","nodeType":"Identifier","overloadedDeclarations":[340,341],"referencedDeclaration":341,"src":"1760:7:0","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$","typeString":"function (bool,string memory) pure"}},"id":197,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1760:107:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":198,"nodeType":"ExpressionStatement","src":"1760:107:0"},{"assignments":[200],"declarations":[{"constant":false,"id":200,"name":"n","nodeType":"VariableDeclaration","scope":250,"src":"1877:8:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":199,"name":"uint32","nodeType":"ElementaryTypeName","src":"1877:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":null,"visibility":"internal"}],"id":209,"initialValue":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":208,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":201,"name":"votesByFor","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":24,"src":"1888:10:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_uint32_$_$","typeString":"mapping(address => mapping(uint32 => uint32))"}},"id":204,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":202,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":337,"src":"1899:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":203,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1899:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1888:22:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint32_$_t_uint32_$","typeString":"mapping(uint32 => uint32)"}},"id":206,"indexExpression":{"argumentTypes":null,"id":205,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":184,"src":"1911:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1888:25:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"hexValue":"31","id":207,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1916:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"1888:29:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"VariableDeclarationStatement","src":"1877:40:0"},{"assignments":[211],"declarations":[{"constant":false,"id":211,"name":"required","nodeType":"VariableDeclaration","scope":250,"src":"2017:15:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":210,"name":"uint32","nodeType":"ElementaryTypeName","src":"2017:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":null,"visibility":"internal"}],"id":217,"initialValue":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":216,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":214,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"32","id":212,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2035:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":213,"name":"n","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":200,"src":"2039:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"2035:5:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"31","id":215,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2043:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"2035:9:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"VariableDeclarationStatement","src":"2017:27:0"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":224,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":219,"name":"tokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":14,"src":"2062:6:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint32_$","typeString":"mapping(address => uint32)"}},"id":222,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":220,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":337,"src":"2069:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":221,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2069:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2062:18:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"id":223,"name":"required","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":211,"src":"2084:8:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"2062:30:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},{"argumentTypes":null,"hexValue":"496e73756666696369656e7420746f6b656e73","id":225,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"2094:21:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_e8936288c111bb7d1b946c971bd3b8178cb07640f167f3ff2ff426c9e5ad86d5","typeString":"literal_string \\"Insufficient tokens\\""},"value":"Insufficient tokens"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"},{"typeIdentifier":"t_stringliteral_e8936288c111bb7d1b946c971bd3b8178cb07640f167f3ff2ff426c9e5ad86d5","typeString":"literal_string \\"Insufficient tokens\\""}],"id":218,"name":"require","nodeType":"Identifier","overloadedDeclarations":[340,341],"referencedDeclaration":341,"src":"2054:7:0","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$","typeString":"function (bool,string memory) pure"}},"id":226,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2054:62:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":227,"nodeType":"ExpressionStatement","src":"2054:62:0"},{"expression":{"argumentTypes":null,"id":233,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":228,"name":"tokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":14,"src":"2127:6:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint32_$","typeString":"mapping(address => uint32)"}},"id":231,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":229,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":337,"src":"2134:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":230,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2134:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"2127:18:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"-=","rightHandSide":{"argumentTypes":null,"id":232,"name":"required","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":211,"src":"2149:8:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"2127:30:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":234,"nodeType":"ExpressionStatement","src":"2127:30:0"},{"expression":{"argumentTypes":null,"id":242,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":235,"name":"votesByFor","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":24,"src":"2167:10:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_uint32_$_$","typeString":"mapping(address => mapping(uint32 => uint32))"}},"id":239,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":236,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":337,"src":"2178:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":237,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2178:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2167:22:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint32_$_t_uint32_$","typeString":"mapping(uint32 => uint32)"}},"id":240,"indexExpression":{"argumentTypes":null,"id":238,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":184,"src":"2190:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"2167:25:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":241,"name":"n","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":200,"src":"2195:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"2167:29:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":243,"nodeType":"ExpressionStatement","src":"2167:29:0"},{"expression":{"argumentTypes":null,"id":248,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":244,"name":"proposals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":18,"src":"2206:9:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint32_$_t_uint32_$","typeString":"mapping(uint32 => uint32)"}},"id":246,"indexExpression":{"argumentTypes":null,"id":245,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":184,"src":"2216:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"2206:12:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"hexValue":"31","id":247,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2222:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"2206:17:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":249,"nodeType":"ExpressionStatement","src":"2206:17:0"}]},"documentation":null,"id":251,"implemented":true,"kind":"function","modifiers":[],"name":"voteFor","nodeType":"FunctionDefinition","parameters":{"id":181,"nodeType":"ParameterList","parameters":[{"constant":false,"id":180,"name":"proposal","nodeType":"VariableDeclaration","scope":251,"src":"1631:22:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_string_memory_ptr","typeString":"string"},"typeName":{"id":179,"name":"string","nodeType":"ElementaryTypeName","src":"1631:6:0","typeDescriptions":{"typeIdentifier":"t_string_storage_ptr","typeString":"string"}},"value":null,"visibility":"internal"}],"src":"1630:24:0"},"returnParameters":{"id":182,"nodeType":"ParameterList","parameters":[],"src":"1662:0:0"},"scope":322,"src":"1614:616:0","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":299,"nodeType":"Block","src":"2339:234:0","statements":[{"body":{"id":297,"nodeType":"Block","src":"2391:176:0","statements":[{"assignments":[265],"declarations":[{"constant":false,"id":265,"name":"n","nodeType":"VariableDeclaration","scope":297,"src":"2405:8:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":264,"name":"uint32","nodeType":"ElementaryTypeName","src":"2405:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":null,"visibility":"internal"}],"id":272,"initialValue":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":266,"name":"votesByFor","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":24,"src":"2416:10:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_uint32_$_$","typeString":"mapping(address => mapping(uint32 => uint32))"}},"id":269,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":267,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":337,"src":"2427:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":268,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2427:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2416:22:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint32_$_t_uint32_$","typeString":"mapping(uint32 => uint32)"}},"id":271,"indexExpression":{"argumentTypes":null,"id":270,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":255,"src":"2439:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2416:25:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"VariableDeclarationStatement","src":"2405:36:0"},{"expression":{"argumentTypes":null,"id":280,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":273,"name":"tokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":14,"src":"2455:6:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint32_$","typeString":"mapping(address => uint32)"}},"id":276,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":274,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":337,"src":"2462:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":275,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2462:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"2455:18:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":279,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":277,"name":"n","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":265,"src":"2477:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":278,"name":"n","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":265,"src":"2481:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"2477:5:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"2455:27:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":281,"nodeType":"ExpressionStatement","src":"2455:27:0"},{"expression":{"argumentTypes":null,"id":286,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":282,"name":"proposals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":18,"src":"2496:9:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint32_$_t_uint32_$","typeString":"mapping(uint32 => uint32)"}},"id":284,"indexExpression":{"argumentTypes":null,"id":283,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":255,"src":"2506:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"2496:12:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"-=","rightHandSide":{"argumentTypes":null,"id":285,"name":"n","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":265,"src":"2512:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"2496:17:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":287,"nodeType":"ExpressionStatement","src":"2496:17:0"},{"expression":{"argumentTypes":null,"id":295,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":288,"name":"votesByFor","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":24,"src":"2527:10:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_uint32_$_$","typeString":"mapping(address => mapping(uint32 => uint32))"}},"id":292,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":289,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":337,"src":"2538:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":290,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2538:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2527:22:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint32_$_t_uint32_$","typeString":"mapping(uint32 => uint32)"}},"id":293,"indexExpression":{"argumentTypes":null,"id":291,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":255,"src":"2550:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"2527:25:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"30","id":294,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2555:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2527:29:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":296,"nodeType":"ExpressionStatement","src":"2527:29:0"}]},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":260,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":258,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":255,"src":"2368:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":259,"name":"numProposals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":10,"src":"2372:12:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"2368:16:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":298,"initializationExpression":{"assignments":[255],"declarations":[{"constant":false,"id":255,"name":"i","nodeType":"VariableDeclaration","scope":298,"src":"2354:8:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":254,"name":"uint32","nodeType":"ElementaryTypeName","src":"2354:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":null,"visibility":"internal"}],"id":257,"initialValue":{"argumentTypes":null,"hexValue":"30","id":256,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2365:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"2354:12:0"},"loopExpression":{"expression":{"argumentTypes":null,"id":262,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":true,"src":"2386:3:0","subExpression":{"argumentTypes":null,"id":261,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":255,"src":"2388:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":263,"nodeType":"ExpressionStatement","src":"2386:3:0"},"nodeType":"ForStatement","src":"2349:218:0"}]},"documentation":null,"id":300,"implemented":true,"kind":"function","modifiers":[],"name":"resetMyVotes","nodeType":"FunctionDefinition","parameters":{"id":252,"nodeType":"ParameterList","parameters":[],"src":"2329:2:0"},"returnParameters":{"id":253,"nodeType":"ParameterList","parameters":[],"src":"2339:0:0"},"scope":322,"src":"2308:265:0","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":320,"nodeType":"Block","src":"2654:95:0","statements":[{"assignments":[308],"declarations":[{"constant":false,"id":308,"name":"i","nodeType":"VariableDeclaration","scope":320,"src":"2664:8:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":307,"name":"uint32","nodeType":"ElementaryTypeName","src":"2664:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":null,"visibility":"internal"}],"id":312,"initialValue":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":309,"name":"proposalIndices","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7,"src":"2675:15:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_string_memory_$_t_uint32_$","typeString":"mapping(string memory => uint32)"}},"id":311,"indexExpression":{"argumentTypes":null,"id":310,"name":"proposal","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":302,"src":"2691:8:0","typeDescriptions":{"typeIdentifier":"t_string_memory_ptr","typeString":"string memory"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2675:25:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"VariableDeclarationStatement","src":"2664:36:0"},{"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":313,"name":"votesByFor","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":24,"src":"2717:10:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_uint32_$_$","typeString":"mapping(address => mapping(uint32 => uint32))"}},"id":316,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":314,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":337,"src":"2728:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":315,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2728:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2717:22:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint32_$_t_uint32_$","typeString":"mapping(uint32 => uint32)"}},"id":318,"indexExpression":{"argumentTypes":null,"id":317,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":308,"src":"2740:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2717:25:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"functionReturnParameters":306,"id":319,"nodeType":"Return","src":"2710:32:0"}]},"documentation":null,"id":321,"implemented":true,"kind":"function","modifiers":[],"name":"myVotes","nodeType":"FunctionDefinition","parameters":{"id":303,"nodeType":"ParameterList","parameters":[{"constant":false,"id":302,"name":"proposal","nodeType":"VariableDeclaration","scope":321,"src":"2596:22:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_string_memory_ptr","typeString":"string"},"typeName":{"id":301,"name":"string","nodeType":"ElementaryTypeName","src":"2596:6:0","typeDescriptions":{"typeIdentifier":"t_string_storage_ptr","typeString":"string"}},"value":null,"visibility":"internal"}],"src":"2595:24:0"},"returnParameters":{"id":306,"nodeType":"ParameterList","parameters":[{"constant":false,"id":305,"name":"votes","nodeType":"VariableDeclaration","scope":321,"src":"2640:12:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":304,"name":"uint32","nodeType":"ElementaryTypeName","src":"2640:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":null,"visibility":"internal"}],"src":"2639:14:0"},"scope":322,"src":"2579:170:0","stateMutability":"view","superFunction":null,"visibility":"public"}],"scope":323,"src":"28:2723:0"}],"src":"0:2752:0"},"legacyAST":{"absolutePath":"/Users/mac/Drive/Documents/Academia/EPFL/TA/cs234/DAO-Interactive/contracts/Proposals.sol","exportedSymbols":{"Proposals":[322]},"id":323,"nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity",">=","0.4",".22"],"nodeType":"PragmaDirective","src":"0:25:0"},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":322,"linearizedBaseContracts":[322],"name":"Proposals","nodeType":"ContractDefinition","nodes":[{"constant":false,"id":3,"name":"owner","nodeType":"VariableDeclaration","scope":322,"src":"53:20:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":2,"name":"address","nodeType":"ElementaryTypeName","src":"53:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"public"},{"constant":false,"id":7,"name":"proposalIndices","nodeType":"VariableDeclaration","scope":322,"src":"79:48:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_string_memory_$_t_uint32_$","typeString":"mapping(string => uint32)"},"typeName":{"id":6,"keyType":{"id":4,"name":"string","nodeType":"ElementaryTypeName","src":"87:6:0","typeDescriptions":{"typeIdentifier":"t_string_storage_ptr","typeString":"string"}},"nodeType":"Mapping","src":"79:25:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_string_memory_$_t_uint32_$","typeString":"mapping(string => uint32)"},"valueType":{"id":5,"name":"uint32","nodeType":"ElementaryTypeName","src":"97:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}}},"value":null,"visibility":"public"},{"constant":false,"id":10,"name":"numProposals","nodeType":"VariableDeclaration","scope":322,"src":"133:23:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":8,"name":"uint32","nodeType":"ElementaryTypeName","src":"133:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":{"argumentTypes":null,"hexValue":"38","id":9,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"155:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_8_by_1","typeString":"int_const 8"},"value":"8"},"visibility":"internal"},{"constant":false,"id":14,"name":"tokens","nodeType":"VariableDeclaration","scope":322,"src":"212:40:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint32_$","typeString":"mapping(address => uint32)"},"typeName":{"id":13,"keyType":{"id":11,"name":"address","nodeType":"ElementaryTypeName","src":"220:7:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Mapping","src":"212:26:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint32_$","typeString":"mapping(address => uint32)"},"valueType":{"id":12,"name":"uint32","nodeType":"ElementaryTypeName","src":"231:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}}},"value":null,"visibility":"public"},{"constant":false,"id":18,"name":"proposals","nodeType":"VariableDeclaration","scope":322,"src":"305:42:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint32_$_t_uint32_$","typeString":"mapping(uint32 => uint32)"},"typeName":{"id":17,"keyType":{"id":15,"name":"uint32","nodeType":"ElementaryTypeName","src":"313:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Mapping","src":"305:25:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint32_$_t_uint32_$","typeString":"mapping(uint32 => uint32)"},"valueType":{"id":16,"name":"uint32","nodeType":"ElementaryTypeName","src":"323:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}}},"value":null,"visibility":"public"},{"constant":false,"id":24,"name":"votesByFor","nodeType":"VariableDeclaration","scope":322,"src":"353:56:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_uint32_$_$","typeString":"mapping(address => mapping(uint32 => uint32))"},"typeName":{"id":23,"keyType":{"id":19,"name":"address","nodeType":"ElementaryTypeName","src":"361:7:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Mapping","src":"353:45:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_uint32_$_$","typeString":"mapping(address => mapping(uint32 => uint32))"},"valueType":{"id":22,"keyType":{"id":20,"name":"uint32","nodeType":"ElementaryTypeName","src":"380:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Mapping","src":"372:25:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint32_$_t_uint32_$","typeString":"mapping(uint32 => uint32)"},"valueType":{"id":21,"name":"uint32","nodeType":"ElementaryTypeName","src":"390:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}}}},"value":null,"visibility":"internal"},{"body":{"id":35,"nodeType":"Block","src":"438:134:0","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":30,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":27,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":337,"src":"469:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":28,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"469:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":29,"name":"owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3,"src":"483:5:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"469:19:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},{"argumentTypes":null,"hexValue":"546869732066756e6374696f6e206973207265737472696374656420746f20746865206f776e6572","id":31,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"502:42:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_f5132e684ff59c4f69cfd3e5048a139c5e9dfc67213b9635f1b469112c0afb2e","typeString":"literal_string \\"This function is restricted to the owner\\""},"value":"This function is restricted to the owner"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"},{"typeIdentifier":"t_stringliteral_f5132e684ff59c4f69cfd3e5048a139c5e9dfc67213b9635f1b469112c0afb2e","typeString":"literal_string \\"This function is restricted to the owner\\""}],"id":26,"name":"require","nodeType":"Identifier","overloadedDeclarations":[340,341],"referencedDeclaration":341,"src":"448:7:0","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$","typeString":"function (bool,string memory) pure"}},"id":32,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"448:106:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":33,"nodeType":"ExpressionStatement","src":"448:106:0"},{"id":34,"nodeType":"PlaceholderStatement","src":"564:1:0"}]},"documentation":null,"id":36,"name":"restricted","nodeType":"ModifierDefinition","parameters":{"id":25,"nodeType":"ParameterList","parameters":[],"src":"435:2:0"},"src":"416:156:0","visibility":"internal"},{"body":{"id":141,"nodeType":"Block","src":"655:639:0","statements":[{"expression":{"argumentTypes":null,"id":44,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":41,"name":"owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3,"src":"665:5:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":42,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":337,"src":"673:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":43,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"673:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},"src":"665:18:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":45,"nodeType":"ExpressionStatement","src":"665:18:0"},{"expression":{"argumentTypes":null,"id":50,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":46,"name":"proposalIndices","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7,"src":"694:15:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_string_memory_$_t_uint32_$","typeString":"mapping(string memory => uint32)"}},"id":48,"indexExpression":{"argumentTypes":null,"hexValue":"4e6f7468696e67","id":47,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"710:9:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_27d9ba80d77827936415bb0556f4b381deb8a23dc7c74e317212ea0a6b965eb5","typeString":"literal_string \\"Nothing\\""},"value":"Nothing"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"694:26:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"30","id":49,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"723:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"694:30:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":51,"nodeType":"ExpressionStatement","src":"694:30:0"},{"expression":{"argumentTypes":null,"id":56,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":52,"name":"proposalIndices","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7,"src":"734:15:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_string_memory_$_t_uint32_$","typeString":"mapping(string memory => uint32)"}},"id":54,"indexExpression":{"argumentTypes":null,"hexValue":"446f67","id":53,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"750:5:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_87856bd34916bb0e621c2c2aae95a8318405c51a55def4f451f4738d93e03771","typeString":"literal_string \\"Dog\\""},"value":"Dog"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"734:22:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"31","id":55,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"759:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"734:26:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":57,"nodeType":"ExpressionStatement","src":"734:26:0"},{"expression":{"argumentTypes":null,"id":62,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":58,"name":"proposalIndices","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7,"src":"770:15:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_string_memory_$_t_uint32_$","typeString":"mapping(string memory => uint32)"}},"id":60,"indexExpression":{"argumentTypes":null,"hexValue":"436174","id":59,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"786:5:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_d25f1cb268e7212783aa2330ac94ff078b1182c7819977d67e23a42dd800b873","typeString":"literal_string \\"Cat\\""},"value":"Cat"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"770:22:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"32","id":61,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"795:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"770:26:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":63,"nodeType":"ExpressionStatement","src":"770:26:0"},{"expression":{"argumentTypes":null,"id":68,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":64,"name":"proposalIndices","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7,"src":"806:15:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_string_memory_$_t_uint32_$","typeString":"mapping(string memory => uint32)"}},"id":66,"indexExpression":{"argumentTypes":null,"hexValue":"50656e6775696e","id":65,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"822:9:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_1b154774b575e0c8ceddd9bf9a5201b990df2d11828d5f07688d80863cb78bc1","typeString":"literal_string \\"Penguin\\""},"value":"Penguin"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"806:26:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"33","id":67,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"835:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_3_by_1","typeString":"int_const 3"},"value":"3"},"src":"806:30:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":69,"nodeType":"ExpressionStatement","src":"806:30:0"},{"expression":{"argumentTypes":null,"id":74,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":70,"name":"proposalIndices","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7,"src":"846:15:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_string_memory_$_t_uint32_$","typeString":"mapping(string memory => uint32)"}},"id":72,"indexExpression":{"argumentTypes":null,"hexValue":"4d6f6e6b6579","id":71,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"862:8:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_23e53e14c39ea81a150d444ba901cfbfd0dae3a380f9c5a725f3e3bc66f37ff9","typeString":"literal_string \\"Monkey\\""},"value":"Monkey"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"846:25:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"34","id":73,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"874:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_4_by_1","typeString":"int_const 4"},"value":"4"},"src":"846:29:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":75,"nodeType":"ExpressionStatement","src":"846:29:0"},{"expression":{"argumentTypes":null,"id":80,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":76,"name":"proposalIndices","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7,"src":"885:15:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_string_memory_$_t_uint32_$","typeString":"mapping(string memory => uint32)"}},"id":78,"indexExpression":{"argumentTypes":null,"hexValue":"4b6f616c61","id":77,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"901:7:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_c568372dce760513cef13c41234bb9741bc174998420762ee0ef86f58c6e7ed8","typeString":"literal_string \\"Koala\\""},"value":"Koala"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"885:24:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"35","id":79,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"912:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_5_by_1","typeString":"int_const 5"},"value":"5"},"src":"885:28:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":81,"nodeType":"ExpressionStatement","src":"885:28:0"},{"expression":{"argumentTypes":null,"id":86,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":82,"name":"proposalIndices","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7,"src":"923:15:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_string_memory_$_t_uint32_$","typeString":"mapping(string memory => uint32)"}},"id":84,"indexExpression":{"argumentTypes":null,"hexValue":"526162626974","id":83,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"939:8:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_570759eae85e7fee44c8d9fb913ed2a16bc6453194784112f709053fbb4e860b","typeString":"literal_string \\"Rabbit\\""},"value":"Rabbit"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"923:25:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"36","id":85,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"951:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_6_by_1","typeString":"int_const 6"},"value":"6"},"src":"923:29:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":87,"nodeType":"ExpressionStatement","src":"923:29:0"},{"expression":{"argumentTypes":null,"id":92,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":88,"name":"proposalIndices","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7,"src":"962:15:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_string_memory_$_t_uint32_$","typeString":"mapping(string memory => uint32)"}},"id":90,"indexExpression":{"argumentTypes":null,"hexValue":"50616e6461","id":89,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"978:7:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_0d9ce105e2c8d4ce6fe95eb24a154ece6dd0d8c2c1ae10c942e10eae4c0920ad","typeString":"literal_string \\"Panda\\""},"value":"Panda"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"962:24:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"37","id":91,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"989:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_7_by_1","typeString":"int_const 7"},"value":"7"},"src":"962:28:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":93,"nodeType":"ExpressionStatement","src":"962:28:0"},{"assignments":[95],"declarations":[{"constant":false,"id":95,"name":"threeTokenStudents","nodeType":"VariableDeclaration","scope":141,"src":"1001:25:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":94,"name":"uint32","nodeType":"ElementaryTypeName","src":"1001:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":null,"visibility":"internal"}],"id":102,"initialValue":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":101,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":98,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":96,"name":"studentCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":38,"src":"1030:12:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"hexValue":"33","id":97,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1045:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_3_by_1","typeString":"int_const 3"},"value":"3"},"src":"1030:16:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}}],"id":99,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"1029:18:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"hexValue":"34","id":100,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1050:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_4_by_1","typeString":"int_const 4"},"value":"4"},"src":"1029:22:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"VariableDeclarationStatement","src":"1001:50:0"},{"assignments":[104],"declarations":[{"constant":false,"id":104,"name":"twoTokenStudents","nodeType":"VariableDeclaration","scope":141,"src":"1061:23:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":103,"name":"uint32","nodeType":"ElementaryTypeName","src":"1061:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":null,"visibility":"internal"}],"id":108,"initialValue":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":107,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":105,"name":"studentCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":38,"src":"1087:12:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":106,"name":"threeTokenStudents","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":95,"src":"1102:18:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"1087:33:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"VariableDeclarationStatement","src":"1061:59:0"},{"expression":{"argumentTypes":null,"id":121,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":109,"name":"proposals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":18,"src":"1130:9:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint32_$_t_uint32_$","typeString":"mapping(uint32 => uint32)"}},"id":111,"indexExpression":{"argumentTypes":null,"hexValue":"30","id":110,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1140:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1130:12:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":120,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":118,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":114,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"33","id":112,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1145:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_3_by_1","typeString":"int_const 3"},"value":"3"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":113,"name":"threeTokenStudents","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":95,"src":"1149:18:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"1145:22:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":117,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"32","id":115,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1170:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":116,"name":"twoTokenStudents","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":104,"src":"1174:16:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"1170:20:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"1145:45:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"31","id":119,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1193:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"1145:49:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"1130:64:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":122,"nodeType":"ExpressionStatement","src":"1130:64:0"},{"body":{"id":139,"nodeType":"Block","src":"1247:41:0","statements":[{"expression":{"argumentTypes":null,"id":137,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":133,"name":"proposals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":18,"src":"1261:9:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint32_$_t_uint32_$","typeString":"mapping(uint32 => uint32)"}},"id":135,"indexExpression":{"argumentTypes":null,"id":134,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":124,"src":"1271:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1261:12:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"31","id":136,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1276:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"1261:16:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":138,"nodeType":"ExpressionStatement","src":"1261:16:0"}]},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":129,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":127,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":124,"src":"1224:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":128,"name":"numProposals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":10,"src":"1228:12:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"1224:16:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":140,"initializationExpression":{"assignments":[124],"declarations":[{"constant":false,"id":124,"name":"i","nodeType":"VariableDeclaration","scope":140,"src":"1210:8:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":123,"name":"uint32","nodeType":"ElementaryTypeName","src":"1210:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":null,"visibility":"internal"}],"id":126,"initialValue":{"argumentTypes":null,"hexValue":"31","id":125,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1221:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"nodeType":"VariableDeclarationStatement","src":"1210:12:0"},"loopExpression":{"expression":{"argumentTypes":null,"id":131,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":true,"src":"1242:3:0","subExpression":{"argumentTypes":null,"id":130,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":124,"src":"1244:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":132,"nodeType":"ExpressionStatement","src":"1242:3:0"},"nodeType":"ForStatement","src":"1205:83:0"}]},"documentation":null,"id":142,"implemented":true,"kind":"constructor","modifiers":[],"name":"","nodeType":"FunctionDefinition","parameters":{"id":39,"nodeType":"ParameterList","parameters":[{"constant":false,"id":38,"name":"studentCount","nodeType":"VariableDeclaration","scope":142,"src":"627:19:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":37,"name":"uint32","nodeType":"ElementaryTypeName","src":"627:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":null,"visibility":"internal"}],"src":"626:21:0"},"returnParameters":{"id":40,"nodeType":"ParameterList","parameters":[],"src":"655:0:0"},"scope":322,"src":"615:679:0","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":163,"nodeType":"Block","src":"1375:84:0","statements":[{"assignments":[152],"declarations":[{"constant":false,"id":152,"name":"i","nodeType":"VariableDeclaration","scope":163,"src":"1385:8:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":151,"name":"uint32","nodeType":"ElementaryTypeName","src":"1385:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":null,"visibility":"internal"}],"id":156,"initialValue":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":153,"name":"proposalIndices","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7,"src":"1396:15:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_string_memory_$_t_uint32_$","typeString":"mapping(string memory => uint32)"}},"id":155,"indexExpression":{"argumentTypes":null,"id":154,"name":"proposal","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":144,"src":"1412:8:0","typeDescriptions":{"typeIdentifier":"t_string_memory_ptr","typeString":"string memory"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1396:25:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"VariableDeclarationStatement","src":"1385:36:0"},{"expression":{"argumentTypes":null,"id":161,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":157,"name":"proposals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":18,"src":"1431:9:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint32_$_t_uint32_$","typeString":"mapping(uint32 => uint32)"}},"id":159,"indexExpression":{"argumentTypes":null,"id":158,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":152,"src":"1441:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1431:12:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":160,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":146,"src":"1446:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"1431:21:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":162,"nodeType":"ExpressionStatement","src":"1431:21:0"}]},"documentation":null,"id":164,"implemented":true,"kind":"function","modifiers":[{"arguments":null,"id":149,"modifierName":{"argumentTypes":null,"id":148,"name":"restricted","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":36,"src":"1364:10:0","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"1364:10:0"}],"name":"setVotes","nodeType":"FunctionDefinition","parameters":{"id":147,"nodeType":"ParameterList","parameters":[{"constant":false,"id":144,"name":"proposal","nodeType":"VariableDeclaration","scope":164,"src":"1318:22:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_string_memory_ptr","typeString":"string"},"typeName":{"id":143,"name":"string","nodeType":"ElementaryTypeName","src":"1318:6:0","typeDescriptions":{"typeIdentifier":"t_string_storage_ptr","typeString":"string"}},"value":null,"visibility":"internal"},{"constant":false,"id":146,"name":"amount","nodeType":"VariableDeclaration","scope":164,"src":"1342:13:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":145,"name":"uint32","nodeType":"ElementaryTypeName","src":"1342:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":null,"visibility":"internal"}],"src":"1317:39:0"},"returnParameters":{"id":150,"nodeType":"ParameterList","parameters":[],"src":"1375:0:0"},"scope":322,"src":"1300:159:0","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":177,"nodeType":"Block","src":"1519:89:0","statements":[{"expression":{"argumentTypes":null,"id":175,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":171,"name":"tokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":14,"src":"1585:6:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint32_$","typeString":"mapping(address => uint32)"}},"id":173,"indexExpression":{"argumentTypes":null,"id":172,"name":"addr","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":166,"src":"1592:4:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1585:12:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"39","id":174,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1600:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_9_by_1","typeString":"int_const 9"},"value":"9"},"src":"1585:16:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":176,"nodeType":"ExpressionStatement","src":"1585:16:0"}]},"documentation":null,"id":178,"implemented":true,"kind":"function","modifiers":[{"arguments":null,"id":169,"modifierName":{"argumentTypes":null,"id":168,"name":"restricted","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":36,"src":"1508:10:0","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"1508:10:0"}],"name":"setupStudent","nodeType":"FunctionDefinition","parameters":{"id":167,"nodeType":"ParameterList","parameters":[{"constant":false,"id":166,"name":"addr","nodeType":"VariableDeclaration","scope":178,"src":"1487:12:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":165,"name":"address","nodeType":"ElementaryTypeName","src":"1487:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"}],"src":"1486:14:0"},"returnParameters":{"id":170,"nodeType":"ParameterList","parameters":[],"src":"1519:0:0"},"scope":322,"src":"1465:143:0","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":250,"nodeType":"Block","src":"1662:568:0","statements":[{"assignments":[184],"declarations":[{"constant":false,"id":184,"name":"i","nodeType":"VariableDeclaration","scope":250,"src":"1714:8:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":183,"name":"uint32","nodeType":"ElementaryTypeName","src":"1714:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":null,"visibility":"internal"}],"id":188,"initialValue":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":185,"name":"proposalIndices","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7,"src":"1725:15:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_string_memory_$_t_uint32_$","typeString":"mapping(string memory => uint32)"}},"id":187,"indexExpression":{"argumentTypes":null,"id":186,"name":"proposal","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":180,"src":"1741:8:0","typeDescriptions":{"typeIdentifier":"t_string_memory_ptr","typeString":"string memory"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1725:25:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"VariableDeclarationStatement","src":"1714:36:0"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":195,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":190,"name":"tokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":14,"src":"1781:6:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint32_$","typeString":"mapping(address => uint32)"}},"id":193,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":191,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":337,"src":"1788:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":192,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1788:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1781:18:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"31","id":194,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1803:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"1781:23:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},{"argumentTypes":null,"hexValue":"596f75206e65656420746f2068617665206120746f6b656e20746f20766f74652077697468","id":196,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"1818:39:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_ecd3486d568e69ccf13825a905009c74303486ae004973a1978e24ff6c4d65b2","typeString":"literal_string \\"You need to have a token to vote with\\""},"value":"You need to have a token to vote with"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"},{"typeIdentifier":"t_stringliteral_ecd3486d568e69ccf13825a905009c74303486ae004973a1978e24ff6c4d65b2","typeString":"literal_string \\"You need to have a token to vote with\\""}],"id":189,"name":"require","nodeType":"Identifier","overloadedDeclarations":[340,341],"referencedDeclaration":341,"src":"1760:7:0","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$","typeString":"function (bool,string memory) pure"}},"id":197,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1760:107:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":198,"nodeType":"ExpressionStatement","src":"1760:107:0"},{"assignments":[200],"declarations":[{"constant":false,"id":200,"name":"n","nodeType":"VariableDeclaration","scope":250,"src":"1877:8:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":199,"name":"uint32","nodeType":"ElementaryTypeName","src":"1877:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":null,"visibility":"internal"}],"id":209,"initialValue":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":208,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":201,"name":"votesByFor","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":24,"src":"1888:10:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_uint32_$_$","typeString":"mapping(address => mapping(uint32 => uint32))"}},"id":204,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":202,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":337,"src":"1899:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":203,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1899:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1888:22:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint32_$_t_uint32_$","typeString":"mapping(uint32 => uint32)"}},"id":206,"indexExpression":{"argumentTypes":null,"id":205,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":184,"src":"1911:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1888:25:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"hexValue":"31","id":207,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1916:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"1888:29:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"VariableDeclarationStatement","src":"1877:40:0"},{"assignments":[211],"declarations":[{"constant":false,"id":211,"name":"required","nodeType":"VariableDeclaration","scope":250,"src":"2017:15:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":210,"name":"uint32","nodeType":"ElementaryTypeName","src":"2017:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":null,"visibility":"internal"}],"id":217,"initialValue":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":216,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":214,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"32","id":212,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2035:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":213,"name":"n","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":200,"src":"2039:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"2035:5:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"31","id":215,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2043:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"2035:9:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"VariableDeclarationStatement","src":"2017:27:0"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":224,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":219,"name":"tokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":14,"src":"2062:6:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint32_$","typeString":"mapping(address => uint32)"}},"id":222,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":220,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":337,"src":"2069:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":221,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2069:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2062:18:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"id":223,"name":"required","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":211,"src":"2084:8:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"2062:30:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},{"argumentTypes":null,"hexValue":"496e73756666696369656e7420746f6b656e73","id":225,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"2094:21:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_e8936288c111bb7d1b946c971bd3b8178cb07640f167f3ff2ff426c9e5ad86d5","typeString":"literal_string \\"Insufficient tokens\\""},"value":"Insufficient tokens"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"},{"typeIdentifier":"t_stringliteral_e8936288c111bb7d1b946c971bd3b8178cb07640f167f3ff2ff426c9e5ad86d5","typeString":"literal_string \\"Insufficient tokens\\""}],"id":218,"name":"require","nodeType":"Identifier","overloadedDeclarations":[340,341],"referencedDeclaration":341,"src":"2054:7:0","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$","typeString":"function (bool,string memory) pure"}},"id":226,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2054:62:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":227,"nodeType":"ExpressionStatement","src":"2054:62:0"},{"expression":{"argumentTypes":null,"id":233,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":228,"name":"tokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":14,"src":"2127:6:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint32_$","typeString":"mapping(address => uint32)"}},"id":231,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":229,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":337,"src":"2134:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":230,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2134:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"2127:18:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"-=","rightHandSide":{"argumentTypes":null,"id":232,"name":"required","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":211,"src":"2149:8:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"2127:30:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":234,"nodeType":"ExpressionStatement","src":"2127:30:0"},{"expression":{"argumentTypes":null,"id":242,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":235,"name":"votesByFor","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":24,"src":"2167:10:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_uint32_$_$","typeString":"mapping(address => mapping(uint32 => uint32))"}},"id":239,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":236,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":337,"src":"2178:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":237,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2178:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2167:22:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint32_$_t_uint32_$","typeString":"mapping(uint32 => uint32)"}},"id":240,"indexExpression":{"argumentTypes":null,"id":238,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":184,"src":"2190:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"2167:25:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":241,"name":"n","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":200,"src":"2195:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"2167:29:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":243,"nodeType":"ExpressionStatement","src":"2167:29:0"},{"expression":{"argumentTypes":null,"id":248,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":244,"name":"proposals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":18,"src":"2206:9:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint32_$_t_uint32_$","typeString":"mapping(uint32 => uint32)"}},"id":246,"indexExpression":{"argumentTypes":null,"id":245,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":184,"src":"2216:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"2206:12:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"hexValue":"31","id":247,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2222:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"2206:17:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":249,"nodeType":"ExpressionStatement","src":"2206:17:0"}]},"documentation":null,"id":251,"implemented":true,"kind":"function","modifiers":[],"name":"voteFor","nodeType":"FunctionDefinition","parameters":{"id":181,"nodeType":"ParameterList","parameters":[{"constant":false,"id":180,"name":"proposal","nodeType":"VariableDeclaration","scope":251,"src":"1631:22:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_string_memory_ptr","typeString":"string"},"typeName":{"id":179,"name":"string","nodeType":"ElementaryTypeName","src":"1631:6:0","typeDescriptions":{"typeIdentifier":"t_string_storage_ptr","typeString":"string"}},"value":null,"visibility":"internal"}],"src":"1630:24:0"},"returnParameters":{"id":182,"nodeType":"ParameterList","parameters":[],"src":"1662:0:0"},"scope":322,"src":"1614:616:0","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":299,"nodeType":"Block","src":"2339:234:0","statements":[{"body":{"id":297,"nodeType":"Block","src":"2391:176:0","statements":[{"assignments":[265],"declarations":[{"constant":false,"id":265,"name":"n","nodeType":"VariableDeclaration","scope":297,"src":"2405:8:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":264,"name":"uint32","nodeType":"ElementaryTypeName","src":"2405:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":null,"visibility":"internal"}],"id":272,"initialValue":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":266,"name":"votesByFor","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":24,"src":"2416:10:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_uint32_$_$","typeString":"mapping(address => mapping(uint32 => uint32))"}},"id":269,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":267,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":337,"src":"2427:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":268,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2427:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2416:22:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint32_$_t_uint32_$","typeString":"mapping(uint32 => uint32)"}},"id":271,"indexExpression":{"argumentTypes":null,"id":270,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":255,"src":"2439:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2416:25:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"VariableDeclarationStatement","src":"2405:36:0"},{"expression":{"argumentTypes":null,"id":280,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":273,"name":"tokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":14,"src":"2455:6:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint32_$","typeString":"mapping(address => uint32)"}},"id":276,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":274,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":337,"src":"2462:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":275,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2462:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"2455:18:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":279,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":277,"name":"n","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":265,"src":"2477:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":278,"name":"n","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":265,"src":"2481:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"2477:5:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"2455:27:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":281,"nodeType":"ExpressionStatement","src":"2455:27:0"},{"expression":{"argumentTypes":null,"id":286,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":282,"name":"proposals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":18,"src":"2496:9:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint32_$_t_uint32_$","typeString":"mapping(uint32 => uint32)"}},"id":284,"indexExpression":{"argumentTypes":null,"id":283,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":255,"src":"2506:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"2496:12:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"-=","rightHandSide":{"argumentTypes":null,"id":285,"name":"n","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":265,"src":"2512:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"2496:17:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":287,"nodeType":"ExpressionStatement","src":"2496:17:0"},{"expression":{"argumentTypes":null,"id":295,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":288,"name":"votesByFor","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":24,"src":"2527:10:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_uint32_$_$","typeString":"mapping(address => mapping(uint32 => uint32))"}},"id":292,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":289,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":337,"src":"2538:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":290,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2538:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2527:22:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint32_$_t_uint32_$","typeString":"mapping(uint32 => uint32)"}},"id":293,"indexExpression":{"argumentTypes":null,"id":291,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":255,"src":"2550:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"2527:25:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"30","id":294,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2555:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2527:29:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":296,"nodeType":"ExpressionStatement","src":"2527:29:0"}]},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":260,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":258,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":255,"src":"2368:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":259,"name":"numProposals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":10,"src":"2372:12:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"2368:16:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":298,"initializationExpression":{"assignments":[255],"declarations":[{"constant":false,"id":255,"name":"i","nodeType":"VariableDeclaration","scope":298,"src":"2354:8:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":254,"name":"uint32","nodeType":"ElementaryTypeName","src":"2354:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":null,"visibility":"internal"}],"id":257,"initialValue":{"argumentTypes":null,"hexValue":"30","id":256,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2365:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"2354:12:0"},"loopExpression":{"expression":{"argumentTypes":null,"id":262,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":true,"src":"2386:3:0","subExpression":{"argumentTypes":null,"id":261,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":255,"src":"2388:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":263,"nodeType":"ExpressionStatement","src":"2386:3:0"},"nodeType":"ForStatement","src":"2349:218:0"}]},"documentation":null,"id":300,"implemented":true,"kind":"function","modifiers":[],"name":"resetMyVotes","nodeType":"FunctionDefinition","parameters":{"id":252,"nodeType":"ParameterList","parameters":[],"src":"2329:2:0"},"returnParameters":{"id":253,"nodeType":"ParameterList","parameters":[],"src":"2339:0:0"},"scope":322,"src":"2308:265:0","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":320,"nodeType":"Block","src":"2654:95:0","statements":[{"assignments":[308],"declarations":[{"constant":false,"id":308,"name":"i","nodeType":"VariableDeclaration","scope":320,"src":"2664:8:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":307,"name":"uint32","nodeType":"ElementaryTypeName","src":"2664:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":null,"visibility":"internal"}],"id":312,"initialValue":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":309,"name":"proposalIndices","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7,"src":"2675:15:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_string_memory_$_t_uint32_$","typeString":"mapping(string memory => uint32)"}},"id":311,"indexExpression":{"argumentTypes":null,"id":310,"name":"proposal","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":302,"src":"2691:8:0","typeDescriptions":{"typeIdentifier":"t_string_memory_ptr","typeString":"string memory"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2675:25:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"VariableDeclarationStatement","src":"2664:36:0"},{"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":313,"name":"votesByFor","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":24,"src":"2717:10:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_uint32_$_$","typeString":"mapping(address => mapping(uint32 => uint32))"}},"id":316,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":314,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":337,"src":"2728:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":315,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2728:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2717:22:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint32_$_t_uint32_$","typeString":"mapping(uint32 => uint32)"}},"id":318,"indexExpression":{"argumentTypes":null,"id":317,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":308,"src":"2740:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2717:25:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"functionReturnParameters":306,"id":319,"nodeType":"Return","src":"2710:32:0"}]},"documentation":null,"id":321,"implemented":true,"kind":"function","modifiers":[],"name":"myVotes","nodeType":"FunctionDefinition","parameters":{"id":303,"nodeType":"ParameterList","parameters":[{"constant":false,"id":302,"name":"proposal","nodeType":"VariableDeclaration","scope":321,"src":"2596:22:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_string_memory_ptr","typeString":"string"},"typeName":{"id":301,"name":"string","nodeType":"ElementaryTypeName","src":"2596:6:0","typeDescriptions":{"typeIdentifier":"t_string_storage_ptr","typeString":"string"}},"value":null,"visibility":"internal"}],"src":"2595:24:0"},"returnParameters":{"id":306,"nodeType":"ParameterList","parameters":[{"constant":false,"id":305,"name":"votes","nodeType":"VariableDeclaration","scope":321,"src":"2640:12:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":304,"name":"uint32","nodeType":"ElementaryTypeName","src":"2640:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":null,"visibility":"internal"}],"src":"2639:14:0"},"scope":322,"src":"2579:170:0","stateMutability":"view","superFunction":null,"visibility":"public"}],"scope":323,"src":"28:2723:0"}],"src":"0:2752:0"},"compiler":{"name":"solc","version":"0.5.16+commit.9c3226ce.Emscripten.clang"},"networks":{"5":{"events":{},"links":{},"address":"0xc2FaBcC7F21451a5C4DB45DBfa52142C664772DE","transactionHash":"0x5f948155ed16a107402c0d405858692ecc230cbf6d0a04eddc7dab25a35de335"},"11155111":{"events":{},"links":{},"address":"0xb6b890Ede7A9Bb20209DC8dBc26c60f9883dD799","transactionHash":"0x157469db8768446d654f79e48f8398241152039dd72c9c8cb34dd30b45094854"}},"schemaVersion":"3.3.2","updatedAt":"2023-11-28T06:28:51.010Z","networkType":"ethereum","devdoc":{"methods":{}},"userdoc":{"methods":{}}}')}},[[26,1,2]]]); -//# sourceMappingURL=main.0c23d573.chunk.js.map \ No newline at end of file diff --git a/static/js/main.96438fcf.chunk.js b/static/js/main.96438fcf.chunk.js new file mode 100644 index 0000000..e13c8b2 --- /dev/null +++ b/static/js/main.96438fcf.chunk.js @@ -0,0 +1,2 @@ +(this.webpackJsonpclient=this.webpackJsonpclient||[]).push([[0],{15:function(e,t,n){},26:function(e,t,n){"use strict";n.r(t);var i=n(0),s=n(2),r=n.n(s),a=n(7),f=n.n(a),p=(n(15),n(1));function l(){return Object(i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 0 24 24",width:"24",fill:"currentColor",children:[Object(i.jsx)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(i.jsx)("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM10 17l-3.5-3.5 1.41-1.41L10 14.17 15.18 9l1.41 1.41L10 17z"})]})}function o(){return Object(i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 0 24 24",width:"24",fill:"currentColor",children:[Object(i.jsx)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(i.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"})]})}function d(){return Object(i.jsxs)("div",{className:"self-building-square-spinner",children:[Object(i.jsx)("div",{className:"square"}),Object(i.jsx)("div",{className:"square"}),Object(i.jsx)("div",{className:"square"}),Object(i.jsx)("div",{className:"square clear"}),Object(i.jsx)("div",{className:"square"}),Object(i.jsx)("div",{className:"square"}),Object(i.jsx)("div",{className:"square clear"}),Object(i.jsx)("div",{className:"square"}),Object(i.jsx)("div",{className:"square"})]})}const u=["Nothing","Dog","Cat","Penguin","Monkey","Koala","Rabbit","Panda"];function y({account:e}){return Object(i.jsxs)("div",{className:"space-y-2",children:[Object(i.jsx)("h2",{className:"text-gray-800 text-xl font-bold",children:"My Account"}),Object(i.jsx)("p",{className:"text-gray-700 font-mono text-xs sm:text-base",children:e})]})}function c({myTokens:e}){const{useCacheSend:t}=p.drizzleReactHooks.useDrizzle(),{send:n}=t("Proposals","resetMyVotes");return Object(i.jsxs)("div",{className:"space-y-6",children:[Object(i.jsxs)("p",{className:"text-gray-800 text-2xl",children:[Object(i.jsx)("span",{className:"font-bold",children:e})," animal tokens"]}),Object(i.jsx)("button",{onClick:()=>n(),className:"motion-reduce:transition-none transition-colors duration-300 ease-in-out bg-indigo-500 hover:bg-red-500 text-white text-lg font-bold px-2 py-1 rounded",children:"Reset Votes"})]})}function m({account:e,myTokens:t}){return Object(i.jsxs)("div",{className:"bg-white p-4 shadow rounded-md space-y-2",children:[Object(i.jsx)(y,{account:e}),Object(i.jsx)(c,{myTokens:t})]})}function g({account:e}){const[t,n]=s.useState(""),{useCacheSend:r}=p.drizzleReactHooks.useDrizzle(),{send:a}=r("Proposals","setupStudent");return Object(i.jsxs)("div",{className:"bg-white p-4 rounded-md shadow space-y-6 text-gray-800",children:[Object(i.jsx)("h2",{className:"text-2xl font-bold",children:"Owner's Section"}),Object(i.jsxs)("div",{className:"space-y-3",children:[Object(i.jsx)("input",{type:"text",placeholder:"Ethereum Address",value:t,onChange:e=>n(e.target.value),className:"shadow-inner text-base sm:text-xl px-2 bg-gray-50 rounded-md placeholder-gray-700 font-mono w-full"}),Object(i.jsx)("button",{onClick:()=>a(t),className:"transition-colors duration-300 ease-in-out text-white rounded text-lg shadow font-bold py-1 px-2 bg-indigo-500 hover:bg-blue-400",children:"Initialize Student"})]})]})}function _(e){const t=[...e];return t.sort(((e,t)=>t.votes-e.votes)),t}function T(e,t){const n=[];for(let i=e;i=2*t+1}function D({tid:e,status:t}){let n=Object(i.jsx)(d,{}),s="text-blue-600";return"success"===t?(n=Object(i.jsx)(l,{}),s="text-green-600"):"error"===t&&(n=Object(i.jsx)(o,{}),s="text-red-600"),Object(i.jsxs)("li",{className:"flex space-x-4 items-center ".concat(s," space-y-2"),children:[Object(i.jsx)("div",{className:"w-6",children:n}),Object(i.jsx)("div",{className:"font-bold pb-1",children:e})]})}function I({transactions:e}){const t=[...Object.entries(e)];return t.reverse(),0==t.length?Object(i.jsx)(i.Fragment,{}):Object(i.jsx)("ul",{className:"bg-white rounded shadow-md p-4",children:t.map((([e,{status:t}])=>(console.log("first key",e),Object(i.jsx)(D,{tid:e,status:t},e))))})}function S({name:e}){const{useCacheSend:t}=p.drizzleReactHooks.useDrizzle(),[n,r]=s.useState("0"),{send:a}=t("Proposals","setVotes");return Object(i.jsxs)("div",{className:"pl-16 flex items-end space-x-4",children:[Object(i.jsx)("input",{type:"number",value:n,className:"w-12 rounded shadow-inner px-1 bg-gray-50",onChange:e=>r(e.target.value)}),Object(i.jsx)("button",{className:"transition-colors text-white text-sm p-1 font-bold bg-indigo-500 hover:bg-blue-400 rounded",onClick:()=>(()=>{const t=parseInt(n);isNaN(t)||a(e,t)})(),children:"Set Votes"})]})}function V({myTokens:e,admin:t}){const{useCacheCall:n,useCacheSend:s}=p.drizzleReactHooks.useDrizzle(),r=n(["Proposals"],(e=>u.map(((t,n)=>({name:t,votes:e("Proposals","proposals",n),myVotes:e("Proposals","myVotes",t)}))))),{send:a}=s("Proposals","voteFor");return Object(i.jsx)("ul",{className:"bg-white p-4 rounded shadow-md text-xl text-gray-800",children:_(r).map((({name:n,votes:s,myVotes:r})=>Object(i.jsxs)("li",{className:"flex items-center space-x-4",children:[Object(i.jsx)("div",{className:"text-2xl w-1/3",children:n}),Object(i.jsxs)("div",{className:"flex items-center space-x-4 justify-between",children:[Object(i.jsxs)("div",{className:"text-gray-700 w-24",children:[Object(i.jsx)("span",{className:"font-bold",children:s})," ",1==s?"vote":"votes"]}),Object(i.jsxs)("div",{className:"flex items-center flex-grow space-x-2",children:[T(0,r).map((e=>Object(i.jsx)("div",{className:"w-6 h-6 bg-gradient-to-r from-indigo-500 to-blue-500 rounded"},e))),Object(i.jsx)("button",{onClick:()=>a(n),disabled:!b(e,r),className:"transition-colors border-2 border-dashed w-6 h-6 ".concat(b(e,r)?"border-indigo-500 hover:border-blue-400":"border-red-500")})]})]}),t?Object(i.jsx)(S,{name:n}):Object(i.jsx)(i.Fragment,{})]},n)))})}function x(){const{account:e,transactions:t}=p.drizzleReactHooks.useDrizzleState((e=>({account:e.accounts[0],transactions:e.transactions}))),{useCacheCall:n}=p.drizzleReactHooks.useDrizzle(),s=n("Proposals","tokens",e),r=n("Proposals","owner")===e;return Object(i.jsxs)("div",{className:"lg:flex flex-wrap space-y-6 lg:space-y-0 lg:space-x-8 mx-auto px-4 sm:px-0 sm:w-10/12",children:[Object(i.jsxs)("div",{className:"space-y-6",children:[r?Object(i.jsx)(g,{account:e}):null,Object(i.jsx)(m,{account:e,myTokens:s})]}),Object(i.jsxs)("div",{className:"flex flex-col lg:flex-grow space-y-2",children:[Object(i.jsx)(V,{myTokens:s,admin:r}),Object(i.jsx)(I,{transactions:t})]})]})}function v(){return Object(i.jsx)("nav",{className:"bg-gradient-to-r from-indigo-500 to-blue-500 h-16 flex items-center text-white font-bold text-3xl mb-8 shadow-md",children:Object(i.jsx)("div",{className:"mx-8",children:"Animal Vote"})})}function L(e){return Object(i.jsxs)(i.Fragment,{children:[Object(i.jsx)(v,{}),Object(i.jsx)("main",{children:e.children})]})}var $=n(3);function P(){return Object(i.jsxs)("div",{className:"text-lg text-blue-800 flex flex-col items-center max-auto",children:[Object(i.jsx)(d,{}),Object(i.jsxs)("p",{children:["Currently loading the DAPP application",Object(i.jsx)("br",{}),"If this is taking a while, make sure that MetaMask is using the ",Object(i.jsx)("b",{children:"Sepolia "}),"network."]})]})}const E={contracts:[n(9)],web3:{fallback:{type:"ws",url:"ws://127.0.0.1:9545"}}},h=Object($.generateStore)(E),C=new $.Drizzle(E,h);f.a.render(Object(i.jsx)(r.a.StrictMode,{children:Object(i.jsx)(L,{children:Object(i.jsx)(p.drizzleReactHooks.DrizzleProvider,{drizzle:C,children:Object(i.jsx)(p.drizzleReactHooks.Initializer,{error:"There was an error.",loadingContractsAndAccounts:Object(i.jsx)(P,{}),loadingWeb3:Object(i.jsx)(P,{}),children:Object(i.jsx)(x,{})})})})}),document.getElementById("root"))},9:function(e){e.exports=JSON.parse('{"contractName":"Proposals","abi":[{"inputs":[{"internalType":"uint32","name":"studentCount","type":"uint32"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"string","name":"","type":"string"}],"name":"proposalIndices","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint32","name":"","type":"uint32"}],"name":"proposals","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"tokens","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"string","name":"proposal","type":"string"},{"internalType":"uint32","name":"amount","type":"uint32"}],"name":"setVotes","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address[]","name":"addrs","type":"address[]"}],"name":"setupStudent","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"string","name":"proposal","type":"string"}],"name":"voteFor","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"resetMyVotes","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"string","name":"proposal","type":"string"}],"name":"myVotes","outputs":[{"internalType":"uint32","name":"votes","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"}],"metadata":"{\\"compiler\\":{\\"version\\":\\"0.5.16+commit.9c3226ce\\"},\\"language\\":\\"Solidity\\",\\"output\\":{\\"abi\\":[{\\"inputs\\":[{\\"internalType\\":\\"uint32\\",\\"name\\":\\"studentCount\\",\\"type\\":\\"uint32\\"}],\\"payable\\":false,\\"stateMutability\\":\\"nonpayable\\",\\"type\\":\\"constructor\\"},{\\"constant\\":true,\\"inputs\\":[{\\"internalType\\":\\"string\\",\\"name\\":\\"proposal\\",\\"type\\":\\"string\\"}],\\"name\\":\\"myVotes\\",\\"outputs\\":[{\\"internalType\\":\\"uint32\\",\\"name\\":\\"votes\\",\\"type\\":\\"uint32\\"}],\\"payable\\":false,\\"stateMutability\\":\\"view\\",\\"type\\":\\"function\\"},{\\"constant\\":true,\\"inputs\\":[],\\"name\\":\\"owner\\",\\"outputs\\":[{\\"internalType\\":\\"address\\",\\"name\\":\\"\\",\\"type\\":\\"address\\"}],\\"payable\\":false,\\"stateMutability\\":\\"view\\",\\"type\\":\\"function\\"},{\\"constant\\":true,\\"inputs\\":[{\\"internalType\\":\\"string\\",\\"name\\":\\"\\",\\"type\\":\\"string\\"}],\\"name\\":\\"proposalIndices\\",\\"outputs\\":[{\\"internalType\\":\\"uint32\\",\\"name\\":\\"\\",\\"type\\":\\"uint32\\"}],\\"payable\\":false,\\"stateMutability\\":\\"view\\",\\"type\\":\\"function\\"},{\\"constant\\":true,\\"inputs\\":[{\\"internalType\\":\\"uint32\\",\\"name\\":\\"\\",\\"type\\":\\"uint32\\"}],\\"name\\":\\"proposals\\",\\"outputs\\":[{\\"internalType\\":\\"uint32\\",\\"name\\":\\"\\",\\"type\\":\\"uint32\\"}],\\"payable\\":false,\\"stateMutability\\":\\"view\\",\\"type\\":\\"function\\"},{\\"constant\\":false,\\"inputs\\":[],\\"name\\":\\"resetMyVotes\\",\\"outputs\\":[],\\"payable\\":false,\\"stateMutability\\":\\"nonpayable\\",\\"type\\":\\"function\\"},{\\"constant\\":false,\\"inputs\\":[{\\"internalType\\":\\"string\\",\\"name\\":\\"proposal\\",\\"type\\":\\"string\\"},{\\"internalType\\":\\"uint32\\",\\"name\\":\\"amount\\",\\"type\\":\\"uint32\\"}],\\"name\\":\\"setVotes\\",\\"outputs\\":[],\\"payable\\":false,\\"stateMutability\\":\\"nonpayable\\",\\"type\\":\\"function\\"},{\\"constant\\":false,\\"inputs\\":[{\\"internalType\\":\\"address[]\\",\\"name\\":\\"addrs\\",\\"type\\":\\"address[]\\"}],\\"name\\":\\"setupStudent\\",\\"outputs\\":[],\\"payable\\":false,\\"stateMutability\\":\\"nonpayable\\",\\"type\\":\\"function\\"},{\\"constant\\":true,\\"inputs\\":[{\\"internalType\\":\\"address\\",\\"name\\":\\"\\",\\"type\\":\\"address\\"}],\\"name\\":\\"tokens\\",\\"outputs\\":[{\\"internalType\\":\\"uint32\\",\\"name\\":\\"\\",\\"type\\":\\"uint32\\"}],\\"payable\\":false,\\"stateMutability\\":\\"view\\",\\"type\\":\\"function\\"},{\\"constant\\":false,\\"inputs\\":[{\\"internalType\\":\\"string\\",\\"name\\":\\"proposal\\",\\"type\\":\\"string\\"}],\\"name\\":\\"voteFor\\",\\"outputs\\":[],\\"payable\\":false,\\"stateMutability\\":\\"nonpayable\\",\\"type\\":\\"function\\"}],\\"devdoc\\":{\\"methods\\":{}},\\"userdoc\\":{\\"methods\\":{}}},\\"settings\\":{\\"compilationTarget\\":{\\"/Users/mac/Drive/Documents/Academia/EPFL/TA/cs234/DAO-Interactive/contracts/Proposals.sol\\":\\"Proposals\\"},\\"evmVersion\\":\\"istanbul\\",\\"libraries\\":{},\\"optimizer\\":{\\"enabled\\":false,\\"runs\\":200},\\"remappings\\":[]},\\"sources\\":{\\"/Users/mac/Drive/Documents/Academia/EPFL/TA/cs234/DAO-Interactive/contracts/Proposals.sol\\":{\\"keccak256\\":\\"0xf6ec1b85da9b88e3fe0fe852f58cc478400772edfd64c5427206441d5108005c\\",\\"urls\\":[\\"bzz-raw://d5249182879447866496b4e54857c0f09e088042c4c4e9e2a101232ee393ea43\\",\\"dweb:/ipfs/QmPLpDK7rkMna42LMKrzYDxyZBgNxGpoSmmffgcdzCssFn\\"]}},\\"version\\":1}","bytecode":"0x60806040526008600260006101000a81548163ffffffff021916908363ffffffff16021790555034801561003257600080fd5b5060405161148f38038061148f8339818101604052602081101561005557600080fd5b8101908080519060200190929190505050336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600160405180807f4e6f7468696e67000000000000000000000000000000000000000000000000008152506007019050908152602001604051809103902060006101000a81548163ffffffff021916908363ffffffff16021790555060018060405180807f446f6700000000000000000000000000000000000000000000000000000000008152506003019050908152602001604051809103902060006101000a81548163ffffffff021916908363ffffffff1602179055506002600160405180807f43617400000000000000000000000000000000000000000000000000000000008152506003019050908152602001604051809103902060006101000a81548163ffffffff021916908363ffffffff1602179055506003600160405180807f50656e6775696e000000000000000000000000000000000000000000000000008152506007019050908152602001604051809103902060006101000a81548163ffffffff021916908363ffffffff1602179055506004600160405180807f4d6f6e6b657900000000000000000000000000000000000000000000000000008152506006019050908152602001604051809103902060006101000a81548163ffffffff021916908363ffffffff1602179055506005600160405180807f4b6f616c610000000000000000000000000000000000000000000000000000008152506005019050908152602001604051809103902060006101000a81548163ffffffff021916908363ffffffff1602179055506006600160405180807f52616262697400000000000000000000000000000000000000000000000000008152506006019050908152602001604051809103902060006101000a81548163ffffffff021916908363ffffffff1602179055506007600160405180807f50616e64610000000000000000000000000000000000000000000000000000008152506005019050908152602001604051809103902060006101000a81548163ffffffff021916908363ffffffff160217905550600060046003830263ffffffff16816103aa57fe5b04905060008183039050600181600202836003020103600460008063ffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff1602179055506000600190505b600260009054906101000a900463ffffffff1663ffffffff168163ffffffff16101561046e576001600460008363ffffffff1663ffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff1602179055508060010190506103fe565b5050505061100e806104816000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c80636ec59ee6116100665780636ec59ee61461029c5780638da5cb5b14610354578063b49b0a311461039e578063c04752d814610479578063e48603391461053457610093565b80630b3de1f3146100985780632295a8e5146100a25780632a4910ab1461016d5780633cb9269e146101c1575b600080fd5b6100a0610598565b005b61016b600480360360408110156100b857600080fd5b81019080803590602001906401000000008111156100d557600080fd5b8201836020820111156100e757600080fd5b8035906020019184600183028401116401000000008311171561010957600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290803563ffffffff169060200190929190505050610788565b005b61019f6004803603602081101561018357600080fd5b81019080803563ffffffff1690602001909291905050506108ee565b604051808263ffffffff1663ffffffff16815260200191505060405180910390f35b61027a600480360360208110156101d757600080fd5b81019080803590602001906401000000008111156101f457600080fd5b82018360208201111561020657600080fd5b8035906020019184600183028401116401000000008311171561022857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610911565b604051808263ffffffff1663ffffffff16815260200191505060405180910390f35b610352600480360360208110156102b257600080fd5b81019080803590602001906401000000008111156102cf57600080fd5b8201836020820111156102e157600080fd5b8035906020019184602083028401116401000000008311171561030357600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050919291929050505061094a565b005b61035c610a8b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610457600480360360208110156103b457600080fd5b81019080803590602001906401000000008111156103d157600080fd5b8201836020820111156103e357600080fd5b8035906020019184600183028401116401000000008311171561040557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610ab0565b604051808263ffffffff1663ffffffff16815260200191505060405180910390f35b6105326004803603602081101561048f57600080fd5b81019080803590602001906401000000008111156104ac57600080fd5b8201836020820111156104be57600080fd5b803590602001918460018302840111640100000000831117156104e057600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610ba4565b005b6105766004803603602081101561054a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f69565b604051808263ffffffff1663ffffffff16815260200191505060405180910390f35b60008090505b600260009054906101000a900463ffffffff1663ffffffff168163ffffffff161015610785576000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008363ffffffff1663ffffffff16815260200190815260200160002060009054906101000a900463ffffffff169050808102600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282829054906101000a900463ffffffff160192506101000a81548163ffffffff021916908363ffffffff16021790555080600460008463ffffffff1663ffffffff16815260200190815260200160002060008282829054906101000a900463ffffffff160392506101000a81548163ffffffff021916908363ffffffff1602179055506000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008463ffffffff1663ffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff1602179055505080600101905061059e565b50565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461082d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180610fb26028913960400191505060405180910390fd5b60006001836040518082805190602001908083835b602083106108655780518252602082019150602081019050602083039250610842565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900463ffffffff16905081600460008363ffffffff1663ffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff160217905550505050565b60046020528060005260406000206000915054906101000a900463ffffffff1681565b6001818051602081018201805184825260208301602085012081835280955050505050506000915054906101000a900463ffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109ef576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180610fb26028913960400191505060405180910390fd5b60008090505b81518163ffffffff161015610a8757600960036000848463ffffffff1681518110610a1c57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff1602179055508060010190506109f5565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806001836040518082805190602001908083835b60208310610ae95780518252602082019150602081019050602083039250610ac6565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900463ffffffff169050600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008263ffffffff1663ffffffff16815260200190815260200160002060009054906101000a900463ffffffff16915050919050565b60006001826040518082805190602001908083835b60208310610bdc5780518252602082019150602081019050602083039250610bb9565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900463ffffffff1690506001600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900463ffffffff1663ffffffff161015610cd1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180610f8d6025913960400191505060405180910390fd5b60006001600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008463ffffffff1663ffffffff16815260200190815260200160002060009054906101000a900463ffffffff1601905060006001826002020390508063ffffffff16600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900463ffffffff1663ffffffff161015610e21576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f496e73756666696369656e7420746f6b656e730000000000000000000000000081525060200191505060405180910390fd5b80600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282829054906101000a900463ffffffff160392506101000a81548163ffffffff021916908363ffffffff16021790555081600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008563ffffffff1663ffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff1602179055506001600460008563ffffffff1663ffffffff16815260200190815260200160002060008282829054906101000a900463ffffffff160192506101000a81548163ffffffff021916908363ffffffff16021790555050505050565b60036020528060005260406000206000915054906101000a900463ffffffff168156fe596f75206e65656420746f2068617665206120746f6b656e20746f20766f74652077697468546869732066756e6374696f6e206973207265737472696374656420746f20746865206f776e6572a265627a7a72315820d598dd71ec7042477b136ef44a16170446991e26b2165578415d79cbe695918f64736f6c63430005100032","deployedBytecode":"0x608060405234801561001057600080fd5b50600436106100935760003560e01c80636ec59ee6116100665780636ec59ee61461029c5780638da5cb5b14610354578063b49b0a311461039e578063c04752d814610479578063e48603391461053457610093565b80630b3de1f3146100985780632295a8e5146100a25780632a4910ab1461016d5780633cb9269e146101c1575b600080fd5b6100a0610598565b005b61016b600480360360408110156100b857600080fd5b81019080803590602001906401000000008111156100d557600080fd5b8201836020820111156100e757600080fd5b8035906020019184600183028401116401000000008311171561010957600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290803563ffffffff169060200190929190505050610788565b005b61019f6004803603602081101561018357600080fd5b81019080803563ffffffff1690602001909291905050506108ee565b604051808263ffffffff1663ffffffff16815260200191505060405180910390f35b61027a600480360360208110156101d757600080fd5b81019080803590602001906401000000008111156101f457600080fd5b82018360208201111561020657600080fd5b8035906020019184600183028401116401000000008311171561022857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610911565b604051808263ffffffff1663ffffffff16815260200191505060405180910390f35b610352600480360360208110156102b257600080fd5b81019080803590602001906401000000008111156102cf57600080fd5b8201836020820111156102e157600080fd5b8035906020019184602083028401116401000000008311171561030357600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050919291929050505061094a565b005b61035c610a8b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610457600480360360208110156103b457600080fd5b81019080803590602001906401000000008111156103d157600080fd5b8201836020820111156103e357600080fd5b8035906020019184600183028401116401000000008311171561040557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610ab0565b604051808263ffffffff1663ffffffff16815260200191505060405180910390f35b6105326004803603602081101561048f57600080fd5b81019080803590602001906401000000008111156104ac57600080fd5b8201836020820111156104be57600080fd5b803590602001918460018302840111640100000000831117156104e057600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610ba4565b005b6105766004803603602081101561054a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f69565b604051808263ffffffff1663ffffffff16815260200191505060405180910390f35b60008090505b600260009054906101000a900463ffffffff1663ffffffff168163ffffffff161015610785576000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008363ffffffff1663ffffffff16815260200190815260200160002060009054906101000a900463ffffffff169050808102600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282829054906101000a900463ffffffff160192506101000a81548163ffffffff021916908363ffffffff16021790555080600460008463ffffffff1663ffffffff16815260200190815260200160002060008282829054906101000a900463ffffffff160392506101000a81548163ffffffff021916908363ffffffff1602179055506000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008463ffffffff1663ffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff1602179055505080600101905061059e565b50565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461082d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180610fb26028913960400191505060405180910390fd5b60006001836040518082805190602001908083835b602083106108655780518252602082019150602081019050602083039250610842565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900463ffffffff16905081600460008363ffffffff1663ffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff160217905550505050565b60046020528060005260406000206000915054906101000a900463ffffffff1681565b6001818051602081018201805184825260208301602085012081835280955050505050506000915054906101000a900463ffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109ef576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180610fb26028913960400191505060405180910390fd5b60008090505b81518163ffffffff161015610a8757600960036000848463ffffffff1681518110610a1c57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff1602179055508060010190506109f5565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806001836040518082805190602001908083835b60208310610ae95780518252602082019150602081019050602083039250610ac6565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900463ffffffff169050600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008263ffffffff1663ffffffff16815260200190815260200160002060009054906101000a900463ffffffff16915050919050565b60006001826040518082805190602001908083835b60208310610bdc5780518252602082019150602081019050602083039250610bb9565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900463ffffffff1690506001600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900463ffffffff1663ffffffff161015610cd1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180610f8d6025913960400191505060405180910390fd5b60006001600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008463ffffffff1663ffffffff16815260200190815260200160002060009054906101000a900463ffffffff1601905060006001826002020390508063ffffffff16600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900463ffffffff1663ffffffff161015610e21576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f496e73756666696369656e7420746f6b656e730000000000000000000000000081525060200191505060405180910390fd5b80600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282829054906101000a900463ffffffff160392506101000a81548163ffffffff021916908363ffffffff16021790555081600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008563ffffffff1663ffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff1602179055506001600460008563ffffffff1663ffffffff16815260200190815260200160002060008282829054906101000a900463ffffffff160192506101000a81548163ffffffff021916908363ffffffff16021790555050505050565b60036020528060005260406000206000915054906101000a900463ffffffff168156fe596f75206e65656420746f2068617665206120746f6b656e20746f20766f74652077697468546869732066756e6374696f6e206973207265737472696374656420746f20746865206f776e6572a265627a7a72315820d598dd71ec7042477b136ef44a16170446991e26b2165578415d79cbe695918f64736f6c63430005100032","sourceMap":"28:2801:0:-;;;155:1;133:23;;;;;;;;;;;;;;;;;;;;615:679;8:9:-1;5:2;;;30:1;27;20:12;5:2;615:679:0;;;;;;;;;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;615:679:0;;;;;;;;;;;;;;;;673:10;665:5;;:18;;;;;;;;;;;;;;;;;;723:1;694:15;:26;;;;;;;;;;;;;;;;;;;;;;;;;:30;;;;;;;;;;;;;;;;;;759:1;734:15;:22;;;;;;;;;;;;;;;;;;;;;;;;;:26;;;;;;;;;;;;;;;;;;795:1;770:15;:22;;;;;;;;;;;;;;;;;;;;;;;;;:26;;;;;;;;;;;;;;;;;;835:1;806:15;:26;;;;;;;;;;;;;;;;;;;;;;;;;:30;;;;;;;;;;;;;;;;;;874:1;846:15;:25;;;;;;;;;;;;;;;;;;;;;;;;;:29;;;;;;;;;;;;;;;;;;912:1;885:15;:24;;;;;;;;;;;;;;;;;;;;;;;;;:28;;;;;;;;;;;;;;;;;;951:1;923:15;:25;;;;;;;;;;;;;;;;;;;;;;;;;:29;;;;;;;;;;;;;;;;;;989:1;962:15;:24;;;;;;;;;;;;;;;;;;;;;;;;;:28;;;;;;;;;;;;;;;;;;1001:25;1050:1;1045;1030:12;:16;1029:22;;;;;;;;1001:50;;1061:23;1102:18;1087:12;:33;1061:59;;1193:1;1174:16;1170:1;:20;1149:18;1145:1;:22;:45;:49;1130:9;:12;1140:1;1130:12;;;;;;;;;;;;;;:64;;;;;;;;;;;;;;;;;;1210:8;1221:1;1210:12;;1205:83;1228:12;;;;;;;;;;;1224:16;;:1;:16;;;1205:83;;;1276:1;1261:9;:12;1271:1;1261:12;;;;;;;;;;;;;;;;:16;;;;;;;;;;;;;;;;;;1242:3;;;;;1205:83;;;;615:679;;;28:2801;;;;;;","deployedSourceMap":"28:2801:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;28:2801:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2386:265;;;:::i;:::-;;1300:159;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1300:159:0;;;;;;;;;;21:11:-1;8;5:28;2:2;;;46:1;43;36:12;2:2;1300:159:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;1300:159:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;1300:159:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;93:3;85:6;81:16;74:27;137:4;133:9;126:4;121:3;117:14;113:30;106:37;;169:3;161:6;157:16;147:26;;1300:159:0;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;305:42;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;305:42:0;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;79:48;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;79:48:0;;;;;;;;;;21:11:-1;8;5:28;2:2;;;46:1;43;36:12;2:2;79:48:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;79:48:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;79:48:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;93:3;85:6;81:16;74:27;137:4;133:9;126:4;121:3;117:14;113:30;106:37;;169:3;161:6;157:16;147:26;;79:48:0;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;1465:221;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1465:221:0;;;;;;;;;;21:11:-1;8;5:28;2:2;;;46:1;43;36:12;2:2;1465:221:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;1465:221:0;;;;;;101:9:-1;95:2;81:12;77:21;67:8;63:36;60:51;39:11;25:12;22:29;11:108;8:2;;;132:1;129;122:12;8:2;1465:221:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;93:3;85:6;81:16;74:27;137:4;133:9;126:4;121:3;117:14;113:30;106:37;;169:3;161:6;157:16;147:26;;1465:221:0;;;;;;;;;;;;;;;:::i;:::-;;53:20;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;2657:170;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2657:170:0;;;;;;;;;;21:11:-1;8;5:28;2:2;;;46:1;43;36:12;2:2;2657:170:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;2657:170:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;2657:170:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;93:3;85:6;81:16;74:27;137:4;133:9;126:4;121:3;117:14;113:30;106:37;;169:3;161:6;157:16;147:26;;2657:170:0;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;1692:616;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1692:616:0;;;;;;;;;;21:11:-1;8;5:28;2:2;;;46:1;43;36:12;2:2;1692:616:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;1692:616:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;1692:616:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;93:3;85:6;81:16;74:27;137:4;133:9;126:4;121:3;117:14;113:30;106:37;;169:3;161:6;157:16;147:26;;1692:616:0;;;;;;;;;;;;;;;:::i;:::-;;212:40;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;212:40:0;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;2386:265;2432:8;2443:1;2432:12;;2427:218;2450:12;;;;;;;;;;;2446:16;;:1;:16;;;2427:218;;;2483:8;2494:10;:22;2505:10;2494:22;;;;;;;;;;;;;;;:25;2517:1;2494:25;;;;;;;;;;;;;;;;;;;;;;;;;2483:36;;2559:1;2555;:5;2533:6;:18;2540:10;2533:18;;;;;;;;;;;;;;;;:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2590:1;2574:9;:12;2584:1;2574:12;;;;;;;;;;;;;;;;:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2633:1;2605:10;:22;2616:10;2605:22;;;;;;;;;;;;;;;:25;2628:1;2605:25;;;;;;;;;;;;;;;;:29;;;;;;;;;;;;;;;;;;2427:218;2464:3;;;;;2427:218;;;;2386:265::o;1300:159::-;483:5;;;;;;;;;;;469:19;;:10;:19;;;448:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1385:8;1396:15;1412:8;1396:25;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;182:3;176:10;171:3;164:23;98:2;93:3;89:12;82:19;;123:2;118:3;114:12;107:19;;148:2;143:3;139:12;132:19;;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;1396:25:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1385:36;;1446:6;1431:9;:12;1441:1;1431:12;;;;;;;;;;;;;;;;:21;;;;;;;;;;;;;;;;;;564:1;1300:159;;:::o;305:42::-;;;;;;;;;;;;;;;;;;;;;;:::o;79:48::-;;;28:7:-1;22:14;169:4;160:7;156:18;147:7;143:32;204:13;198:20;246:8;231:13;224:31;316:4;307:7;303:18;296:4;287:7;283:18;273:49;350:9;335:13;328:32;378:4;366:16;;0:388;;;;79:48:0;;;;;;;;;;;;;:::o;1465:221::-;483:5;;;;;;;;;;;469:19;;:10;:19;;;448:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1600:8;1611:1;1600:12;;1595:85;1618:5;:12;1614:1;:16;;;1595:85;;;1668:1;1649:6;:16;1656:5;1662:1;1656:8;;;;;;;;;;;;;;;;1649:16;;;;;;;;;;;;;;;;:20;;;;;;;;;;;;;;;;;;1632:3;;;;;1595:85;;;;1465:221;:::o;53:20::-;;;;;;;;;;;;;:::o;2657:170::-;2718:12;2742:8;2753:15;2769:8;2753:25;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;182:3;176:10;171:3;164:23;98:2;93:3;89:12;82:19;;123:2;118:3;114:12;107:19;;148:2;143:3;139:12;132:19;;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;2753:25:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2742:36;;2795:10;:22;2806:10;2795:22;;;;;;;;;;;;;;;:25;2818:1;2795:25;;;;;;;;;;;;;;;;;;;;;;;;;2788:32;;;2657:170;;;:::o;1692:616::-;1792:8;1803:15;1819:8;1803:25;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;182:3;176:10;171:3;164:23;98:2;93:3;89:12;82:19;;123:2;118:3;114:12;107:19;;148:2;143:3;139:12;132:19;;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;1803:25:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1792:36;;1881:1;1859:6;:18;1866:10;1859:18;;;;;;;;;;;;;;;;;;;;;;;;;:23;;;;1838:107;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1955:8;1994:1;1966:10;:22;1977:10;1966:22;;;;;;;;;;;;;;;:25;1989:1;1966:25;;;;;;;;;;;;;;;;;;;;;;;;;:29;1955:40;;2095:15;2121:1;2117;2113;:5;:9;2095:27;;2162:8;2140:30;;:6;:18;2147:10;2140:18;;;;;;;;;;;;;;;;;;;;;;;;;:30;;;;2132:62;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2227:8;2205:6;:18;2212:10;2205:18;;;;;;;;;;;;;;;;:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2273:1;2245:10;:22;2256:10;2245:22;;;;;;;;;;;;;;;:25;2268:1;2245:25;;;;;;;;;;;;;;;;:29;;;;;;;;;;;;;;;;;;2300:1;2284:9;:12;2294:1;2284:12;;;;;;;;;;;;;;;;:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1692:616;;;;:::o;212:40::-;;;;;;;;;;;;;;;;;;;;;;:::o","source":"pragma solidity >=0.4.22;\\n\\n\\ncontract Proposals {\\n address public owner;\\n mapping(string => uint32) public proposalIndices;\\n uint32 numProposals = 8;\\n // The tokens we\'ve given to each participant\\n mapping(address => uint32) public tokens;\\n // The votes that each proposal has gotten\\n mapping(uint32 => uint32) public proposals;\\n mapping(address => mapping(uint32 => uint32)) votesByFor;\\n\\n modifier restricted() {\\n require(\\n msg.sender == owner,\\n \\"This function is restricted to the owner\\"\\n );\\n _;\\n }\\n\\n // Truffle needs the public here\\n constructor(uint32 studentCount) public {\\n owner = msg.sender;\\n\\n proposalIndices[\\"Nothing\\"] = 0;\\n proposalIndices[\\"Dog\\"] = 1;\\n proposalIndices[\\"Cat\\"] = 2;\\n proposalIndices[\\"Penguin\\"] = 3;\\n proposalIndices[\\"Monkey\\"] = 4;\\n proposalIndices[\\"Koala\\"] = 5;\\n proposalIndices[\\"Rabbit\\"] = 6;\\n proposalIndices[\\"Panda\\"] = 7;\\n\\n uint32 threeTokenStudents = (studentCount * 3) / 4;\\n uint32 twoTokenStudents = studentCount - threeTokenStudents;\\n proposals[0] = 3 * threeTokenStudents + 2 * twoTokenStudents - 1;\\n\\n for (uint32 i = 1; i < numProposals; ++i) {\\n proposals[i] = 1;\\n }\\n }\\n\\n function setVotes(string memory proposal, uint32 amount) public restricted {\\n uint32 i = proposalIndices[proposal];\\n proposals[i] = amount;\\n }\\n\\n function setupStudent(address[] memory addrs) public restricted {\\n // Enough to vote 3 times for a single proposal\\n for (uint32 i = 0; i < addrs.length; ++i) {\\n tokens[addrs[i]] = 9;\\n }\\n }\\n\\n function voteFor(string memory proposal) public {\\n // Will be Nothing if not present\\n uint32 i = proposalIndices[proposal];\\n require(\\n tokens[msg.sender] >= 1,\\n \\"You need to have a token to vote with\\"\\n );\\n uint32 n = votesByFor[msg.sender][i] + 1;\\n // This makes it so that for N votes, we need to have spent a total of N^2 tokens\\n uint32 required = 2 * n - 1;\\n require(tokens[msg.sender] >= required, \\"Insufficient tokens\\");\\n\\n tokens[msg.sender] -= required;\\n votesByFor[msg.sender][i] = n;\\n proposals[i] += 1;\\n }\\n\\n // This will take away all votes that the user has allocated so far\\n function resetMyVotes() public {\\n for (uint32 i = 0; i < numProposals; ++i) {\\n uint32 n = votesByFor[msg.sender][i];\\n tokens[msg.sender] += n * n;\\n proposals[i] -= n;\\n votesByFor[msg.sender][i] = 0;\\n }\\n }\\n\\n function myVotes(string memory proposal) public view returns(uint32 votes) {\\n uint32 i = proposalIndices[proposal];\\n return votesByFor[msg.sender][i];\\n }\\n}\\n","sourcePath":"/Users/mac/Drive/Documents/Academia/EPFL/TA/cs234/DAO-Interactive/contracts/Proposals.sol","ast":{"absolutePath":"/Users/mac/Drive/Documents/Academia/EPFL/TA/cs234/DAO-Interactive/contracts/Proposals.sol","exportedSymbols":{"Proposals":[338]},"id":339,"nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity",">=","0.4",".22"],"nodeType":"PragmaDirective","src":"0:25:0"},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":338,"linearizedBaseContracts":[338],"name":"Proposals","nodeType":"ContractDefinition","nodes":[{"constant":false,"id":3,"name":"owner","nodeType":"VariableDeclaration","scope":338,"src":"53:20:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":2,"name":"address","nodeType":"ElementaryTypeName","src":"53:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"public"},{"constant":false,"id":7,"name":"proposalIndices","nodeType":"VariableDeclaration","scope":338,"src":"79:48:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_string_memory_$_t_uint32_$","typeString":"mapping(string => uint32)"},"typeName":{"id":6,"keyType":{"id":4,"name":"string","nodeType":"ElementaryTypeName","src":"87:6:0","typeDescriptions":{"typeIdentifier":"t_string_storage_ptr","typeString":"string"}},"nodeType":"Mapping","src":"79:25:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_string_memory_$_t_uint32_$","typeString":"mapping(string => uint32)"},"valueType":{"id":5,"name":"uint32","nodeType":"ElementaryTypeName","src":"97:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}}},"value":null,"visibility":"public"},{"constant":false,"id":10,"name":"numProposals","nodeType":"VariableDeclaration","scope":338,"src":"133:23:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":8,"name":"uint32","nodeType":"ElementaryTypeName","src":"133:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":{"argumentTypes":null,"hexValue":"38","id":9,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"155:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_8_by_1","typeString":"int_const 8"},"value":"8"},"visibility":"internal"},{"constant":false,"id":14,"name":"tokens","nodeType":"VariableDeclaration","scope":338,"src":"212:40:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint32_$","typeString":"mapping(address => uint32)"},"typeName":{"id":13,"keyType":{"id":11,"name":"address","nodeType":"ElementaryTypeName","src":"220:7:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Mapping","src":"212:26:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint32_$","typeString":"mapping(address => uint32)"},"valueType":{"id":12,"name":"uint32","nodeType":"ElementaryTypeName","src":"231:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}}},"value":null,"visibility":"public"},{"constant":false,"id":18,"name":"proposals","nodeType":"VariableDeclaration","scope":338,"src":"305:42:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint32_$_t_uint32_$","typeString":"mapping(uint32 => uint32)"},"typeName":{"id":17,"keyType":{"id":15,"name":"uint32","nodeType":"ElementaryTypeName","src":"313:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Mapping","src":"305:25:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint32_$_t_uint32_$","typeString":"mapping(uint32 => uint32)"},"valueType":{"id":16,"name":"uint32","nodeType":"ElementaryTypeName","src":"323:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}}},"value":null,"visibility":"public"},{"constant":false,"id":24,"name":"votesByFor","nodeType":"VariableDeclaration","scope":338,"src":"353:56:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_uint32_$_$","typeString":"mapping(address => mapping(uint32 => uint32))"},"typeName":{"id":23,"keyType":{"id":19,"name":"address","nodeType":"ElementaryTypeName","src":"361:7:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Mapping","src":"353:45:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_uint32_$_$","typeString":"mapping(address => mapping(uint32 => uint32))"},"valueType":{"id":22,"keyType":{"id":20,"name":"uint32","nodeType":"ElementaryTypeName","src":"380:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Mapping","src":"372:25:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint32_$_t_uint32_$","typeString":"mapping(uint32 => uint32)"},"valueType":{"id":21,"name":"uint32","nodeType":"ElementaryTypeName","src":"390:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}}}},"value":null,"visibility":"internal"},{"body":{"id":35,"nodeType":"Block","src":"438:134:0","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":30,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":27,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":353,"src":"469:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":28,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"469:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":29,"name":"owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3,"src":"483:5:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"469:19:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},{"argumentTypes":null,"hexValue":"546869732066756e6374696f6e206973207265737472696374656420746f20746865206f776e6572","id":31,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"502:42:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_f5132e684ff59c4f69cfd3e5048a139c5e9dfc67213b9635f1b469112c0afb2e","typeString":"literal_string \\"This function is restricted to the owner\\""},"value":"This function is restricted to the owner"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"},{"typeIdentifier":"t_stringliteral_f5132e684ff59c4f69cfd3e5048a139c5e9dfc67213b9635f1b469112c0afb2e","typeString":"literal_string \\"This function is restricted to the owner\\""}],"id":26,"name":"require","nodeType":"Identifier","overloadedDeclarations":[356,357],"referencedDeclaration":357,"src":"448:7:0","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$","typeString":"function (bool,string memory) pure"}},"id":32,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"448:106:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":33,"nodeType":"ExpressionStatement","src":"448:106:0"},{"id":34,"nodeType":"PlaceholderStatement","src":"564:1:0"}]},"documentation":null,"id":36,"name":"restricted","nodeType":"ModifierDefinition","parameters":{"id":25,"nodeType":"ParameterList","parameters":[],"src":"435:2:0"},"src":"416:156:0","visibility":"internal"},{"body":{"id":141,"nodeType":"Block","src":"655:639:0","statements":[{"expression":{"argumentTypes":null,"id":44,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":41,"name":"owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3,"src":"665:5:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":42,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":353,"src":"673:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":43,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"673:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},"src":"665:18:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":45,"nodeType":"ExpressionStatement","src":"665:18:0"},{"expression":{"argumentTypes":null,"id":50,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":46,"name":"proposalIndices","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7,"src":"694:15:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_string_memory_$_t_uint32_$","typeString":"mapping(string memory => uint32)"}},"id":48,"indexExpression":{"argumentTypes":null,"hexValue":"4e6f7468696e67","id":47,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"710:9:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_27d9ba80d77827936415bb0556f4b381deb8a23dc7c74e317212ea0a6b965eb5","typeString":"literal_string \\"Nothing\\""},"value":"Nothing"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"694:26:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"30","id":49,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"723:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"694:30:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":51,"nodeType":"ExpressionStatement","src":"694:30:0"},{"expression":{"argumentTypes":null,"id":56,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":52,"name":"proposalIndices","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7,"src":"734:15:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_string_memory_$_t_uint32_$","typeString":"mapping(string memory => uint32)"}},"id":54,"indexExpression":{"argumentTypes":null,"hexValue":"446f67","id":53,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"750:5:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_87856bd34916bb0e621c2c2aae95a8318405c51a55def4f451f4738d93e03771","typeString":"literal_string \\"Dog\\""},"value":"Dog"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"734:22:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"31","id":55,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"759:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"734:26:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":57,"nodeType":"ExpressionStatement","src":"734:26:0"},{"expression":{"argumentTypes":null,"id":62,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":58,"name":"proposalIndices","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7,"src":"770:15:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_string_memory_$_t_uint32_$","typeString":"mapping(string memory => uint32)"}},"id":60,"indexExpression":{"argumentTypes":null,"hexValue":"436174","id":59,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"786:5:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_d25f1cb268e7212783aa2330ac94ff078b1182c7819977d67e23a42dd800b873","typeString":"literal_string \\"Cat\\""},"value":"Cat"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"770:22:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"32","id":61,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"795:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"770:26:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":63,"nodeType":"ExpressionStatement","src":"770:26:0"},{"expression":{"argumentTypes":null,"id":68,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":64,"name":"proposalIndices","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7,"src":"806:15:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_string_memory_$_t_uint32_$","typeString":"mapping(string memory => uint32)"}},"id":66,"indexExpression":{"argumentTypes":null,"hexValue":"50656e6775696e","id":65,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"822:9:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_1b154774b575e0c8ceddd9bf9a5201b990df2d11828d5f07688d80863cb78bc1","typeString":"literal_string \\"Penguin\\""},"value":"Penguin"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"806:26:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"33","id":67,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"835:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_3_by_1","typeString":"int_const 3"},"value":"3"},"src":"806:30:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":69,"nodeType":"ExpressionStatement","src":"806:30:0"},{"expression":{"argumentTypes":null,"id":74,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":70,"name":"proposalIndices","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7,"src":"846:15:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_string_memory_$_t_uint32_$","typeString":"mapping(string memory => uint32)"}},"id":72,"indexExpression":{"argumentTypes":null,"hexValue":"4d6f6e6b6579","id":71,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"862:8:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_23e53e14c39ea81a150d444ba901cfbfd0dae3a380f9c5a725f3e3bc66f37ff9","typeString":"literal_string \\"Monkey\\""},"value":"Monkey"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"846:25:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"34","id":73,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"874:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_4_by_1","typeString":"int_const 4"},"value":"4"},"src":"846:29:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":75,"nodeType":"ExpressionStatement","src":"846:29:0"},{"expression":{"argumentTypes":null,"id":80,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":76,"name":"proposalIndices","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7,"src":"885:15:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_string_memory_$_t_uint32_$","typeString":"mapping(string memory => uint32)"}},"id":78,"indexExpression":{"argumentTypes":null,"hexValue":"4b6f616c61","id":77,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"901:7:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_c568372dce760513cef13c41234bb9741bc174998420762ee0ef86f58c6e7ed8","typeString":"literal_string \\"Koala\\""},"value":"Koala"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"885:24:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"35","id":79,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"912:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_5_by_1","typeString":"int_const 5"},"value":"5"},"src":"885:28:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":81,"nodeType":"ExpressionStatement","src":"885:28:0"},{"expression":{"argumentTypes":null,"id":86,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":82,"name":"proposalIndices","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7,"src":"923:15:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_string_memory_$_t_uint32_$","typeString":"mapping(string memory => uint32)"}},"id":84,"indexExpression":{"argumentTypes":null,"hexValue":"526162626974","id":83,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"939:8:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_570759eae85e7fee44c8d9fb913ed2a16bc6453194784112f709053fbb4e860b","typeString":"literal_string \\"Rabbit\\""},"value":"Rabbit"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"923:25:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"36","id":85,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"951:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_6_by_1","typeString":"int_const 6"},"value":"6"},"src":"923:29:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":87,"nodeType":"ExpressionStatement","src":"923:29:0"},{"expression":{"argumentTypes":null,"id":92,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":88,"name":"proposalIndices","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7,"src":"962:15:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_string_memory_$_t_uint32_$","typeString":"mapping(string memory => uint32)"}},"id":90,"indexExpression":{"argumentTypes":null,"hexValue":"50616e6461","id":89,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"978:7:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_0d9ce105e2c8d4ce6fe95eb24a154ece6dd0d8c2c1ae10c942e10eae4c0920ad","typeString":"literal_string \\"Panda\\""},"value":"Panda"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"962:24:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"37","id":91,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"989:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_7_by_1","typeString":"int_const 7"},"value":"7"},"src":"962:28:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":93,"nodeType":"ExpressionStatement","src":"962:28:0"},{"assignments":[95],"declarations":[{"constant":false,"id":95,"name":"threeTokenStudents","nodeType":"VariableDeclaration","scope":141,"src":"1001:25:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":94,"name":"uint32","nodeType":"ElementaryTypeName","src":"1001:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":null,"visibility":"internal"}],"id":102,"initialValue":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":101,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":98,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":96,"name":"studentCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":38,"src":"1030:12:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"hexValue":"33","id":97,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1045:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_3_by_1","typeString":"int_const 3"},"value":"3"},"src":"1030:16:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}}],"id":99,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"1029:18:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"hexValue":"34","id":100,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1050:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_4_by_1","typeString":"int_const 4"},"value":"4"},"src":"1029:22:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"VariableDeclarationStatement","src":"1001:50:0"},{"assignments":[104],"declarations":[{"constant":false,"id":104,"name":"twoTokenStudents","nodeType":"VariableDeclaration","scope":141,"src":"1061:23:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":103,"name":"uint32","nodeType":"ElementaryTypeName","src":"1061:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":null,"visibility":"internal"}],"id":108,"initialValue":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":107,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":105,"name":"studentCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":38,"src":"1087:12:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":106,"name":"threeTokenStudents","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":95,"src":"1102:18:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"1087:33:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"VariableDeclarationStatement","src":"1061:59:0"},{"expression":{"argumentTypes":null,"id":121,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":109,"name":"proposals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":18,"src":"1130:9:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint32_$_t_uint32_$","typeString":"mapping(uint32 => uint32)"}},"id":111,"indexExpression":{"argumentTypes":null,"hexValue":"30","id":110,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1140:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1130:12:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":120,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":118,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":114,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"33","id":112,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1145:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_3_by_1","typeString":"int_const 3"},"value":"3"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":113,"name":"threeTokenStudents","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":95,"src":"1149:18:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"1145:22:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":117,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"32","id":115,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1170:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":116,"name":"twoTokenStudents","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":104,"src":"1174:16:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"1170:20:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"1145:45:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"31","id":119,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1193:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"1145:49:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"1130:64:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":122,"nodeType":"ExpressionStatement","src":"1130:64:0"},{"body":{"id":139,"nodeType":"Block","src":"1247:41:0","statements":[{"expression":{"argumentTypes":null,"id":137,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":133,"name":"proposals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":18,"src":"1261:9:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint32_$_t_uint32_$","typeString":"mapping(uint32 => uint32)"}},"id":135,"indexExpression":{"argumentTypes":null,"id":134,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":124,"src":"1271:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1261:12:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"31","id":136,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1276:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"1261:16:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":138,"nodeType":"ExpressionStatement","src":"1261:16:0"}]},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":129,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":127,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":124,"src":"1224:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":128,"name":"numProposals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":10,"src":"1228:12:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"1224:16:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":140,"initializationExpression":{"assignments":[124],"declarations":[{"constant":false,"id":124,"name":"i","nodeType":"VariableDeclaration","scope":140,"src":"1210:8:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":123,"name":"uint32","nodeType":"ElementaryTypeName","src":"1210:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":null,"visibility":"internal"}],"id":126,"initialValue":{"argumentTypes":null,"hexValue":"31","id":125,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1221:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"nodeType":"VariableDeclarationStatement","src":"1210:12:0"},"loopExpression":{"expression":{"argumentTypes":null,"id":131,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":true,"src":"1242:3:0","subExpression":{"argumentTypes":null,"id":130,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":124,"src":"1244:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":132,"nodeType":"ExpressionStatement","src":"1242:3:0"},"nodeType":"ForStatement","src":"1205:83:0"}]},"documentation":null,"id":142,"implemented":true,"kind":"constructor","modifiers":[],"name":"","nodeType":"FunctionDefinition","parameters":{"id":39,"nodeType":"ParameterList","parameters":[{"constant":false,"id":38,"name":"studentCount","nodeType":"VariableDeclaration","scope":142,"src":"627:19:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":37,"name":"uint32","nodeType":"ElementaryTypeName","src":"627:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":null,"visibility":"internal"}],"src":"626:21:0"},"returnParameters":{"id":40,"nodeType":"ParameterList","parameters":[],"src":"655:0:0"},"scope":338,"src":"615:679:0","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":163,"nodeType":"Block","src":"1375:84:0","statements":[{"assignments":[152],"declarations":[{"constant":false,"id":152,"name":"i","nodeType":"VariableDeclaration","scope":163,"src":"1385:8:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":151,"name":"uint32","nodeType":"ElementaryTypeName","src":"1385:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":null,"visibility":"internal"}],"id":156,"initialValue":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":153,"name":"proposalIndices","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7,"src":"1396:15:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_string_memory_$_t_uint32_$","typeString":"mapping(string memory => uint32)"}},"id":155,"indexExpression":{"argumentTypes":null,"id":154,"name":"proposal","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":144,"src":"1412:8:0","typeDescriptions":{"typeIdentifier":"t_string_memory_ptr","typeString":"string memory"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1396:25:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"VariableDeclarationStatement","src":"1385:36:0"},{"expression":{"argumentTypes":null,"id":161,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":157,"name":"proposals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":18,"src":"1431:9:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint32_$_t_uint32_$","typeString":"mapping(uint32 => uint32)"}},"id":159,"indexExpression":{"argumentTypes":null,"id":158,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":152,"src":"1441:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1431:12:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":160,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":146,"src":"1446:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"1431:21:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":162,"nodeType":"ExpressionStatement","src":"1431:21:0"}]},"documentation":null,"id":164,"implemented":true,"kind":"function","modifiers":[{"arguments":null,"id":149,"modifierName":{"argumentTypes":null,"id":148,"name":"restricted","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":36,"src":"1364:10:0","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"1364:10:0"}],"name":"setVotes","nodeType":"FunctionDefinition","parameters":{"id":147,"nodeType":"ParameterList","parameters":[{"constant":false,"id":144,"name":"proposal","nodeType":"VariableDeclaration","scope":164,"src":"1318:22:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_string_memory_ptr","typeString":"string"},"typeName":{"id":143,"name":"string","nodeType":"ElementaryTypeName","src":"1318:6:0","typeDescriptions":{"typeIdentifier":"t_string_storage_ptr","typeString":"string"}},"value":null,"visibility":"internal"},{"constant":false,"id":146,"name":"amount","nodeType":"VariableDeclaration","scope":164,"src":"1342:13:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":145,"name":"uint32","nodeType":"ElementaryTypeName","src":"1342:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":null,"visibility":"internal"}],"src":"1317:39:0"},"returnParameters":{"id":150,"nodeType":"ParameterList","parameters":[],"src":"1375:0:0"},"scope":338,"src":"1300:159:0","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":193,"nodeType":"Block","src":"1529:157:0","statements":[{"body":{"id":191,"nodeType":"Block","src":"1637:43:0","statements":[{"expression":{"argumentTypes":null,"id":189,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":183,"name":"tokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":14,"src":"1649:6:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint32_$","typeString":"mapping(address => uint32)"}},"id":187,"indexExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":184,"name":"addrs","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":167,"src":"1656:5:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":186,"indexExpression":{"argumentTypes":null,"id":185,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":173,"src":"1662:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1656:8:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1649:16:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"39","id":188,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1668:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_9_by_1","typeString":"int_const 9"},"value":"9"},"src":"1649:20:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":190,"nodeType":"ExpressionStatement","src":"1649:20:0"}]},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":179,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":176,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":173,"src":"1614:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":177,"name":"addrs","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":167,"src":"1618:5:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":178,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1618:12:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1614:16:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":192,"initializationExpression":{"assignments":[173],"declarations":[{"constant":false,"id":173,"name":"i","nodeType":"VariableDeclaration","scope":192,"src":"1600:8:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":172,"name":"uint32","nodeType":"ElementaryTypeName","src":"1600:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":null,"visibility":"internal"}],"id":175,"initialValue":{"argumentTypes":null,"hexValue":"30","id":174,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1611:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"1600:12:0"},"loopExpression":{"expression":{"argumentTypes":null,"id":181,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":true,"src":"1632:3:0","subExpression":{"argumentTypes":null,"id":180,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":173,"src":"1634:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":182,"nodeType":"ExpressionStatement","src":"1632:3:0"},"nodeType":"ForStatement","src":"1595:85:0"}]},"documentation":null,"id":194,"implemented":true,"kind":"function","modifiers":[{"arguments":null,"id":170,"modifierName":{"argumentTypes":null,"id":169,"name":"restricted","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":36,"src":"1518:10:0","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"1518:10:0"}],"name":"setupStudent","nodeType":"FunctionDefinition","parameters":{"id":168,"nodeType":"ParameterList","parameters":[{"constant":false,"id":167,"name":"addrs","nodeType":"VariableDeclaration","scope":194,"src":"1487:22:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":165,"name":"address","nodeType":"ElementaryTypeName","src":"1487:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":166,"length":null,"nodeType":"ArrayTypeName","src":"1487:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"value":null,"visibility":"internal"}],"src":"1486:24:0"},"returnParameters":{"id":171,"nodeType":"ParameterList","parameters":[],"src":"1529:0:0"},"scope":338,"src":"1465:221:0","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":266,"nodeType":"Block","src":"1740:568:0","statements":[{"assignments":[200],"declarations":[{"constant":false,"id":200,"name":"i","nodeType":"VariableDeclaration","scope":266,"src":"1792:8:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":199,"name":"uint32","nodeType":"ElementaryTypeName","src":"1792:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":null,"visibility":"internal"}],"id":204,"initialValue":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":201,"name":"proposalIndices","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7,"src":"1803:15:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_string_memory_$_t_uint32_$","typeString":"mapping(string memory => uint32)"}},"id":203,"indexExpression":{"argumentTypes":null,"id":202,"name":"proposal","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":196,"src":"1819:8:0","typeDescriptions":{"typeIdentifier":"t_string_memory_ptr","typeString":"string memory"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1803:25:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"VariableDeclarationStatement","src":"1792:36:0"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":211,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":206,"name":"tokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":14,"src":"1859:6:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint32_$","typeString":"mapping(address => uint32)"}},"id":209,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":207,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":353,"src":"1866:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":208,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1866:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1859:18:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"31","id":210,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1881:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"1859:23:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},{"argumentTypes":null,"hexValue":"596f75206e65656420746f2068617665206120746f6b656e20746f20766f74652077697468","id":212,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"1896:39:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_ecd3486d568e69ccf13825a905009c74303486ae004973a1978e24ff6c4d65b2","typeString":"literal_string \\"You need to have a token to vote with\\""},"value":"You need to have a token to vote with"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"},{"typeIdentifier":"t_stringliteral_ecd3486d568e69ccf13825a905009c74303486ae004973a1978e24ff6c4d65b2","typeString":"literal_string \\"You need to have a token to vote with\\""}],"id":205,"name":"require","nodeType":"Identifier","overloadedDeclarations":[356,357],"referencedDeclaration":357,"src":"1838:7:0","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$","typeString":"function (bool,string memory) pure"}},"id":213,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1838:107:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":214,"nodeType":"ExpressionStatement","src":"1838:107:0"},{"assignments":[216],"declarations":[{"constant":false,"id":216,"name":"n","nodeType":"VariableDeclaration","scope":266,"src":"1955:8:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":215,"name":"uint32","nodeType":"ElementaryTypeName","src":"1955:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":null,"visibility":"internal"}],"id":225,"initialValue":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":224,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":217,"name":"votesByFor","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":24,"src":"1966:10:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_uint32_$_$","typeString":"mapping(address => mapping(uint32 => uint32))"}},"id":220,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":218,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":353,"src":"1977:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":219,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1977:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1966:22:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint32_$_t_uint32_$","typeString":"mapping(uint32 => uint32)"}},"id":222,"indexExpression":{"argumentTypes":null,"id":221,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":200,"src":"1989:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1966:25:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"hexValue":"31","id":223,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1994:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"1966:29:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"VariableDeclarationStatement","src":"1955:40:0"},{"assignments":[227],"declarations":[{"constant":false,"id":227,"name":"required","nodeType":"VariableDeclaration","scope":266,"src":"2095:15:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":226,"name":"uint32","nodeType":"ElementaryTypeName","src":"2095:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":null,"visibility":"internal"}],"id":233,"initialValue":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":232,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":230,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"32","id":228,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2113:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":229,"name":"n","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":216,"src":"2117:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"2113:5:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"31","id":231,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2121:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"2113:9:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"VariableDeclarationStatement","src":"2095:27:0"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":240,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":235,"name":"tokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":14,"src":"2140:6:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint32_$","typeString":"mapping(address => uint32)"}},"id":238,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":236,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":353,"src":"2147:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":237,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2147:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2140:18:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"id":239,"name":"required","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":227,"src":"2162:8:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"2140:30:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},{"argumentTypes":null,"hexValue":"496e73756666696369656e7420746f6b656e73","id":241,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"2172:21:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_e8936288c111bb7d1b946c971bd3b8178cb07640f167f3ff2ff426c9e5ad86d5","typeString":"literal_string \\"Insufficient tokens\\""},"value":"Insufficient tokens"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"},{"typeIdentifier":"t_stringliteral_e8936288c111bb7d1b946c971bd3b8178cb07640f167f3ff2ff426c9e5ad86d5","typeString":"literal_string \\"Insufficient tokens\\""}],"id":234,"name":"require","nodeType":"Identifier","overloadedDeclarations":[356,357],"referencedDeclaration":357,"src":"2132:7:0","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$","typeString":"function (bool,string memory) pure"}},"id":242,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2132:62:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":243,"nodeType":"ExpressionStatement","src":"2132:62:0"},{"expression":{"argumentTypes":null,"id":249,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":244,"name":"tokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":14,"src":"2205:6:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint32_$","typeString":"mapping(address => uint32)"}},"id":247,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":245,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":353,"src":"2212:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":246,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2212:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"2205:18:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"-=","rightHandSide":{"argumentTypes":null,"id":248,"name":"required","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":227,"src":"2227:8:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"2205:30:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":250,"nodeType":"ExpressionStatement","src":"2205:30:0"},{"expression":{"argumentTypes":null,"id":258,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":251,"name":"votesByFor","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":24,"src":"2245:10:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_uint32_$_$","typeString":"mapping(address => mapping(uint32 => uint32))"}},"id":255,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":252,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":353,"src":"2256:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":253,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2256:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2245:22:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint32_$_t_uint32_$","typeString":"mapping(uint32 => uint32)"}},"id":256,"indexExpression":{"argumentTypes":null,"id":254,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":200,"src":"2268:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"2245:25:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":257,"name":"n","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":216,"src":"2273:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"2245:29:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":259,"nodeType":"ExpressionStatement","src":"2245:29:0"},{"expression":{"argumentTypes":null,"id":264,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":260,"name":"proposals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":18,"src":"2284:9:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint32_$_t_uint32_$","typeString":"mapping(uint32 => uint32)"}},"id":262,"indexExpression":{"argumentTypes":null,"id":261,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":200,"src":"2294:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"2284:12:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"hexValue":"31","id":263,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2300:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"2284:17:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":265,"nodeType":"ExpressionStatement","src":"2284:17:0"}]},"documentation":null,"id":267,"implemented":true,"kind":"function","modifiers":[],"name":"voteFor","nodeType":"FunctionDefinition","parameters":{"id":197,"nodeType":"ParameterList","parameters":[{"constant":false,"id":196,"name":"proposal","nodeType":"VariableDeclaration","scope":267,"src":"1709:22:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_string_memory_ptr","typeString":"string"},"typeName":{"id":195,"name":"string","nodeType":"ElementaryTypeName","src":"1709:6:0","typeDescriptions":{"typeIdentifier":"t_string_storage_ptr","typeString":"string"}},"value":null,"visibility":"internal"}],"src":"1708:24:0"},"returnParameters":{"id":198,"nodeType":"ParameterList","parameters":[],"src":"1740:0:0"},"scope":338,"src":"1692:616:0","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":315,"nodeType":"Block","src":"2417:234:0","statements":[{"body":{"id":313,"nodeType":"Block","src":"2469:176:0","statements":[{"assignments":[281],"declarations":[{"constant":false,"id":281,"name":"n","nodeType":"VariableDeclaration","scope":313,"src":"2483:8:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":280,"name":"uint32","nodeType":"ElementaryTypeName","src":"2483:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":null,"visibility":"internal"}],"id":288,"initialValue":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":282,"name":"votesByFor","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":24,"src":"2494:10:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_uint32_$_$","typeString":"mapping(address => mapping(uint32 => uint32))"}},"id":285,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":283,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":353,"src":"2505:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":284,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2505:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2494:22:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint32_$_t_uint32_$","typeString":"mapping(uint32 => uint32)"}},"id":287,"indexExpression":{"argumentTypes":null,"id":286,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":271,"src":"2517:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2494:25:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"VariableDeclarationStatement","src":"2483:36:0"},{"expression":{"argumentTypes":null,"id":296,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":289,"name":"tokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":14,"src":"2533:6:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint32_$","typeString":"mapping(address => uint32)"}},"id":292,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":290,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":353,"src":"2540:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":291,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2540:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"2533:18:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":295,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":293,"name":"n","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":281,"src":"2555:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":294,"name":"n","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":281,"src":"2559:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"2555:5:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"2533:27:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":297,"nodeType":"ExpressionStatement","src":"2533:27:0"},{"expression":{"argumentTypes":null,"id":302,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":298,"name":"proposals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":18,"src":"2574:9:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint32_$_t_uint32_$","typeString":"mapping(uint32 => uint32)"}},"id":300,"indexExpression":{"argumentTypes":null,"id":299,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":271,"src":"2584:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"2574:12:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"-=","rightHandSide":{"argumentTypes":null,"id":301,"name":"n","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":281,"src":"2590:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"2574:17:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":303,"nodeType":"ExpressionStatement","src":"2574:17:0"},{"expression":{"argumentTypes":null,"id":311,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":304,"name":"votesByFor","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":24,"src":"2605:10:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_uint32_$_$","typeString":"mapping(address => mapping(uint32 => uint32))"}},"id":308,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":305,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":353,"src":"2616:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":306,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2616:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2605:22:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint32_$_t_uint32_$","typeString":"mapping(uint32 => uint32)"}},"id":309,"indexExpression":{"argumentTypes":null,"id":307,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":271,"src":"2628:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"2605:25:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"30","id":310,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2633:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2605:29:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":312,"nodeType":"ExpressionStatement","src":"2605:29:0"}]},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":276,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":274,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":271,"src":"2446:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":275,"name":"numProposals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":10,"src":"2450:12:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"2446:16:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":314,"initializationExpression":{"assignments":[271],"declarations":[{"constant":false,"id":271,"name":"i","nodeType":"VariableDeclaration","scope":314,"src":"2432:8:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":270,"name":"uint32","nodeType":"ElementaryTypeName","src":"2432:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":null,"visibility":"internal"}],"id":273,"initialValue":{"argumentTypes":null,"hexValue":"30","id":272,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2443:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"2432:12:0"},"loopExpression":{"expression":{"argumentTypes":null,"id":278,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":true,"src":"2464:3:0","subExpression":{"argumentTypes":null,"id":277,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":271,"src":"2466:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":279,"nodeType":"ExpressionStatement","src":"2464:3:0"},"nodeType":"ForStatement","src":"2427:218:0"}]},"documentation":null,"id":316,"implemented":true,"kind":"function","modifiers":[],"name":"resetMyVotes","nodeType":"FunctionDefinition","parameters":{"id":268,"nodeType":"ParameterList","parameters":[],"src":"2407:2:0"},"returnParameters":{"id":269,"nodeType":"ParameterList","parameters":[],"src":"2417:0:0"},"scope":338,"src":"2386:265:0","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":336,"nodeType":"Block","src":"2732:95:0","statements":[{"assignments":[324],"declarations":[{"constant":false,"id":324,"name":"i","nodeType":"VariableDeclaration","scope":336,"src":"2742:8:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":323,"name":"uint32","nodeType":"ElementaryTypeName","src":"2742:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":null,"visibility":"internal"}],"id":328,"initialValue":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":325,"name":"proposalIndices","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7,"src":"2753:15:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_string_memory_$_t_uint32_$","typeString":"mapping(string memory => uint32)"}},"id":327,"indexExpression":{"argumentTypes":null,"id":326,"name":"proposal","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":318,"src":"2769:8:0","typeDescriptions":{"typeIdentifier":"t_string_memory_ptr","typeString":"string memory"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2753:25:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"VariableDeclarationStatement","src":"2742:36:0"},{"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":329,"name":"votesByFor","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":24,"src":"2795:10:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_uint32_$_$","typeString":"mapping(address => mapping(uint32 => uint32))"}},"id":332,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":330,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":353,"src":"2806:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":331,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2806:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2795:22:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint32_$_t_uint32_$","typeString":"mapping(uint32 => uint32)"}},"id":334,"indexExpression":{"argumentTypes":null,"id":333,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":324,"src":"2818:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2795:25:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"functionReturnParameters":322,"id":335,"nodeType":"Return","src":"2788:32:0"}]},"documentation":null,"id":337,"implemented":true,"kind":"function","modifiers":[],"name":"myVotes","nodeType":"FunctionDefinition","parameters":{"id":319,"nodeType":"ParameterList","parameters":[{"constant":false,"id":318,"name":"proposal","nodeType":"VariableDeclaration","scope":337,"src":"2674:22:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_string_memory_ptr","typeString":"string"},"typeName":{"id":317,"name":"string","nodeType":"ElementaryTypeName","src":"2674:6:0","typeDescriptions":{"typeIdentifier":"t_string_storage_ptr","typeString":"string"}},"value":null,"visibility":"internal"}],"src":"2673:24:0"},"returnParameters":{"id":322,"nodeType":"ParameterList","parameters":[{"constant":false,"id":321,"name":"votes","nodeType":"VariableDeclaration","scope":337,"src":"2718:12:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":320,"name":"uint32","nodeType":"ElementaryTypeName","src":"2718:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":null,"visibility":"internal"}],"src":"2717:14:0"},"scope":338,"src":"2657:170:0","stateMutability":"view","superFunction":null,"visibility":"public"}],"scope":339,"src":"28:2801:0"}],"src":"0:2830:0"},"legacyAST":{"absolutePath":"/Users/mac/Drive/Documents/Academia/EPFL/TA/cs234/DAO-Interactive/contracts/Proposals.sol","exportedSymbols":{"Proposals":[338]},"id":339,"nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity",">=","0.4",".22"],"nodeType":"PragmaDirective","src":"0:25:0"},{"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":338,"linearizedBaseContracts":[338],"name":"Proposals","nodeType":"ContractDefinition","nodes":[{"constant":false,"id":3,"name":"owner","nodeType":"VariableDeclaration","scope":338,"src":"53:20:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":2,"name":"address","nodeType":"ElementaryTypeName","src":"53:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"public"},{"constant":false,"id":7,"name":"proposalIndices","nodeType":"VariableDeclaration","scope":338,"src":"79:48:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_string_memory_$_t_uint32_$","typeString":"mapping(string => uint32)"},"typeName":{"id":6,"keyType":{"id":4,"name":"string","nodeType":"ElementaryTypeName","src":"87:6:0","typeDescriptions":{"typeIdentifier":"t_string_storage_ptr","typeString":"string"}},"nodeType":"Mapping","src":"79:25:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_string_memory_$_t_uint32_$","typeString":"mapping(string => uint32)"},"valueType":{"id":5,"name":"uint32","nodeType":"ElementaryTypeName","src":"97:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}}},"value":null,"visibility":"public"},{"constant":false,"id":10,"name":"numProposals","nodeType":"VariableDeclaration","scope":338,"src":"133:23:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":8,"name":"uint32","nodeType":"ElementaryTypeName","src":"133:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":{"argumentTypes":null,"hexValue":"38","id":9,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"155:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_8_by_1","typeString":"int_const 8"},"value":"8"},"visibility":"internal"},{"constant":false,"id":14,"name":"tokens","nodeType":"VariableDeclaration","scope":338,"src":"212:40:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint32_$","typeString":"mapping(address => uint32)"},"typeName":{"id":13,"keyType":{"id":11,"name":"address","nodeType":"ElementaryTypeName","src":"220:7:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Mapping","src":"212:26:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint32_$","typeString":"mapping(address => uint32)"},"valueType":{"id":12,"name":"uint32","nodeType":"ElementaryTypeName","src":"231:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}}},"value":null,"visibility":"public"},{"constant":false,"id":18,"name":"proposals","nodeType":"VariableDeclaration","scope":338,"src":"305:42:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint32_$_t_uint32_$","typeString":"mapping(uint32 => uint32)"},"typeName":{"id":17,"keyType":{"id":15,"name":"uint32","nodeType":"ElementaryTypeName","src":"313:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Mapping","src":"305:25:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint32_$_t_uint32_$","typeString":"mapping(uint32 => uint32)"},"valueType":{"id":16,"name":"uint32","nodeType":"ElementaryTypeName","src":"323:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}}},"value":null,"visibility":"public"},{"constant":false,"id":24,"name":"votesByFor","nodeType":"VariableDeclaration","scope":338,"src":"353:56:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_uint32_$_$","typeString":"mapping(address => mapping(uint32 => uint32))"},"typeName":{"id":23,"keyType":{"id":19,"name":"address","nodeType":"ElementaryTypeName","src":"361:7:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Mapping","src":"353:45:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_uint32_$_$","typeString":"mapping(address => mapping(uint32 => uint32))"},"valueType":{"id":22,"keyType":{"id":20,"name":"uint32","nodeType":"ElementaryTypeName","src":"380:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Mapping","src":"372:25:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint32_$_t_uint32_$","typeString":"mapping(uint32 => uint32)"},"valueType":{"id":21,"name":"uint32","nodeType":"ElementaryTypeName","src":"390:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}}}},"value":null,"visibility":"internal"},{"body":{"id":35,"nodeType":"Block","src":"438:134:0","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":30,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":27,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":353,"src":"469:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":28,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"469:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":29,"name":"owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3,"src":"483:5:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"469:19:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},{"argumentTypes":null,"hexValue":"546869732066756e6374696f6e206973207265737472696374656420746f20746865206f776e6572","id":31,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"502:42:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_f5132e684ff59c4f69cfd3e5048a139c5e9dfc67213b9635f1b469112c0afb2e","typeString":"literal_string \\"This function is restricted to the owner\\""},"value":"This function is restricted to the owner"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"},{"typeIdentifier":"t_stringliteral_f5132e684ff59c4f69cfd3e5048a139c5e9dfc67213b9635f1b469112c0afb2e","typeString":"literal_string \\"This function is restricted to the owner\\""}],"id":26,"name":"require","nodeType":"Identifier","overloadedDeclarations":[356,357],"referencedDeclaration":357,"src":"448:7:0","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$","typeString":"function (bool,string memory) pure"}},"id":32,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"448:106:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":33,"nodeType":"ExpressionStatement","src":"448:106:0"},{"id":34,"nodeType":"PlaceholderStatement","src":"564:1:0"}]},"documentation":null,"id":36,"name":"restricted","nodeType":"ModifierDefinition","parameters":{"id":25,"nodeType":"ParameterList","parameters":[],"src":"435:2:0"},"src":"416:156:0","visibility":"internal"},{"body":{"id":141,"nodeType":"Block","src":"655:639:0","statements":[{"expression":{"argumentTypes":null,"id":44,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":41,"name":"owner","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3,"src":"665:5:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":42,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":353,"src":"673:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":43,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"673:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},"src":"665:18:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":45,"nodeType":"ExpressionStatement","src":"665:18:0"},{"expression":{"argumentTypes":null,"id":50,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":46,"name":"proposalIndices","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7,"src":"694:15:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_string_memory_$_t_uint32_$","typeString":"mapping(string memory => uint32)"}},"id":48,"indexExpression":{"argumentTypes":null,"hexValue":"4e6f7468696e67","id":47,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"710:9:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_27d9ba80d77827936415bb0556f4b381deb8a23dc7c74e317212ea0a6b965eb5","typeString":"literal_string \\"Nothing\\""},"value":"Nothing"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"694:26:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"30","id":49,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"723:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"694:30:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":51,"nodeType":"ExpressionStatement","src":"694:30:0"},{"expression":{"argumentTypes":null,"id":56,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":52,"name":"proposalIndices","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7,"src":"734:15:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_string_memory_$_t_uint32_$","typeString":"mapping(string memory => uint32)"}},"id":54,"indexExpression":{"argumentTypes":null,"hexValue":"446f67","id":53,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"750:5:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_87856bd34916bb0e621c2c2aae95a8318405c51a55def4f451f4738d93e03771","typeString":"literal_string \\"Dog\\""},"value":"Dog"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"734:22:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"31","id":55,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"759:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"734:26:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":57,"nodeType":"ExpressionStatement","src":"734:26:0"},{"expression":{"argumentTypes":null,"id":62,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":58,"name":"proposalIndices","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7,"src":"770:15:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_string_memory_$_t_uint32_$","typeString":"mapping(string memory => uint32)"}},"id":60,"indexExpression":{"argumentTypes":null,"hexValue":"436174","id":59,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"786:5:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_d25f1cb268e7212783aa2330ac94ff078b1182c7819977d67e23a42dd800b873","typeString":"literal_string \\"Cat\\""},"value":"Cat"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"770:22:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"32","id":61,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"795:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"src":"770:26:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":63,"nodeType":"ExpressionStatement","src":"770:26:0"},{"expression":{"argumentTypes":null,"id":68,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":64,"name":"proposalIndices","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7,"src":"806:15:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_string_memory_$_t_uint32_$","typeString":"mapping(string memory => uint32)"}},"id":66,"indexExpression":{"argumentTypes":null,"hexValue":"50656e6775696e","id":65,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"822:9:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_1b154774b575e0c8ceddd9bf9a5201b990df2d11828d5f07688d80863cb78bc1","typeString":"literal_string \\"Penguin\\""},"value":"Penguin"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"806:26:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"33","id":67,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"835:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_3_by_1","typeString":"int_const 3"},"value":"3"},"src":"806:30:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":69,"nodeType":"ExpressionStatement","src":"806:30:0"},{"expression":{"argumentTypes":null,"id":74,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":70,"name":"proposalIndices","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7,"src":"846:15:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_string_memory_$_t_uint32_$","typeString":"mapping(string memory => uint32)"}},"id":72,"indexExpression":{"argumentTypes":null,"hexValue":"4d6f6e6b6579","id":71,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"862:8:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_23e53e14c39ea81a150d444ba901cfbfd0dae3a380f9c5a725f3e3bc66f37ff9","typeString":"literal_string \\"Monkey\\""},"value":"Monkey"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"846:25:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"34","id":73,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"874:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_4_by_1","typeString":"int_const 4"},"value":"4"},"src":"846:29:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":75,"nodeType":"ExpressionStatement","src":"846:29:0"},{"expression":{"argumentTypes":null,"id":80,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":76,"name":"proposalIndices","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7,"src":"885:15:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_string_memory_$_t_uint32_$","typeString":"mapping(string memory => uint32)"}},"id":78,"indexExpression":{"argumentTypes":null,"hexValue":"4b6f616c61","id":77,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"901:7:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_c568372dce760513cef13c41234bb9741bc174998420762ee0ef86f58c6e7ed8","typeString":"literal_string \\"Koala\\""},"value":"Koala"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"885:24:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"35","id":79,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"912:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_5_by_1","typeString":"int_const 5"},"value":"5"},"src":"885:28:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":81,"nodeType":"ExpressionStatement","src":"885:28:0"},{"expression":{"argumentTypes":null,"id":86,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":82,"name":"proposalIndices","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7,"src":"923:15:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_string_memory_$_t_uint32_$","typeString":"mapping(string memory => uint32)"}},"id":84,"indexExpression":{"argumentTypes":null,"hexValue":"526162626974","id":83,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"939:8:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_570759eae85e7fee44c8d9fb913ed2a16bc6453194784112f709053fbb4e860b","typeString":"literal_string \\"Rabbit\\""},"value":"Rabbit"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"923:25:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"36","id":85,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"951:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_6_by_1","typeString":"int_const 6"},"value":"6"},"src":"923:29:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":87,"nodeType":"ExpressionStatement","src":"923:29:0"},{"expression":{"argumentTypes":null,"id":92,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":88,"name":"proposalIndices","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7,"src":"962:15:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_string_memory_$_t_uint32_$","typeString":"mapping(string memory => uint32)"}},"id":90,"indexExpression":{"argumentTypes":null,"hexValue":"50616e6461","id":89,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"978:7:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_0d9ce105e2c8d4ce6fe95eb24a154ece6dd0d8c2c1ae10c942e10eae4c0920ad","typeString":"literal_string \\"Panda\\""},"value":"Panda"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"962:24:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"37","id":91,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"989:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_7_by_1","typeString":"int_const 7"},"value":"7"},"src":"962:28:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":93,"nodeType":"ExpressionStatement","src":"962:28:0"},{"assignments":[95],"declarations":[{"constant":false,"id":95,"name":"threeTokenStudents","nodeType":"VariableDeclaration","scope":141,"src":"1001:25:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":94,"name":"uint32","nodeType":"ElementaryTypeName","src":"1001:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":null,"visibility":"internal"}],"id":102,"initialValue":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":101,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"components":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":98,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":96,"name":"studentCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":38,"src":"1030:12:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"hexValue":"33","id":97,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1045:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_3_by_1","typeString":"int_const 3"},"value":"3"},"src":"1030:16:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}}],"id":99,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"TupleExpression","src":"1029:18:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"argumentTypes":null,"hexValue":"34","id":100,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1050:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_4_by_1","typeString":"int_const 4"},"value":"4"},"src":"1029:22:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"VariableDeclarationStatement","src":"1001:50:0"},{"assignments":[104],"declarations":[{"constant":false,"id":104,"name":"twoTokenStudents","nodeType":"VariableDeclaration","scope":141,"src":"1061:23:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":103,"name":"uint32","nodeType":"ElementaryTypeName","src":"1061:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":null,"visibility":"internal"}],"id":108,"initialValue":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":107,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":105,"name":"studentCount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":38,"src":"1087:12:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"id":106,"name":"threeTokenStudents","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":95,"src":"1102:18:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"1087:33:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"VariableDeclarationStatement","src":"1061:59:0"},{"expression":{"argumentTypes":null,"id":121,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":109,"name":"proposals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":18,"src":"1130:9:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint32_$_t_uint32_$","typeString":"mapping(uint32 => uint32)"}},"id":111,"indexExpression":{"argumentTypes":null,"hexValue":"30","id":110,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1140:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1130:12:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":120,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":118,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":114,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"33","id":112,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1145:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_3_by_1","typeString":"int_const 3"},"value":"3"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":113,"name":"threeTokenStudents","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":95,"src":"1149:18:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"1145:22:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":117,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"32","id":115,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1170:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":116,"name":"twoTokenStudents","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":104,"src":"1174:16:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"1170:20:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"1145:45:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"31","id":119,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1193:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"1145:49:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"1130:64:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":122,"nodeType":"ExpressionStatement","src":"1130:64:0"},{"body":{"id":139,"nodeType":"Block","src":"1247:41:0","statements":[{"expression":{"argumentTypes":null,"id":137,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":133,"name":"proposals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":18,"src":"1261:9:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint32_$_t_uint32_$","typeString":"mapping(uint32 => uint32)"}},"id":135,"indexExpression":{"argumentTypes":null,"id":134,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":124,"src":"1271:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1261:12:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"31","id":136,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1276:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"1261:16:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":138,"nodeType":"ExpressionStatement","src":"1261:16:0"}]},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":129,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":127,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":124,"src":"1224:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":128,"name":"numProposals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":10,"src":"1228:12:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"1224:16:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":140,"initializationExpression":{"assignments":[124],"declarations":[{"constant":false,"id":124,"name":"i","nodeType":"VariableDeclaration","scope":140,"src":"1210:8:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":123,"name":"uint32","nodeType":"ElementaryTypeName","src":"1210:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":null,"visibility":"internal"}],"id":126,"initialValue":{"argumentTypes":null,"hexValue":"31","id":125,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1221:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"nodeType":"VariableDeclarationStatement","src":"1210:12:0"},"loopExpression":{"expression":{"argumentTypes":null,"id":131,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":true,"src":"1242:3:0","subExpression":{"argumentTypes":null,"id":130,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":124,"src":"1244:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":132,"nodeType":"ExpressionStatement","src":"1242:3:0"},"nodeType":"ForStatement","src":"1205:83:0"}]},"documentation":null,"id":142,"implemented":true,"kind":"constructor","modifiers":[],"name":"","nodeType":"FunctionDefinition","parameters":{"id":39,"nodeType":"ParameterList","parameters":[{"constant":false,"id":38,"name":"studentCount","nodeType":"VariableDeclaration","scope":142,"src":"627:19:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":37,"name":"uint32","nodeType":"ElementaryTypeName","src":"627:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":null,"visibility":"internal"}],"src":"626:21:0"},"returnParameters":{"id":40,"nodeType":"ParameterList","parameters":[],"src":"655:0:0"},"scope":338,"src":"615:679:0","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":163,"nodeType":"Block","src":"1375:84:0","statements":[{"assignments":[152],"declarations":[{"constant":false,"id":152,"name":"i","nodeType":"VariableDeclaration","scope":163,"src":"1385:8:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":151,"name":"uint32","nodeType":"ElementaryTypeName","src":"1385:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":null,"visibility":"internal"}],"id":156,"initialValue":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":153,"name":"proposalIndices","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7,"src":"1396:15:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_string_memory_$_t_uint32_$","typeString":"mapping(string memory => uint32)"}},"id":155,"indexExpression":{"argumentTypes":null,"id":154,"name":"proposal","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":144,"src":"1412:8:0","typeDescriptions":{"typeIdentifier":"t_string_memory_ptr","typeString":"string memory"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1396:25:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"VariableDeclarationStatement","src":"1385:36:0"},{"expression":{"argumentTypes":null,"id":161,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":157,"name":"proposals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":18,"src":"1431:9:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint32_$_t_uint32_$","typeString":"mapping(uint32 => uint32)"}},"id":159,"indexExpression":{"argumentTypes":null,"id":158,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":152,"src":"1441:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1431:12:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":160,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":146,"src":"1446:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"1431:21:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":162,"nodeType":"ExpressionStatement","src":"1431:21:0"}]},"documentation":null,"id":164,"implemented":true,"kind":"function","modifiers":[{"arguments":null,"id":149,"modifierName":{"argumentTypes":null,"id":148,"name":"restricted","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":36,"src":"1364:10:0","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"1364:10:0"}],"name":"setVotes","nodeType":"FunctionDefinition","parameters":{"id":147,"nodeType":"ParameterList","parameters":[{"constant":false,"id":144,"name":"proposal","nodeType":"VariableDeclaration","scope":164,"src":"1318:22:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_string_memory_ptr","typeString":"string"},"typeName":{"id":143,"name":"string","nodeType":"ElementaryTypeName","src":"1318:6:0","typeDescriptions":{"typeIdentifier":"t_string_storage_ptr","typeString":"string"}},"value":null,"visibility":"internal"},{"constant":false,"id":146,"name":"amount","nodeType":"VariableDeclaration","scope":164,"src":"1342:13:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":145,"name":"uint32","nodeType":"ElementaryTypeName","src":"1342:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":null,"visibility":"internal"}],"src":"1317:39:0"},"returnParameters":{"id":150,"nodeType":"ParameterList","parameters":[],"src":"1375:0:0"},"scope":338,"src":"1300:159:0","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":193,"nodeType":"Block","src":"1529:157:0","statements":[{"body":{"id":191,"nodeType":"Block","src":"1637:43:0","statements":[{"expression":{"argumentTypes":null,"id":189,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":183,"name":"tokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":14,"src":"1649:6:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint32_$","typeString":"mapping(address => uint32)"}},"id":187,"indexExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":184,"name":"addrs","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":167,"src":"1656:5:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":186,"indexExpression":{"argumentTypes":null,"id":185,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":173,"src":"1662:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1656:8:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"1649:16:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"39","id":188,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1668:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_9_by_1","typeString":"int_const 9"},"value":"9"},"src":"1649:20:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":190,"nodeType":"ExpressionStatement","src":"1649:20:0"}]},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":179,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":176,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":173,"src":"1614:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":177,"name":"addrs","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":167,"src":"1618:5:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":178,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"length","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1618:12:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1614:16:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":192,"initializationExpression":{"assignments":[173],"declarations":[{"constant":false,"id":173,"name":"i","nodeType":"VariableDeclaration","scope":192,"src":"1600:8:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":172,"name":"uint32","nodeType":"ElementaryTypeName","src":"1600:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":null,"visibility":"internal"}],"id":175,"initialValue":{"argumentTypes":null,"hexValue":"30","id":174,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1611:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"1600:12:0"},"loopExpression":{"expression":{"argumentTypes":null,"id":181,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":true,"src":"1632:3:0","subExpression":{"argumentTypes":null,"id":180,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":173,"src":"1634:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":182,"nodeType":"ExpressionStatement","src":"1632:3:0"},"nodeType":"ForStatement","src":"1595:85:0"}]},"documentation":null,"id":194,"implemented":true,"kind":"function","modifiers":[{"arguments":null,"id":170,"modifierName":{"argumentTypes":null,"id":169,"name":"restricted","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":36,"src":"1518:10:0","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"1518:10:0"}],"name":"setupStudent","nodeType":"FunctionDefinition","parameters":{"id":168,"nodeType":"ParameterList","parameters":[{"constant":false,"id":167,"name":"addrs","nodeType":"VariableDeclaration","scope":194,"src":"1487:22:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":165,"name":"address","nodeType":"ElementaryTypeName","src":"1487:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":166,"length":null,"nodeType":"ArrayTypeName","src":"1487:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"value":null,"visibility":"internal"}],"src":"1486:24:0"},"returnParameters":{"id":171,"nodeType":"ParameterList","parameters":[],"src":"1529:0:0"},"scope":338,"src":"1465:221:0","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":266,"nodeType":"Block","src":"1740:568:0","statements":[{"assignments":[200],"declarations":[{"constant":false,"id":200,"name":"i","nodeType":"VariableDeclaration","scope":266,"src":"1792:8:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":199,"name":"uint32","nodeType":"ElementaryTypeName","src":"1792:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":null,"visibility":"internal"}],"id":204,"initialValue":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":201,"name":"proposalIndices","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7,"src":"1803:15:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_string_memory_$_t_uint32_$","typeString":"mapping(string memory => uint32)"}},"id":203,"indexExpression":{"argumentTypes":null,"id":202,"name":"proposal","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":196,"src":"1819:8:0","typeDescriptions":{"typeIdentifier":"t_string_memory_ptr","typeString":"string memory"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1803:25:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"VariableDeclarationStatement","src":"1792:36:0"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":211,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":206,"name":"tokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":14,"src":"1859:6:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint32_$","typeString":"mapping(address => uint32)"}},"id":209,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":207,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":353,"src":"1866:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":208,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1866:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1859:18:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"hexValue":"31","id":210,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1881:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"1859:23:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},{"argumentTypes":null,"hexValue":"596f75206e65656420746f2068617665206120746f6b656e20746f20766f74652077697468","id":212,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"1896:39:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_ecd3486d568e69ccf13825a905009c74303486ae004973a1978e24ff6c4d65b2","typeString":"literal_string \\"You need to have a token to vote with\\""},"value":"You need to have a token to vote with"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"},{"typeIdentifier":"t_stringliteral_ecd3486d568e69ccf13825a905009c74303486ae004973a1978e24ff6c4d65b2","typeString":"literal_string \\"You need to have a token to vote with\\""}],"id":205,"name":"require","nodeType":"Identifier","overloadedDeclarations":[356,357],"referencedDeclaration":357,"src":"1838:7:0","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$","typeString":"function (bool,string memory) pure"}},"id":213,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1838:107:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":214,"nodeType":"ExpressionStatement","src":"1838:107:0"},{"assignments":[216],"declarations":[{"constant":false,"id":216,"name":"n","nodeType":"VariableDeclaration","scope":266,"src":"1955:8:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":215,"name":"uint32","nodeType":"ElementaryTypeName","src":"1955:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":null,"visibility":"internal"}],"id":225,"initialValue":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":224,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":217,"name":"votesByFor","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":24,"src":"1966:10:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_uint32_$_$","typeString":"mapping(address => mapping(uint32 => uint32))"}},"id":220,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":218,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":353,"src":"1977:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":219,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"1977:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1966:22:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint32_$_t_uint32_$","typeString":"mapping(uint32 => uint32)"}},"id":222,"indexExpression":{"argumentTypes":null,"id":221,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":200,"src":"1989:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"1966:25:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"hexValue":"31","id":223,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"1994:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"1966:29:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"VariableDeclarationStatement","src":"1955:40:0"},{"assignments":[227],"declarations":[{"constant":false,"id":227,"name":"required","nodeType":"VariableDeclaration","scope":266,"src":"2095:15:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":226,"name":"uint32","nodeType":"ElementaryTypeName","src":"2095:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":null,"visibility":"internal"}],"id":233,"initialValue":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":232,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":230,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"hexValue":"32","id":228,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2113:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_2_by_1","typeString":"int_const 2"},"value":"2"},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":229,"name":"n","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":216,"src":"2117:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"2113:5:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"argumentTypes":null,"hexValue":"31","id":231,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2121:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"2113:9:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"VariableDeclarationStatement","src":"2095:27:0"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":240,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":235,"name":"tokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":14,"src":"2140:6:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint32_$","typeString":"mapping(address => uint32)"}},"id":238,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":236,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":353,"src":"2147:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":237,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2147:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2140:18:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"id":239,"name":"required","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":227,"src":"2162:8:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"2140:30:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},{"argumentTypes":null,"hexValue":"496e73756666696369656e7420746f6b656e73","id":241,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"2172:21:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_e8936288c111bb7d1b946c971bd3b8178cb07640f167f3ff2ff426c9e5ad86d5","typeString":"literal_string \\"Insufficient tokens\\""},"value":"Insufficient tokens"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"},{"typeIdentifier":"t_stringliteral_e8936288c111bb7d1b946c971bd3b8178cb07640f167f3ff2ff426c9e5ad86d5","typeString":"literal_string \\"Insufficient tokens\\""}],"id":234,"name":"require","nodeType":"Identifier","overloadedDeclarations":[356,357],"referencedDeclaration":357,"src":"2132:7:0","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$","typeString":"function (bool,string memory) pure"}},"id":242,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2132:62:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":243,"nodeType":"ExpressionStatement","src":"2132:62:0"},{"expression":{"argumentTypes":null,"id":249,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":244,"name":"tokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":14,"src":"2205:6:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint32_$","typeString":"mapping(address => uint32)"}},"id":247,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":245,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":353,"src":"2212:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":246,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2212:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"2205:18:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"-=","rightHandSide":{"argumentTypes":null,"id":248,"name":"required","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":227,"src":"2227:8:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"2205:30:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":250,"nodeType":"ExpressionStatement","src":"2205:30:0"},{"expression":{"argumentTypes":null,"id":258,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":251,"name":"votesByFor","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":24,"src":"2245:10:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_uint32_$_$","typeString":"mapping(address => mapping(uint32 => uint32))"}},"id":255,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":252,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":353,"src":"2256:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":253,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2256:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2245:22:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint32_$_t_uint32_$","typeString":"mapping(uint32 => uint32)"}},"id":256,"indexExpression":{"argumentTypes":null,"id":254,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":200,"src":"2268:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"2245:25:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":257,"name":"n","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":216,"src":"2273:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"2245:29:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":259,"nodeType":"ExpressionStatement","src":"2245:29:0"},{"expression":{"argumentTypes":null,"id":264,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":260,"name":"proposals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":18,"src":"2284:9:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint32_$_t_uint32_$","typeString":"mapping(uint32 => uint32)"}},"id":262,"indexExpression":{"argumentTypes":null,"id":261,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":200,"src":"2294:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"2284:12:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"hexValue":"31","id":263,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2300:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"},"src":"2284:17:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":265,"nodeType":"ExpressionStatement","src":"2284:17:0"}]},"documentation":null,"id":267,"implemented":true,"kind":"function","modifiers":[],"name":"voteFor","nodeType":"FunctionDefinition","parameters":{"id":197,"nodeType":"ParameterList","parameters":[{"constant":false,"id":196,"name":"proposal","nodeType":"VariableDeclaration","scope":267,"src":"1709:22:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_string_memory_ptr","typeString":"string"},"typeName":{"id":195,"name":"string","nodeType":"ElementaryTypeName","src":"1709:6:0","typeDescriptions":{"typeIdentifier":"t_string_storage_ptr","typeString":"string"}},"value":null,"visibility":"internal"}],"src":"1708:24:0"},"returnParameters":{"id":198,"nodeType":"ParameterList","parameters":[],"src":"1740:0:0"},"scope":338,"src":"1692:616:0","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":315,"nodeType":"Block","src":"2417:234:0","statements":[{"body":{"id":313,"nodeType":"Block","src":"2469:176:0","statements":[{"assignments":[281],"declarations":[{"constant":false,"id":281,"name":"n","nodeType":"VariableDeclaration","scope":313,"src":"2483:8:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":280,"name":"uint32","nodeType":"ElementaryTypeName","src":"2483:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":null,"visibility":"internal"}],"id":288,"initialValue":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":282,"name":"votesByFor","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":24,"src":"2494:10:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_uint32_$_$","typeString":"mapping(address => mapping(uint32 => uint32))"}},"id":285,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":283,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":353,"src":"2505:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":284,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2505:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2494:22:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint32_$_t_uint32_$","typeString":"mapping(uint32 => uint32)"}},"id":287,"indexExpression":{"argumentTypes":null,"id":286,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":271,"src":"2517:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2494:25:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"VariableDeclarationStatement","src":"2483:36:0"},{"expression":{"argumentTypes":null,"id":296,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":289,"name":"tokens","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":14,"src":"2533:6:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint32_$","typeString":"mapping(address => uint32)"}},"id":292,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":290,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":353,"src":"2540:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":291,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2540:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"2533:18:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"+=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":295,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":293,"name":"n","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":281,"src":"2555:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"argumentTypes":null,"id":294,"name":"n","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":281,"src":"2559:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"2555:5:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"2533:27:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":297,"nodeType":"ExpressionStatement","src":"2533:27:0"},{"expression":{"argumentTypes":null,"id":302,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":298,"name":"proposals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":18,"src":"2574:9:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint32_$_t_uint32_$","typeString":"mapping(uint32 => uint32)"}},"id":300,"indexExpression":{"argumentTypes":null,"id":299,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":271,"src":"2584:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"2574:12:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"-=","rightHandSide":{"argumentTypes":null,"id":301,"name":"n","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":281,"src":"2590:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"2574:17:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":303,"nodeType":"ExpressionStatement","src":"2574:17:0"},{"expression":{"argumentTypes":null,"id":311,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":304,"name":"votesByFor","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":24,"src":"2605:10:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_uint32_$_$","typeString":"mapping(address => mapping(uint32 => uint32))"}},"id":308,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":305,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":353,"src":"2616:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":306,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2616:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2605:22:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint32_$_t_uint32_$","typeString":"mapping(uint32 => uint32)"}},"id":309,"indexExpression":{"argumentTypes":null,"id":307,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":271,"src":"2628:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"2605:25:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"hexValue":"30","id":310,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2633:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2605:29:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":312,"nodeType":"ExpressionStatement","src":"2605:29:0"}]},"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"id":276,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":274,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":271,"src":"2446:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"argumentTypes":null,"id":275,"name":"numProposals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":10,"src":"2450:12:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"src":"2446:16:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":314,"initializationExpression":{"assignments":[271],"declarations":[{"constant":false,"id":271,"name":"i","nodeType":"VariableDeclaration","scope":314,"src":"2432:8:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":270,"name":"uint32","nodeType":"ElementaryTypeName","src":"2432:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":null,"visibility":"internal"}],"id":273,"initialValue":{"argumentTypes":null,"hexValue":"30","id":272,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2443:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"2432:12:0"},"loopExpression":{"expression":{"argumentTypes":null,"id":278,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":true,"src":"2464:3:0","subExpression":{"argumentTypes":null,"id":277,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":271,"src":"2466:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"id":279,"nodeType":"ExpressionStatement","src":"2464:3:0"},"nodeType":"ForStatement","src":"2427:218:0"}]},"documentation":null,"id":316,"implemented":true,"kind":"function","modifiers":[],"name":"resetMyVotes","nodeType":"FunctionDefinition","parameters":{"id":268,"nodeType":"ParameterList","parameters":[],"src":"2407:2:0"},"returnParameters":{"id":269,"nodeType":"ParameterList","parameters":[],"src":"2417:0:0"},"scope":338,"src":"2386:265:0","stateMutability":"nonpayable","superFunction":null,"visibility":"public"},{"body":{"id":336,"nodeType":"Block","src":"2732:95:0","statements":[{"assignments":[324],"declarations":[{"constant":false,"id":324,"name":"i","nodeType":"VariableDeclaration","scope":336,"src":"2742:8:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":323,"name":"uint32","nodeType":"ElementaryTypeName","src":"2742:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":null,"visibility":"internal"}],"id":328,"initialValue":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":325,"name":"proposalIndices","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7,"src":"2753:15:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_string_memory_$_t_uint32_$","typeString":"mapping(string memory => uint32)"}},"id":327,"indexExpression":{"argumentTypes":null,"id":326,"name":"proposal","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":318,"src":"2769:8:0","typeDescriptions":{"typeIdentifier":"t_string_memory_ptr","typeString":"string memory"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2753:25:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"nodeType":"VariableDeclarationStatement","src":"2742:36:0"},{"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":329,"name":"votesByFor","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":24,"src":"2795:10:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_mapping$_t_uint32_$_t_uint32_$_$","typeString":"mapping(address => mapping(uint32 => uint32))"}},"id":332,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":330,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":353,"src":"2806:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":331,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2806:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2795:22:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_uint32_$_t_uint32_$","typeString":"mapping(uint32 => uint32)"}},"id":334,"indexExpression":{"argumentTypes":null,"id":333,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":324,"src":"2818:1:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2795:25:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"functionReturnParameters":322,"id":335,"nodeType":"Return","src":"2788:32:0"}]},"documentation":null,"id":337,"implemented":true,"kind":"function","modifiers":[],"name":"myVotes","nodeType":"FunctionDefinition","parameters":{"id":319,"nodeType":"ParameterList","parameters":[{"constant":false,"id":318,"name":"proposal","nodeType":"VariableDeclaration","scope":337,"src":"2674:22:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_string_memory_ptr","typeString":"string"},"typeName":{"id":317,"name":"string","nodeType":"ElementaryTypeName","src":"2674:6:0","typeDescriptions":{"typeIdentifier":"t_string_storage_ptr","typeString":"string"}},"value":null,"visibility":"internal"}],"src":"2673:24:0"},"returnParameters":{"id":322,"nodeType":"ParameterList","parameters":[{"constant":false,"id":321,"name":"votes","nodeType":"VariableDeclaration","scope":337,"src":"2718:12:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"},"typeName":{"id":320,"name":"uint32","nodeType":"ElementaryTypeName","src":"2718:6:0","typeDescriptions":{"typeIdentifier":"t_uint32","typeString":"uint32"}},"value":null,"visibility":"internal"}],"src":"2717:14:0"},"scope":338,"src":"2657:170:0","stateMutability":"view","superFunction":null,"visibility":"public"}],"scope":339,"src":"28:2801:0"}],"src":"0:2830:0"},"compiler":{"name":"solc","version":"0.5.16+commit.9c3226ce.Emscripten.clang"},"networks":{"5":{"events":{},"links":{},"address":"0xc2FaBcC7F21451a5C4DB45DBfa52142C664772DE","transactionHash":"0x5f948155ed16a107402c0d405858692ecc230cbf6d0a04eddc7dab25a35de335"},"11155111":{"events":{},"links":{},"address":"0x68382531D50D93D8dEfb0AF601069279C4D95419","transactionHash":"0x9beff2bd05f829c692f14dadf0f06840c81e61fdaa93caf9a10f42abb03e973b"}},"schemaVersion":"3.3.2","updatedAt":"2023-12-12T20:43:25.561Z","networkType":"ethereum","devdoc":{"methods":{}},"userdoc":{"methods":{}}}')}},[[26,1,2]]]); +//# sourceMappingURL=main.96438fcf.chunk.js.map \ No newline at end of file diff --git a/static/js/main.0c23d573.chunk.js.map b/static/js/main.96438fcf.chunk.js.map similarity index 92% rename from static/js/main.0c23d573.chunk.js.map rename to static/js/main.96438fcf.chunk.js.map index bde70e4..23fdb0e 100644 --- a/static/js/main.0c23d573.chunk.js.map +++ b/static/js/main.96438fcf.chunk.js.map @@ -1 +1 @@ -{"version":3,"sources":["Check.js","ErrorIcon.js","Spinner.js","App.js","Layout.js","Loading.js","index.js"],"names":["Check","xmlns","height","viewBox","width","fill","d","ErrorIcon","Spinner","className","PROPOSALS","ShowAccount","account","ShowMyTokens","myTokens","useCacheSend","drizzleHooks","useDrizzle","send","resetMyVotes","onClick","ShowPersonalInfo","AdminInfo","addr","setAddr","React","setupStudent","type","placeholder","value","onChange","e","target","sortProposals","proposals","copy","sort","a","b","votes","fromTo","from","to","arr","i","push","enoughVotes","ShowTransaction","tid","status","color","ShowTransactions","transactions","reversed","Object","entries","reverse","length","map","console","log","SetButton","name","voteString","setVoteString","int","parseInt","isNaN","setVotes","Proposals","admin","useCacheCall","call","p","myVotes","voteFor","disabled","App","useDrizzleState","drizzleState","accounts","Nav","Layout","props","children","Loading","options","contracts","web3","fallback","url","drizzleStore","generateStore","drizzle","Drizzle","ReactDOM","render","StrictMode","DrizzleProvider","Initializer","error","loadingContractsAndAccounts","loadingWeb3","document","getElementById"],"mappings":"uLAAe,SAASA,IACtB,OACE,sBACEC,MAAM,6BACNC,OAAO,KACPC,QAAQ,YACRC,MAAM,KACNC,KAAK,eALP,UAOE,sBAAMC,EAAE,gBAAgBD,KAAK,SAC7B,sBAAMC,EAAE,0NAGb,CCbc,SAASC,IACtB,OACE,sBACEN,MAAM,6BACNC,OAAO,KACPC,QAAQ,YACRC,MAAM,KACNC,KAAK,eALP,UAOE,sBAAMC,EAAE,gBAAgBD,KAAK,SAC7B,sBAAMC,EAAE,uGAGb,CCbc,SAASE,IACtB,OACE,sBAAKC,UAAU,+BAAf,UACE,qBAAKA,UAAU,WACf,qBAAKA,UAAU,WACf,qBAAKA,UAAU,WACf,qBAAKA,UAAU,iBACf,qBAAKA,UAAU,WACf,qBAAKA,UAAU,WACf,qBAAKA,UAAU,iBACf,qBAAKA,UAAU,WACf,qBAAKA,UAAU,aAGpB,CCRD,MAAMC,EAAY,CAChB,UACA,MACA,MACA,UACA,SACA,QACA,SACA,SAGF,SAASC,GAAY,QAAEC,IACrB,OACE,sBAAKH,UAAU,YAAf,UACE,oBAAIA,UAAU,kCAAd,wBACA,mBAAGA,UAAU,+CAAb,SAA6DG,MAGlE,CAED,SAASC,GAAa,SAAEC,IACtB,MAAM,aAAEC,GAAiBC,oBAAaC,cAC9BC,KAAMC,GAAiBJ,EAAa,YAAa,gBAEzD,OACE,sBAAKN,UAAU,YAAf,UACE,oBAAGA,UAAU,yBAAb,UACE,sBAAMA,UAAU,YAAhB,SAA6BK,IAD/B,oBAGA,wBACEM,QAAS,IAAMD,IACfV,UAAU,yJAFZ,2BAQL,CAED,SAASY,GAAiB,QAAET,EAAF,SAAWE,IACnC,OACE,sBAAKL,UAAU,2CAAf,UACE,cAACE,EAAD,CAAaC,QAASA,IACtB,cAACC,EAAD,CAAcC,SAAUA,MAG7B,CAED,SAASQ,GAAU,QAAEV,IACnB,MAAOW,EAAMC,GAAWC,WAAe,KACjC,aAAEV,GAAiBC,oBAAaC,cAC9BC,KAAMQ,GAAiBX,EAAa,YAAa,gBAEzD,OACE,sBAAKN,UAAU,yDAAf,UACE,oBAAIA,UAAU,qBAAd,6BACA,sBAAKA,UAAU,YAAf,UACE,uBACEkB,KAAK,OACLC,YAAY,mBACZC,MAAON,EACPO,SAAWC,GAAMP,EAAQO,EAAEC,OAAOH,OAClCpB,UAAU,uGAEZ,wBACEW,QAAS,IAAMM,EAAaH,GAC5Bd,UAAU,mIAFZ,qCASP,CAED,SAASwB,EAAcC,GACrB,MAAMC,EAAO,IAAID,GAEjB,OADAC,EAAKC,MAAK,CAACC,EAAGC,IAAMA,EAAEC,MAAQF,EAAEE,QACzBJ,CACR,CAED,SAASK,EAAOC,EAAMC,GACpB,MAAMC,EAAM,GACZ,IAAK,IAAIC,EAAIH,EAAMG,EAAIF,IAAME,EAC3BD,EAAIE,KAAKD,GAEX,OAAOD,CACR,CAED,SAASG,EAAYhC,EAAUyB,GAC7B,OAAOzB,GAAY,EAAIyB,EAAQ,CAChC,CAED,SAASQ,GAAgB,IAAEC,EAAF,OAAOC,IAC9B,IAAIrB,EAAc,cAACpB,EAAD,IACd0C,EAAQ,gBAQZ,MAPe,YAAXD,GACFrB,EAAc,cAAC5B,EAAD,IACdkD,EAAQ,kBACY,UAAXD,IACTrB,EAAc,cAACrB,EAAD,IACd2C,EAAQ,gBAGR,qBAAIzC,UAAS,sCAAiCyC,EAAjC,cAAb,UACE,qBAAKzC,UAAU,MAAf,SAAsBmB,IACtB,qBAAKnB,UAAU,iBAAf,SAAiCuC,MAGtC,CAED,SAASG,GAAiB,aAAEC,IAC1B,MAAMC,EAAW,IAAIC,OAAOC,QAAQH,IAEpC,OADAC,EAASG,UACc,GAAnBH,EAASI,OACJ,6BAGP,oBAAIhD,UAAU,iCAAd,SACG4C,EAASK,KAAI,EAAEV,GAAOC,cACrBU,QAAQC,IAAI,YAAaZ,GAClB,cAACD,EAAD,CAA2BC,IAAKA,EAAKC,OAAQA,GAAvBD,OAIpC,CAED,SAASa,GAAU,KAAEC,IACnB,MAAM,aAAE/C,GAAiBC,oBAAaC,cAC/B8C,EAAYC,GAAiBvC,WAAe,MAC7C,KAAEP,GAASH,EAAa,YAAa,YAS3C,OACE,sBAAKN,UAAU,iCAAf,UACE,uBACEkB,KAAK,SACLE,MAAOkC,EACPtD,UAAU,4CACVqB,SAAWC,GAAMiC,EAAcjC,EAAEC,OAAOH,SAE1C,wBACEpB,UAAU,6FACVW,QAAS,IAlBE,MACf,MAAM6C,EAAMC,SAASH,GACjBI,MAAMF,IAGV/C,EAAK4C,EAAMG,EAAX,EAamBG,GAFjB,yBAQL,CAED,SAASC,GAAU,SAAEvD,EAAF,MAAYwD,IAC7B,MAAM,aAAEC,EAAF,aAAgBxD,GAAiBC,oBAAaC,aAE9CiB,EAAYqC,EAAa,CAAC,cAAeC,GAC7C9D,EAAUgD,KAAI,CAACe,EAAG7B,KAAJ,CACZkB,KAAMW,EACNlC,MAAOiC,EAAK,YAAa,YAAa5B,GACtC8B,QAASF,EAAK,YAAa,UAAWC,UAGlCvD,KAAMyD,GAAY5D,EAAa,YAAa,WAEpD,OACE,oBAAIN,UAAU,uDAAd,SACGwB,EAAcC,GAAWwB,KAAI,EAAGI,OAAMvB,QAAOmC,aAC5C,qBAAejE,UAAU,8BAAzB,UACE,qBAAKA,UAAU,iBAAf,SAAiCqD,IACjC,sBAAKrD,UAAU,8CAAf,UACE,sBAAKA,UAAU,qBAAf,UACE,sBAAMA,UAAU,YAAhB,SAA6B8B,IAAc,IACjC,GAATA,EAAa,OAAS,WAEzB,sBAAK9B,UAAU,wCAAf,UACG+B,EAAO,EAAGkC,GAAShB,KAAKd,GACvB,qBAEEnC,UAAU,gEADLmC,KAIT,wBACExB,QAAS,IAAMuD,EAAQb,GACvBc,UAAW9B,EAAYhC,EAAU4D,GACjCjE,UAAS,2DACNqC,EAAYhC,EAAU4D,GAEnB,0CADA,0BAMXJ,EAAQ,cAACT,EAAD,CAAWC,KAAMA,IAAW,+BAzB9BA,MA8BhB,CAEc,SAASe,IACtB,MAAM,QAAEjE,EAAF,aAAWwC,GAAiBpC,oBAAa8D,iBAC5CC,IAAD,CACEnE,QAASmE,EAAaC,SAAS,GAC/B5B,aAAc2B,EAAa3B,kBAIzB,aAAEmB,GAAiBvD,oBAAaC,aAEhCH,EAAWyD,EAAa,YAAa,SAAU3D,GAE/C0D,EADWC,EAAa,YAAa,WAChB3D,EAE3B,OACE,sBAAKH,UAAU,wFAAf,UACE,sBAAKA,UAAU,YAAf,UACG6D,EAAQ,cAAChD,EAAD,CAAWV,QAASA,IAAc,KAC3C,cAACS,EAAD,CAAkBT,QAASA,EAASE,SAAUA,OAEhD,sBAAKL,UAAU,uCAAf,UACE,cAAC4D,EAAD,CAAWvD,SAAUA,EAAUwD,MAAOA,IACtC,cAACnB,EAAD,CAAkBC,aAAcA,SAIvC,CC5OD,SAAS6B,IACP,OACE,qBAAKxE,UAAU,mHAAf,SACE,qBAAKA,UAAU,OAAf,0BAGL,CAEc,SAASyE,EAAOC,GAC7B,OACE,qCACE,cAACF,EAAD,IACA,+BAAOE,EAAMC,aAGlB,C,WCbc,SAASC,IACtB,OAAO,sBAAK5E,UAAU,4DAAf,UACL,cAACD,EAAD,IACA,uEAEE,uBAFF,mEAGkE,yCAHlE,gBAOH,CCFD,MAAM8E,EAAU,CACdC,UAAW,C,MACXC,KAAM,CACJC,SAAU,CACR9D,KAAM,KACN+D,IAAK,yBAKLC,EAAeC,wBAAcN,GAC7BO,EAAU,IAAIC,UAAQR,EAASK,GAErCI,IAASC,OACP,cAAC,IAAMC,WAAP,UACE,cAACf,EAAD,UACE,cAAC,oBAAagB,gBAAd,CAA8BL,QAASA,EAAvC,SACE,cAAC,oBAAaM,YAAd,CAEEC,MAAM,sBACNC,4BAA6B,cAAChB,EAAD,IAC7BiB,YAAa,cAACjB,EAAD,IAJf,SAME,cAACR,EAAD,YAKR0B,SAASC,eAAe,Q","file":"static/js/main.0c23d573.chunk.js","sourcesContent":["export default function Check() {\n return (\n \n \n \n \n );\n}\n","export default function ErrorIcon() {\n return (\n \n \n \n \n );\n}\n","export default function Spinner() {\n return (\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n );\n}\n","import { drizzleReactHooks as drizzleHooks } from \"@drizzle/react-plugin\";\nimport * as React from \"react\";\nimport Check from \"./Check\";\nimport ErrorIcon from \"./ErrorIcon\";\nimport Spinner from \"./Spinner\";\n\nconst PROPOSALS = [\n \"Nothing\",\n \"Dog\",\n \"Cat\",\n \"Penguin\",\n \"Monkey\",\n \"Koala\",\n \"Rabbit\",\n \"Panda\",\n];\n\nfunction ShowAccount({ account }) {\n return (\n
\n

My Account

\n

{account}

\n
\n );\n}\n\nfunction ShowMyTokens({ myTokens }) {\n const { useCacheSend } = drizzleHooks.useDrizzle();\n const { send: resetMyVotes } = useCacheSend(\"Proposals\", \"resetMyVotes\");\n\n return (\n
\n

\n {myTokens} animal tokens\n

\n resetMyVotes()}\n className=\"motion-reduce:transition-none transition-colors duration-300 ease-in-out bg-indigo-500 hover:bg-red-500 text-white text-lg font-bold px-2 py-1 rounded\"\n >\n Reset Votes\n \n
\n );\n}\n\nfunction ShowPersonalInfo({ account, myTokens }) {\n return (\n
\n \n \n
\n );\n}\n\nfunction AdminInfo({ account }) {\n const [addr, setAddr] = React.useState(\"\");\n const { useCacheSend } = drizzleHooks.useDrizzle();\n const { send: setupStudent } = useCacheSend(\"Proposals\", \"setupStudent\");\n\n return (\n
\n

Owner's Section

\n
\n setAddr(e.target.value)}\n className=\"shadow-inner text-base sm:text-xl px-2 bg-gray-50 rounded-md placeholder-gray-700 font-mono w-full\"\n >\n setupStudent(addr)}\n className=\"transition-colors duration-300 ease-in-out text-white rounded text-lg shadow font-bold py-1 px-2 bg-indigo-500 hover:bg-blue-400\"\n >\n Initialize Student\n \n
\n
\n );\n}\n\nfunction sortProposals(proposals) {\n const copy = [...proposals];\n copy.sort((a, b) => b.votes - a.votes);\n return copy;\n}\n\nfunction fromTo(from, to) {\n const arr = [];\n for (let i = from; i < to; ++i) {\n arr.push(i);\n }\n return arr;\n}\n\nfunction enoughVotes(myTokens, votes) {\n return myTokens >= 2 * votes + 1;\n}\n\nfunction ShowTransaction({ tid, status }) {\n let placeholder = ;\n let color = \"text-blue-600\";\n if (status === \"success\") {\n placeholder = ;\n color = \"text-green-600\";\n } else if (status === \"error\") {\n placeholder = ;\n color = \"text-red-600\";\n }\n return (\n
  • \n
    {placeholder}
    \n
    {tid}
    \n
  • \n );\n}\n\nfunction ShowTransactions({ transactions }) {\n const reversed = [...Object.entries(transactions)];\n reversed.reverse();\n if (reversed.length == 0) {\n return <>;\n }\n return (\n
      \n {reversed.map(([tid, { status }]) => {\n console.log(\"first key\", tid);\n return ;\n })}\n
    \n );\n}\n\nfunction SetButton({ name }) {\n const { useCacheSend } = drizzleHooks.useDrizzle();\n const [voteString, setVoteString] = React.useState(\"0\");\n const { send } = useCacheSend(\"Proposals\", \"setVotes\");\n const setVotes = () => {\n const int = parseInt(voteString);\n if (isNaN(int)) {\n return;\n }\n send(name, int);\n };\n\n return (\n
    \n setVoteString(e.target.value)}\n >\n setVotes()}\n >\n Set Votes\n \n
    \n );\n}\n\nfunction Proposals({ myTokens, admin }) {\n const { useCacheCall, useCacheSend } = drizzleHooks.useDrizzle();\n\n const proposals = useCacheCall([\"Proposals\"], (call) =>\n PROPOSALS.map((p, i) => ({\n name: p,\n votes: call(\"Proposals\", \"proposals\", i),\n myVotes: call(\"Proposals\", \"myVotes\", p),\n }))\n );\n const { send: voteFor } = useCacheSend(\"Proposals\", \"voteFor\");\n\n return (\n
      \n {sortProposals(proposals).map(({ name, votes, myVotes }) => (\n
    • \n
      {name}
      \n
      \n
      \n {votes}{\" \"}\n {votes == 1 ? \"vote\" : \"votes\"}\n
      \n
      \n {fromTo(0, myVotes).map((i) => (\n
      \n ))}\n voteFor(name)}\n disabled={!enoughVotes(myTokens, myVotes)}\n className={`transition-colors border-2 border-dashed w-6 h-6 ${\n !enoughVotes(myTokens, myVotes)\n ? \"border-red-500\"\n : \"border-indigo-500 hover:border-blue-400\"\n }`}\n >\n
      \n \n {admin ? : <>}\n
    • \n ))}\n
    \n );\n}\n\nexport default function App() {\n const { account, transactions } = drizzleHooks.useDrizzleState(\n (drizzleState) => ({\n account: drizzleState.accounts[0],\n transactions: drizzleState.transactions,\n })\n );\n\n const { useCacheCall } = drizzleHooks.useDrizzle();\n\n const myTokens = useCacheCall(\"Proposals\", \"tokens\", account);\n const theOwner = useCacheCall(\"Proposals\", \"owner\");\n const admin = theOwner === account;\n\n return (\n
    \n
    \n {admin ? : null}\n \n
    \n
    \n \n \n
    \n
    \n );\n}\n","function Nav() {\n return (\n \n );\n}\n\nexport default function Layout(props) {\n return (\n <>\n