From 6ca4faec39cfb37384544b6cd3018f66bc4b0501 Mon Sep 17 00:00:00 2001 From: smishy05 Date: Sun, 10 Nov 2024 11:15:54 +0100 Subject: [PATCH] website update --- asset-manifest.json | 6 +++--- index.html | 2 +- .../js/{main.2ffd29f7.chunk.js => main.436e8cb3.chunk.js} | 4 ++-- ...ain.2ffd29f7.chunk.js.map => main.436e8cb3.chunk.js.map} | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) rename static/js/{main.2ffd29f7.chunk.js => main.436e8cb3.chunk.js} (99%) rename static/js/{main.2ffd29f7.chunk.js.map => main.436e8cb3.chunk.js.map} (99%) diff --git a/asset-manifest.json b/asset-manifest.json index 43c4ed9..097146a 100644 --- a/asset-manifest.json +++ b/asset-manifest.json @@ -1,8 +1,8 @@ { "files": { "main.css": "/cs234-public/static/css/main.df43e5ca.chunk.css", - "main.js": "/cs234-public/static/js/main.2ffd29f7.chunk.js", - "main.js.map": "/cs234-public/static/js/main.2ffd29f7.chunk.js.map", + "main.js": "/cs234-public/static/js/main.436e8cb3.chunk.js", + "main.js.map": "/cs234-public/static/js/main.436e8cb3.chunk.js.map", "runtime-main.js": "/cs234-public/static/js/runtime-main.387213e2.js", "runtime-main.js.map": "/cs234-public/static/js/runtime-main.387213e2.js.map", "static/js/2.21ce75fb.chunk.js": "/cs234-public/static/js/2.21ce75fb.chunk.js", @@ -15,6 +15,6 @@ "static/js/runtime-main.387213e2.js", "static/js/2.21ce75fb.chunk.js", "static/css/main.df43e5ca.chunk.css", - "static/js/main.2ffd29f7.chunk.js" + "static/js/main.436e8cb3.chunk.js" ] } \ No newline at end of file diff --git a/index.html b/index.html index f88112a..cc81219 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.2ffd29f7.chunk.js b/static/js/main.436e8cb3.chunk.js similarity index 99% rename from static/js/main.2ffd29f7.chunk.js rename to static/js/main.436e8cb3.chunk.js index cb3aa6e..a858847 100644 --- a/static/js/main.2ffd29f7.chunk.js +++ b/static/js/main.436e8cb3.chunk.js @@ -1,2 +1,2 @@ -(this.webpackJsonpclient=this.webpackJsonpclient||[]).push([[0],{13:function(e,t,n){},26:function(e,t,n){"use strict";n.r(t);var i=n(2),a=n.n(i),s=n(7),r=n.n(s),f=(n(13),n(1)),l=n(0);function u(){return Object(l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 0 24 24",width:"24",fill:"currentColor",children:[Object(l.jsx)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(l.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(l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 0 24 24",width:"24",fill:"currentColor",children:[Object(l.jsx)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(l.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(l.jsxs)("div",{className:"self-building-square-spinner",children:[Object(l.jsx)("div",{className:"square"}),Object(l.jsx)("div",{className:"square"}),Object(l.jsx)("div",{className:"square"}),Object(l.jsx)("div",{className:"square clear"}),Object(l.jsx)("div",{className:"square"}),Object(l.jsx)("div",{className:"square"}),Object(l.jsx)("div",{className:"square clear"}),Object(l.jsx)("div",{className:"square"}),Object(l.jsx)("div",{className:"square"})]})}const p=["Nothing","Dog","Cat","Penguin","Monkey","Koala","Rabbit","Panda"];function c(e){let{account:t}=e;return Object(l.jsxs)("div",{className:"space-y-2",children:[Object(l.jsx)("h2",{className:"text-gray-800 text-xl font-bold",children:"My Account"}),Object(l.jsx)("p",{className:"text-gray-700 font-mono text-xs sm:text-base",children:t})]})}function y(e){let{myTokens:t}=e;const{useCacheSend:n}=f.drizzleReactHooks.useDrizzle(),{send:i}=n("Proposals","resetMyVotes");return Object(l.jsxs)("div",{className:"space-y-6",children:[Object(l.jsxs)("p",{className:"text-gray-800 text-2xl",children:[Object(l.jsx)("span",{className:"font-bold",children:t})," animal tokens"]}),Object(l.jsx)("button",{onClick:()=>i(),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(e){let{account:t,myTokens:n}=e;return Object(l.jsxs)("div",{className:"bg-white p-4 shadow rounded-md space-y-2",children:[Object(l.jsx)(c,{account:t}),Object(l.jsx)(y,{myTokens:n})]})}function g(e){let{account:t}=e;const[n,a]=i.useState(""),{useCacheSend:s}=f.drizzleReactHooks.useDrizzle(),{send:r}=s("Proposals","setupStudent");return Object(l.jsxs)("div",{className:"bg-white p-4 rounded-md shadow space-y-6 text-gray-800",children:[Object(l.jsx)("h2",{className:"text-2xl font-bold",children:"Owner's Section"}),Object(l.jsxs)("div",{className:"space-y-3",children:[Object(l.jsx)("input",{type:"text",placeholder:"Ethereum Address",value:n,onChange:e=>a(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(l.jsx)("button",{onClick:()=>r(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",children:"Initialize Student"})]})]})}function b(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(e){let{tid:t,status:n}=e,i=Object(l.jsx)(d,{}),a="text-blue-600";return"success"===n?(i=Object(l.jsx)(u,{}),a="text-green-600"):"error"===n&&(i=Object(l.jsx)(o,{}),a="text-red-600"),Object(l.jsxs)("li",{className:`flex space-x-4 items-center ${a} space-y-2`,children:[Object(l.jsx)("div",{className:"w-6",children:i}),Object(l.jsx)("div",{className:"font-bold pb-1",children:t})]})}function V(e){let{transactions:t}=e;const n=[...Object.entries(t)];return n.reverse(),0==n.length?Object(l.jsx)(l.Fragment,{}):Object(l.jsx)("ul",{className:"bg-white rounded shadow-md p-4",children:n.map((e=>{let[t,{status:n}]=e;return console.log("first key",t),Object(l.jsx)(D,{tid:t,status:n},t)}))})}function v(e){let{name:t}=e;const{useCacheSend:n}=f.drizzleReactHooks.useDrizzle(),[a,s]=i.useState("0"),{send:r}=n("Proposals","setVotes");return Object(l.jsxs)("div",{className:"pl-16 flex items-end space-x-4",children:[Object(l.jsx)("input",{type:"number",value:a,className:"w-12 rounded shadow-inner px-1 bg-gray-50",onChange:e=>s(e.target.value)}),Object(l.jsx)("button",{className:"transition-colors text-white text-sm p-1 font-bold bg-indigo-500 hover:bg-blue-400 rounded",onClick:()=>(()=>{const e=parseInt(a);isNaN(e)||r(t,e)})(),children:"Set Votes"})]})}function I(e){let{myTokens:t,admin:n}=e;const{useCacheCall:i,useCacheSend:a}=f.drizzleReactHooks.useDrizzle(),s=i(["Proposals"],(e=>p.map(((t,n)=>({name:t,votes:e("Proposals","proposals",n),myVotes:e("Proposals","myVotes",t)}))))),{send:r}=a("Proposals","voteFor");return Object(l.jsx)("ul",{className:"bg-white p-4 rounded shadow-md text-xl text-gray-800",children:b(s).map((e=>{let{name:i,votes:a,myVotes:s}=e;return Object(l.jsxs)("li",{className:"flex items-center space-x-4",children:[Object(l.jsx)("div",{className:"text-2xl w-1/3",children:i}),Object(l.jsxs)("div",{className:"flex items-center space-x-4 justify-between",children:[Object(l.jsxs)("div",{className:"text-gray-700 w-24",children:[Object(l.jsx)("span",{className:"font-bold",children:a})," ",1==a?"vote":"votes"]}),Object(l.jsxs)("div",{className:"flex items-center flex-grow space-x-2",children:[T(0,s).map((e=>Object(l.jsx)("div",{className:"w-6 h-6 bg-gradient-to-r from-indigo-500 to-blue-500 rounded"},e))),Object(l.jsx)("button",{onClick:()=>r(i),disabled:!_(t,s),className:"transition-colors border-2 border-dashed w-6 h-6 "+(_(t,s)?"border-indigo-500 hover:border-blue-400":"border-red-500")})]})]}),n?Object(l.jsx)(v,{name:i}):Object(l.jsx)(l.Fragment,{})]},i)}))})}function x(){const{account:e,transactions:t}=f.drizzleReactHooks.useDrizzleState((e=>({account:e.accounts[0],transactions:e.transactions}))),{useCacheCall:n}=f.drizzleReactHooks.useDrizzle(),i=n("Proposals","tokens",e),a=n("Proposals","owner")===e;return Object(l.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(l.jsxs)("div",{className:"space-y-6",children:[a?Object(l.jsx)(g,{account:e}):null,Object(l.jsx)(m,{account:e,myTokens:i})]}),Object(l.jsxs)("div",{className:"flex flex-col lg:flex-grow space-y-2",children:[Object(l.jsx)(I,{myTokens:i,admin:a}),Object(l.jsx)(V,{transactions:t})]})]})}function h(){return Object(l.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(l.jsx)("div",{className:"mx-8",children:"Animal Vote"})})}function S(e){return Object(l.jsxs)(l.Fragment,{children:[Object(l.jsx)(h,{}),Object(l.jsx)("main",{children:e.children})]})}var L=n(3);function P(){return Object(l.jsxs)("div",{className:"text-lg text-blue-800 flex flex-col items-center max-auto",children:[Object(l.jsx)(d,{}),Object(l.jsxs)("p",{children:["Currently loading the DAPP application",Object(l.jsx)("br",{}),"If this is taking a while, make sure that MetaMask is using the ",Object(l.jsx)("b",{children:"Sepolia "}),"network."]})]})}const C={contracts:[n(8)],web3:{fallback:{type:"ws",url:"ws://127.0.0.1:9545"}}},q=Object(L.generateStore)(C),R=new L.Drizzle(C,q);r.a.render(Object(l.jsx)(a.a.StrictMode,{children:Object(l.jsx)(S,{children:Object(l.jsx)(f.drizzleReactHooks.DrizzleProvider,{drizzle:R,children:Object(l.jsx)(f.drizzleReactHooks.Initializer,{error:"There was an error.",loadingContractsAndAccounts:Object(l.jsx)(P,{}),loadingWeb3:Object(l.jsx)(P,{}),children:Object(l.jsx)(x,{})})})})}),document.getElementById("root"))},8: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\\":{\\"project:/contracts/Proposals.sol\\":\\"Proposals\\"},\\"evmVersion\\":\\"istanbul\\",\\"libraries\\":{},\\"optimizer\\":{\\"enabled\\":false,\\"runs\\":200},\\"remappings\\":[]},\\"sources\\":{\\"project:/contracts/Proposals.sol\\":{\\"keccak256\\":\\"0xf6ec1b85da9b88e3fe0fe852f58cc478400772edfd64c5427206441d5108005c\\",\\"urls\\":[\\"bzz-raw://d5249182879447866496b4e54857c0f09e088042c4c4e9e2a101232ee393ea43\\",\\"dweb:/ipfs/QmPLpDK7rkMna42LMKrzYDxyZBgNxGpoSmmffgcdzCssFn\\"]}},\\"version\\":1}","bytecode":"0x60806040526008600260006101000a81548163ffffffff021916908363ffffffff16021790555034801561003257600080fd5b5060405161148f38038061148f8339818101604052602081101561005557600080fd5b8101908080519060200190929190505050336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600160405180807f4e6f7468696e67000000000000000000000000000000000000000000000000008152506007019050908152602001604051809103902060006101000a81548163ffffffff021916908363ffffffff16021790555060018060405180807f446f6700000000000000000000000000000000000000000000000000000000008152506003019050908152602001604051809103902060006101000a81548163ffffffff021916908363ffffffff1602179055506002600160405180807f43617400000000000000000000000000000000000000000000000000000000008152506003019050908152602001604051809103902060006101000a81548163ffffffff021916908363ffffffff1602179055506003600160405180807f50656e6775696e000000000000000000000000000000000000000000000000008152506007019050908152602001604051809103902060006101000a81548163ffffffff021916908363ffffffff1602179055506004600160405180807f4d6f6e6b657900000000000000000000000000000000000000000000000000008152506006019050908152602001604051809103902060006101000a81548163ffffffff021916908363ffffffff1602179055506005600160405180807f4b6f616c610000000000000000000000000000000000000000000000000000008152506005019050908152602001604051809103902060006101000a81548163ffffffff021916908363ffffffff1602179055506006600160405180807f52616262697400000000000000000000000000000000000000000000000000008152506006019050908152602001604051809103902060006101000a81548163ffffffff021916908363ffffffff1602179055506007600160405180807f50616e64610000000000000000000000000000000000000000000000000000008152506005019050908152602001604051809103902060006101000a81548163ffffffff021916908363ffffffff160217905550600060046003830263ffffffff16816103aa57fe5b04905060008183039050600181600202836003020103600460008063ffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff1602179055506000600190505b600260009054906101000a900463ffffffff1663ffffffff168163ffffffff16101561046e576001600460008363ffffffff1663ffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff1602179055508060010190506103fe565b5050505061100e806104816000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c80636ec59ee6116100665780636ec59ee61461029c5780638da5cb5b14610354578063b49b0a311461039e578063c04752d814610479578063e48603391461053457610093565b80630b3de1f3146100985780632295a8e5146100a25780632a4910ab1461016d5780633cb9269e146101c1575b600080fd5b6100a0610598565b005b61016b600480360360408110156100b857600080fd5b81019080803590602001906401000000008111156100d557600080fd5b8201836020820111156100e757600080fd5b8035906020019184600183028401116401000000008311171561010957600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290803563ffffffff169060200190929190505050610788565b005b61019f6004803603602081101561018357600080fd5b81019080803563ffffffff1690602001909291905050506108ee565b604051808263ffffffff1663ffffffff16815260200191505060405180910390f35b61027a600480360360208110156101d757600080fd5b81019080803590602001906401000000008111156101f457600080fd5b82018360208201111561020657600080fd5b8035906020019184600183028401116401000000008311171561022857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610911565b604051808263ffffffff1663ffffffff16815260200191505060405180910390f35b610352600480360360208110156102b257600080fd5b81019080803590602001906401000000008111156102cf57600080fd5b8201836020820111156102e157600080fd5b8035906020019184602083028401116401000000008311171561030357600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050919291929050505061094a565b005b61035c610a8b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610457600480360360208110156103b457600080fd5b81019080803590602001906401000000008111156103d157600080fd5b8201836020820111156103e357600080fd5b8035906020019184600183028401116401000000008311171561040557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610ab0565b604051808263ffffffff1663ffffffff16815260200191505060405180910390f35b6105326004803603602081101561048f57600080fd5b81019080803590602001906401000000008111156104ac57600080fd5b8201836020820111156104be57600080fd5b803590602001918460018302840111640100000000831117156104e057600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610ba4565b005b6105766004803603602081101561054a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f69565b604051808263ffffffff1663ffffffff16815260200191505060405180910390f35b60008090505b600260009054906101000a900463ffffffff1663ffffffff168163ffffffff161015610785576000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008363ffffffff1663ffffffff16815260200190815260200160002060009054906101000a900463ffffffff169050808102600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282829054906101000a900463ffffffff160192506101000a81548163ffffffff021916908363ffffffff16021790555080600460008463ffffffff1663ffffffff16815260200190815260200160002060008282829054906101000a900463ffffffff160392506101000a81548163ffffffff021916908363ffffffff1602179055506000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008463ffffffff1663ffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff1602179055505080600101905061059e565b50565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461082d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180610fb26028913960400191505060405180910390fd5b60006001836040518082805190602001908083835b602083106108655780518252602082019150602081019050602083039250610842565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900463ffffffff16905081600460008363ffffffff1663ffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff160217905550505050565b60046020528060005260406000206000915054906101000a900463ffffffff1681565b6001818051602081018201805184825260208301602085012081835280955050505050506000915054906101000a900463ffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109ef576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180610fb26028913960400191505060405180910390fd5b60008090505b81518163ffffffff161015610a8757600960036000848463ffffffff1681518110610a1c57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff1602179055508060010190506109f5565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806001836040518082805190602001908083835b60208310610ae95780518252602082019150602081019050602083039250610ac6565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900463ffffffff169050600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008263ffffffff1663ffffffff16815260200190815260200160002060009054906101000a900463ffffffff16915050919050565b60006001826040518082805190602001908083835b60208310610bdc5780518252602082019150602081019050602083039250610bb9565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900463ffffffff1690506001600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900463ffffffff1663ffffffff161015610cd1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180610f8d6025913960400191505060405180910390fd5b60006001600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008463ffffffff1663ffffffff16815260200190815260200160002060009054906101000a900463ffffffff1601905060006001826002020390508063ffffffff16600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900463ffffffff1663ffffffff161015610e21576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f496e73756666696369656e7420746f6b656e730000000000000000000000000081525060200191505060405180910390fd5b80600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282829054906101000a900463ffffffff160392506101000a81548163ffffffff021916908363ffffffff16021790555081600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008563ffffffff1663ffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff1602179055506001600460008563ffffffff1663ffffffff16815260200190815260200160002060008282829054906101000a900463ffffffff160192506101000a81548163ffffffff021916908363ffffffff16021790555050505050565b60036020528060005260406000206000915054906101000a900463ffffffff168156fe596f75206e65656420746f2068617665206120746f6b656e20746f20766f74652077697468546869732066756e6374696f6e206973207265737472696374656420746f20746865206f776e6572a265627a7a72315820ff5dd0cbc6e3f959c70fd07f10895c13cb703ea127d715ffa4905cc410784fc064736f6c63430005100032","deployedBytecode":"0x608060405234801561001057600080fd5b50600436106100935760003560e01c80636ec59ee6116100665780636ec59ee61461029c5780638da5cb5b14610354578063b49b0a311461039e578063c04752d814610479578063e48603391461053457610093565b80630b3de1f3146100985780632295a8e5146100a25780632a4910ab1461016d5780633cb9269e146101c1575b600080fd5b6100a0610598565b005b61016b600480360360408110156100b857600080fd5b81019080803590602001906401000000008111156100d557600080fd5b8201836020820111156100e757600080fd5b8035906020019184600183028401116401000000008311171561010957600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290803563ffffffff169060200190929190505050610788565b005b61019f6004803603602081101561018357600080fd5b81019080803563ffffffff1690602001909291905050506108ee565b604051808263ffffffff1663ffffffff16815260200191505060405180910390f35b61027a600480360360208110156101d757600080fd5b81019080803590602001906401000000008111156101f457600080fd5b82018360208201111561020657600080fd5b8035906020019184600183028401116401000000008311171561022857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610911565b604051808263ffffffff1663ffffffff16815260200191505060405180910390f35b610352600480360360208110156102b257600080fd5b81019080803590602001906401000000008111156102cf57600080fd5b8201836020820111156102e157600080fd5b8035906020019184602083028401116401000000008311171561030357600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050919291929050505061094a565b005b61035c610a8b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610457600480360360208110156103b457600080fd5b81019080803590602001906401000000008111156103d157600080fd5b8201836020820111156103e357600080fd5b8035906020019184600183028401116401000000008311171561040557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610ab0565b604051808263ffffffff1663ffffffff16815260200191505060405180910390f35b6105326004803603602081101561048f57600080fd5b81019080803590602001906401000000008111156104ac57600080fd5b8201836020820111156104be57600080fd5b803590602001918460018302840111640100000000831117156104e057600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610ba4565b005b6105766004803603602081101561054a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f69565b604051808263ffffffff1663ffffffff16815260200191505060405180910390f35b60008090505b600260009054906101000a900463ffffffff1663ffffffff168163ffffffff161015610785576000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008363ffffffff1663ffffffff16815260200190815260200160002060009054906101000a900463ffffffff169050808102600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282829054906101000a900463ffffffff160192506101000a81548163ffffffff021916908363ffffffff16021790555080600460008463ffffffff1663ffffffff16815260200190815260200160002060008282829054906101000a900463ffffffff160392506101000a81548163ffffffff021916908363ffffffff1602179055506000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008463ffffffff1663ffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff1602179055505080600101905061059e565b50565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461082d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180610fb26028913960400191505060405180910390fd5b60006001836040518082805190602001908083835b602083106108655780518252602082019150602081019050602083039250610842565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900463ffffffff16905081600460008363ffffffff1663ffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff160217905550505050565b60046020528060005260406000206000915054906101000a900463ffffffff1681565b6001818051602081018201805184825260208301602085012081835280955050505050506000915054906101000a900463ffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109ef576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180610fb26028913960400191505060405180910390fd5b60008090505b81518163ffffffff161015610a8757600960036000848463ffffffff1681518110610a1c57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff1602179055508060010190506109f5565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806001836040518082805190602001908083835b60208310610ae95780518252602082019150602081019050602083039250610ac6565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900463ffffffff169050600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008263ffffffff1663ffffffff16815260200190815260200160002060009054906101000a900463ffffffff16915050919050565b60006001826040518082805190602001908083835b60208310610bdc5780518252602082019150602081019050602083039250610bb9565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900463ffffffff1690506001600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900463ffffffff1663ffffffff161015610cd1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180610f8d6025913960400191505060405180910390fd5b60006001600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008463ffffffff1663ffffffff16815260200190815260200160002060009054906101000a900463ffffffff1601905060006001826002020390508063ffffffff16600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900463ffffffff1663ffffffff161015610e21576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f496e73756666696369656e7420746f6b656e730000000000000000000000000081525060200191505060405180910390fd5b80600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282829054906101000a900463ffffffff160392506101000a81548163ffffffff021916908363ffffffff16021790555081600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008563ffffffff1663ffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff1602179055506001600460008563ffffffff1663ffffffff16815260200190815260200160002060008282829054906101000a900463ffffffff160192506101000a81548163ffffffff021916908363ffffffff16021790555050505050565b60036020528060005260406000206000915054906101000a900463ffffffff168156fe596f75206e65656420746f2068617665206120746f6b656e20746f20766f74652077697468546869732066756e6374696f6e206973207265737472696374656420746f20746865206f776e6572a265627a7a72315820ff5dd0cbc6e3f959c70fd07f10895c13cb703ea127d715ffa4905cc410784fc064736f6c63430005100032","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/smishra/Desktop/TAing/Sem5/hws/hw4/contracts/Proposals.sol","ast":{"absolutePath":"project:/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":{"attributes":{"absolutePath":"project:/contracts/Proposals.sol","exportedSymbols":{"Proposals":[338]}},"children":[{"attributes":{"literals":["solidity",">=","0.4",".22"]},"id":1,"name":"PragmaDirective","src":"0:25:0"},{"attributes":{"baseContracts":[null],"contractDependencies":[null],"contractKind":"contract","documentation":null,"fullyImplemented":true,"linearizedBaseContracts":[338],"name":"Proposals","scope":339},"children":[{"attributes":{"constant":false,"name":"owner","scope":338,"stateVariable":true,"storageLocation":"default","type":"address","value":null,"visibility":"public"},"children":[{"attributes":{"name":"address","stateMutability":"nonpayable","type":"address"},"id":2,"name":"ElementaryTypeName","src":"53:7:0"}],"id":3,"name":"VariableDeclaration","src":"53:20:0"},{"attributes":{"constant":false,"name":"proposalIndices","scope":338,"stateVariable":true,"storageLocation":"default","type":"mapping(string => uint32)","value":null,"visibility":"public"},"children":[{"attributes":{"type":"mapping(string => uint32)"},"children":[{"attributes":{"name":"string","type":"string"},"id":4,"name":"ElementaryTypeName","src":"87:6:0"},{"attributes":{"name":"uint32","type":"uint32"},"id":5,"name":"ElementaryTypeName","src":"97:6:0"}],"id":6,"name":"Mapping","src":"79:25:0"}],"id":7,"name":"VariableDeclaration","src":"79:48:0"},{"attributes":{"constant":false,"name":"numProposals","scope":338,"stateVariable":true,"storageLocation":"default","type":"uint32","visibility":"internal"},"children":[{"attributes":{"name":"uint32","type":"uint32"},"id":8,"name":"ElementaryTypeName","src":"133:6:0"},{"attributes":{"argumentTypes":null,"hexvalue":"38","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"number","type":"int_const 8","value":"8"},"id":9,"name":"Literal","src":"155:1:0"}],"id":10,"name":"VariableDeclaration","src":"133:23:0"},{"attributes":{"constant":false,"name":"tokens","scope":338,"stateVariable":true,"storageLocation":"default","type":"mapping(address => uint32)","value":null,"visibility":"public"},"children":[{"attributes":{"type":"mapping(address => uint32)"},"children":[{"attributes":{"name":"address","type":"address"},"id":11,"name":"ElementaryTypeName","src":"220:7:0"},{"attributes":{"name":"uint32","type":"uint32"},"id":12,"name":"ElementaryTypeName","src":"231:6:0"}],"id":13,"name":"Mapping","src":"212:26:0"}],"id":14,"name":"VariableDeclaration","src":"212:40:0"},{"attributes":{"constant":false,"name":"proposals","scope":338,"stateVariable":true,"storageLocation":"default","type":"mapping(uint32 => uint32)","value":null,"visibility":"public"},"children":[{"attributes":{"type":"mapping(uint32 => uint32)"},"children":[{"attributes":{"name":"uint32","type":"uint32"},"id":15,"name":"ElementaryTypeName","src":"313:6:0"},{"attributes":{"name":"uint32","type":"uint32"},"id":16,"name":"ElementaryTypeName","src":"323:6:0"}],"id":17,"name":"Mapping","src":"305:25:0"}],"id":18,"name":"VariableDeclaration","src":"305:42:0"},{"attributes":{"constant":false,"name":"votesByFor","scope":338,"stateVariable":true,"storageLocation":"default","type":"mapping(address => mapping(uint32 => uint32))","value":null,"visibility":"internal"},"children":[{"attributes":{"type":"mapping(address => mapping(uint32 => uint32))"},"children":[{"attributes":{"name":"address","type":"address"},"id":19,"name":"ElementaryTypeName","src":"361:7:0"},{"attributes":{"type":"mapping(uint32 => uint32)"},"children":[{"attributes":{"name":"uint32","type":"uint32"},"id":20,"name":"ElementaryTypeName","src":"380:6:0"},{"attributes":{"name":"uint32","type":"uint32"},"id":21,"name":"ElementaryTypeName","src":"390:6:0"}],"id":22,"name":"Mapping","src":"372:25:0"}],"id":23,"name":"Mapping","src":"353:45:0"}],"id":24,"name":"VariableDeclaration","src":"353:56:0"},{"attributes":{"documentation":null,"name":"restricted","visibility":"internal"},"children":[{"attributes":{"parameters":[null]},"children":[],"id":25,"name":"ParameterList","src":"435:2:0"},{"children":[{"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"isStructConstructorCall":false,"lValueRequested":false,"names":[null],"type":"tuple()","type_conversion":false},"children":[{"attributes":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"},{"typeIdentifier":"t_stringliteral_f5132e684ff59c4f69cfd3e5048a139c5e9dfc67213b9635f1b469112c0afb2e","typeString":"literal_string \\"This function is restricted to the owner\\""}],"overloadedDeclarations":[356,357],"referencedDeclaration":357,"type":"function (bool,string memory) pure","value":"require"},"id":26,"name":"Identifier","src":"448:7:0"},{"attributes":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"==","type":"bool"},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"member_name":"sender","referencedDeclaration":null,"type":"address payable"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":353,"type":"msg","value":"msg"},"id":27,"name":"Identifier","src":"469:3:0"}],"id":28,"name":"MemberAccess","src":"469:10:0"},{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":3,"type":"address","value":"owner"},"id":29,"name":"Identifier","src":"483:5:0"}],"id":30,"name":"BinaryOperation","src":"469:19:0"},{"attributes":{"argumentTypes":null,"hexvalue":"546869732066756e6374696f6e206973207265737472696374656420746f20746865206f776e6572","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"string","type":"literal_string \\"This function is restricted to the owner\\"","value":"This function is restricted to the owner"},"id":31,"name":"Literal","src":"502:42:0"}],"id":32,"name":"FunctionCall","src":"448:106:0"}],"id":33,"name":"ExpressionStatement","src":"448:106:0"},{"id":34,"name":"PlaceholderStatement","src":"564:1:0"}],"id":35,"name":"Block","src":"438:134:0"}],"id":36,"name":"ModifierDefinition","src":"416:156:0"},{"attributes":{"documentation":null,"implemented":true,"isConstructor":true,"kind":"constructor","modifiers":[null],"name":"","scope":338,"stateMutability":"nonpayable","superFunction":null,"visibility":"public"},"children":[{"children":[{"attributes":{"constant":false,"name":"studentCount","scope":142,"stateVariable":false,"storageLocation":"default","type":"uint32","value":null,"visibility":"internal"},"children":[{"attributes":{"name":"uint32","type":"uint32"},"id":37,"name":"ElementaryTypeName","src":"627:6:0"}],"id":38,"name":"VariableDeclaration","src":"627:19:0"}],"id":39,"name":"ParameterList","src":"626:21:0"},{"attributes":{"parameters":[null]},"children":[],"id":40,"name":"ParameterList","src":"655:0:0"},{"children":[{"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"=","type":"address"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":3,"type":"address","value":"owner"},"id":41,"name":"Identifier","src":"665:5:0"},{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"member_name":"sender","referencedDeclaration":null,"type":"address payable"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":353,"type":"msg","value":"msg"},"id":42,"name":"Identifier","src":"673:3:0"}],"id":43,"name":"MemberAccess","src":"673:10:0"}],"id":44,"name":"Assignment","src":"665:18:0"}],"id":45,"name":"ExpressionStatement","src":"665:18:0"},{"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"=","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":7,"type":"mapping(string memory => uint32)","value":"proposalIndices"},"id":46,"name":"Identifier","src":"694:15:0"},{"attributes":{"argumentTypes":null,"hexvalue":"4e6f7468696e67","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"string","type":"literal_string \\"Nothing\\"","value":"Nothing"},"id":47,"name":"Literal","src":"710:9:0"}],"id":48,"name":"IndexAccess","src":"694:26:0"},{"attributes":{"argumentTypes":null,"hexvalue":"30","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"number","type":"int_const 0","value":"0"},"id":49,"name":"Literal","src":"723:1:0"}],"id":50,"name":"Assignment","src":"694:30:0"}],"id":51,"name":"ExpressionStatement","src":"694:30:0"},{"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"=","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":7,"type":"mapping(string memory => uint32)","value":"proposalIndices"},"id":52,"name":"Identifier","src":"734:15:0"},{"attributes":{"argumentTypes":null,"hexvalue":"446f67","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"string","type":"literal_string \\"Dog\\"","value":"Dog"},"id":53,"name":"Literal","src":"750:5:0"}],"id":54,"name":"IndexAccess","src":"734:22:0"},{"attributes":{"argumentTypes":null,"hexvalue":"31","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"number","type":"int_const 1","value":"1"},"id":55,"name":"Literal","src":"759:1:0"}],"id":56,"name":"Assignment","src":"734:26:0"}],"id":57,"name":"ExpressionStatement","src":"734:26:0"},{"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"=","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":7,"type":"mapping(string memory => uint32)","value":"proposalIndices"},"id":58,"name":"Identifier","src":"770:15:0"},{"attributes":{"argumentTypes":null,"hexvalue":"436174","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"string","type":"literal_string \\"Cat\\"","value":"Cat"},"id":59,"name":"Literal","src":"786:5:0"}],"id":60,"name":"IndexAccess","src":"770:22:0"},{"attributes":{"argumentTypes":null,"hexvalue":"32","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"number","type":"int_const 2","value":"2"},"id":61,"name":"Literal","src":"795:1:0"}],"id":62,"name":"Assignment","src":"770:26:0"}],"id":63,"name":"ExpressionStatement","src":"770:26:0"},{"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"=","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":7,"type":"mapping(string memory => uint32)","value":"proposalIndices"},"id":64,"name":"Identifier","src":"806:15:0"},{"attributes":{"argumentTypes":null,"hexvalue":"50656e6775696e","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"string","type":"literal_string \\"Penguin\\"","value":"Penguin"},"id":65,"name":"Literal","src":"822:9:0"}],"id":66,"name":"IndexAccess","src":"806:26:0"},{"attributes":{"argumentTypes":null,"hexvalue":"33","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"number","type":"int_const 3","value":"3"},"id":67,"name":"Literal","src":"835:1:0"}],"id":68,"name":"Assignment","src":"806:30:0"}],"id":69,"name":"ExpressionStatement","src":"806:30:0"},{"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"=","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":7,"type":"mapping(string memory => uint32)","value":"proposalIndices"},"id":70,"name":"Identifier","src":"846:15:0"},{"attributes":{"argumentTypes":null,"hexvalue":"4d6f6e6b6579","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"string","type":"literal_string \\"Monkey\\"","value":"Monkey"},"id":71,"name":"Literal","src":"862:8:0"}],"id":72,"name":"IndexAccess","src":"846:25:0"},{"attributes":{"argumentTypes":null,"hexvalue":"34","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"number","type":"int_const 4","value":"4"},"id":73,"name":"Literal","src":"874:1:0"}],"id":74,"name":"Assignment","src":"846:29:0"}],"id":75,"name":"ExpressionStatement","src":"846:29:0"},{"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"=","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":7,"type":"mapping(string memory => uint32)","value":"proposalIndices"},"id":76,"name":"Identifier","src":"885:15:0"},{"attributes":{"argumentTypes":null,"hexvalue":"4b6f616c61","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"string","type":"literal_string \\"Koala\\"","value":"Koala"},"id":77,"name":"Literal","src":"901:7:0"}],"id":78,"name":"IndexAccess","src":"885:24:0"},{"attributes":{"argumentTypes":null,"hexvalue":"35","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"number","type":"int_const 5","value":"5"},"id":79,"name":"Literal","src":"912:1:0"}],"id":80,"name":"Assignment","src":"885:28:0"}],"id":81,"name":"ExpressionStatement","src":"885:28:0"},{"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"=","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":7,"type":"mapping(string memory => uint32)","value":"proposalIndices"},"id":82,"name":"Identifier","src":"923:15:0"},{"attributes":{"argumentTypes":null,"hexvalue":"526162626974","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"string","type":"literal_string \\"Rabbit\\"","value":"Rabbit"},"id":83,"name":"Literal","src":"939:8:0"}],"id":84,"name":"IndexAccess","src":"923:25:0"},{"attributes":{"argumentTypes":null,"hexvalue":"36","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"number","type":"int_const 6","value":"6"},"id":85,"name":"Literal","src":"951:1:0"}],"id":86,"name":"Assignment","src":"923:29:0"}],"id":87,"name":"ExpressionStatement","src":"923:29:0"},{"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"=","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":7,"type":"mapping(string memory => uint32)","value":"proposalIndices"},"id":88,"name":"Identifier","src":"962:15:0"},{"attributes":{"argumentTypes":null,"hexvalue":"50616e6461","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"string","type":"literal_string \\"Panda\\"","value":"Panda"},"id":89,"name":"Literal","src":"978:7:0"}],"id":90,"name":"IndexAccess","src":"962:24:0"},{"attributes":{"argumentTypes":null,"hexvalue":"37","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"number","type":"int_const 7","value":"7"},"id":91,"name":"Literal","src":"989:1:0"}],"id":92,"name":"Assignment","src":"962:28:0"}],"id":93,"name":"ExpressionStatement","src":"962:28:0"},{"attributes":{"assignments":[95]},"children":[{"attributes":{"constant":false,"name":"threeTokenStudents","scope":141,"stateVariable":false,"storageLocation":"default","type":"uint32","value":null,"visibility":"internal"},"children":[{"attributes":{"name":"uint32","type":"uint32"},"id":94,"name":"ElementaryTypeName","src":"1001:6:0"}],"id":95,"name":"VariableDeclaration","src":"1001:25:0"},{"attributes":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"/","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"*","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":38,"type":"uint32","value":"studentCount"},"id":96,"name":"Identifier","src":"1030:12:0"},{"attributes":{"argumentTypes":null,"hexvalue":"33","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"number","type":"int_const 3","value":"3"},"id":97,"name":"Literal","src":"1045:1:0"}],"id":98,"name":"BinaryOperation","src":"1030:16:0"}],"id":99,"name":"TupleExpression","src":"1029:18:0"},{"attributes":{"argumentTypes":null,"hexvalue":"34","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"number","type":"int_const 4","value":"4"},"id":100,"name":"Literal","src":"1050:1:0"}],"id":101,"name":"BinaryOperation","src":"1029:22:0"}],"id":102,"name":"VariableDeclarationStatement","src":"1001:50:0"},{"attributes":{"assignments":[104]},"children":[{"attributes":{"constant":false,"name":"twoTokenStudents","scope":141,"stateVariable":false,"storageLocation":"default","type":"uint32","value":null,"visibility":"internal"},"children":[{"attributes":{"name":"uint32","type":"uint32"},"id":103,"name":"ElementaryTypeName","src":"1061:6:0"}],"id":104,"name":"VariableDeclaration","src":"1061:23:0"},{"attributes":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"-","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":38,"type":"uint32","value":"studentCount"},"id":105,"name":"Identifier","src":"1087:12:0"},{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":95,"type":"uint32","value":"threeTokenStudents"},"id":106,"name":"Identifier","src":"1102:18:0"}],"id":107,"name":"BinaryOperation","src":"1087:33:0"}],"id":108,"name":"VariableDeclarationStatement","src":"1061:59:0"},{"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"=","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":18,"type":"mapping(uint32 => uint32)","value":"proposals"},"id":109,"name":"Identifier","src":"1130:9:0"},{"attributes":{"argumentTypes":null,"hexvalue":"30","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"number","type":"int_const 0","value":"0"},"id":110,"name":"Literal","src":"1140:1:0"}],"id":111,"name":"IndexAccess","src":"1130:12:0"},{"attributes":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"-","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"+","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"*","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"hexvalue":"33","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"number","type":"int_const 3","value":"3"},"id":112,"name":"Literal","src":"1145:1:0"},{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":95,"type":"uint32","value":"threeTokenStudents"},"id":113,"name":"Identifier","src":"1149:18:0"}],"id":114,"name":"BinaryOperation","src":"1145:22:0"},{"attributes":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"*","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"hexvalue":"32","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"number","type":"int_const 2","value":"2"},"id":115,"name":"Literal","src":"1170:1:0"},{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":104,"type":"uint32","value":"twoTokenStudents"},"id":116,"name":"Identifier","src":"1174:16:0"}],"id":117,"name":"BinaryOperation","src":"1170:20:0"}],"id":118,"name":"BinaryOperation","src":"1145:45:0"},{"attributes":{"argumentTypes":null,"hexvalue":"31","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"number","type":"int_const 1","value":"1"},"id":119,"name":"Literal","src":"1193:1:0"}],"id":120,"name":"BinaryOperation","src":"1145:49:0"}],"id":121,"name":"Assignment","src":"1130:64:0"}],"id":122,"name":"ExpressionStatement","src":"1130:64:0"},{"children":[{"attributes":{"assignments":[124]},"children":[{"attributes":{"constant":false,"name":"i","scope":140,"stateVariable":false,"storageLocation":"default","type":"uint32","value":null,"visibility":"internal"},"children":[{"attributes":{"name":"uint32","type":"uint32"},"id":123,"name":"ElementaryTypeName","src":"1210:6:0"}],"id":124,"name":"VariableDeclaration","src":"1210:8:0"},{"attributes":{"argumentTypes":null,"hexvalue":"31","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"number","type":"int_const 1","value":"1"},"id":125,"name":"Literal","src":"1221:1:0"}],"id":126,"name":"VariableDeclarationStatement","src":"1210:12:0"},{"attributes":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"<","type":"bool"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":124,"type":"uint32","value":"i"},"id":127,"name":"Identifier","src":"1224:1:0"},{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":10,"type":"uint32","value":"numProposals"},"id":128,"name":"Identifier","src":"1228:12:0"}],"id":129,"name":"BinaryOperation","src":"1224:16:0"},{"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"++","prefix":true,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":124,"type":"uint32","value":"i"},"id":130,"name":"Identifier","src":"1244:1:0"}],"id":131,"name":"UnaryOperation","src":"1242:3:0"}],"id":132,"name":"ExpressionStatement","src":"1242:3:0"},{"children":[{"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"=","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":18,"type":"mapping(uint32 => uint32)","value":"proposals"},"id":133,"name":"Identifier","src":"1261:9:0"},{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":124,"type":"uint32","value":"i"},"id":134,"name":"Identifier","src":"1271:1:0"}],"id":135,"name":"IndexAccess","src":"1261:12:0"},{"attributes":{"argumentTypes":null,"hexvalue":"31","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"number","type":"int_const 1","value":"1"},"id":136,"name":"Literal","src":"1276:1:0"}],"id":137,"name":"Assignment","src":"1261:16:0"}],"id":138,"name":"ExpressionStatement","src":"1261:16:0"}],"id":139,"name":"Block","src":"1247:41:0"}],"id":140,"name":"ForStatement","src":"1205:83:0"}],"id":141,"name":"Block","src":"655:639:0"}],"id":142,"name":"FunctionDefinition","src":"615:679:0"},{"attributes":{"documentation":null,"implemented":true,"isConstructor":false,"kind":"function","name":"setVotes","scope":338,"stateMutability":"nonpayable","superFunction":null,"visibility":"public"},"children":[{"children":[{"attributes":{"constant":false,"name":"proposal","scope":164,"stateVariable":false,"storageLocation":"memory","type":"string","value":null,"visibility":"internal"},"children":[{"attributes":{"name":"string","type":"string"},"id":143,"name":"ElementaryTypeName","src":"1318:6:0"}],"id":144,"name":"VariableDeclaration","src":"1318:22:0"},{"attributes":{"constant":false,"name":"amount","scope":164,"stateVariable":false,"storageLocation":"default","type":"uint32","value":null,"visibility":"internal"},"children":[{"attributes":{"name":"uint32","type":"uint32"},"id":145,"name":"ElementaryTypeName","src":"1342:6:0"}],"id":146,"name":"VariableDeclaration","src":"1342:13:0"}],"id":147,"name":"ParameterList","src":"1317:39:0"},{"attributes":{"parameters":[null]},"children":[],"id":150,"name":"ParameterList","src":"1375:0:0"},{"attributes":{"arguments":null},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":36,"type":"modifier ()","value":"restricted"},"id":148,"name":"Identifier","src":"1364:10:0"}],"id":149,"name":"ModifierInvocation","src":"1364:10:0"},{"children":[{"attributes":{"assignments":[152]},"children":[{"attributes":{"constant":false,"name":"i","scope":163,"stateVariable":false,"storageLocation":"default","type":"uint32","value":null,"visibility":"internal"},"children":[{"attributes":{"name":"uint32","type":"uint32"},"id":151,"name":"ElementaryTypeName","src":"1385:6:0"}],"id":152,"name":"VariableDeclaration","src":"1385:8:0"},{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":7,"type":"mapping(string memory => uint32)","value":"proposalIndices"},"id":153,"name":"Identifier","src":"1396:15:0"},{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":144,"type":"string memory","value":"proposal"},"id":154,"name":"Identifier","src":"1412:8:0"}],"id":155,"name":"IndexAccess","src":"1396:25:0"}],"id":156,"name":"VariableDeclarationStatement","src":"1385:36:0"},{"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"=","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":18,"type":"mapping(uint32 => uint32)","value":"proposals"},"id":157,"name":"Identifier","src":"1431:9:0"},{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":152,"type":"uint32","value":"i"},"id":158,"name":"Identifier","src":"1441:1:0"}],"id":159,"name":"IndexAccess","src":"1431:12:0"},{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":146,"type":"uint32","value":"amount"},"id":160,"name":"Identifier","src":"1446:6:0"}],"id":161,"name":"Assignment","src":"1431:21:0"}],"id":162,"name":"ExpressionStatement","src":"1431:21:0"}],"id":163,"name":"Block","src":"1375:84:0"}],"id":164,"name":"FunctionDefinition","src":"1300:159:0"},{"attributes":{"documentation":null,"implemented":true,"isConstructor":false,"kind":"function","name":"setupStudent","scope":338,"stateMutability":"nonpayable","superFunction":null,"visibility":"public"},"children":[{"children":[{"attributes":{"constant":false,"name":"addrs","scope":194,"stateVariable":false,"storageLocation":"memory","type":"address[]","value":null,"visibility":"internal"},"children":[{"attributes":{"length":null,"type":"address[]"},"children":[{"attributes":{"name":"address","stateMutability":"nonpayable","type":"address"},"id":165,"name":"ElementaryTypeName","src":"1487:7:0"}],"id":166,"name":"ArrayTypeName","src":"1487:9:0"}],"id":167,"name":"VariableDeclaration","src":"1487:22:0"}],"id":168,"name":"ParameterList","src":"1486:24:0"},{"attributes":{"parameters":[null]},"children":[],"id":171,"name":"ParameterList","src":"1529:0:0"},{"attributes":{"arguments":null},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":36,"type":"modifier ()","value":"restricted"},"id":169,"name":"Identifier","src":"1518:10:0"}],"id":170,"name":"ModifierInvocation","src":"1518:10:0"},{"children":[{"children":[{"attributes":{"assignments":[173]},"children":[{"attributes":{"constant":false,"name":"i","scope":192,"stateVariable":false,"storageLocation":"default","type":"uint32","value":null,"visibility":"internal"},"children":[{"attributes":{"name":"uint32","type":"uint32"},"id":172,"name":"ElementaryTypeName","src":"1600:6:0"}],"id":173,"name":"VariableDeclaration","src":"1600:8:0"},{"attributes":{"argumentTypes":null,"hexvalue":"30","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"number","type":"int_const 0","value":"0"},"id":174,"name":"Literal","src":"1611:1:0"}],"id":175,"name":"VariableDeclarationStatement","src":"1600:12:0"},{"attributes":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"<","type":"bool"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":173,"type":"uint32","value":"i"},"id":176,"name":"Identifier","src":"1614:1:0"},{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"member_name":"length","referencedDeclaration":null,"type":"uint256"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":167,"type":"address[] memory","value":"addrs"},"id":177,"name":"Identifier","src":"1618:5:0"}],"id":178,"name":"MemberAccess","src":"1618:12:0"}],"id":179,"name":"BinaryOperation","src":"1614:16:0"},{"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"++","prefix":true,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":173,"type":"uint32","value":"i"},"id":180,"name":"Identifier","src":"1634:1:0"}],"id":181,"name":"UnaryOperation","src":"1632:3:0"}],"id":182,"name":"ExpressionStatement","src":"1632:3:0"},{"children":[{"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"=","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":14,"type":"mapping(address => uint32)","value":"tokens"},"id":183,"name":"Identifier","src":"1649:6:0"},{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"type":"address"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":167,"type":"address[] memory","value":"addrs"},"id":184,"name":"Identifier","src":"1656:5:0"},{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":173,"type":"uint32","value":"i"},"id":185,"name":"Identifier","src":"1662:1:0"}],"id":186,"name":"IndexAccess","src":"1656:8:0"}],"id":187,"name":"IndexAccess","src":"1649:16:0"},{"attributes":{"argumentTypes":null,"hexvalue":"39","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"number","type":"int_const 9","value":"9"},"id":188,"name":"Literal","src":"1668:1:0"}],"id":189,"name":"Assignment","src":"1649:20:0"}],"id":190,"name":"ExpressionStatement","src":"1649:20:0"}],"id":191,"name":"Block","src":"1637:43:0"}],"id":192,"name":"ForStatement","src":"1595:85:0"}],"id":193,"name":"Block","src":"1529:157:0"}],"id":194,"name":"FunctionDefinition","src":"1465:221:0"},{"attributes":{"documentation":null,"implemented":true,"isConstructor":false,"kind":"function","modifiers":[null],"name":"voteFor","scope":338,"stateMutability":"nonpayable","superFunction":null,"visibility":"public"},"children":[{"children":[{"attributes":{"constant":false,"name":"proposal","scope":267,"stateVariable":false,"storageLocation":"memory","type":"string","value":null,"visibility":"internal"},"children":[{"attributes":{"name":"string","type":"string"},"id":195,"name":"ElementaryTypeName","src":"1709:6:0"}],"id":196,"name":"VariableDeclaration","src":"1709:22:0"}],"id":197,"name":"ParameterList","src":"1708:24:0"},{"attributes":{"parameters":[null]},"children":[],"id":198,"name":"ParameterList","src":"1740:0:0"},{"children":[{"attributes":{"assignments":[200]},"children":[{"attributes":{"constant":false,"name":"i","scope":266,"stateVariable":false,"storageLocation":"default","type":"uint32","value":null,"visibility":"internal"},"children":[{"attributes":{"name":"uint32","type":"uint32"},"id":199,"name":"ElementaryTypeName","src":"1792:6:0"}],"id":200,"name":"VariableDeclaration","src":"1792:8:0"},{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":7,"type":"mapping(string memory => uint32)","value":"proposalIndices"},"id":201,"name":"Identifier","src":"1803:15:0"},{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":196,"type":"string memory","value":"proposal"},"id":202,"name":"Identifier","src":"1819:8:0"}],"id":203,"name":"IndexAccess","src":"1803:25:0"}],"id":204,"name":"VariableDeclarationStatement","src":"1792:36:0"},{"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"isStructConstructorCall":false,"lValueRequested":false,"names":[null],"type":"tuple()","type_conversion":false},"children":[{"attributes":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"},{"typeIdentifier":"t_stringliteral_ecd3486d568e69ccf13825a905009c74303486ae004973a1978e24ff6c4d65b2","typeString":"literal_string \\"You need to have a token to vote with\\""}],"overloadedDeclarations":[356,357],"referencedDeclaration":357,"type":"function (bool,string memory) pure","value":"require"},"id":205,"name":"Identifier","src":"1838:7:0"},{"attributes":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":">=","type":"bool"},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":14,"type":"mapping(address => uint32)","value":"tokens"},"id":206,"name":"Identifier","src":"1859:6:0"},{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"member_name":"sender","referencedDeclaration":null,"type":"address payable"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":353,"type":"msg","value":"msg"},"id":207,"name":"Identifier","src":"1866:3:0"}],"id":208,"name":"MemberAccess","src":"1866:10:0"}],"id":209,"name":"IndexAccess","src":"1859:18:0"},{"attributes":{"argumentTypes":null,"hexvalue":"31","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"number","type":"int_const 1","value":"1"},"id":210,"name":"Literal","src":"1881:1:0"}],"id":211,"name":"BinaryOperation","src":"1859:23:0"},{"attributes":{"argumentTypes":null,"hexvalue":"596f75206e65656420746f2068617665206120746f6b656e20746f20766f74652077697468","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"string","type":"literal_string \\"You need to have a token to vote with\\"","value":"You need to have a token to vote with"},"id":212,"name":"Literal","src":"1896:39:0"}],"id":213,"name":"FunctionCall","src":"1838:107:0"}],"id":214,"name":"ExpressionStatement","src":"1838:107:0"},{"attributes":{"assignments":[216]},"children":[{"attributes":{"constant":false,"name":"n","scope":266,"stateVariable":false,"storageLocation":"default","type":"uint32","value":null,"visibility":"internal"},"children":[{"attributes":{"name":"uint32","type":"uint32"},"id":215,"name":"ElementaryTypeName","src":"1955:6:0"}],"id":216,"name":"VariableDeclaration","src":"1955:8:0"},{"attributes":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"+","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"type":"mapping(uint32 => uint32)"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":24,"type":"mapping(address => mapping(uint32 => uint32))","value":"votesByFor"},"id":217,"name":"Identifier","src":"1966:10:0"},{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"member_name":"sender","referencedDeclaration":null,"type":"address payable"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":353,"type":"msg","value":"msg"},"id":218,"name":"Identifier","src":"1977:3:0"}],"id":219,"name":"MemberAccess","src":"1977:10:0"}],"id":220,"name":"IndexAccess","src":"1966:22:0"},{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":200,"type":"uint32","value":"i"},"id":221,"name":"Identifier","src":"1989:1:0"}],"id":222,"name":"IndexAccess","src":"1966:25:0"},{"attributes":{"argumentTypes":null,"hexvalue":"31","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"number","type":"int_const 1","value":"1"},"id":223,"name":"Literal","src":"1994:1:0"}],"id":224,"name":"BinaryOperation","src":"1966:29:0"}],"id":225,"name":"VariableDeclarationStatement","src":"1955:40:0"},{"attributes":{"assignments":[227]},"children":[{"attributes":{"constant":false,"name":"required","scope":266,"stateVariable":false,"storageLocation":"default","type":"uint32","value":null,"visibility":"internal"},"children":[{"attributes":{"name":"uint32","type":"uint32"},"id":226,"name":"ElementaryTypeName","src":"2095:6:0"}],"id":227,"name":"VariableDeclaration","src":"2095:15:0"},{"attributes":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"-","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"*","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"hexvalue":"32","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"number","type":"int_const 2","value":"2"},"id":228,"name":"Literal","src":"2113:1:0"},{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":216,"type":"uint32","value":"n"},"id":229,"name":"Identifier","src":"2117:1:0"}],"id":230,"name":"BinaryOperation","src":"2113:5:0"},{"attributes":{"argumentTypes":null,"hexvalue":"31","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"number","type":"int_const 1","value":"1"},"id":231,"name":"Literal","src":"2121:1:0"}],"id":232,"name":"BinaryOperation","src":"2113:9:0"}],"id":233,"name":"VariableDeclarationStatement","src":"2095:27:0"},{"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"isStructConstructorCall":false,"lValueRequested":false,"names":[null],"type":"tuple()","type_conversion":false},"children":[{"attributes":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"},{"typeIdentifier":"t_stringliteral_e8936288c111bb7d1b946c971bd3b8178cb07640f167f3ff2ff426c9e5ad86d5","typeString":"literal_string \\"Insufficient tokens\\""}],"overloadedDeclarations":[356,357],"referencedDeclaration":357,"type":"function (bool,string memory) pure","value":"require"},"id":234,"name":"Identifier","src":"2132:7:0"},{"attributes":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":">=","type":"bool"},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":14,"type":"mapping(address => uint32)","value":"tokens"},"id":235,"name":"Identifier","src":"2140:6:0"},{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"member_name":"sender","referencedDeclaration":null,"type":"address payable"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":353,"type":"msg","value":"msg"},"id":236,"name":"Identifier","src":"2147:3:0"}],"id":237,"name":"MemberAccess","src":"2147:10:0"}],"id":238,"name":"IndexAccess","src":"2140:18:0"},{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":227,"type":"uint32","value":"required"},"id":239,"name":"Identifier","src":"2162:8:0"}],"id":240,"name":"BinaryOperation","src":"2140:30:0"},{"attributes":{"argumentTypes":null,"hexvalue":"496e73756666696369656e7420746f6b656e73","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"string","type":"literal_string \\"Insufficient tokens\\"","value":"Insufficient tokens"},"id":241,"name":"Literal","src":"2172:21:0"}],"id":242,"name":"FunctionCall","src":"2132:62:0"}],"id":243,"name":"ExpressionStatement","src":"2132:62:0"},{"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"-=","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":14,"type":"mapping(address => uint32)","value":"tokens"},"id":244,"name":"Identifier","src":"2205:6:0"},{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"member_name":"sender","referencedDeclaration":null,"type":"address payable"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":353,"type":"msg","value":"msg"},"id":245,"name":"Identifier","src":"2212:3:0"}],"id":246,"name":"MemberAccess","src":"2212:10:0"}],"id":247,"name":"IndexAccess","src":"2205:18:0"},{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":227,"type":"uint32","value":"required"},"id":248,"name":"Identifier","src":"2227:8:0"}],"id":249,"name":"Assignment","src":"2205:30:0"}],"id":250,"name":"ExpressionStatement","src":"2205:30:0"},{"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"=","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"type":"mapping(uint32 => uint32)"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":24,"type":"mapping(address => mapping(uint32 => uint32))","value":"votesByFor"},"id":251,"name":"Identifier","src":"2245:10:0"},{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"member_name":"sender","referencedDeclaration":null,"type":"address payable"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":353,"type":"msg","value":"msg"},"id":252,"name":"Identifier","src":"2256:3:0"}],"id":253,"name":"MemberAccess","src":"2256:10:0"}],"id":255,"name":"IndexAccess","src":"2245:22:0"},{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":200,"type":"uint32","value":"i"},"id":254,"name":"Identifier","src":"2268:1:0"}],"id":256,"name":"IndexAccess","src":"2245:25:0"},{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":216,"type":"uint32","value":"n"},"id":257,"name":"Identifier","src":"2273:1:0"}],"id":258,"name":"Assignment","src":"2245:29:0"}],"id":259,"name":"ExpressionStatement","src":"2245:29:0"},{"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"+=","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":18,"type":"mapping(uint32 => uint32)","value":"proposals"},"id":260,"name":"Identifier","src":"2284:9:0"},{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":200,"type":"uint32","value":"i"},"id":261,"name":"Identifier","src":"2294:1:0"}],"id":262,"name":"IndexAccess","src":"2284:12:0"},{"attributes":{"argumentTypes":null,"hexvalue":"31","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"number","type":"int_const 1","value":"1"},"id":263,"name":"Literal","src":"2300:1:0"}],"id":264,"name":"Assignment","src":"2284:17:0"}],"id":265,"name":"ExpressionStatement","src":"2284:17:0"}],"id":266,"name":"Block","src":"1740:568:0"}],"id":267,"name":"FunctionDefinition","src":"1692:616:0"},{"attributes":{"documentation":null,"implemented":true,"isConstructor":false,"kind":"function","modifiers":[null],"name":"resetMyVotes","scope":338,"stateMutability":"nonpayable","superFunction":null,"visibility":"public"},"children":[{"attributes":{"parameters":[null]},"children":[],"id":268,"name":"ParameterList","src":"2407:2:0"},{"attributes":{"parameters":[null]},"children":[],"id":269,"name":"ParameterList","src":"2417:0:0"},{"children":[{"children":[{"attributes":{"assignments":[271]},"children":[{"attributes":{"constant":false,"name":"i","scope":314,"stateVariable":false,"storageLocation":"default","type":"uint32","value":null,"visibility":"internal"},"children":[{"attributes":{"name":"uint32","type":"uint32"},"id":270,"name":"ElementaryTypeName","src":"2432:6:0"}],"id":271,"name":"VariableDeclaration","src":"2432:8:0"},{"attributes":{"argumentTypes":null,"hexvalue":"30","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"number","type":"int_const 0","value":"0"},"id":272,"name":"Literal","src":"2443:1:0"}],"id":273,"name":"VariableDeclarationStatement","src":"2432:12:0"},{"attributes":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"<","type":"bool"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":271,"type":"uint32","value":"i"},"id":274,"name":"Identifier","src":"2446:1:0"},{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":10,"type":"uint32","value":"numProposals"},"id":275,"name":"Identifier","src":"2450:12:0"}],"id":276,"name":"BinaryOperation","src":"2446:16:0"},{"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"++","prefix":true,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":271,"type":"uint32","value":"i"},"id":277,"name":"Identifier","src":"2466:1:0"}],"id":278,"name":"UnaryOperation","src":"2464:3:0"}],"id":279,"name":"ExpressionStatement","src":"2464:3:0"},{"children":[{"attributes":{"assignments":[281]},"children":[{"attributes":{"constant":false,"name":"n","scope":313,"stateVariable":false,"storageLocation":"default","type":"uint32","value":null,"visibility":"internal"},"children":[{"attributes":{"name":"uint32","type":"uint32"},"id":280,"name":"ElementaryTypeName","src":"2483:6:0"}],"id":281,"name":"VariableDeclaration","src":"2483:8:0"},{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"type":"mapping(uint32 => uint32)"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":24,"type":"mapping(address => mapping(uint32 => uint32))","value":"votesByFor"},"id":282,"name":"Identifier","src":"2494:10:0"},{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"member_name":"sender","referencedDeclaration":null,"type":"address payable"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":353,"type":"msg","value":"msg"},"id":283,"name":"Identifier","src":"2505:3:0"}],"id":284,"name":"MemberAccess","src":"2505:10:0"}],"id":285,"name":"IndexAccess","src":"2494:22:0"},{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":271,"type":"uint32","value":"i"},"id":286,"name":"Identifier","src":"2517:1:0"}],"id":287,"name":"IndexAccess","src":"2494:25:0"}],"id":288,"name":"VariableDeclarationStatement","src":"2483:36:0"},{"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"+=","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":14,"type":"mapping(address => uint32)","value":"tokens"},"id":289,"name":"Identifier","src":"2533:6:0"},{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"member_name":"sender","referencedDeclaration":null,"type":"address payable"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":353,"type":"msg","value":"msg"},"id":290,"name":"Identifier","src":"2540:3:0"}],"id":291,"name":"MemberAccess","src":"2540:10:0"}],"id":292,"name":"IndexAccess","src":"2533:18:0"},{"attributes":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"*","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":281,"type":"uint32","value":"n"},"id":293,"name":"Identifier","src":"2555:1:0"},{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":281,"type":"uint32","value":"n"},"id":294,"name":"Identifier","src":"2559:1:0"}],"id":295,"name":"BinaryOperation","src":"2555:5:0"}],"id":296,"name":"Assignment","src":"2533:27:0"}],"id":297,"name":"ExpressionStatement","src":"2533:27:0"},{"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"-=","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":18,"type":"mapping(uint32 => uint32)","value":"proposals"},"id":298,"name":"Identifier","src":"2574:9:0"},{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":271,"type":"uint32","value":"i"},"id":299,"name":"Identifier","src":"2584:1:0"}],"id":300,"name":"IndexAccess","src":"2574:12:0"},{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":281,"type":"uint32","value":"n"},"id":301,"name":"Identifier","src":"2590:1:0"}],"id":302,"name":"Assignment","src":"2574:17:0"}],"id":303,"name":"ExpressionStatement","src":"2574:17:0"},{"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"=","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"type":"mapping(uint32 => uint32)"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":24,"type":"mapping(address => mapping(uint32 => uint32))","value":"votesByFor"},"id":304,"name":"Identifier","src":"2605:10:0"},{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"member_name":"sender","referencedDeclaration":null,"type":"address payable"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":353,"type":"msg","value":"msg"},"id":305,"name":"Identifier","src":"2616:3:0"}],"id":306,"name":"MemberAccess","src":"2616:10:0"}],"id":308,"name":"IndexAccess","src":"2605:22:0"},{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":271,"type":"uint32","value":"i"},"id":307,"name":"Identifier","src":"2628:1:0"}],"id":309,"name":"IndexAccess","src":"2605:25:0"},{"attributes":{"argumentTypes":null,"hexvalue":"30","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"number","type":"int_const 0","value":"0"},"id":310,"name":"Literal","src":"2633:1:0"}],"id":311,"name":"Assignment","src":"2605:29:0"}],"id":312,"name":"ExpressionStatement","src":"2605:29:0"}],"id":313,"name":"Block","src":"2469:176:0"}],"id":314,"name":"ForStatement","src":"2427:218:0"}],"id":315,"name":"Block","src":"2417:234:0"}],"id":316,"name":"FunctionDefinition","src":"2386:265:0"},{"attributes":{"documentation":null,"implemented":true,"isConstructor":false,"kind":"function","modifiers":[null],"name":"myVotes","scope":338,"stateMutability":"view","superFunction":null,"visibility":"public"},"children":[{"children":[{"attributes":{"constant":false,"name":"proposal","scope":337,"stateVariable":false,"storageLocation":"memory","type":"string","value":null,"visibility":"internal"},"children":[{"attributes":{"name":"string","type":"string"},"id":317,"name":"ElementaryTypeName","src":"2674:6:0"}],"id":318,"name":"VariableDeclaration","src":"2674:22:0"}],"id":319,"name":"ParameterList","src":"2673:24:0"},{"children":[{"attributes":{"constant":false,"name":"votes","scope":337,"stateVariable":false,"storageLocation":"default","type":"uint32","value":null,"visibility":"internal"},"children":[{"attributes":{"name":"uint32","type":"uint32"},"id":320,"name":"ElementaryTypeName","src":"2718:6:0"}],"id":321,"name":"VariableDeclaration","src":"2718:12:0"}],"id":322,"name":"ParameterList","src":"2717:14:0"},{"children":[{"attributes":{"assignments":[324]},"children":[{"attributes":{"constant":false,"name":"i","scope":336,"stateVariable":false,"storageLocation":"default","type":"uint32","value":null,"visibility":"internal"},"children":[{"attributes":{"name":"uint32","type":"uint32"},"id":323,"name":"ElementaryTypeName","src":"2742:6:0"}],"id":324,"name":"VariableDeclaration","src":"2742:8:0"},{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":7,"type":"mapping(string memory => uint32)","value":"proposalIndices"},"id":325,"name":"Identifier","src":"2753:15:0"},{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":318,"type":"string memory","value":"proposal"},"id":326,"name":"Identifier","src":"2769:8:0"}],"id":327,"name":"IndexAccess","src":"2753:25:0"}],"id":328,"name":"VariableDeclarationStatement","src":"2742:36:0"},{"attributes":{"functionReturnParameters":322},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"type":"mapping(uint32 => uint32)"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":24,"type":"mapping(address => mapping(uint32 => uint32))","value":"votesByFor"},"id":329,"name":"Identifier","src":"2795:10:0"},{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"member_name":"sender","referencedDeclaration":null,"type":"address payable"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":353,"type":"msg","value":"msg"},"id":330,"name":"Identifier","src":"2806:3:0"}],"id":331,"name":"MemberAccess","src":"2806:10:0"}],"id":332,"name":"IndexAccess","src":"2795:22:0"},{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":324,"type":"uint32","value":"i"},"id":333,"name":"Identifier","src":"2818:1:0"}],"id":334,"name":"IndexAccess","src":"2795:25:0"}],"id":335,"name":"Return","src":"2788:32:0"}],"id":336,"name":"Block","src":"2732:95:0"}],"id":337,"name":"FunctionDefinition","src":"2657:170:0"}],"id":338,"name":"ContractDefinition","src":"28:2801:0"}],"id":339,"name":"SourceUnit","src":"0:2830:0"},"compiler":{"name":"solc","version":"0.5.16+commit.9c3226ce.Emscripten.clang"},"networks":{"11155111":{"events":{},"links":{},"address":"0x1CBA20b94FAd031d74683Ed6E0Af50A9717BFA4a","transactionHash":"0x420c976e779c5e9c6ea7e09d5bf3426ef1c260e5ee1d91a45d7855a2aa2c22ed"}},"schemaVersion":"3.4.16","updatedAt":"2024-11-08T09:53:03.124Z","networkType":"ethereum","devdoc":{"methods":{}},"userdoc":{"methods":{}}}')}},[[26,1,2]]]); -//# sourceMappingURL=main.2ffd29f7.chunk.js.map \ No newline at end of file +(this.webpackJsonpclient=this.webpackJsonpclient||[]).push([[0],{13:function(e,t,n){},26:function(e,t,n){"use strict";n.r(t);var i=n(2),a=n.n(i),s=n(7),r=n.n(s),f=(n(13),n(1)),l=n(0);function u(){return Object(l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 0 24 24",width:"24",fill:"currentColor",children:[Object(l.jsx)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(l.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(l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 0 24 24",width:"24",fill:"currentColor",children:[Object(l.jsx)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(l.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(l.jsxs)("div",{className:"self-building-square-spinner",children:[Object(l.jsx)("div",{className:"square"}),Object(l.jsx)("div",{className:"square"}),Object(l.jsx)("div",{className:"square"}),Object(l.jsx)("div",{className:"square clear"}),Object(l.jsx)("div",{className:"square"}),Object(l.jsx)("div",{className:"square"}),Object(l.jsx)("div",{className:"square clear"}),Object(l.jsx)("div",{className:"square"}),Object(l.jsx)("div",{className:"square"})]})}const p=["Nothing","Dog","Cat","Penguin","Monkey","Koala","Rabbit","Panda"];function c(e){let{account:t}=e;return Object(l.jsxs)("div",{className:"space-y-2",children:[Object(l.jsx)("h2",{className:"text-gray-800 text-xl font-bold",children:"My Account"}),Object(l.jsx)("p",{className:"text-gray-700 font-mono text-xs sm:text-base",children:t})]})}function y(e){let{myTokens:t}=e;const{useCacheSend:n}=f.drizzleReactHooks.useDrizzle(),{send:i}=n("Proposals","resetMyVotes");return Object(l.jsxs)("div",{className:"space-y-6",children:[Object(l.jsxs)("p",{className:"text-gray-800 text-2xl",children:[Object(l.jsx)("span",{className:"font-bold",children:t})," animal tokens"]}),Object(l.jsx)("button",{onClick:()=>i(),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(e){let{account:t,myTokens:n}=e;return Object(l.jsxs)("div",{className:"bg-white p-4 shadow rounded-md space-y-2",children:[Object(l.jsx)(c,{account:t}),Object(l.jsx)(y,{myTokens:n})]})}function g(e){let{account:t}=e;const[n,a]=i.useState(""),{useCacheSend:s}=f.drizzleReactHooks.useDrizzle(),{send:r}=s("Proposals","setupStudent");return Object(l.jsxs)("div",{className:"bg-white p-4 rounded-md shadow space-y-6 text-gray-800",children:[Object(l.jsx)("h2",{className:"text-2xl font-bold",children:"Owner's Section"}),Object(l.jsxs)("div",{className:"space-y-3",children:[Object(l.jsx)("input",{type:"text",placeholder:"Ethereum Address",value:n,onChange:e=>a(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(l.jsx)("button",{onClick:()=>r(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",children:"Initialize Student"})]})]})}function b(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(e){let{tid:t,status:n}=e,i=Object(l.jsx)(d,{}),a="text-blue-600";return"success"===n?(i=Object(l.jsx)(u,{}),a="text-green-600"):"error"===n&&(i=Object(l.jsx)(o,{}),a="text-red-600"),Object(l.jsxs)("li",{className:`flex space-x-4 items-center ${a} space-y-2`,children:[Object(l.jsx)("div",{className:"w-6",children:i}),Object(l.jsx)("div",{className:"font-bold pb-1",children:t})]})}function V(e){let{transactions:t}=e;const n=[...Object.entries(t)];return n.reverse(),0==n.length?Object(l.jsx)(l.Fragment,{}):Object(l.jsx)("ul",{className:"bg-white rounded shadow-md p-4",children:n.map((e=>{let[t,{status:n}]=e;return console.log("first key",t),Object(l.jsx)(D,{tid:t,status:n},t)}))})}function v(e){let{name:t}=e;const{useCacheSend:n}=f.drizzleReactHooks.useDrizzle(),[a,s]=i.useState("0"),{send:r}=n("Proposals","setVotes");return Object(l.jsxs)("div",{className:"pl-16 flex items-end space-x-4",children:[Object(l.jsx)("input",{type:"number",value:a,className:"w-12 rounded shadow-inner px-1 bg-gray-50",onChange:e=>s(e.target.value)}),Object(l.jsx)("button",{className:"transition-colors text-white text-sm p-1 font-bold bg-indigo-500 hover:bg-blue-400 rounded",onClick:()=>(()=>{const e=parseInt(a);isNaN(e)||r(t,e)})(),children:"Set Votes"})]})}function I(e){let{myTokens:t,admin:n}=e;const{useCacheCall:i,useCacheSend:a}=f.drizzleReactHooks.useDrizzle(),s=i(["Proposals"],(e=>p.map(((t,n)=>({name:t,votes:e("Proposals","proposals",n),myVotes:e("Proposals","myVotes",t)}))))),{send:r}=a("Proposals","voteFor");return Object(l.jsx)("ul",{className:"bg-white p-4 rounded shadow-md text-xl text-gray-800",children:b(s).map((e=>{let{name:i,votes:a,myVotes:s}=e;return Object(l.jsxs)("li",{className:"flex items-center space-x-4",children:[Object(l.jsx)("div",{className:"text-2xl w-1/3",children:i}),Object(l.jsxs)("div",{className:"flex items-center space-x-4 justify-between",children:[Object(l.jsxs)("div",{className:"text-gray-700 w-24",children:[Object(l.jsx)("span",{className:"font-bold",children:a})," ",1==a?"vote":"votes"]}),Object(l.jsxs)("div",{className:"flex items-center flex-grow space-x-2",children:[T(0,s).map((e=>Object(l.jsx)("div",{className:"w-6 h-6 bg-gradient-to-r from-indigo-500 to-blue-500 rounded"},e))),Object(l.jsx)("button",{onClick:()=>r(i),disabled:!_(t,s),className:"transition-colors border-2 border-dashed w-6 h-6 "+(_(t,s)?"border-indigo-500 hover:border-blue-400":"border-red-500")})]})]}),n?Object(l.jsx)(v,{name:i}):Object(l.jsx)(l.Fragment,{})]},i)}))})}function x(){const{account:e,transactions:t}=f.drizzleReactHooks.useDrizzleState((e=>({account:e.accounts[0],transactions:e.transactions}))),{useCacheCall:n}=f.drizzleReactHooks.useDrizzle(),i=n("Proposals","tokens",e),a=n("Proposals","owner")===e;return Object(l.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(l.jsxs)("div",{className:"space-y-6",children:[a?Object(l.jsx)(g,{account:e}):null,Object(l.jsx)(m,{account:e,myTokens:i})]}),Object(l.jsxs)("div",{className:"flex flex-col lg:flex-grow space-y-2",children:[Object(l.jsx)(I,{myTokens:i,admin:a}),Object(l.jsx)(V,{transactions:t})]})]})}function h(){return Object(l.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(l.jsx)("div",{className:"mx-8",children:"Animal Vote"})})}function S(e){return Object(l.jsxs)(l.Fragment,{children:[Object(l.jsx)(h,{}),Object(l.jsx)("main",{children:e.children})]})}var L=n(3);function P(){return Object(l.jsxs)("div",{className:"text-lg text-blue-800 flex flex-col items-center max-auto",children:[Object(l.jsx)(d,{}),Object(l.jsxs)("p",{children:["Currently loading the DAPP application",Object(l.jsx)("br",{}),"If this is taking a while, make sure that MetaMask is using the ",Object(l.jsx)("b",{children:"Sepolia "}),"network."]})]})}const C={contracts:[n(8)],web3:{fallback:{type:"ws",url:"ws://127.0.0.1:9545"}}},q=Object(L.generateStore)(C),R=new L.Drizzle(C,q);r.a.render(Object(l.jsx)(a.a.StrictMode,{children:Object(l.jsx)(S,{children:Object(l.jsx)(f.drizzleReactHooks.DrizzleProvider,{drizzle:R,children:Object(l.jsx)(f.drizzleReactHooks.Initializer,{error:"There was an error.",loadingContractsAndAccounts:Object(l.jsx)(P,{}),loadingWeb3:Object(l.jsx)(P,{}),children:Object(l.jsx)(x,{})})})})}),document.getElementById("root"))},8: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\\":{\\"project:/contracts/Proposals.sol\\":\\"Proposals\\"},\\"evmVersion\\":\\"istanbul\\",\\"libraries\\":{},\\"optimizer\\":{\\"enabled\\":false,\\"runs\\":200},\\"remappings\\":[]},\\"sources\\":{\\"project:/contracts/Proposals.sol\\":{\\"keccak256\\":\\"0xf6ec1b85da9b88e3fe0fe852f58cc478400772edfd64c5427206441d5108005c\\",\\"urls\\":[\\"bzz-raw://d5249182879447866496b4e54857c0f09e088042c4c4e9e2a101232ee393ea43\\",\\"dweb:/ipfs/QmPLpDK7rkMna42LMKrzYDxyZBgNxGpoSmmffgcdzCssFn\\"]}},\\"version\\":1}","bytecode":"0x60806040526008600260006101000a81548163ffffffff021916908363ffffffff16021790555034801561003257600080fd5b5060405161148f38038061148f8339818101604052602081101561005557600080fd5b8101908080519060200190929190505050336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600160405180807f4e6f7468696e67000000000000000000000000000000000000000000000000008152506007019050908152602001604051809103902060006101000a81548163ffffffff021916908363ffffffff16021790555060018060405180807f446f6700000000000000000000000000000000000000000000000000000000008152506003019050908152602001604051809103902060006101000a81548163ffffffff021916908363ffffffff1602179055506002600160405180807f43617400000000000000000000000000000000000000000000000000000000008152506003019050908152602001604051809103902060006101000a81548163ffffffff021916908363ffffffff1602179055506003600160405180807f50656e6775696e000000000000000000000000000000000000000000000000008152506007019050908152602001604051809103902060006101000a81548163ffffffff021916908363ffffffff1602179055506004600160405180807f4d6f6e6b657900000000000000000000000000000000000000000000000000008152506006019050908152602001604051809103902060006101000a81548163ffffffff021916908363ffffffff1602179055506005600160405180807f4b6f616c610000000000000000000000000000000000000000000000000000008152506005019050908152602001604051809103902060006101000a81548163ffffffff021916908363ffffffff1602179055506006600160405180807f52616262697400000000000000000000000000000000000000000000000000008152506006019050908152602001604051809103902060006101000a81548163ffffffff021916908363ffffffff1602179055506007600160405180807f50616e64610000000000000000000000000000000000000000000000000000008152506005019050908152602001604051809103902060006101000a81548163ffffffff021916908363ffffffff160217905550600060046003830263ffffffff16816103aa57fe5b04905060008183039050600181600202836003020103600460008063ffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff1602179055506000600190505b600260009054906101000a900463ffffffff1663ffffffff168163ffffffff16101561046e576001600460008363ffffffff1663ffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff1602179055508060010190506103fe565b5050505061100e806104816000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c80636ec59ee6116100665780636ec59ee61461029c5780638da5cb5b14610354578063b49b0a311461039e578063c04752d814610479578063e48603391461053457610093565b80630b3de1f3146100985780632295a8e5146100a25780632a4910ab1461016d5780633cb9269e146101c1575b600080fd5b6100a0610598565b005b61016b600480360360408110156100b857600080fd5b81019080803590602001906401000000008111156100d557600080fd5b8201836020820111156100e757600080fd5b8035906020019184600183028401116401000000008311171561010957600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290803563ffffffff169060200190929190505050610788565b005b61019f6004803603602081101561018357600080fd5b81019080803563ffffffff1690602001909291905050506108ee565b604051808263ffffffff1663ffffffff16815260200191505060405180910390f35b61027a600480360360208110156101d757600080fd5b81019080803590602001906401000000008111156101f457600080fd5b82018360208201111561020657600080fd5b8035906020019184600183028401116401000000008311171561022857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610911565b604051808263ffffffff1663ffffffff16815260200191505060405180910390f35b610352600480360360208110156102b257600080fd5b81019080803590602001906401000000008111156102cf57600080fd5b8201836020820111156102e157600080fd5b8035906020019184602083028401116401000000008311171561030357600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050919291929050505061094a565b005b61035c610a8b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610457600480360360208110156103b457600080fd5b81019080803590602001906401000000008111156103d157600080fd5b8201836020820111156103e357600080fd5b8035906020019184600183028401116401000000008311171561040557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610ab0565b604051808263ffffffff1663ffffffff16815260200191505060405180910390f35b6105326004803603602081101561048f57600080fd5b81019080803590602001906401000000008111156104ac57600080fd5b8201836020820111156104be57600080fd5b803590602001918460018302840111640100000000831117156104e057600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610ba4565b005b6105766004803603602081101561054a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f69565b604051808263ffffffff1663ffffffff16815260200191505060405180910390f35b60008090505b600260009054906101000a900463ffffffff1663ffffffff168163ffffffff161015610785576000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008363ffffffff1663ffffffff16815260200190815260200160002060009054906101000a900463ffffffff169050808102600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282829054906101000a900463ffffffff160192506101000a81548163ffffffff021916908363ffffffff16021790555080600460008463ffffffff1663ffffffff16815260200190815260200160002060008282829054906101000a900463ffffffff160392506101000a81548163ffffffff021916908363ffffffff1602179055506000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008463ffffffff1663ffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff1602179055505080600101905061059e565b50565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461082d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180610fb26028913960400191505060405180910390fd5b60006001836040518082805190602001908083835b602083106108655780518252602082019150602081019050602083039250610842565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900463ffffffff16905081600460008363ffffffff1663ffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff160217905550505050565b60046020528060005260406000206000915054906101000a900463ffffffff1681565b6001818051602081018201805184825260208301602085012081835280955050505050506000915054906101000a900463ffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109ef576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180610fb26028913960400191505060405180910390fd5b60008090505b81518163ffffffff161015610a8757600960036000848463ffffffff1681518110610a1c57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff1602179055508060010190506109f5565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806001836040518082805190602001908083835b60208310610ae95780518252602082019150602081019050602083039250610ac6565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900463ffffffff169050600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008263ffffffff1663ffffffff16815260200190815260200160002060009054906101000a900463ffffffff16915050919050565b60006001826040518082805190602001908083835b60208310610bdc5780518252602082019150602081019050602083039250610bb9565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900463ffffffff1690506001600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900463ffffffff1663ffffffff161015610cd1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180610f8d6025913960400191505060405180910390fd5b60006001600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008463ffffffff1663ffffffff16815260200190815260200160002060009054906101000a900463ffffffff1601905060006001826002020390508063ffffffff16600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900463ffffffff1663ffffffff161015610e21576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f496e73756666696369656e7420746f6b656e730000000000000000000000000081525060200191505060405180910390fd5b80600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282829054906101000a900463ffffffff160392506101000a81548163ffffffff021916908363ffffffff16021790555081600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008563ffffffff1663ffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff1602179055506001600460008563ffffffff1663ffffffff16815260200190815260200160002060008282829054906101000a900463ffffffff160192506101000a81548163ffffffff021916908363ffffffff16021790555050505050565b60036020528060005260406000206000915054906101000a900463ffffffff168156fe596f75206e65656420746f2068617665206120746f6b656e20746f20766f74652077697468546869732066756e6374696f6e206973207265737472696374656420746f20746865206f776e6572a265627a7a72315820ff5dd0cbc6e3f959c70fd07f10895c13cb703ea127d715ffa4905cc410784fc064736f6c63430005100032","deployedBytecode":"0x608060405234801561001057600080fd5b50600436106100935760003560e01c80636ec59ee6116100665780636ec59ee61461029c5780638da5cb5b14610354578063b49b0a311461039e578063c04752d814610479578063e48603391461053457610093565b80630b3de1f3146100985780632295a8e5146100a25780632a4910ab1461016d5780633cb9269e146101c1575b600080fd5b6100a0610598565b005b61016b600480360360408110156100b857600080fd5b81019080803590602001906401000000008111156100d557600080fd5b8201836020820111156100e757600080fd5b8035906020019184600183028401116401000000008311171561010957600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290803563ffffffff169060200190929190505050610788565b005b61019f6004803603602081101561018357600080fd5b81019080803563ffffffff1690602001909291905050506108ee565b604051808263ffffffff1663ffffffff16815260200191505060405180910390f35b61027a600480360360208110156101d757600080fd5b81019080803590602001906401000000008111156101f457600080fd5b82018360208201111561020657600080fd5b8035906020019184600183028401116401000000008311171561022857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610911565b604051808263ffffffff1663ffffffff16815260200191505060405180910390f35b610352600480360360208110156102b257600080fd5b81019080803590602001906401000000008111156102cf57600080fd5b8201836020820111156102e157600080fd5b8035906020019184602083028401116401000000008311171561030357600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050919291929050505061094a565b005b61035c610a8b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610457600480360360208110156103b457600080fd5b81019080803590602001906401000000008111156103d157600080fd5b8201836020820111156103e357600080fd5b8035906020019184600183028401116401000000008311171561040557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610ab0565b604051808263ffffffff1663ffffffff16815260200191505060405180910390f35b6105326004803603602081101561048f57600080fd5b81019080803590602001906401000000008111156104ac57600080fd5b8201836020820111156104be57600080fd5b803590602001918460018302840111640100000000831117156104e057600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610ba4565b005b6105766004803603602081101561054a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f69565b604051808263ffffffff1663ffffffff16815260200191505060405180910390f35b60008090505b600260009054906101000a900463ffffffff1663ffffffff168163ffffffff161015610785576000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008363ffffffff1663ffffffff16815260200190815260200160002060009054906101000a900463ffffffff169050808102600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282829054906101000a900463ffffffff160192506101000a81548163ffffffff021916908363ffffffff16021790555080600460008463ffffffff1663ffffffff16815260200190815260200160002060008282829054906101000a900463ffffffff160392506101000a81548163ffffffff021916908363ffffffff1602179055506000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008463ffffffff1663ffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff1602179055505080600101905061059e565b50565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461082d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180610fb26028913960400191505060405180910390fd5b60006001836040518082805190602001908083835b602083106108655780518252602082019150602081019050602083039250610842565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900463ffffffff16905081600460008363ffffffff1663ffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff160217905550505050565b60046020528060005260406000206000915054906101000a900463ffffffff1681565b6001818051602081018201805184825260208301602085012081835280955050505050506000915054906101000a900463ffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109ef576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180610fb26028913960400191505060405180910390fd5b60008090505b81518163ffffffff161015610a8757600960036000848463ffffffff1681518110610a1c57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff1602179055508060010190506109f5565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806001836040518082805190602001908083835b60208310610ae95780518252602082019150602081019050602083039250610ac6565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900463ffffffff169050600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008263ffffffff1663ffffffff16815260200190815260200160002060009054906101000a900463ffffffff16915050919050565b60006001826040518082805190602001908083835b60208310610bdc5780518252602082019150602081019050602083039250610bb9565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900463ffffffff1690506001600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900463ffffffff1663ffffffff161015610cd1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180610f8d6025913960400191505060405180910390fd5b60006001600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008463ffffffff1663ffffffff16815260200190815260200160002060009054906101000a900463ffffffff1601905060006001826002020390508063ffffffff16600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900463ffffffff1663ffffffff161015610e21576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f496e73756666696369656e7420746f6b656e730000000000000000000000000081525060200191505060405180910390fd5b80600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282829054906101000a900463ffffffff160392506101000a81548163ffffffff021916908363ffffffff16021790555081600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008563ffffffff1663ffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff1602179055506001600460008563ffffffff1663ffffffff16815260200190815260200160002060008282829054906101000a900463ffffffff160192506101000a81548163ffffffff021916908363ffffffff16021790555050505050565b60036020528060005260406000206000915054906101000a900463ffffffff168156fe596f75206e65656420746f2068617665206120746f6b656e20746f20766f74652077697468546869732066756e6374696f6e206973207265737472696374656420746f20746865206f776e6572a265627a7a72315820ff5dd0cbc6e3f959c70fd07f10895c13cb703ea127d715ffa4905cc410784fc064736f6c63430005100032","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/smishra/Desktop/TAing/Sem5/hws/hw4/contracts/Proposals.sol","ast":{"absolutePath":"project:/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":{"attributes":{"absolutePath":"project:/contracts/Proposals.sol","exportedSymbols":{"Proposals":[338]}},"children":[{"attributes":{"literals":["solidity",">=","0.4",".22"]},"id":1,"name":"PragmaDirective","src":"0:25:0"},{"attributes":{"baseContracts":[null],"contractDependencies":[null],"contractKind":"contract","documentation":null,"fullyImplemented":true,"linearizedBaseContracts":[338],"name":"Proposals","scope":339},"children":[{"attributes":{"constant":false,"name":"owner","scope":338,"stateVariable":true,"storageLocation":"default","type":"address","value":null,"visibility":"public"},"children":[{"attributes":{"name":"address","stateMutability":"nonpayable","type":"address"},"id":2,"name":"ElementaryTypeName","src":"53:7:0"}],"id":3,"name":"VariableDeclaration","src":"53:20:0"},{"attributes":{"constant":false,"name":"proposalIndices","scope":338,"stateVariable":true,"storageLocation":"default","type":"mapping(string => uint32)","value":null,"visibility":"public"},"children":[{"attributes":{"type":"mapping(string => uint32)"},"children":[{"attributes":{"name":"string","type":"string"},"id":4,"name":"ElementaryTypeName","src":"87:6:0"},{"attributes":{"name":"uint32","type":"uint32"},"id":5,"name":"ElementaryTypeName","src":"97:6:0"}],"id":6,"name":"Mapping","src":"79:25:0"}],"id":7,"name":"VariableDeclaration","src":"79:48:0"},{"attributes":{"constant":false,"name":"numProposals","scope":338,"stateVariable":true,"storageLocation":"default","type":"uint32","visibility":"internal"},"children":[{"attributes":{"name":"uint32","type":"uint32"},"id":8,"name":"ElementaryTypeName","src":"133:6:0"},{"attributes":{"argumentTypes":null,"hexvalue":"38","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"number","type":"int_const 8","value":"8"},"id":9,"name":"Literal","src":"155:1:0"}],"id":10,"name":"VariableDeclaration","src":"133:23:0"},{"attributes":{"constant":false,"name":"tokens","scope":338,"stateVariable":true,"storageLocation":"default","type":"mapping(address => uint32)","value":null,"visibility":"public"},"children":[{"attributes":{"type":"mapping(address => uint32)"},"children":[{"attributes":{"name":"address","type":"address"},"id":11,"name":"ElementaryTypeName","src":"220:7:0"},{"attributes":{"name":"uint32","type":"uint32"},"id":12,"name":"ElementaryTypeName","src":"231:6:0"}],"id":13,"name":"Mapping","src":"212:26:0"}],"id":14,"name":"VariableDeclaration","src":"212:40:0"},{"attributes":{"constant":false,"name":"proposals","scope":338,"stateVariable":true,"storageLocation":"default","type":"mapping(uint32 => uint32)","value":null,"visibility":"public"},"children":[{"attributes":{"type":"mapping(uint32 => uint32)"},"children":[{"attributes":{"name":"uint32","type":"uint32"},"id":15,"name":"ElementaryTypeName","src":"313:6:0"},{"attributes":{"name":"uint32","type":"uint32"},"id":16,"name":"ElementaryTypeName","src":"323:6:0"}],"id":17,"name":"Mapping","src":"305:25:0"}],"id":18,"name":"VariableDeclaration","src":"305:42:0"},{"attributes":{"constant":false,"name":"votesByFor","scope":338,"stateVariable":true,"storageLocation":"default","type":"mapping(address => mapping(uint32 => uint32))","value":null,"visibility":"internal"},"children":[{"attributes":{"type":"mapping(address => mapping(uint32 => uint32))"},"children":[{"attributes":{"name":"address","type":"address"},"id":19,"name":"ElementaryTypeName","src":"361:7:0"},{"attributes":{"type":"mapping(uint32 => uint32)"},"children":[{"attributes":{"name":"uint32","type":"uint32"},"id":20,"name":"ElementaryTypeName","src":"380:6:0"},{"attributes":{"name":"uint32","type":"uint32"},"id":21,"name":"ElementaryTypeName","src":"390:6:0"}],"id":22,"name":"Mapping","src":"372:25:0"}],"id":23,"name":"Mapping","src":"353:45:0"}],"id":24,"name":"VariableDeclaration","src":"353:56:0"},{"attributes":{"documentation":null,"name":"restricted","visibility":"internal"},"children":[{"attributes":{"parameters":[null]},"children":[],"id":25,"name":"ParameterList","src":"435:2:0"},{"children":[{"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"isStructConstructorCall":false,"lValueRequested":false,"names":[null],"type":"tuple()","type_conversion":false},"children":[{"attributes":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"},{"typeIdentifier":"t_stringliteral_f5132e684ff59c4f69cfd3e5048a139c5e9dfc67213b9635f1b469112c0afb2e","typeString":"literal_string \\"This function is restricted to the owner\\""}],"overloadedDeclarations":[356,357],"referencedDeclaration":357,"type":"function (bool,string memory) pure","value":"require"},"id":26,"name":"Identifier","src":"448:7:0"},{"attributes":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"==","type":"bool"},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"member_name":"sender","referencedDeclaration":null,"type":"address payable"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":353,"type":"msg","value":"msg"},"id":27,"name":"Identifier","src":"469:3:0"}],"id":28,"name":"MemberAccess","src":"469:10:0"},{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":3,"type":"address","value":"owner"},"id":29,"name":"Identifier","src":"483:5:0"}],"id":30,"name":"BinaryOperation","src":"469:19:0"},{"attributes":{"argumentTypes":null,"hexvalue":"546869732066756e6374696f6e206973207265737472696374656420746f20746865206f776e6572","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"string","type":"literal_string \\"This function is restricted to the owner\\"","value":"This function is restricted to the owner"},"id":31,"name":"Literal","src":"502:42:0"}],"id":32,"name":"FunctionCall","src":"448:106:0"}],"id":33,"name":"ExpressionStatement","src":"448:106:0"},{"id":34,"name":"PlaceholderStatement","src":"564:1:0"}],"id":35,"name":"Block","src":"438:134:0"}],"id":36,"name":"ModifierDefinition","src":"416:156:0"},{"attributes":{"documentation":null,"implemented":true,"isConstructor":true,"kind":"constructor","modifiers":[null],"name":"","scope":338,"stateMutability":"nonpayable","superFunction":null,"visibility":"public"},"children":[{"children":[{"attributes":{"constant":false,"name":"studentCount","scope":142,"stateVariable":false,"storageLocation":"default","type":"uint32","value":null,"visibility":"internal"},"children":[{"attributes":{"name":"uint32","type":"uint32"},"id":37,"name":"ElementaryTypeName","src":"627:6:0"}],"id":38,"name":"VariableDeclaration","src":"627:19:0"}],"id":39,"name":"ParameterList","src":"626:21:0"},{"attributes":{"parameters":[null]},"children":[],"id":40,"name":"ParameterList","src":"655:0:0"},{"children":[{"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"=","type":"address"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":3,"type":"address","value":"owner"},"id":41,"name":"Identifier","src":"665:5:0"},{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"member_name":"sender","referencedDeclaration":null,"type":"address payable"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":353,"type":"msg","value":"msg"},"id":42,"name":"Identifier","src":"673:3:0"}],"id":43,"name":"MemberAccess","src":"673:10:0"}],"id":44,"name":"Assignment","src":"665:18:0"}],"id":45,"name":"ExpressionStatement","src":"665:18:0"},{"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"=","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":7,"type":"mapping(string memory => uint32)","value":"proposalIndices"},"id":46,"name":"Identifier","src":"694:15:0"},{"attributes":{"argumentTypes":null,"hexvalue":"4e6f7468696e67","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"string","type":"literal_string \\"Nothing\\"","value":"Nothing"},"id":47,"name":"Literal","src":"710:9:0"}],"id":48,"name":"IndexAccess","src":"694:26:0"},{"attributes":{"argumentTypes":null,"hexvalue":"30","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"number","type":"int_const 0","value":"0"},"id":49,"name":"Literal","src":"723:1:0"}],"id":50,"name":"Assignment","src":"694:30:0"}],"id":51,"name":"ExpressionStatement","src":"694:30:0"},{"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"=","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":7,"type":"mapping(string memory => uint32)","value":"proposalIndices"},"id":52,"name":"Identifier","src":"734:15:0"},{"attributes":{"argumentTypes":null,"hexvalue":"446f67","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"string","type":"literal_string \\"Dog\\"","value":"Dog"},"id":53,"name":"Literal","src":"750:5:0"}],"id":54,"name":"IndexAccess","src":"734:22:0"},{"attributes":{"argumentTypes":null,"hexvalue":"31","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"number","type":"int_const 1","value":"1"},"id":55,"name":"Literal","src":"759:1:0"}],"id":56,"name":"Assignment","src":"734:26:0"}],"id":57,"name":"ExpressionStatement","src":"734:26:0"},{"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"=","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":7,"type":"mapping(string memory => uint32)","value":"proposalIndices"},"id":58,"name":"Identifier","src":"770:15:0"},{"attributes":{"argumentTypes":null,"hexvalue":"436174","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"string","type":"literal_string \\"Cat\\"","value":"Cat"},"id":59,"name":"Literal","src":"786:5:0"}],"id":60,"name":"IndexAccess","src":"770:22:0"},{"attributes":{"argumentTypes":null,"hexvalue":"32","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"number","type":"int_const 2","value":"2"},"id":61,"name":"Literal","src":"795:1:0"}],"id":62,"name":"Assignment","src":"770:26:0"}],"id":63,"name":"ExpressionStatement","src":"770:26:0"},{"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"=","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":7,"type":"mapping(string memory => uint32)","value":"proposalIndices"},"id":64,"name":"Identifier","src":"806:15:0"},{"attributes":{"argumentTypes":null,"hexvalue":"50656e6775696e","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"string","type":"literal_string \\"Penguin\\"","value":"Penguin"},"id":65,"name":"Literal","src":"822:9:0"}],"id":66,"name":"IndexAccess","src":"806:26:0"},{"attributes":{"argumentTypes":null,"hexvalue":"33","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"number","type":"int_const 3","value":"3"},"id":67,"name":"Literal","src":"835:1:0"}],"id":68,"name":"Assignment","src":"806:30:0"}],"id":69,"name":"ExpressionStatement","src":"806:30:0"},{"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"=","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":7,"type":"mapping(string memory => uint32)","value":"proposalIndices"},"id":70,"name":"Identifier","src":"846:15:0"},{"attributes":{"argumentTypes":null,"hexvalue":"4d6f6e6b6579","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"string","type":"literal_string \\"Monkey\\"","value":"Monkey"},"id":71,"name":"Literal","src":"862:8:0"}],"id":72,"name":"IndexAccess","src":"846:25:0"},{"attributes":{"argumentTypes":null,"hexvalue":"34","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"number","type":"int_const 4","value":"4"},"id":73,"name":"Literal","src":"874:1:0"}],"id":74,"name":"Assignment","src":"846:29:0"}],"id":75,"name":"ExpressionStatement","src":"846:29:0"},{"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"=","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":7,"type":"mapping(string memory => uint32)","value":"proposalIndices"},"id":76,"name":"Identifier","src":"885:15:0"},{"attributes":{"argumentTypes":null,"hexvalue":"4b6f616c61","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"string","type":"literal_string \\"Koala\\"","value":"Koala"},"id":77,"name":"Literal","src":"901:7:0"}],"id":78,"name":"IndexAccess","src":"885:24:0"},{"attributes":{"argumentTypes":null,"hexvalue":"35","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"number","type":"int_const 5","value":"5"},"id":79,"name":"Literal","src":"912:1:0"}],"id":80,"name":"Assignment","src":"885:28:0"}],"id":81,"name":"ExpressionStatement","src":"885:28:0"},{"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"=","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":7,"type":"mapping(string memory => uint32)","value":"proposalIndices"},"id":82,"name":"Identifier","src":"923:15:0"},{"attributes":{"argumentTypes":null,"hexvalue":"526162626974","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"string","type":"literal_string \\"Rabbit\\"","value":"Rabbit"},"id":83,"name":"Literal","src":"939:8:0"}],"id":84,"name":"IndexAccess","src":"923:25:0"},{"attributes":{"argumentTypes":null,"hexvalue":"36","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"number","type":"int_const 6","value":"6"},"id":85,"name":"Literal","src":"951:1:0"}],"id":86,"name":"Assignment","src":"923:29:0"}],"id":87,"name":"ExpressionStatement","src":"923:29:0"},{"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"=","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":7,"type":"mapping(string memory => uint32)","value":"proposalIndices"},"id":88,"name":"Identifier","src":"962:15:0"},{"attributes":{"argumentTypes":null,"hexvalue":"50616e6461","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"string","type":"literal_string \\"Panda\\"","value":"Panda"},"id":89,"name":"Literal","src":"978:7:0"}],"id":90,"name":"IndexAccess","src":"962:24:0"},{"attributes":{"argumentTypes":null,"hexvalue":"37","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"number","type":"int_const 7","value":"7"},"id":91,"name":"Literal","src":"989:1:0"}],"id":92,"name":"Assignment","src":"962:28:0"}],"id":93,"name":"ExpressionStatement","src":"962:28:0"},{"attributes":{"assignments":[95]},"children":[{"attributes":{"constant":false,"name":"threeTokenStudents","scope":141,"stateVariable":false,"storageLocation":"default","type":"uint32","value":null,"visibility":"internal"},"children":[{"attributes":{"name":"uint32","type":"uint32"},"id":94,"name":"ElementaryTypeName","src":"1001:6:0"}],"id":95,"name":"VariableDeclaration","src":"1001:25:0"},{"attributes":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"/","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isInlineArray":false,"isLValue":false,"isPure":false,"lValueRequested":false,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"*","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":38,"type":"uint32","value":"studentCount"},"id":96,"name":"Identifier","src":"1030:12:0"},{"attributes":{"argumentTypes":null,"hexvalue":"33","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"number","type":"int_const 3","value":"3"},"id":97,"name":"Literal","src":"1045:1:0"}],"id":98,"name":"BinaryOperation","src":"1030:16:0"}],"id":99,"name":"TupleExpression","src":"1029:18:0"},{"attributes":{"argumentTypes":null,"hexvalue":"34","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"number","type":"int_const 4","value":"4"},"id":100,"name":"Literal","src":"1050:1:0"}],"id":101,"name":"BinaryOperation","src":"1029:22:0"}],"id":102,"name":"VariableDeclarationStatement","src":"1001:50:0"},{"attributes":{"assignments":[104]},"children":[{"attributes":{"constant":false,"name":"twoTokenStudents","scope":141,"stateVariable":false,"storageLocation":"default","type":"uint32","value":null,"visibility":"internal"},"children":[{"attributes":{"name":"uint32","type":"uint32"},"id":103,"name":"ElementaryTypeName","src":"1061:6:0"}],"id":104,"name":"VariableDeclaration","src":"1061:23:0"},{"attributes":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"-","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":38,"type":"uint32","value":"studentCount"},"id":105,"name":"Identifier","src":"1087:12:0"},{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":95,"type":"uint32","value":"threeTokenStudents"},"id":106,"name":"Identifier","src":"1102:18:0"}],"id":107,"name":"BinaryOperation","src":"1087:33:0"}],"id":108,"name":"VariableDeclarationStatement","src":"1061:59:0"},{"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"=","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":18,"type":"mapping(uint32 => uint32)","value":"proposals"},"id":109,"name":"Identifier","src":"1130:9:0"},{"attributes":{"argumentTypes":null,"hexvalue":"30","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"number","type":"int_const 0","value":"0"},"id":110,"name":"Literal","src":"1140:1:0"}],"id":111,"name":"IndexAccess","src":"1130:12:0"},{"attributes":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"-","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"+","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"*","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"hexvalue":"33","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"number","type":"int_const 3","value":"3"},"id":112,"name":"Literal","src":"1145:1:0"},{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":95,"type":"uint32","value":"threeTokenStudents"},"id":113,"name":"Identifier","src":"1149:18:0"}],"id":114,"name":"BinaryOperation","src":"1145:22:0"},{"attributes":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"*","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"hexvalue":"32","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"number","type":"int_const 2","value":"2"},"id":115,"name":"Literal","src":"1170:1:0"},{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":104,"type":"uint32","value":"twoTokenStudents"},"id":116,"name":"Identifier","src":"1174:16:0"}],"id":117,"name":"BinaryOperation","src":"1170:20:0"}],"id":118,"name":"BinaryOperation","src":"1145:45:0"},{"attributes":{"argumentTypes":null,"hexvalue":"31","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"number","type":"int_const 1","value":"1"},"id":119,"name":"Literal","src":"1193:1:0"}],"id":120,"name":"BinaryOperation","src":"1145:49:0"}],"id":121,"name":"Assignment","src":"1130:64:0"}],"id":122,"name":"ExpressionStatement","src":"1130:64:0"},{"children":[{"attributes":{"assignments":[124]},"children":[{"attributes":{"constant":false,"name":"i","scope":140,"stateVariable":false,"storageLocation":"default","type":"uint32","value":null,"visibility":"internal"},"children":[{"attributes":{"name":"uint32","type":"uint32"},"id":123,"name":"ElementaryTypeName","src":"1210:6:0"}],"id":124,"name":"VariableDeclaration","src":"1210:8:0"},{"attributes":{"argumentTypes":null,"hexvalue":"31","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"number","type":"int_const 1","value":"1"},"id":125,"name":"Literal","src":"1221:1:0"}],"id":126,"name":"VariableDeclarationStatement","src":"1210:12:0"},{"attributes":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"<","type":"bool"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":124,"type":"uint32","value":"i"},"id":127,"name":"Identifier","src":"1224:1:0"},{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":10,"type":"uint32","value":"numProposals"},"id":128,"name":"Identifier","src":"1228:12:0"}],"id":129,"name":"BinaryOperation","src":"1224:16:0"},{"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"++","prefix":true,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":124,"type":"uint32","value":"i"},"id":130,"name":"Identifier","src":"1244:1:0"}],"id":131,"name":"UnaryOperation","src":"1242:3:0"}],"id":132,"name":"ExpressionStatement","src":"1242:3:0"},{"children":[{"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"=","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":18,"type":"mapping(uint32 => uint32)","value":"proposals"},"id":133,"name":"Identifier","src":"1261:9:0"},{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":124,"type":"uint32","value":"i"},"id":134,"name":"Identifier","src":"1271:1:0"}],"id":135,"name":"IndexAccess","src":"1261:12:0"},{"attributes":{"argumentTypes":null,"hexvalue":"31","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"number","type":"int_const 1","value":"1"},"id":136,"name":"Literal","src":"1276:1:0"}],"id":137,"name":"Assignment","src":"1261:16:0"}],"id":138,"name":"ExpressionStatement","src":"1261:16:0"}],"id":139,"name":"Block","src":"1247:41:0"}],"id":140,"name":"ForStatement","src":"1205:83:0"}],"id":141,"name":"Block","src":"655:639:0"}],"id":142,"name":"FunctionDefinition","src":"615:679:0"},{"attributes":{"documentation":null,"implemented":true,"isConstructor":false,"kind":"function","name":"setVotes","scope":338,"stateMutability":"nonpayable","superFunction":null,"visibility":"public"},"children":[{"children":[{"attributes":{"constant":false,"name":"proposal","scope":164,"stateVariable":false,"storageLocation":"memory","type":"string","value":null,"visibility":"internal"},"children":[{"attributes":{"name":"string","type":"string"},"id":143,"name":"ElementaryTypeName","src":"1318:6:0"}],"id":144,"name":"VariableDeclaration","src":"1318:22:0"},{"attributes":{"constant":false,"name":"amount","scope":164,"stateVariable":false,"storageLocation":"default","type":"uint32","value":null,"visibility":"internal"},"children":[{"attributes":{"name":"uint32","type":"uint32"},"id":145,"name":"ElementaryTypeName","src":"1342:6:0"}],"id":146,"name":"VariableDeclaration","src":"1342:13:0"}],"id":147,"name":"ParameterList","src":"1317:39:0"},{"attributes":{"parameters":[null]},"children":[],"id":150,"name":"ParameterList","src":"1375:0:0"},{"attributes":{"arguments":null},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":36,"type":"modifier ()","value":"restricted"},"id":148,"name":"Identifier","src":"1364:10:0"}],"id":149,"name":"ModifierInvocation","src":"1364:10:0"},{"children":[{"attributes":{"assignments":[152]},"children":[{"attributes":{"constant":false,"name":"i","scope":163,"stateVariable":false,"storageLocation":"default","type":"uint32","value":null,"visibility":"internal"},"children":[{"attributes":{"name":"uint32","type":"uint32"},"id":151,"name":"ElementaryTypeName","src":"1385:6:0"}],"id":152,"name":"VariableDeclaration","src":"1385:8:0"},{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":7,"type":"mapping(string memory => uint32)","value":"proposalIndices"},"id":153,"name":"Identifier","src":"1396:15:0"},{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":144,"type":"string memory","value":"proposal"},"id":154,"name":"Identifier","src":"1412:8:0"}],"id":155,"name":"IndexAccess","src":"1396:25:0"}],"id":156,"name":"VariableDeclarationStatement","src":"1385:36:0"},{"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"=","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":18,"type":"mapping(uint32 => uint32)","value":"proposals"},"id":157,"name":"Identifier","src":"1431:9:0"},{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":152,"type":"uint32","value":"i"},"id":158,"name":"Identifier","src":"1441:1:0"}],"id":159,"name":"IndexAccess","src":"1431:12:0"},{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":146,"type":"uint32","value":"amount"},"id":160,"name":"Identifier","src":"1446:6:0"}],"id":161,"name":"Assignment","src":"1431:21:0"}],"id":162,"name":"ExpressionStatement","src":"1431:21:0"}],"id":163,"name":"Block","src":"1375:84:0"}],"id":164,"name":"FunctionDefinition","src":"1300:159:0"},{"attributes":{"documentation":null,"implemented":true,"isConstructor":false,"kind":"function","name":"setupStudent","scope":338,"stateMutability":"nonpayable","superFunction":null,"visibility":"public"},"children":[{"children":[{"attributes":{"constant":false,"name":"addrs","scope":194,"stateVariable":false,"storageLocation":"memory","type":"address[]","value":null,"visibility":"internal"},"children":[{"attributes":{"length":null,"type":"address[]"},"children":[{"attributes":{"name":"address","stateMutability":"nonpayable","type":"address"},"id":165,"name":"ElementaryTypeName","src":"1487:7:0"}],"id":166,"name":"ArrayTypeName","src":"1487:9:0"}],"id":167,"name":"VariableDeclaration","src":"1487:22:0"}],"id":168,"name":"ParameterList","src":"1486:24:0"},{"attributes":{"parameters":[null]},"children":[],"id":171,"name":"ParameterList","src":"1529:0:0"},{"attributes":{"arguments":null},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":36,"type":"modifier ()","value":"restricted"},"id":169,"name":"Identifier","src":"1518:10:0"}],"id":170,"name":"ModifierInvocation","src":"1518:10:0"},{"children":[{"children":[{"attributes":{"assignments":[173]},"children":[{"attributes":{"constant":false,"name":"i","scope":192,"stateVariable":false,"storageLocation":"default","type":"uint32","value":null,"visibility":"internal"},"children":[{"attributes":{"name":"uint32","type":"uint32"},"id":172,"name":"ElementaryTypeName","src":"1600:6:0"}],"id":173,"name":"VariableDeclaration","src":"1600:8:0"},{"attributes":{"argumentTypes":null,"hexvalue":"30","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"number","type":"int_const 0","value":"0"},"id":174,"name":"Literal","src":"1611:1:0"}],"id":175,"name":"VariableDeclarationStatement","src":"1600:12:0"},{"attributes":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"<","type":"bool"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":173,"type":"uint32","value":"i"},"id":176,"name":"Identifier","src":"1614:1:0"},{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"member_name":"length","referencedDeclaration":null,"type":"uint256"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":167,"type":"address[] memory","value":"addrs"},"id":177,"name":"Identifier","src":"1618:5:0"}],"id":178,"name":"MemberAccess","src":"1618:12:0"}],"id":179,"name":"BinaryOperation","src":"1614:16:0"},{"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"++","prefix":true,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":173,"type":"uint32","value":"i"},"id":180,"name":"Identifier","src":"1634:1:0"}],"id":181,"name":"UnaryOperation","src":"1632:3:0"}],"id":182,"name":"ExpressionStatement","src":"1632:3:0"},{"children":[{"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"=","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":14,"type":"mapping(address => uint32)","value":"tokens"},"id":183,"name":"Identifier","src":"1649:6:0"},{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"type":"address"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":167,"type":"address[] memory","value":"addrs"},"id":184,"name":"Identifier","src":"1656:5:0"},{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":173,"type":"uint32","value":"i"},"id":185,"name":"Identifier","src":"1662:1:0"}],"id":186,"name":"IndexAccess","src":"1656:8:0"}],"id":187,"name":"IndexAccess","src":"1649:16:0"},{"attributes":{"argumentTypes":null,"hexvalue":"39","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"number","type":"int_const 9","value":"9"},"id":188,"name":"Literal","src":"1668:1:0"}],"id":189,"name":"Assignment","src":"1649:20:0"}],"id":190,"name":"ExpressionStatement","src":"1649:20:0"}],"id":191,"name":"Block","src":"1637:43:0"}],"id":192,"name":"ForStatement","src":"1595:85:0"}],"id":193,"name":"Block","src":"1529:157:0"}],"id":194,"name":"FunctionDefinition","src":"1465:221:0"},{"attributes":{"documentation":null,"implemented":true,"isConstructor":false,"kind":"function","modifiers":[null],"name":"voteFor","scope":338,"stateMutability":"nonpayable","superFunction":null,"visibility":"public"},"children":[{"children":[{"attributes":{"constant":false,"name":"proposal","scope":267,"stateVariable":false,"storageLocation":"memory","type":"string","value":null,"visibility":"internal"},"children":[{"attributes":{"name":"string","type":"string"},"id":195,"name":"ElementaryTypeName","src":"1709:6:0"}],"id":196,"name":"VariableDeclaration","src":"1709:22:0"}],"id":197,"name":"ParameterList","src":"1708:24:0"},{"attributes":{"parameters":[null]},"children":[],"id":198,"name":"ParameterList","src":"1740:0:0"},{"children":[{"attributes":{"assignments":[200]},"children":[{"attributes":{"constant":false,"name":"i","scope":266,"stateVariable":false,"storageLocation":"default","type":"uint32","value":null,"visibility":"internal"},"children":[{"attributes":{"name":"uint32","type":"uint32"},"id":199,"name":"ElementaryTypeName","src":"1792:6:0"}],"id":200,"name":"VariableDeclaration","src":"1792:8:0"},{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":7,"type":"mapping(string memory => uint32)","value":"proposalIndices"},"id":201,"name":"Identifier","src":"1803:15:0"},{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":196,"type":"string memory","value":"proposal"},"id":202,"name":"Identifier","src":"1819:8:0"}],"id":203,"name":"IndexAccess","src":"1803:25:0"}],"id":204,"name":"VariableDeclarationStatement","src":"1792:36:0"},{"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"isStructConstructorCall":false,"lValueRequested":false,"names":[null],"type":"tuple()","type_conversion":false},"children":[{"attributes":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"},{"typeIdentifier":"t_stringliteral_ecd3486d568e69ccf13825a905009c74303486ae004973a1978e24ff6c4d65b2","typeString":"literal_string \\"You need to have a token to vote with\\""}],"overloadedDeclarations":[356,357],"referencedDeclaration":357,"type":"function (bool,string memory) pure","value":"require"},"id":205,"name":"Identifier","src":"1838:7:0"},{"attributes":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":">=","type":"bool"},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":14,"type":"mapping(address => uint32)","value":"tokens"},"id":206,"name":"Identifier","src":"1859:6:0"},{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"member_name":"sender","referencedDeclaration":null,"type":"address payable"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":353,"type":"msg","value":"msg"},"id":207,"name":"Identifier","src":"1866:3:0"}],"id":208,"name":"MemberAccess","src":"1866:10:0"}],"id":209,"name":"IndexAccess","src":"1859:18:0"},{"attributes":{"argumentTypes":null,"hexvalue":"31","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"number","type":"int_const 1","value":"1"},"id":210,"name":"Literal","src":"1881:1:0"}],"id":211,"name":"BinaryOperation","src":"1859:23:0"},{"attributes":{"argumentTypes":null,"hexvalue":"596f75206e65656420746f2068617665206120746f6b656e20746f20766f74652077697468","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"string","type":"literal_string \\"You need to have a token to vote with\\"","value":"You need to have a token to vote with"},"id":212,"name":"Literal","src":"1896:39:0"}],"id":213,"name":"FunctionCall","src":"1838:107:0"}],"id":214,"name":"ExpressionStatement","src":"1838:107:0"},{"attributes":{"assignments":[216]},"children":[{"attributes":{"constant":false,"name":"n","scope":266,"stateVariable":false,"storageLocation":"default","type":"uint32","value":null,"visibility":"internal"},"children":[{"attributes":{"name":"uint32","type":"uint32"},"id":215,"name":"ElementaryTypeName","src":"1955:6:0"}],"id":216,"name":"VariableDeclaration","src":"1955:8:0"},{"attributes":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"+","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"type":"mapping(uint32 => uint32)"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":24,"type":"mapping(address => mapping(uint32 => uint32))","value":"votesByFor"},"id":217,"name":"Identifier","src":"1966:10:0"},{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"member_name":"sender","referencedDeclaration":null,"type":"address payable"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":353,"type":"msg","value":"msg"},"id":218,"name":"Identifier","src":"1977:3:0"}],"id":219,"name":"MemberAccess","src":"1977:10:0"}],"id":220,"name":"IndexAccess","src":"1966:22:0"},{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":200,"type":"uint32","value":"i"},"id":221,"name":"Identifier","src":"1989:1:0"}],"id":222,"name":"IndexAccess","src":"1966:25:0"},{"attributes":{"argumentTypes":null,"hexvalue":"31","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"number","type":"int_const 1","value":"1"},"id":223,"name":"Literal","src":"1994:1:0"}],"id":224,"name":"BinaryOperation","src":"1966:29:0"}],"id":225,"name":"VariableDeclarationStatement","src":"1955:40:0"},{"attributes":{"assignments":[227]},"children":[{"attributes":{"constant":false,"name":"required","scope":266,"stateVariable":false,"storageLocation":"default","type":"uint32","value":null,"visibility":"internal"},"children":[{"attributes":{"name":"uint32","type":"uint32"},"id":226,"name":"ElementaryTypeName","src":"2095:6:0"}],"id":227,"name":"VariableDeclaration","src":"2095:15:0"},{"attributes":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"-","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"*","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"hexvalue":"32","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"number","type":"int_const 2","value":"2"},"id":228,"name":"Literal","src":"2113:1:0"},{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":216,"type":"uint32","value":"n"},"id":229,"name":"Identifier","src":"2117:1:0"}],"id":230,"name":"BinaryOperation","src":"2113:5:0"},{"attributes":{"argumentTypes":null,"hexvalue":"31","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"number","type":"int_const 1","value":"1"},"id":231,"name":"Literal","src":"2121:1:0"}],"id":232,"name":"BinaryOperation","src":"2113:9:0"}],"id":233,"name":"VariableDeclarationStatement","src":"2095:27:0"},{"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"isStructConstructorCall":false,"lValueRequested":false,"names":[null],"type":"tuple()","type_conversion":false},"children":[{"attributes":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"},{"typeIdentifier":"t_stringliteral_e8936288c111bb7d1b946c971bd3b8178cb07640f167f3ff2ff426c9e5ad86d5","typeString":"literal_string \\"Insufficient tokens\\""}],"overloadedDeclarations":[356,357],"referencedDeclaration":357,"type":"function (bool,string memory) pure","value":"require"},"id":234,"name":"Identifier","src":"2132:7:0"},{"attributes":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":">=","type":"bool"},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":14,"type":"mapping(address => uint32)","value":"tokens"},"id":235,"name":"Identifier","src":"2140:6:0"},{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"member_name":"sender","referencedDeclaration":null,"type":"address payable"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":353,"type":"msg","value":"msg"},"id":236,"name":"Identifier","src":"2147:3:0"}],"id":237,"name":"MemberAccess","src":"2147:10:0"}],"id":238,"name":"IndexAccess","src":"2140:18:0"},{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":227,"type":"uint32","value":"required"},"id":239,"name":"Identifier","src":"2162:8:0"}],"id":240,"name":"BinaryOperation","src":"2140:30:0"},{"attributes":{"argumentTypes":null,"hexvalue":"496e73756666696369656e7420746f6b656e73","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"string","type":"literal_string \\"Insufficient tokens\\"","value":"Insufficient tokens"},"id":241,"name":"Literal","src":"2172:21:0"}],"id":242,"name":"FunctionCall","src":"2132:62:0"}],"id":243,"name":"ExpressionStatement","src":"2132:62:0"},{"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"-=","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":14,"type":"mapping(address => uint32)","value":"tokens"},"id":244,"name":"Identifier","src":"2205:6:0"},{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"member_name":"sender","referencedDeclaration":null,"type":"address payable"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":353,"type":"msg","value":"msg"},"id":245,"name":"Identifier","src":"2212:3:0"}],"id":246,"name":"MemberAccess","src":"2212:10:0"}],"id":247,"name":"IndexAccess","src":"2205:18:0"},{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":227,"type":"uint32","value":"required"},"id":248,"name":"Identifier","src":"2227:8:0"}],"id":249,"name":"Assignment","src":"2205:30:0"}],"id":250,"name":"ExpressionStatement","src":"2205:30:0"},{"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"=","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"type":"mapping(uint32 => uint32)"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":24,"type":"mapping(address => mapping(uint32 => uint32))","value":"votesByFor"},"id":251,"name":"Identifier","src":"2245:10:0"},{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"member_name":"sender","referencedDeclaration":null,"type":"address payable"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":353,"type":"msg","value":"msg"},"id":252,"name":"Identifier","src":"2256:3:0"}],"id":253,"name":"MemberAccess","src":"2256:10:0"}],"id":255,"name":"IndexAccess","src":"2245:22:0"},{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":200,"type":"uint32","value":"i"},"id":254,"name":"Identifier","src":"2268:1:0"}],"id":256,"name":"IndexAccess","src":"2245:25:0"},{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":216,"type":"uint32","value":"n"},"id":257,"name":"Identifier","src":"2273:1:0"}],"id":258,"name":"Assignment","src":"2245:29:0"}],"id":259,"name":"ExpressionStatement","src":"2245:29:0"},{"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"+=","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":18,"type":"mapping(uint32 => uint32)","value":"proposals"},"id":260,"name":"Identifier","src":"2284:9:0"},{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":200,"type":"uint32","value":"i"},"id":261,"name":"Identifier","src":"2294:1:0"}],"id":262,"name":"IndexAccess","src":"2284:12:0"},{"attributes":{"argumentTypes":null,"hexvalue":"31","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"number","type":"int_const 1","value":"1"},"id":263,"name":"Literal","src":"2300:1:0"}],"id":264,"name":"Assignment","src":"2284:17:0"}],"id":265,"name":"ExpressionStatement","src":"2284:17:0"}],"id":266,"name":"Block","src":"1740:568:0"}],"id":267,"name":"FunctionDefinition","src":"1692:616:0"},{"attributes":{"documentation":null,"implemented":true,"isConstructor":false,"kind":"function","modifiers":[null],"name":"resetMyVotes","scope":338,"stateMutability":"nonpayable","superFunction":null,"visibility":"public"},"children":[{"attributes":{"parameters":[null]},"children":[],"id":268,"name":"ParameterList","src":"2407:2:0"},{"attributes":{"parameters":[null]},"children":[],"id":269,"name":"ParameterList","src":"2417:0:0"},{"children":[{"children":[{"attributes":{"assignments":[271]},"children":[{"attributes":{"constant":false,"name":"i","scope":314,"stateVariable":false,"storageLocation":"default","type":"uint32","value":null,"visibility":"internal"},"children":[{"attributes":{"name":"uint32","type":"uint32"},"id":270,"name":"ElementaryTypeName","src":"2432:6:0"}],"id":271,"name":"VariableDeclaration","src":"2432:8:0"},{"attributes":{"argumentTypes":null,"hexvalue":"30","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"number","type":"int_const 0","value":"0"},"id":272,"name":"Literal","src":"2443:1:0"}],"id":273,"name":"VariableDeclarationStatement","src":"2432:12:0"},{"attributes":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"<","type":"bool"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":271,"type":"uint32","value":"i"},"id":274,"name":"Identifier","src":"2446:1:0"},{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":10,"type":"uint32","value":"numProposals"},"id":275,"name":"Identifier","src":"2450:12:0"}],"id":276,"name":"BinaryOperation","src":"2446:16:0"},{"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"++","prefix":true,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":271,"type":"uint32","value":"i"},"id":277,"name":"Identifier","src":"2466:1:0"}],"id":278,"name":"UnaryOperation","src":"2464:3:0"}],"id":279,"name":"ExpressionStatement","src":"2464:3:0"},{"children":[{"attributes":{"assignments":[281]},"children":[{"attributes":{"constant":false,"name":"n","scope":313,"stateVariable":false,"storageLocation":"default","type":"uint32","value":null,"visibility":"internal"},"children":[{"attributes":{"name":"uint32","type":"uint32"},"id":280,"name":"ElementaryTypeName","src":"2483:6:0"}],"id":281,"name":"VariableDeclaration","src":"2483:8:0"},{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"type":"mapping(uint32 => uint32)"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":24,"type":"mapping(address => mapping(uint32 => uint32))","value":"votesByFor"},"id":282,"name":"Identifier","src":"2494:10:0"},{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"member_name":"sender","referencedDeclaration":null,"type":"address payable"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":353,"type":"msg","value":"msg"},"id":283,"name":"Identifier","src":"2505:3:0"}],"id":284,"name":"MemberAccess","src":"2505:10:0"}],"id":285,"name":"IndexAccess","src":"2494:22:0"},{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":271,"type":"uint32","value":"i"},"id":286,"name":"Identifier","src":"2517:1:0"}],"id":287,"name":"IndexAccess","src":"2494:25:0"}],"id":288,"name":"VariableDeclarationStatement","src":"2483:36:0"},{"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"+=","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":14,"type":"mapping(address => uint32)","value":"tokens"},"id":289,"name":"Identifier","src":"2533:6:0"},{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"member_name":"sender","referencedDeclaration":null,"type":"address payable"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":353,"type":"msg","value":"msg"},"id":290,"name":"Identifier","src":"2540:3:0"}],"id":291,"name":"MemberAccess","src":"2540:10:0"}],"id":292,"name":"IndexAccess","src":"2533:18:0"},{"attributes":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint32","typeString":"uint32"},"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"*","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":281,"type":"uint32","value":"n"},"id":293,"name":"Identifier","src":"2555:1:0"},{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":281,"type":"uint32","value":"n"},"id":294,"name":"Identifier","src":"2559:1:0"}],"id":295,"name":"BinaryOperation","src":"2555:5:0"}],"id":296,"name":"Assignment","src":"2533:27:0"}],"id":297,"name":"ExpressionStatement","src":"2533:27:0"},{"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"-=","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":18,"type":"mapping(uint32 => uint32)","value":"proposals"},"id":298,"name":"Identifier","src":"2574:9:0"},{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":271,"type":"uint32","value":"i"},"id":299,"name":"Identifier","src":"2584:1:0"}],"id":300,"name":"IndexAccess","src":"2574:12:0"},{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":281,"type":"uint32","value":"n"},"id":301,"name":"Identifier","src":"2590:1:0"}],"id":302,"name":"Assignment","src":"2574:17:0"}],"id":303,"name":"ExpressionStatement","src":"2574:17:0"},{"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"operator":"=","type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"type":"mapping(uint32 => uint32)"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":24,"type":"mapping(address => mapping(uint32 => uint32))","value":"votesByFor"},"id":304,"name":"Identifier","src":"2605:10:0"},{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"member_name":"sender","referencedDeclaration":null,"type":"address payable"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":353,"type":"msg","value":"msg"},"id":305,"name":"Identifier","src":"2616:3:0"}],"id":306,"name":"MemberAccess","src":"2616:10:0"}],"id":308,"name":"IndexAccess","src":"2605:22:0"},{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":271,"type":"uint32","value":"i"},"id":307,"name":"Identifier","src":"2628:1:0"}],"id":309,"name":"IndexAccess","src":"2605:25:0"},{"attributes":{"argumentTypes":null,"hexvalue":"30","isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"subdenomination":null,"token":"number","type":"int_const 0","value":"0"},"id":310,"name":"Literal","src":"2633:1:0"}],"id":311,"name":"Assignment","src":"2605:29:0"}],"id":312,"name":"ExpressionStatement","src":"2605:29:0"}],"id":313,"name":"Block","src":"2469:176:0"}],"id":314,"name":"ForStatement","src":"2427:218:0"}],"id":315,"name":"Block","src":"2417:234:0"}],"id":316,"name":"FunctionDefinition","src":"2386:265:0"},{"attributes":{"documentation":null,"implemented":true,"isConstructor":false,"kind":"function","modifiers":[null],"name":"myVotes","scope":338,"stateMutability":"view","superFunction":null,"visibility":"public"},"children":[{"children":[{"attributes":{"constant":false,"name":"proposal","scope":337,"stateVariable":false,"storageLocation":"memory","type":"string","value":null,"visibility":"internal"},"children":[{"attributes":{"name":"string","type":"string"},"id":317,"name":"ElementaryTypeName","src":"2674:6:0"}],"id":318,"name":"VariableDeclaration","src":"2674:22:0"}],"id":319,"name":"ParameterList","src":"2673:24:0"},{"children":[{"attributes":{"constant":false,"name":"votes","scope":337,"stateVariable":false,"storageLocation":"default","type":"uint32","value":null,"visibility":"internal"},"children":[{"attributes":{"name":"uint32","type":"uint32"},"id":320,"name":"ElementaryTypeName","src":"2718:6:0"}],"id":321,"name":"VariableDeclaration","src":"2718:12:0"}],"id":322,"name":"ParameterList","src":"2717:14:0"},{"children":[{"attributes":{"assignments":[324]},"children":[{"attributes":{"constant":false,"name":"i","scope":336,"stateVariable":false,"storageLocation":"default","type":"uint32","value":null,"visibility":"internal"},"children":[{"attributes":{"name":"uint32","type":"uint32"},"id":323,"name":"ElementaryTypeName","src":"2742:6:0"}],"id":324,"name":"VariableDeclaration","src":"2742:8:0"},{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":7,"type":"mapping(string memory => uint32)","value":"proposalIndices"},"id":325,"name":"Identifier","src":"2753:15:0"},{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":318,"type":"string memory","value":"proposal"},"id":326,"name":"Identifier","src":"2769:8:0"}],"id":327,"name":"IndexAccess","src":"2753:25:0"}],"id":328,"name":"VariableDeclarationStatement","src":"2742:36:0"},{"attributes":{"functionReturnParameters":322},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"type":"uint32"},"children":[{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"type":"mapping(uint32 => uint32)"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":24,"type":"mapping(address => mapping(uint32 => uint32))","value":"votesByFor"},"id":329,"name":"Identifier","src":"2795:10:0"},{"attributes":{"argumentTypes":null,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"member_name":"sender","referencedDeclaration":null,"type":"address payable"},"children":[{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":353,"type":"msg","value":"msg"},"id":330,"name":"Identifier","src":"2806:3:0"}],"id":331,"name":"MemberAccess","src":"2806:10:0"}],"id":332,"name":"IndexAccess","src":"2795:22:0"},{"attributes":{"argumentTypes":null,"overloadedDeclarations":[null],"referencedDeclaration":324,"type":"uint32","value":"i"},"id":333,"name":"Identifier","src":"2818:1:0"}],"id":334,"name":"IndexAccess","src":"2795:25:0"}],"id":335,"name":"Return","src":"2788:32:0"}],"id":336,"name":"Block","src":"2732:95:0"}],"id":337,"name":"FunctionDefinition","src":"2657:170:0"}],"id":338,"name":"ContractDefinition","src":"28:2801:0"}],"id":339,"name":"SourceUnit","src":"0:2830:0"},"compiler":{"name":"solc","version":"0.5.16+commit.9c3226ce.Emscripten.clang"},"networks":{"11155111":{"events":{},"links":{},"address":"0xC9e6AB26AD3d36049AF5204e6402632c89a4Bea4","transactionHash":"0x7b76984f7679a63b945a40b0248df4fed7463ba7379dd8044b3f4b60b98747e2"}},"schemaVersion":"3.4.16","updatedAt":"2024-11-10T10:13:03.897Z","networkType":"ethereum","devdoc":{"methods":{}},"userdoc":{"methods":{}}}')}},[[26,1,2]]]); +//# sourceMappingURL=main.436e8cb3.chunk.js.map \ No newline at end of file diff --git a/static/js/main.2ffd29f7.chunk.js.map b/static/js/main.436e8cb3.chunk.js.map similarity index 99% rename from static/js/main.2ffd29f7.chunk.js.map rename to static/js/main.436e8cb3.chunk.js.map index 41d2e9e..e02314a 100644 --- a/static/js/main.2ffd29f7.chunk.js.map +++ b/static/js/main.436e8cb3.chunk.js.map @@ -1 +1 @@ -{"version":3,"sources":["Check.js","ErrorIcon.js","Spinner.js","App.js","Layout.js","Loading.js","index.js"],"names":["Check","_jsxs","xmlns","height","viewBox","width","fill","children","_jsx","d","ErrorIcon","Spinner","className","PROPOSALS","ShowAccount","_ref","account","ShowMyTokens","_ref2","myTokens","useCacheSend","drizzleHooks","useDrizzle","send","resetMyVotes","onClick","ShowPersonalInfo","_ref3","AdminInfo","_ref4","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","_ref5","tid","status","color","ShowTransactions","_ref6","transactions","reversed","Object","entries","reverse","length","_Fragment","map","_ref7","console","log","SetButton","_ref8","name","voteString","setVoteString","setVotes","int","parseInt","isNaN","Proposals","_ref9","admin","useCacheCall","call","p","myVotes","voteFor","_ref10","disabled","App","useDrizzleState","drizzleState","accounts","Nav","Layout","props","Loading","options","contracts","web3","fallback","url","drizzleStore","generateStore","drizzle","Drizzle","ReactDOM","render","StrictMode","DrizzleProvider","Initializer","error","loadingContractsAndAccounts","loadingWeb3","document","getElementById"],"mappings":"uLAAe,SAASA,IACtB,OACEC,eAAA,OACEC,MAAM,6BACNC,OAAO,KACPC,QAAQ,YACRC,MAAM,KACNC,KAAK,eAAcC,SAAA,CAEnBC,cAAA,QAAMC,EAAE,gBAAgBH,KAAK,SAC7BE,cAAA,QAAMC,EAAE,0NAGd,CCbe,SAASC,IACtB,OACET,eAAA,OACEC,MAAM,6BACNC,OAAO,KACPC,QAAQ,YACRC,MAAM,KACNC,KAAK,eAAcC,SAAA,CAEnBC,cAAA,QAAMC,EAAE,gBAAgBH,KAAK,SAC7BE,cAAA,QAAMC,EAAE,uGAGd,CCbe,SAASE,IACtB,OACEV,eAAA,OAAKW,UAAU,+BAA8BL,SAAA,CAC3CC,cAAA,OAAKI,UAAU,WACfJ,cAAA,OAAKI,UAAU,WACfJ,cAAA,OAAKI,UAAU,WACfJ,cAAA,OAAKI,UAAU,iBACfJ,cAAA,OAAKI,UAAU,WACfJ,cAAA,OAAKI,UAAU,WACfJ,cAAA,OAAKI,UAAU,iBACfJ,cAAA,OAAKI,UAAU,WACfJ,cAAA,OAAKI,UAAU,aAGrB,CCRA,MAAMC,EAAY,CAChB,UACA,MACA,MACA,UACA,SACA,QACA,SACA,SAGF,SAASC,EAAWC,GAAe,IAAd,QAAEC,GAASD,EAC9B,OACEd,eAAA,OAAKW,UAAU,YAAWL,SAAA,CACxBC,cAAA,MAAII,UAAU,kCAAiCL,SAAC,eAChDC,cAAA,KAAGI,UAAU,+CAA8CL,SAAES,MAGnE,CAEA,SAASC,EAAYC,GAAgB,IAAf,SAAEC,GAAUD,EAChC,MAAM,aAAEE,GAAiBC,oBAAaC,cAC9BC,KAAMC,GAAiBJ,EAAa,YAAa,gBAEzD,OACEnB,eAAA,OAAKW,UAAU,YAAWL,SAAA,CACxBN,eAAA,KAAGW,UAAU,yBAAwBL,SAAA,CACnCC,cAAA,QAAMI,UAAU,YAAWL,SAAEY,IAAgB,oBAE/CX,cAAA,UACEiB,QAASA,IAAMD,IACfZ,UAAU,yJAAwJL,SACnK,kBAKP,CAEA,SAASmB,EAAgBC,GAAyB,IAAxB,QAAEX,EAAO,SAAEG,GAAUQ,EAC7C,OACE1B,eAAA,OAAKW,UAAU,2CAA0CL,SAAA,CACvDC,cAACM,EAAW,CAACE,QAASA,IACtBR,cAACS,EAAY,CAACE,SAAUA,MAG9B,CAEA,SAASS,EAASC,GAAe,IAAd,QAAEb,GAASa,EAC5B,MAAOC,EAAMC,GAAWC,WAAe,KACjC,aAAEZ,GAAiBC,oBAAaC,cAC9BC,KAAMU,GAAiBb,EAAa,YAAa,gBAEzD,OACEnB,eAAA,OAAKW,UAAU,yDAAwDL,SAAA,CACrEC,cAAA,MAAII,UAAU,qBAAoBL,SAAC,oBACnCN,eAAA,OAAKW,UAAU,YAAWL,SAAA,CACxBC,cAAA,SACE0B,KAAK,OACLC,YAAY,mBACZC,MAAON,EACPO,SAAWC,GAAMP,EAAQO,EAAEC,OAAOH,OAClCxB,UAAU,uGAEZJ,cAAA,UACEiB,QAASA,IAAMQ,EAAaH,GAC5BlB,UAAU,mIAAkIL,SAC7I,4BAMT,CAEA,SAASiC,EAAcC,GACrB,MAAMC,EAAO,IAAID,GAEjB,OADAC,EAAKC,MAAK,CAACC,EAAGC,IAAMA,EAAEC,MAAQF,EAAEE,QACzBJ,CACT,CAEA,SAASK,EAAOC,EAAMC,GACpB,MAAMC,EAAM,GACZ,IAAK,IAAIC,EAAIH,EAAMG,EAAIF,IAAME,EAC3BD,EAAIE,KAAKD,GAEX,OAAOD,CACT,CAEA,SAASG,EAAYlC,EAAU2B,GAC7B,OAAO3B,GAAY,EAAI2B,EAAQ,CACjC,CAEA,SAASQ,EAAeC,GAAmB,IAAlB,IAAEC,EAAG,OAAEC,GAAQF,EAClCpB,EAAc3B,cAACG,EAAO,IACtB+C,EAAQ,gBAQZ,MAPe,YAAXD,GACFtB,EAAc3B,cAACR,EAAK,IACpB0D,EAAQ,kBACY,UAAXD,IACTtB,EAAc3B,cAACE,EAAS,IACxBgD,EAAQ,gBAGRzD,eAAA,MAAIW,UAAW,+BAA+B8C,cAAkBnD,SAAA,CAC9DC,cAAA,OAAKI,UAAU,MAAKL,SAAE4B,IACtB3B,cAAA,OAAKI,UAAU,iBAAgBL,SAAEiD,MAGvC,CAEA,SAASG,EAAgBC,GAAoB,IAAnB,aAAEC,GAAcD,EACxC,MAAME,EAAW,IAAIC,OAAOC,QAAQH,IAEpC,OADAC,EAASG,UACc,GAAnBH,EAASI,OACJ1D,cAAA2D,WAAA,IAGP3D,cAAA,MAAII,UAAU,iCAAgCL,SAC3CuD,EAASM,KAAIC,IAAwB,IAAtBb,GAAK,OAAEC,IAASY,EAE9B,OADAC,QAAQC,IAAI,YAAaf,GAClBhD,cAAC8C,EAAe,CAAWE,IAAKA,EAAKC,OAAQA,GAAvBD,EAAiC,KAItE,CAEA,SAASgB,EAASC,GAAY,IAAX,KAAEC,GAAMD,EACzB,MAAM,aAAErD,GAAiBC,oBAAaC,cAC/BqD,EAAYC,GAAiB5C,WAAe,MAC7C,KAAET,GAASH,EAAa,YAAa,YAS3C,OACEnB,eAAA,OAAKW,UAAU,iCAAgCL,SAAA,CAC7CC,cAAA,SACE0B,KAAK,SACLE,MAAOuC,EACP/D,UAAU,4CACVyB,SAAWC,GAAMsC,EAActC,EAAEC,OAAOH,SAE1C5B,cAAA,UACEI,UAAU,6FACVa,QAASA,IAlBEoD,MACf,MAAMC,EAAMC,SAASJ,GACjBK,MAAMF,IAGVvD,EAAKmD,EAAMI,EAAI,EAaID,GAAWtE,SAC3B,gBAKP,CAEA,SAAS0E,EAASC,GAAuB,IAAtB,SAAE/D,EAAQ,MAAEgE,GAAOD,EACpC,MAAM,aAAEE,EAAY,aAAEhE,GAAiBC,oBAAaC,aAE9CmB,EAAY2C,EAAa,CAAC,cAAeC,GAC7CxE,EAAUuD,KAAI,CAACkB,EAAGnC,KAAC,CACjBuB,KAAMY,EACNxC,MAAOuC,EAAK,YAAa,YAAalC,GACtCoC,QAASF,EAAK,YAAa,UAAWC,UAGlC/D,KAAMiE,GAAYpE,EAAa,YAAa,WAEpD,OACEZ,cAAA,MAAII,UAAU,uDAAsDL,SACjEiC,EAAcC,GAAW2B,KAAIqB,IAAA,IAAC,KAAEf,EAAI,MAAE5B,EAAK,QAAEyC,GAASE,EAAA,OACrDxF,eAAA,MAAeW,UAAU,8BAA6BL,SAAA,CACpDC,cAAA,OAAKI,UAAU,iBAAgBL,SAAEmE,IACjCzE,eAAA,OAAKW,UAAU,8CAA6CL,SAAA,CAC1DN,eAAA,OAAKW,UAAU,qBAAoBL,SAAA,CACjCC,cAAA,QAAMI,UAAU,YAAWL,SAAEuC,IAAc,IACjC,GAATA,EAAa,OAAS,WAEzB7C,eAAA,OAAKW,UAAU,wCAAuCL,SAAA,CACnDwC,EAAO,EAAGwC,GAASnB,KAAKjB,GACvB3C,cAAA,OAEEI,UAAU,gEADLuC,KAIT3C,cAAA,UACEiB,QAASA,IAAM+D,EAAQd,GACvBgB,UAAWrC,EAAYlC,EAAUoE,GACjC3E,UAAW,qDACRyC,EAAYlC,EAAUoE,GAEnB,0CADA,0BAMXJ,EAAQ3E,cAACgE,EAAS,CAACE,KAAMA,IAAWlE,cAAA2D,WAAA,MAzB9BO,EA0BJ,KAIb,CAEe,SAASiB,IACtB,MAAM,QAAE3E,EAAO,aAAE6C,GAAiBxC,oBAAauE,iBAC5CC,IAAY,CACX7E,QAAS6E,EAAaC,SAAS,GAC/BjC,aAAcgC,EAAahC,kBAIzB,aAAEuB,GAAiB/D,oBAAaC,aAEhCH,EAAWiE,EAAa,YAAa,SAAUpE,GAE/CmE,EADWC,EAAa,YAAa,WAChBpE,EAE3B,OACEf,eAAA,OAAKW,UAAU,wFAAuFL,SAAA,CACpGN,eAAA,OAAKW,UAAU,YAAWL,SAAA,CACvB4E,EAAQ3E,cAACoB,EAAS,CAACZ,QAASA,IAAc,KAC3CR,cAACkB,EAAgB,CAACV,QAASA,EAASG,SAAUA,OAEhDlB,eAAA,OAAKW,UAAU,uCAAsCL,SAAA,CACnDC,cAACyE,EAAS,CAAC9D,SAAUA,EAAUgE,MAAOA,IACtC3E,cAACmD,EAAgB,CAACE,aAAcA,SAIxC,CC5OA,SAASkC,IACP,OACEvF,cAAA,OAAKI,UAAU,mHAAkHL,SAC/HC,cAAA,OAAKI,UAAU,OAAML,SAAC,iBAG5B,CAEe,SAASyF,EAAOC,GAC7B,OACEhG,eAAAkE,WAAA,CAAA5D,SAAA,CACEC,cAACuF,EAAG,IACJvF,cAAA,QAAAD,SAAO0F,EAAM1F,aAGnB,C,WCbe,SAAS2F,IACtB,OAAOjG,eAAA,OAAKW,UAAU,4DAA2DL,SAAA,CAC/EC,cAACG,EAAO,IACRV,eAAA,KAAAM,SAAA,CAAG,yCAEDC,cAAA,SAAM,mEAC0DA,cAAA,KAAAD,SAAG,aAAY,gBAIrF,CCFA,MAAM4F,EAAU,CACdC,UAAW,C,MACXC,KAAM,CACJC,SAAU,CACRpE,KAAM,KACNqE,IAAK,yBAKLC,EAAeC,wBAAcN,GAC7BO,EAAU,IAAIC,UAAQR,EAASK,GAErCI,IAASC,OACPrG,cAACwB,IAAM8E,WAAU,CAAAvG,SACfC,cAACwF,EAAM,CAAAzF,SACLC,cAACa,oBAAa0F,gBAAe,CAACL,QAASA,EAAQnG,SAC7CC,cAACa,oBAAa2F,YAAW,CAEvBC,MAAM,sBACNC,4BAA6B1G,cAAC0F,EAAO,IACrCiB,YAAa3G,cAAC0F,EAAO,IAAI3F,SAEzBC,cAACmF,EAAG,YAKZyB,SAASC,eAAe,Q","file":"static/js/main.2ffd29f7.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