diff --git a/React/src/components/Account.js b/React/src/components/Account.js index 109dc1c..c7dfcd6 100644 --- a/React/src/components/Account.js +++ b/React/src/components/Account.js @@ -9,40 +9,20 @@ import React, { Component } from 'react'; import { Tab, Tabs, TabList, TabPanel } from 'react-tabs'; import 'react-tabs/style/react-tabs.css'; -import {DepositTrx, withdrawTrx, ChangeUsername} from "../utils/tronweb"; +import {ChangeUsername} from "../utils/tronweb"; class Account extends React.Component { constructor(props) { super(props); this.state = { - DepositValue: 0, Username: "" }; - this.handleDepositChange = this.handleDepositChange.bind(this); - this.handleDepositSubmit = this.handleDepositSubmit.bind(this); - this.handleWithdrawSubmit = this.handleWithdrawSubmit.bind(this); - this.handleUserChange = this.handleUserChange.bind(this); this.handleUserSubmit = this.handleUserSubmit.bind(this); } - handleDepositChange(event) { - this.setState({DepositValue: event.target.value}); - } - - handleDepositSubmit(event) { - DepositTrx(this.state.DepositValue); - this.state.DepositValue = 0; - event.preventDefault(); - } - - handleWithdrawSubmit(event) { - withdrawTrx(true, 0); - this.state.WithdrawValue = 0; - event.preventDefault(); - } handleUserChange(event) { this.setState({Username: event.target.value}); @@ -66,8 +46,6 @@ class Account extends React.Component { Current User Information Update Username - Deposit Trx - Withdraw Trx @@ -76,8 +54,6 @@ class Account extends React.Component {

Current User Information

Username: {userData['UserName']} -

- Balance: {Number(userData['SunBalance'])/1000000} Trx

Address: {userData['TronAddress']}

@@ -107,38 +83,6 @@ class Account extends React.Component { - -
-

Deposit Trx

- -
- - -
- -
- -

- -

-
- -
-
- - -
-

Withdraw Trx

- -
- -

- -

-
-
-
- diff --git a/React/src/components/Donate.js b/React/src/components/Donate.js index bd67812..be0f533 100644 --- a/React/src/components/Donate.js +++ b/React/src/components/Donate.js @@ -48,6 +48,7 @@ class Donate extends React.Component {

Post Has Earned: {this.props.donation['TrxDonation']}Trx +

diff --git a/React/src/utils/tronweb.js b/React/src/utils/tronweb.js index cc6af7f..00b9480 100644 --- a/React/src/utils/tronweb.js +++ b/React/src/utils/tronweb.js @@ -23,8 +23,8 @@ const tronWebDefault = new TronWeb( //address of the contract // const contractAddress = "TGX6LGnhFgSUyG4oR7iU4bVTWUnMY9B7mP"; MAINNET -const contractAddress = "TEQebZr8wuhyYMLXCdWi6LQA7z2gN1fEfY" //Shasta -//const contractAddress = "TH4TJ961DbZ6fuJNf3gHwNgfwNcRxxYE6a"; // Quickstart +//const contractAddress = "TEQebZr8wuhyYMLXCdWi6LQA7z2gN1fEfY" //Shasta +const contractAddress = "TM2sSVEvbSGYjR5d6oS8cv529vqWZLF2h3"; // Quickstart function dynamicTronlink(){ @@ -366,77 +366,7 @@ export async function VoteOnComment(postid, commentid, votetype) { } -// DEPOSIT, DONATION and WITHDRAW SYSTEM -export async function DepositTrx(trxAmount) { - - //load the contract - const contract = await window.tronWeb.contract().at(contractAddress); - - //convert tron amount into a sun value as sun is used as the call value - let sunAmount = Number(trxAmount * 1000000) // 1 trx is 1 million sun, call value is in sun. - - //notify the user that the deposit has been attempted - Swal({title:'transaction to deposit ' + sunAmount.toString() + "Sun (" + trxAmount.toString() + " trx) has been sent", - type: 'info' - }); - - //submit the data to the blockchain - contract.deposit().send({ - shouldPollResponse:true, - callValue: sunAmount - - }).then(res => Swal({ - title:'Deposit Made Successfully', - type: 'success' - - })).catch(err => Swal( - { - title:'Deposit Failed', - type: 'error' - } - )); -} - -export async function withdrawTrx(takeAll, trxAmount) { - - //load the contract - const contract = await window.tronWeb.contract().at(contractAddress); - - //convert the postid into a useable form - let sunAmount = Number(trxAmount * 1000000) // 1 trx is 1 million sun, call value is in sun. - let sunHexValue = "0x" + Number(sunAmount).toString(16); - - //notify the user that the deposit has been attempted - if(takeAll == true){ - - Swal({title:'transaction to withdraw Current trx balance has been sent', - type: 'info' - }); - - }else { - - Swal({title:'transaction to withdraw ' + sunAmount.toString() + "Sun (" + trxAmount.toString() + " trx) has been sent", - type: 'info' - }); - - } - - //submit the data to the blockchain - contract.withdraw(tronWeb.toHex(takeAll), sunHexValue).send({ - shouldPollResponse:true, - callValue: 0 - - }).then(res => Swal({ - title:'Withdrawal Successful', - type: 'success' - - })).catch(err => Swal( - { - title:'Withdrawal Failed', - type: 'error' - } - )); -} +//DONATION SYSTEM export async function DonateTrx(postid, trxAmount) { @@ -449,15 +379,15 @@ export async function DonateTrx(postid, trxAmount) { let id = "0x" + Number(postid).toString(16); - Swal({title:'Transaction to Donate ' + trxAmount.toString() + "trx from your contract balance sent", + Swal({title:'Transaction to Donate ' + trxAmount.toString() + "trx sent", type: 'info' }); //submit the data to the blockchain - contract.makeDonation(id, sunHexValue).send({ + contract.makeDonation(id).send({ shouldPollResponse:true, - callValue: 0 + callValue: sunAmount }).then(res => Swal({ title:'Donation Successful', @@ -551,18 +481,17 @@ export async function getUserData() { let senderAddress = await contract.getSenderAddress().call(); let hexAdd = senderAddress; let add = tronWeb.address.fromHex(hexAdd); - - let ContractBalance = await contract.getBalance(hexAdd).call(); - let balance = tronWeb.toBigNumber(ContractBalance['_hex']).toNumber(); let ContractUsername = await contract.getUsername(hexAdd).call(); let username = hex2a(ContractUsername); + let balance = await tronWeb.trx.getBalance(add); + user = { TronAddress : add, HexAddress : "0x" + hexAdd, - SunBalance : balance, - UserName : username + UserName : username, + SunBalance : balance } localStorage.setItem("User", JSON.stringify(user)); diff --git a/Solidity/build/contracts/NoFilter.json b/Solidity/build/contracts/NoFilter.json index 9480816..f37a49a 100644 --- a/Solidity/build/contracts/NoFilter.json +++ b/Solidity/build/contracts/NoFilter.json @@ -81,40 +81,6 @@ "name": "CommentCreated", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "depositer", - "type": "address" - }, - { - "indexed": false, - "name": "value", - "type": "uint256" - } - ], - "name": "Deposited", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "taker", - "type": "address" - }, - { - "indexed": false, - "name": "value", - "type": "uint256" - } - ], - "name": "Withdrawal", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -434,49 +400,18 @@ "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [], - "name": "deposit", - "outputs": [], - "payable": true, - "stateMutability": "payable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "withdrawall", - "type": "bool" - }, - { - "name": "trxAmmount", - "type": "uint256" - } - ], - "name": "withdraw", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ { "name": "postId", "type": "uint256" - }, - { - "name": "donationValue", - "type": "uint256" } ], "name": "makeDonation", "outputs": [], - "payable": false, - "stateMutability": "nonpayable", + "payable": true, + "stateMutability": "payable", "type": "function" }, { @@ -498,25 +433,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": true, - "inputs": [ - { - "name": "user", - "type": "address" - } - ], - "name": "getBalance", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": false, "inputs": [ @@ -565,24 +481,24 @@ "type": "function" } ], - "bytecode": "0x608060405234801561001057600080fd5b5060008055611ad3806100246000396000f3006080604052600436106101275763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630cbe957e811461012c5780630d898f48146102035780630dad041e1461022d57806335c8d82b1461024557806342948e181461027657806349ad53ee146102b45780634e595e3a146102e8578063582e048814610303578063623560af1461031857806368b6883e146103335780637bc43f56146103955780637dc1aae4146103b05780637e6ab916146103cb578063984c0450146103e3578063a0a5c2b614610400578063a4245e671461041b578063c41a360a14610433578063ce43c0321461044b578063d0e30db014610479578063d121c61a14610481578063e6e5533314610499578063f8b2cb4f146104b1575b600080fd5b34801561013857600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261020194369492936024939284019190819084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a99988101979196509182019450925082915084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a9998810197919650918201945092508291508401838280828437509497506104df9650505050505050565b005b34801561020f57600080fd5b5061021b6004356107d3565b60408051918252519081900360200190f35b34801561023957600080fd5b506102016004356107e5565b34801561025157600080fd5b5061021b60043573ffffffffffffffffffffffffffffffffffffffff6024351661096a565b34801561028257600080fd5b5061028b61099c565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b3480156102c057600080fd5b5061021b60043560243573ffffffffffffffffffffffffffffffffffffffff604435166109a0565b3480156102f457600080fd5b506102016004356024356109dc565b34801561030f57600080fd5b5061021b610c70565b34801561032457600080fd5b50610201600435602435610c76565b34801561033f57600080fd5b506040805160206004803580820135601f8101849004840285018401909552848452610201943694929360249392840191908190840183828082843750949750508435955050506020909201359150610e499050565b3480156103a157600080fd5b506102016004356024356110ea565b3480156103bc57600080fd5b5061021b60043560243561137d565b3480156103d757600080fd5b5061021b60043561139a565b3480156103ef57600080fd5b5061020160043515156024356113ac565b34801561040c57600080fd5b5061021b6004356024356115e2565b34801561042757600080fd5b5061021b6004356115ff565b34801561043f57600080fd5b5061028b600435611611565b34801561045757600080fd5b5061021b73ffffffffffffffffffffffffffffffffffffffff60043516611639565b610201611661565b34801561048d57600080fd5b5061020160043561170d565b3480156104a557600080fd5b506102016004356118d5565b3480156104bd57600080fd5b5061021b73ffffffffffffffffffffffffffffffffffffffff60043516611a5f565b60008084511115156105405760408051600080516020611a88833981519152815260206004820152600d60248201527f496e76616c6964207469746c6500000000000000000000000000000000000000604482015290519081900360640190fd5b825160001061059e5760408051600080516020611a88833981519152815260206004820152600c60248201527f496e76616c696420746578740000000000000000000000000000000000000000604482015290519081900360640190fd5b81516000106105fc5760408051600080516020611a88833981519152815260206004820152600c60248201527f496e76616c696420746167730000000000000000000000000000000000000000604482015290519081900360640190fd5b5060008054808252600160208181526040808520805473ffffffffffffffffffffffffffffffffffffffff191633908117909155600283528186208490558086526004835281862085875283528186209390935580514281840181905260808083528851908301528751959687967fdc220f0be468e8336935034fc4829e5d0e772978345b486fa47d2d09bd32cc11958a9593948d948d949193849391840192606085019260a0860192908b01918190849084905b838110156106c95781810151838201526020016106b1565b50505050905090810190601f1680156106f65780820380516001836020036101000a031916815260200191505b50848103835286518152865160209182019188019080838360005b83811015610729578181015183820152602001610711565b50505050905090810190601f1680156107565780820380516001836020036101000a031916815260200191505b50848103825285518152855160209182019187019080838360005b83811015610789578181015183820152602001610771565b50505050905090810190601f1680156107b65780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390a3600101600055505050565b60009081526003602052604090205490565b6000808210156108445760408051600080516020611a88833981519152815260206004820152601d60248201527f766f746573206973206e6f7420666f7220612076616c696420706f7374000000604482015290519081900360640190fd5b60005482106108a25760408051600080516020611a88833981519152815260206004820181905260248201527f766f74657320697320666f722061206e6f6e206578697374656e7420706f7374604482015290519081900360640190fd5b50336000908152600460209081526040808320848452909152902054600281141561091c5760408051600080516020611a88833981519152815260206004820152601560248201527f646f776e766f746520616c726561647920646f6e650000000000000000000000604482015290519081900360640190fd5b806001141561093c57600082815260026020526040902080546000190190555b5033600090815260046020908152604080832093835292815282822060029055600390522080546001019055565b73ffffffffffffffffffffffffffffffffffffffff166000908152600460209081526040808320938352929052205490565b3390565b73ffffffffffffffffffffffffffffffffffffffff16600090815260096020908152604080832094835293815283822092825291909152205490565b6000821015610a3a5760408051600080516020611a88833981519152815260206004820152601d60248201527f766f746573206973206e6f7420666f7220612076616c696420706f7374000000604482015290519081900360640190fd5b6000548210610a985760408051600080516020611a88833981519152815260206004820181905260248201527f766f74657320697320666f722061206e6f6e206578697374656e7420706f7374604482015290519081900360640190fd5b6000811015610af65760408051600080516020611a88833981519152815260206004820152601760248201527f636f6d6d656e74206964206973206e6f742076616c6964000000000000000000604482015290519081900360640190fd5b600082815260056020526040902054811115610b615760408051600080516020611a88833981519152815260206004820152601a60248201527f636f6d6d656e74206964206973206e6f6e206578697374656e74000000000000604482015290519081900360640190fd5b336000908152600960209081526040808320858452825280832084845290915290205460011415610be15760408051600080516020611a88833981519152815260206004820152601360248201527f5570766f746520616c726561647920646f6e6500000000000000000000000000604482015290519081900360640190fd5b336000908152600960209081526040808320858452825280832084845290915290205460021415610c2e576000828152600860209081526040808320848452909152902080546000190190555b33600090815260096020908152604080832085845282528083208484528252808320600190819055948352600782528083209383529290522080549091019055565b60005490565b600080831015610cd55760408051600080516020611a88833981519152815260206004820152601d60248201527f766f746573206973206e6f7420666f7220612076616c696420706f7374000000604482015290519081900360640190fd5b6000548310610d335760408051600080516020611a88833981519152815260206004820181905260248201527f766f74657320697320666f722061206e6f6e206578697374656e7420706f7374604482015290519081900360640190fd5b60008211610d905760408051600080516020611a88833981519152815260206004820152601160248201527f6e6f2061747461636865642076616c7565000000000000000000000000000000604482015290519081900360640190fd5b336000908152600a6020526040902054821115610dac57600080fd5b50336000818152600a6020818152604080842080548790039055868452600182528084205473ffffffffffffffffffffffffffffffffffffffff16808552928252808420805487019055868452600b825292839020805486019055825142815290810186905282519193859390927fd7570171f3eec5b5e70a829a2f7b1a40853d0159967de2efe2bf99208b9a560d9281900390910190a3505050565b600080831015610ea85760408051600080516020611a88833981519152815260206004820152601f60248201527f636f6d6d656e74206973206e6f7420666f7220612076616c696420706f737400604482015290519081900360640190fd5b6000548310610f2c5760408051600080516020611a88833981519152815260206004820152602260248201527f636f6d6d656e7420697320666f722061206e6f6e206578697374656e7420706f60448201527f7374000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b8351600010610f8a5760408051600080516020611a88833981519152815260206004820152601860248201527f636f6d6d656e7420636f6d6d656e7420697320656d7074790000000000000000604482015290519081900360640190fd5b60056000848152602001908152602001600020549050823373ffffffffffffffffffffffffffffffffffffffff167f5c7252053e11b0d1b89164a47c163c5f5027f50b79dc32cc22920d6bc21e189a868542866040518080602001858152602001848152602001838152602001828103825286818151815260200191508051906020019080838360005b8381101561102c578181015183820152602001611014565b50505050905090810190601f1680156110595780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a360008381526006602090815260408083208484528252808320805473ffffffffffffffffffffffffffffffffffffffff19163390811790915586845260078352818420858552835281842060019081905590845260098352818420878552835281842085855283528184208190559583526005909152902092019091555050565b60008210156111485760408051600080516020611a88833981519152815260206004820152601d60248201527f766f746573206973206e6f7420666f7220612076616c696420706f7374000000604482015290519081900360640190fd5b60005482106111a65760408051600080516020611a88833981519152815260206004820181905260248201527f766f74657320697320666f722061206e6f6e206578697374656e7420706f7374604482015290519081900360640190fd5b60008110156112045760408051600080516020611a88833981519152815260206004820152601760248201527f636f6d6d656e74206964206973206e6f742076616c6964000000000000000000604482015290519081900360640190fd5b60008281526005602052604090205481111561126f5760408051600080516020611a88833981519152815260206004820152601a60248201527f636f6d6d656e74206964206973206e6f6e206578697374656e74000000000000604482015290519081900360640190fd5b3360009081526009602090815260408083208584528252808320848452909152902054600214156112ef5760408051600080516020611a88833981519152815260206004820152601360248201527f5570766f746520616c726561647920646f6e6500000000000000000000000000604482015290519081900360640190fd5b33600090815260096020908152604080832085845282528083208484529091529020546001141561133c576000828152600760209081526040808320848452909152902080546000190190555b336000908152600960209081526040808320858452825280832084845282528083206002905593825260088152838220928252919091522080546001019055565b600091825260076020908152604080842092845291905290205490565b60009081526002602052604090205490565b60006001831515141561149d5750336000908152600a60205260408120549081116114265760408051600080516020611a88833981519152815260206004820152601a60248201527f53656e64657220646f6573206e6f7420686176652066756e6473000000000000604482015290519081900360640190fd5b336000818152600a60205260408082208290555183156108fc0291849190818181858888f19350505050158015611461573d6000803e3d6000fd5b5060408051828152905133917f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65919081900360200190a26115dd565b600082116114fa5760408051600080516020611a88833981519152815260206004820152601860248201527f496e636f72726563742077697468647261772076616c75650000000000000000604482015290519081900360640190fd5b336000908152600a60205260409020548211156115665760408051600080516020611a88833981519152815260206004820152601f60248201527f617474656d7074696e6720746f20776974686472617720746f6f206d75636800604482015290519081900360640190fd5b336000818152600a6020526040808220805486900390555184156108fc0291859190818181858888f193505050501580156115a5573d6000803e3d6000fd5b5060408051838152905133917f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65919081900360200190a25b505050565b600091825260086020908152604080842092845291905290205490565b6000908152600b602052604090205490565b60009081526001602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff166000908152600d602052604090205490565b600034116116be5760408051600080516020611a88833981519152815260206004820152601160248201527f6e6f2061747461636865642076616c7565000000000000000000000000000000604482015290519081900360640190fd5b336000818152600a6020908152604091829020805434908101909155825190815291517f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c49281900390910190a2565b6000818152600c602052604081205460ff161561179f5760408051600080516020611a88833981519152815260206004820152602a60248201527f757365726e616d65206973207265676973746572656420746f20616e206f776e60448201527f657220616c726561647900000000000000000000000000000000000000000000606482015290519081900360840190fd5b50336000908152600d6020526040902054818114156118335760408051600080516020611a88833981519152815260206004820152602a60248201527f5468697320757365726e616d6520697320616c72656164792073657420746f2060448201527f7468652073656e64657200000000000000000000000000000000000000000000606482015290519081900360840190fd5b80151561186957336000908152600d60209081526040808320859055848352600c9091529020805460ff191660011790556118a4565b336000908152600d60209081526040808320859055848352600c909152808220805460ff199081166001179091558383529120805490911690555b604051829033907f98669deded710d3d7f0c348e87e0a023ce76d0784aa090cb348048e3f9c88a3490600090a35050565b6000808210156119345760408051600080516020611a88833981519152815260206004820152601d60248201527f766f746573206973206e6f7420666f7220612076616c696420706f7374000000604482015290519081900360640190fd5b60005482106119925760408051600080516020611a88833981519152815260206004820181905260248201527f766f74657320697320666f722061206e6f6e206578697374656e7420706f7374604482015290519081900360640190fd5b503360009081526004602090815260408083208484529091529020546001811415611a0c5760408051600080516020611a88833981519152815260206004820152601360248201527f5570766f746520616c726561647920646f6e6500000000000000000000000000604482015290519081900360640190fd5b8060021415611a2c57600082815260036020526040902080546000190190555b50336000908152600460209081526040808320938352928152828220600190819055600290915291902080549091019055565b73ffffffffffffffffffffffffffffffffffffffff166000908152600a602052604090205490560008c379a000000000000000000000000000000000000000000000000000000000a165627a7a723058200fb1100d97f0c7398a138c9b73c7c1876814903fb5155cd1a8169d23accbe4520029", - "deployedBytecode": "0x6080604052600436106101275763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630cbe957e811461012c5780630d898f48146102035780630dad041e1461022d57806335c8d82b1461024557806342948e181461027657806349ad53ee146102b45780634e595e3a146102e8578063582e048814610303578063623560af1461031857806368b6883e146103335780637bc43f56146103955780637dc1aae4146103b05780637e6ab916146103cb578063984c0450146103e3578063a0a5c2b614610400578063a4245e671461041b578063c41a360a14610433578063ce43c0321461044b578063d0e30db014610479578063d121c61a14610481578063e6e5533314610499578063f8b2cb4f146104b1575b600080fd5b34801561013857600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261020194369492936024939284019190819084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a99988101979196509182019450925082915084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a9998810197919650918201945092508291508401838280828437509497506104df9650505050505050565b005b34801561020f57600080fd5b5061021b6004356107d3565b60408051918252519081900360200190f35b34801561023957600080fd5b506102016004356107e5565b34801561025157600080fd5b5061021b60043573ffffffffffffffffffffffffffffffffffffffff6024351661096a565b34801561028257600080fd5b5061028b61099c565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b3480156102c057600080fd5b5061021b60043560243573ffffffffffffffffffffffffffffffffffffffff604435166109a0565b3480156102f457600080fd5b506102016004356024356109dc565b34801561030f57600080fd5b5061021b610c70565b34801561032457600080fd5b50610201600435602435610c76565b34801561033f57600080fd5b506040805160206004803580820135601f8101849004840285018401909552848452610201943694929360249392840191908190840183828082843750949750508435955050506020909201359150610e499050565b3480156103a157600080fd5b506102016004356024356110ea565b3480156103bc57600080fd5b5061021b60043560243561137d565b3480156103d757600080fd5b5061021b60043561139a565b3480156103ef57600080fd5b5061020160043515156024356113ac565b34801561040c57600080fd5b5061021b6004356024356115e2565b34801561042757600080fd5b5061021b6004356115ff565b34801561043f57600080fd5b5061028b600435611611565b34801561045757600080fd5b5061021b73ffffffffffffffffffffffffffffffffffffffff60043516611639565b610201611661565b34801561048d57600080fd5b5061020160043561170d565b3480156104a557600080fd5b506102016004356118d5565b3480156104bd57600080fd5b5061021b73ffffffffffffffffffffffffffffffffffffffff60043516611a5f565b60008084511115156105405760408051600080516020611a88833981519152815260206004820152600d60248201527f496e76616c6964207469746c6500000000000000000000000000000000000000604482015290519081900360640190fd5b825160001061059e5760408051600080516020611a88833981519152815260206004820152600c60248201527f496e76616c696420746578740000000000000000000000000000000000000000604482015290519081900360640190fd5b81516000106105fc5760408051600080516020611a88833981519152815260206004820152600c60248201527f496e76616c696420746167730000000000000000000000000000000000000000604482015290519081900360640190fd5b5060008054808252600160208181526040808520805473ffffffffffffffffffffffffffffffffffffffff191633908117909155600283528186208490558086526004835281862085875283528186209390935580514281840181905260808083528851908301528751959687967fdc220f0be468e8336935034fc4829e5d0e772978345b486fa47d2d09bd32cc11958a9593948d948d949193849391840192606085019260a0860192908b01918190849084905b838110156106c95781810151838201526020016106b1565b50505050905090810190601f1680156106f65780820380516001836020036101000a031916815260200191505b50848103835286518152865160209182019188019080838360005b83811015610729578181015183820152602001610711565b50505050905090810190601f1680156107565780820380516001836020036101000a031916815260200191505b50848103825285518152855160209182019187019080838360005b83811015610789578181015183820152602001610771565b50505050905090810190601f1680156107b65780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390a3600101600055505050565b60009081526003602052604090205490565b6000808210156108445760408051600080516020611a88833981519152815260206004820152601d60248201527f766f746573206973206e6f7420666f7220612076616c696420706f7374000000604482015290519081900360640190fd5b60005482106108a25760408051600080516020611a88833981519152815260206004820181905260248201527f766f74657320697320666f722061206e6f6e206578697374656e7420706f7374604482015290519081900360640190fd5b50336000908152600460209081526040808320848452909152902054600281141561091c5760408051600080516020611a88833981519152815260206004820152601560248201527f646f776e766f746520616c726561647920646f6e650000000000000000000000604482015290519081900360640190fd5b806001141561093c57600082815260026020526040902080546000190190555b5033600090815260046020908152604080832093835292815282822060029055600390522080546001019055565b73ffffffffffffffffffffffffffffffffffffffff166000908152600460209081526040808320938352929052205490565b3390565b73ffffffffffffffffffffffffffffffffffffffff16600090815260096020908152604080832094835293815283822092825291909152205490565b6000821015610a3a5760408051600080516020611a88833981519152815260206004820152601d60248201527f766f746573206973206e6f7420666f7220612076616c696420706f7374000000604482015290519081900360640190fd5b6000548210610a985760408051600080516020611a88833981519152815260206004820181905260248201527f766f74657320697320666f722061206e6f6e206578697374656e7420706f7374604482015290519081900360640190fd5b6000811015610af65760408051600080516020611a88833981519152815260206004820152601760248201527f636f6d6d656e74206964206973206e6f742076616c6964000000000000000000604482015290519081900360640190fd5b600082815260056020526040902054811115610b615760408051600080516020611a88833981519152815260206004820152601a60248201527f636f6d6d656e74206964206973206e6f6e206578697374656e74000000000000604482015290519081900360640190fd5b336000908152600960209081526040808320858452825280832084845290915290205460011415610be15760408051600080516020611a88833981519152815260206004820152601360248201527f5570766f746520616c726561647920646f6e6500000000000000000000000000604482015290519081900360640190fd5b336000908152600960209081526040808320858452825280832084845290915290205460021415610c2e576000828152600860209081526040808320848452909152902080546000190190555b33600090815260096020908152604080832085845282528083208484528252808320600190819055948352600782528083209383529290522080549091019055565b60005490565b600080831015610cd55760408051600080516020611a88833981519152815260206004820152601d60248201527f766f746573206973206e6f7420666f7220612076616c696420706f7374000000604482015290519081900360640190fd5b6000548310610d335760408051600080516020611a88833981519152815260206004820181905260248201527f766f74657320697320666f722061206e6f6e206578697374656e7420706f7374604482015290519081900360640190fd5b60008211610d905760408051600080516020611a88833981519152815260206004820152601160248201527f6e6f2061747461636865642076616c7565000000000000000000000000000000604482015290519081900360640190fd5b336000908152600a6020526040902054821115610dac57600080fd5b50336000818152600a6020818152604080842080548790039055868452600182528084205473ffffffffffffffffffffffffffffffffffffffff16808552928252808420805487019055868452600b825292839020805486019055825142815290810186905282519193859390927fd7570171f3eec5b5e70a829a2f7b1a40853d0159967de2efe2bf99208b9a560d9281900390910190a3505050565b600080831015610ea85760408051600080516020611a88833981519152815260206004820152601f60248201527f636f6d6d656e74206973206e6f7420666f7220612076616c696420706f737400604482015290519081900360640190fd5b6000548310610f2c5760408051600080516020611a88833981519152815260206004820152602260248201527f636f6d6d656e7420697320666f722061206e6f6e206578697374656e7420706f60448201527f7374000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b8351600010610f8a5760408051600080516020611a88833981519152815260206004820152601860248201527f636f6d6d656e7420636f6d6d656e7420697320656d7074790000000000000000604482015290519081900360640190fd5b60056000848152602001908152602001600020549050823373ffffffffffffffffffffffffffffffffffffffff167f5c7252053e11b0d1b89164a47c163c5f5027f50b79dc32cc22920d6bc21e189a868542866040518080602001858152602001848152602001838152602001828103825286818151815260200191508051906020019080838360005b8381101561102c578181015183820152602001611014565b50505050905090810190601f1680156110595780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a360008381526006602090815260408083208484528252808320805473ffffffffffffffffffffffffffffffffffffffff19163390811790915586845260078352818420858552835281842060019081905590845260098352818420878552835281842085855283528184208190559583526005909152902092019091555050565b60008210156111485760408051600080516020611a88833981519152815260206004820152601d60248201527f766f746573206973206e6f7420666f7220612076616c696420706f7374000000604482015290519081900360640190fd5b60005482106111a65760408051600080516020611a88833981519152815260206004820181905260248201527f766f74657320697320666f722061206e6f6e206578697374656e7420706f7374604482015290519081900360640190fd5b60008110156112045760408051600080516020611a88833981519152815260206004820152601760248201527f636f6d6d656e74206964206973206e6f742076616c6964000000000000000000604482015290519081900360640190fd5b60008281526005602052604090205481111561126f5760408051600080516020611a88833981519152815260206004820152601a60248201527f636f6d6d656e74206964206973206e6f6e206578697374656e74000000000000604482015290519081900360640190fd5b3360009081526009602090815260408083208584528252808320848452909152902054600214156112ef5760408051600080516020611a88833981519152815260206004820152601360248201527f5570766f746520616c726561647920646f6e6500000000000000000000000000604482015290519081900360640190fd5b33600090815260096020908152604080832085845282528083208484529091529020546001141561133c576000828152600760209081526040808320848452909152902080546000190190555b336000908152600960209081526040808320858452825280832084845282528083206002905593825260088152838220928252919091522080546001019055565b600091825260076020908152604080842092845291905290205490565b60009081526002602052604090205490565b60006001831515141561149d5750336000908152600a60205260408120549081116114265760408051600080516020611a88833981519152815260206004820152601a60248201527f53656e64657220646f6573206e6f7420686176652066756e6473000000000000604482015290519081900360640190fd5b336000818152600a60205260408082208290555183156108fc0291849190818181858888f19350505050158015611461573d6000803e3d6000fd5b5060408051828152905133917f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65919081900360200190a26115dd565b600082116114fa5760408051600080516020611a88833981519152815260206004820152601860248201527f496e636f72726563742077697468647261772076616c75650000000000000000604482015290519081900360640190fd5b336000908152600a60205260409020548211156115665760408051600080516020611a88833981519152815260206004820152601f60248201527f617474656d7074696e6720746f20776974686472617720746f6f206d75636800604482015290519081900360640190fd5b336000818152600a6020526040808220805486900390555184156108fc0291859190818181858888f193505050501580156115a5573d6000803e3d6000fd5b5060408051838152905133917f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65919081900360200190a25b505050565b600091825260086020908152604080842092845291905290205490565b6000908152600b602052604090205490565b60009081526001602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff166000908152600d602052604090205490565b600034116116be5760408051600080516020611a88833981519152815260206004820152601160248201527f6e6f2061747461636865642076616c7565000000000000000000000000000000604482015290519081900360640190fd5b336000818152600a6020908152604091829020805434908101909155825190815291517f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c49281900390910190a2565b6000818152600c602052604081205460ff161561179f5760408051600080516020611a88833981519152815260206004820152602a60248201527f757365726e616d65206973207265676973746572656420746f20616e206f776e60448201527f657220616c726561647900000000000000000000000000000000000000000000606482015290519081900360840190fd5b50336000908152600d6020526040902054818114156118335760408051600080516020611a88833981519152815260206004820152602a60248201527f5468697320757365726e616d6520697320616c72656164792073657420746f2060448201527f7468652073656e64657200000000000000000000000000000000000000000000606482015290519081900360840190fd5b80151561186957336000908152600d60209081526040808320859055848352600c9091529020805460ff191660011790556118a4565b336000908152600d60209081526040808320859055848352600c909152808220805460ff199081166001179091558383529120805490911690555b604051829033907f98669deded710d3d7f0c348e87e0a023ce76d0784aa090cb348048e3f9c88a3490600090a35050565b6000808210156119345760408051600080516020611a88833981519152815260206004820152601d60248201527f766f746573206973206e6f7420666f7220612076616c696420706f7374000000604482015290519081900360640190fd5b60005482106119925760408051600080516020611a88833981519152815260206004820181905260248201527f766f74657320697320666f722061206e6f6e206578697374656e7420706f7374604482015290519081900360640190fd5b503360009081526004602090815260408083208484529091529020546001811415611a0c5760408051600080516020611a88833981519152815260206004820152601360248201527f5570766f746520616c726561647920646f6e6500000000000000000000000000604482015290519081900360640190fd5b8060021415611a2c57600082815260036020526040902080546000190190555b50336000908152600460209081526040808320938352928152828220600190819055600290915291902080549091019055565b73ffffffffffffffffffffffffffffffffffffffff166000908152600a602052604090205490560008c379a000000000000000000000000000000000000000000000000000000000a165627a7a723058200fb1100d97f0c7398a138c9b73c7c1876814903fb5155cd1a8169d23accbe4520029", - "sourceMap": "434:11890:1:-;;;1876:55;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1922:1:1;1909:14;;434:11890;;;;;;", - "deployedSourceMap": "434:11890:1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2409:774;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2409:774:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;2409:774:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2409:774:1;;;;-1:-1:-1;2409:774:1;-1:-1:-1;2409:774:1;;-1:-1:-1;2409:774:1;;;;;;;;-1:-1:-1;;2409:774:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2409:774:1;;;;-1:-1:-1;2409:774:1;-1:-1:-1;2409:774:1;;-1:-1:-1;2409:774:1;;;;;;;;-1:-1:-1;2409:774:1;;-1:-1:-1;2409:774:1;;-1:-1:-1;;;;;;;2409:774:1;;;4486:105;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;4486:105:1;;;;;;;;;;;;;;;;;;;;;3860:455;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3860:455:1;;;;;4629:124;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;4629:124:1;;;;;;;;;12227:94;;8:9:-1;5:2;;;30:1;27;20:12;5:2;12227:94:1;;;;;;;;;;;;;;;;;;;;;;;7777:173;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;7777:173:1;;;;;;;;;;;5915:698;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;5915:698:1;;;;;;;7996:89;;8:9:-1;5:2;;;30:1;27;20:12;5:2;7996:89:1;;;;9547:648;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;9547:648:1;;;;;;;5068:813;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;5068:813:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;5068:813:1;;-1:-1:-1;;5068:813:1;;;-1:-1:-1;;;5068:813:1;;;;;;-1:-1:-1;5068:813:1;;-1:-1:-1;5068:813:1;6649:708;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;6649:708:1;;;;;;;7402:142;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;7402:142:1;;;;;;;4352:101;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;4352:101:1;;;;;8674:798;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;8674:798:1;;;;;;;;;7585:146;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;7585:146:1;;;;;;;10437:112;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;10437:112:1;;;;;3226:105;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3226:105:1;;;;;12069:106;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;12069:106:1;;;;;;;8315:188;;;;11063:943;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;11063:943:1;;;;;3365:459;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3365:459:1;;;;;10585:101;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;10585:101:1;;;;;;;2409:774;2701:11;2559:1;2544:5;:12;:16;2536:42;;;;;;;-1:-1:-1;;;;;;;;;;;2536:42:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;2597:11;;2611:1;-1:-1:-1;2589:40:1;;;;;-1:-1:-1;;;;;;;;;;;2589:40:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;2648:11;;2662:1;-1:-1:-1;2640:40:1;;;;;-1:-1:-1;;;;;;;;;;;2640:40:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2715:10:1;;;2796:18;;;:10;:18;;;;;;;;:31;;-1:-1:-1;;2796:31:1;2817:10;2796:31;;;;;;2912:7;:15;;;;;:19;;;2942:18;;;:6;:18;;;;;:26;;;;;;;;:30;;;;3076:55;;3114:3;3076:55;;;;;;;;;;;;;;;;;;2715:10;;;;3076:55;;3108:4;;3114:3;;3119:5;;3126:4;;3076:55;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;3076:55:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3076:55:1;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;3076:55:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3076:55:1;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;3076:55:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3174:1;3165:10;3152;:23;-1:-1:-1;;;2409:774:1:o;4486:105::-;4542:4;4566:17;;;:9;:17;;;;;;;4486:105::o;3860:455::-;4054:14;3921:11;;;;3913:53;;;;;-1:-1:-1;;;;;;;;;;;3913:53:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;3994:10;;3985:19;;3977:64;;;;;-1:-1:-1;;;;;;;;;;;3977:64:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4078:10:1;4071:18;;;;:6;:18;;;;;;;;:26;;;;;;;;;4129:1;4116:14;;;4108:48;;;;;-1:-1:-1;;;;;;;;;;;4108:48:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;4171:9;4184:1;4171:14;4167:67;;;4202:15;;;;:7;:15;;;;;:20;;-1:-1:-1;;4202:20:1;;;4167:67;-1:-1:-1;4251:10:1;4244:18;;;;:6;:18;;;;;;;;:26;;;;;;;;;4273:1;4244:30;;4285:9;:17;;;:22;;4306:1;4285:22;;;3860:455::o;4629:124::-;4724:13;;4700:4;4724:13;;;:6;:13;;;;;;;;:21;;;;;;;;;4629:124::o;12227:94::-;12303:10;12227:94;:::o;7777:173::-;7899:24;;7875:4;7899:24;;;:13;:24;;;;;;;;:32;;;;;;;;;:43;;;;;;;;;;7777:173::o;5915:698::-;6003:1;5993:11;;;5985:53;;;;;-1:-1:-1;;;;;;;;;;;5985:53:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;6066:10;;6057:19;;6049:64;;;;;-1:-1:-1;;;;;;;;;;;6049:64:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6155:1;6142:14;;;6134:50;;;;;-1:-1:-1;;;;;;;;;;;6134:50:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;6216:22;;;;:14;:22;;;;;;6203:35;;;6195:74;;;;;-1:-1:-1;;;;;;;;;;;6195:74:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;6302:10;6288:25;;;;:13;:25;;;;;;;;:33;;;;;;;;:44;;;;;;;;;6336:1;6288:49;;6280:81;;;;;-1:-1:-1;;;;;;;;;;;6280:81:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;6392:10;6378:25;;;;:13;:25;;;;;;;;:33;;;;;;;;:44;;;;;;;;;6426:1;6378:49;6374:122;;;6444:24;;;;:16;:24;;;;;;;;:35;;;;;;;;:40;;-1:-1:-1;;6444:40:1;;;6374:122;6522:10;6508:25;;;;:13;:25;;;;;;;;:33;;;;;;;;:44;;;;;;;;6555:1;6508:48;;;;6567:22;;;:14;:22;;;;;:33;;;;;;;:38;;;;;;;5915:698::o;7996:89::-;8043:4;8067:10;7996:89;:::o;9547:648::-;9994:13;9638:11;;;;9630:53;;;;;-1:-1:-1;;;;;;;;;;;9630:53:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;9711:10;;9702:19;;9694:64;;;;;-1:-1:-1;;;;;;;;;;;9694:64:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9803:1;9787:17;;9779:47;;;;;-1:-1:-1;;;;;;;;;;;9779:47:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;9871:10;9862:20;;;;:8;:20;;;;;;9845:37;;;9837:46;;;;;;-1:-1:-1;9923:10:1;9914:20;;;;:8;:20;;;;;;;;:37;;;;;;;10010:18;;;-1:-1:-1;10010:18:1;;;;;;9914:20;10010:18;10039:15;;;;;;;;;:32;;;;;;10082:20;;;:12;:20;;;;;;:37;;;;;;10135:52;;10175:3;10135:52;;;;;;;;;;10010:18;;9938:13;;9923:10;;10135:52;;;;;;;;;;9547:648;;;:::o;5068:813::-;5400:14;5160:11;;;;5152:55;;;;;-1:-1:-1;;;;;;;;;;;5152:55:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;5235:10;;5226:19;;5218:66;;;;;-1:-1:-1;;;;;;;;;;;5218:66:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5303:11;;5317:1;-1:-1:-1;5295:52:1;;;;;-1:-1:-1;;;;;;;;;;;5295:52:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;5417:14;:22;5432:6;5417:22;;;;;;;;;;;;5400:39;;5514:6;5502:10;5487:71;;;5522:4;5528:13;5543:3;5548:9;5487:71;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;5487:71:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5581:20;;;;:12;:20;;;;;;;;:31;;;;;;;;:44;;-1:-1:-1;;5581:44:1;5615:10;5581:44;;;;;;5679:22;;;:14;:22;;;;;:33;;;;;;;;5581:44;5679:37;;;;5727:25;;;:13;:25;;;;;:33;;;;;;;;:44;;;;;;;;:48;;;5835:22;;;:14;:22;;;;;5860:13;;5835:38;;;-1:-1:-1;;5068:813:1:o;6649:708::-;6739:1;6729:11;;;6721:53;;;;;-1:-1:-1;;;;;;;;;;;6721:53:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;6802:10;;6793:19;;6785:64;;;;;-1:-1:-1;;;;;;;;;;;6785:64:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6891:1;6878:14;;;6870:50;;;;;-1:-1:-1;;;;;;;;;;;6870:50:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;6952:22;;;;:14;:22;;;;;;6939:35;;;6931:74;;;;;-1:-1:-1;;;;;;;;;;;6931:74:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;7038:10;7024:25;;;;:13;:25;;;;;;;;:33;;;;;;;;:44;;;;;;;;;7072:1;7024:49;;7016:81;;;;;-1:-1:-1;;;;;;;;;;;7016:81:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;7136:10;7122:25;;;;:13;:25;;;;;;;;:33;;;;;;;;:44;;;;;;;;;7170:1;7122:49;7118:120;;;7188:22;;;;:14;:22;;;;;;;;:33;;;;;;;;:38;;-1:-1:-1;;7188:38:1;;;7118:120;7264:10;7250:25;;;;:13;:25;;;;;;;;:33;;;;;;;;:44;;;;;;;;7297:1;7250:48;;7309:24;;;:16;:24;;;;;:35;;;;;;;;:40;;7348:1;7309:40;;;6649:708::o;7402:142::-;7479:4;7503:22;;;:14;:22;;;;;;;;:33;;;;;;;;;;7402:142::o;4352:101::-;4406:4;4430:15;;;:7;:15;;;;;;;4352:101::o;8674:798::-;8846:12;8826:4;8811:19;;;;8808:657;;;-1:-1:-1;8870:10:1;8861:20;;;;:8;:20;;;;;;;8904:11;;8896:50;;;;;-1:-1:-1;;;;;;;;;;;8896:50:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;8970:10;8984:1;8961:20;;;:8;:20;;;;;;:24;;;9000:28;;;;;;9020:7;;9000:28;;8984:1;9000:28;9020:7;8970:10;9000:28;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;9048:31:1;;;;;;;;9059:10;;9048:31;;;;;;;;;;8808:657;;;9181:1;9168:14;;9160:51;;;;;-1:-1:-1;;;;;;;;;;;9160:51:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;9243:10;9234:20;;;;:8;:20;;;;;;:34;-1:-1:-1;9234:34:1;9226:78;;;;;-1:-1:-1;;;;;;;;;;;9226:78:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;9328:10;9319:20;;;;:8;:20;;;;;;:34;;;;;;;9368:31;;;;;;9343:10;;9368:31;;9319:20;9368:31;9343:10;9328;9368:31;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;9419:34:1;;;;;;;;9430:10;;9419:34;;;;;;;;;;8808:657;8674:798;;;:::o;7585:146::-;7664:4;7688:24;;;:16;:24;;;;;;;;:35;;;;;;;;;;7585:146::o;10437:112::-;10497:4;10521:20;;;:12;:20;;;;;;;10437:112::o;3226:105::-;3278:7;3305:18;;;:10;:18;;;;;;;;;3226:105::o;12069:106::-;12152:15;;12125:7;12152:15;;;:9;:15;;;;;;;12069:106::o;8315:188::-;8380:1;8368:9;:13;8360:43;;;;;-1:-1:-1;;;;;;;;;;;8360:43:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;8423:10;8414:20;;;;:8;:20;;;;;;;;;:33;;8438:9;8414:33;;;;;;8463:32;;;;;;;;;;;;;;;;;8315:188::o;11063:943::-;11240:23;11139:24;;;:14;:24;;;;;;;;:33;11130:89;;;;;-1:-1:-1;;;;;;;;;;;11130:89:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;11276:10:1;11266:21;;;;:9;:21;;;;;;11306:27;;;;11298:82;;;;;-1:-1:-1;;;;;;;;;;;11298:82:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11464:22;;11461:397;;;11512:10;11502:21;;;;:9;:21;;;;;;;;:32;;;11549:24;;;:14;:24;;;;;:31;;-1:-1:-1;;11549:31:1;11576:4;11549:31;;;11461:397;;;11724:10;11714:21;;;;:9;:21;;;;;;;;:32;;;11761:24;;;:14;:24;;;;;;:31;;-1:-1:-1;;11761:31:1;;;11788:4;11761:31;;;;11807;;;;;:39;;;;;;;11461:397;11951:37;;11979:8;;11967:10;;11951:37;;;;;11063:943;;:::o;3365:459::-;3565:14;3424:11;;;;3416:53;;;;;-1:-1:-1;;;;;;;;;;;3416:53:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;3497:10;;3488:19;;3480:64;;;;;-1:-1:-1;;;;;;;;;;;3480:64:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3589:10:1;3582:18;;;;:6;:18;;;;;;;;:26;;;;;;;;;3640:1;3627:14;;;3619:46;;;;;-1:-1:-1;;;;;;;;;;;3619:46:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;3680:9;3693:1;3680:14;3676:69;;;3711:17;;;;:9;:17;;;;;:22;;-1:-1:-1;;3711:22:1;;;3676:69;-1:-1:-1;3762:10:1;3755:18;;;;:6;:18;;;;;;;;:26;;;;;;;;;3784:1;3755:30;;;;3796:7;:15;;;;;;:20;;;;;;;3365:459::o;10585:101::-;10664:14;;10640:4;10664:14;;;:8;:14;;;;;;;10585:101::o", - "source": "pragma solidity >=0.4.23;\r\n\r\n//No Filter is a dApp created for the Tron Accelerator\r\n//The smart contract enables content creation\r\n//as well as metric tracking and other logic\r\n//When coupled with the frontend, it creates an experience similar to a \r\n//traditional blog style social website such as medium and reddit\r\n//Created By Harnick Khera (Github.com/Hephyrius)\r\n//Repository can be found at (Github.com/Hephyrius/Nofilter)\r\n\r\ncontract NoFilter {\r\n \r\n //post related variables\r\n uint postNumber; // keeps track of posts so that every one is unique\r\n mapping (uint => address) postOwners; //Keeps track of who owns a specific post\r\n mapping (uint => uint) upvotes; // keeps track of a posts vote counter\r\n mapping (uint => uint) downvotes; // keeps track of a posts vote counter\r\n mapping (address => mapping(uint => uint)) voters; //keeps track of a users voting history, helps to prevent vote spamming from a single account\r\n \r\n //comment related variables\r\n mapping (uint => uint) commentCounter; // keeps track of posts so that every one is unique\r\n mapping (uint => mapping(uint => address)) commentOwner; //Keeps track of who owns a specific post\r\n mapping (uint => mapping(uint => uint)) commentUpVotes; // keeps track of a posts vote counter\r\n mapping (uint => mapping(uint => uint)) commentDownVotes; // keeps track of a posts vote counter\r\n mapping (address => mapping(uint => mapping(uint => uint))) commentVoters; //keeps track of a users voting history, helps to prevent vote spamming from a single account\r\n \r\n //Donation System\r\n mapping (address => uint) balances;\r\n mapping (uint => uint) postEarnings;\r\n //mapping (uint => mapping(uint => uint)) commentEarnings;\r\n \r\n //username System\r\n mapping (bytes32 => bool) usernamesTaken;\r\n mapping (address => bytes32) usernames;\r\n \r\n constructor () public {\r\n postNumber = 0;\r\n }\r\n \r\n //Invoked when the post has been created, so that the dApp can access the content\r\n event PostContent (\r\n address indexed author,\r\n uint indexed id,\r\n bytes tags,\r\n uint postTimestamp, //used to generate private post unique key\r\n bytes title,\r\n bytes text\r\n );\r\n \r\n //create a new post, done by storing data in the logs. data can be in any form as long as it is byte data. This means data can be compressed\r\n function CreatePost(bytes title, bytes text, bytes tags) public {\r\n \r\n //check that the data is correct\r\n require(title.length > 0, \"Invalid title\");\r\n require(text.length > 0, \"Invalid text\");\r\n require(tags.length > 0, \"Invalid tags\");\r\n \r\n uint postId = postNumber;\r\n //init the mapping and set the owner as the sender\r\n postOwners[postId] = msg.sender;\r\n \r\n //init votes so that the owner has upvoted by default.\r\n upvotes[postId] = 1;\r\n voters[msg.sender][postId] = 1;\r\n \r\n //posts are stored in logs, it allows to reduce post invocation cost\r\n emit PostContent(msg.sender, postId, tags, now, title, text);\r\n \r\n postNumber = postId + 1;\r\n }\r\n \r\n //get the owner of a post\r\n function getOwner(uint postId) public view returns (address) {\r\n return postOwners[postId];\r\n }\r\n \r\n //upvote a post \r\n function UpvotePost(uint postId) public {\r\n require(postId >= 0, \"votes is not for a valid post\");\r\n require(postId < postNumber, \"votes is for a non existent post\");\r\n \r\n uint knownType = voters[msg.sender][postId];\r\n require(knownType != 1, \"Upvote already done\");\r\n if (knownType == 2) {\r\n downvotes[postId] -= 1;\r\n }\r\n voters[msg.sender][postId] = 1;\r\n upvotes[postId] += 1;\r\n }\r\n \r\n //downvote a post \r\n function DownvotePost(uint postId) public {\r\n require(postId >= 0, \"votes is not for a valid post\");\r\n require(postId < postNumber, \"votes is for a non existent post\");\r\n\r\n uint knownType = voters[msg.sender][postId];\r\n require(knownType != 2, \"downvote already done\");\r\n if (knownType == 1) {\r\n upvotes[postId] -= 1;\r\n }\r\n voters[msg.sender][postId] = 2;\r\n downvotes[postId] += 1;\r\n }\r\n \r\n //get the vote data\r\n function getUpVotes(uint postId) public view returns (uint) {\r\n return upvotes[postId];\r\n }\r\n\r\n //get the vote data\r\n function getDownVotes(uint postId) public view returns (uint) {\r\n return downvotes[postId];\r\n }\r\n \r\n //get the voter data\r\n function getVoterData(uint postId, address voter) public view returns (uint) {\r\n return voters[voter][postId];\r\n }\r\n\r\n /////////// Comment functionality\r\n\r\n //stores a log comment on the blockchain when commented\r\n event CommentCreated (\r\n address indexed commenter,\r\n uint indexed postId,\r\n bytes comment,\r\n uint parentComment,\r\n\t\tuint commentTimestamp,\r\n\t\tuint commentId\r\n );\r\n \r\n function PostComment(bytes text, uint postId, uint parentComment) public {\r\n require(postId >= 0, \"comment is not for a valid post\");\r\n require(postId < postNumber, \"comment is for a non existent post\");\r\n require(text.length > 0, \"comment comment is empty\");\r\n\t\t\r\n\t\t//update comment related variables\r\n uint commentId = commentCounter[postId];\r\n\t\t\r\n\t\t//emit to the blockchain\r\n emit CommentCreated(msg.sender, postId, text, parentComment, now, commentId);\r\n \r\n\r\n commentOwner[postId][commentId] = msg.sender;\r\n \r\n //deal with upvote data\r\n commentUpVotes[postId][commentId] = 1;\r\n commentVoters[msg.sender][postId][commentId] = 1;\r\n \r\n //increment counter when done\r\n commentCounter[postId] = commentId + 1;\r\n }\r\n \r\n //upvote a post \r\n function UpvoteComment(uint postId, uint commendId) public {\r\n require(postId >= 0, \"votes is not for a valid post\");\r\n require(postId < postNumber, \"votes is for a non existent post\");\r\n \r\n require(commendId >= 0, \"comment id is not valid\");\r\n require(commendId <= commentCounter[postId], \"comment id is non existent\");\r\n require(commentVoters[msg.sender][postId][commendId] != 1, \"Upvote already done\");\r\n\r\n if (commentVoters[msg.sender][postId][commendId] == 2) {\r\n commentDownVotes[postId][commendId] -= 1;\r\n }\r\n\r\n commentVoters[msg.sender][postId][commendId] = 1;\r\n commentUpVotes[postId][commendId] += 1;\r\n }\r\n \r\n //downvote a post \r\n function DownvoteComment(uint postId, uint commendId) public {\r\n require(postId >= 0, \"votes is not for a valid post\");\r\n require(postId < postNumber, \"votes is for a non existent post\");\r\n \r\n require(commendId >= 0, \"comment id is not valid\");\r\n require(commendId <= commentCounter[postId], \"comment id is non existent\");\r\n require(commentVoters[msg.sender][postId][commendId] != 2, \"Upvote already done\");\r\n \r\n if (commentVoters[msg.sender][postId][commendId] == 1) {\r\n commentUpVotes[postId][commendId] -= 1;\r\n }\r\n\r\n commentVoters[msg.sender][postId][commendId] = 2;\r\n commentDownVotes[postId][commendId] += 1;\r\n }\r\n \r\n //get the comment vote data\r\n function getCommentUpVotes(uint postId, uint commendId) public view returns (uint) {\r\n return commentUpVotes[postId][commendId];\r\n }\r\n\r\n //get the comment vote data\r\n function getCommentDownVotes(uint postId, uint commendId) public view returns (uint) {\r\n return commentDownVotes[postId][commendId];\r\n }\r\n \r\n //get the comment voter data\r\n function getCommentVoterData(uint postId, uint commendId, address commenter) public view returns (uint) {\r\n return commentVoters[commenter][postId][commendId];\r\n } \r\n\r\n //get the total number of posts\r\n function getPostCounter() public view returns (uint) {\r\n return postNumber;\r\n }\r\n \r\n //deposit and Withdrawal System\r\n \r\n //Invoked when a donation is made\r\n event Deposited (\r\n address indexed depositer,\r\n uint value\r\n );\r\n \r\n //deposit trx into the smart contract\r\n function deposit() public payable {\r\n require(msg.value > 0, \"no attached value\");\r\n balances[msg.sender] += msg.value;\r\n emit Deposited(msg.sender, msg.value);\r\n }\r\n \r\n //Invoked when a Withdrawal is made\r\n event Withdrawal (\r\n address indexed taker,\r\n uint value\r\n );\r\n \r\n \r\n //Withdraw funds\r\n function withdraw(bool withdrawall, uint trxAmmount) public {\r\n \r\n //either withdraw all the funds for a user \r\n if(withdrawall == true){\r\n uint balance = balances[msg.sender];\r\n require(balance > 0, \"Sender does not have funds\");\r\n balances[msg.sender] = 0;\r\n msg.sender.transfer(balance);\r\n emit Withdrawal(msg.sender, balance);\r\n }\r\n else{ //or take out a specific amount of tron\r\n require(trxAmmount > 0, \"Incorrect withdraw value\");\r\n require(balances[msg.sender] >= trxAmmount, \"attempting to withdraw too much\");\r\n balances[msg.sender] -= trxAmmount;\r\n msg.sender.transfer(trxAmmount);\r\n emit Withdrawal(msg.sender, trxAmmount);\r\n }\r\n }\r\n \r\n //Donation System \r\n \r\n //make a donation to a post\r\n function makeDonation(uint postId, uint donationValue) public {\r\n \r\n require(postId >= 0, \"votes is not for a valid post\");\r\n require(postId < postNumber, \"votes is for a non existent post\");\r\n \r\n require(donationValue > 0, \"no attached value\");\r\n require(donationValue <= balances[msg.sender]);\r\n \r\n \r\n balances[msg.sender] -= donationValue;\r\n \r\n //post owner\r\n address owner = postOwners[postId];\r\n balances[owner] += donationValue;\r\n postEarnings[postId] += donationValue;\r\n emit DonationMade(msg.sender, donationValue, now, postId);\r\n }\r\n \r\n //Invoked when a donation is made\r\n event DonationMade (\r\n address indexed donator,\r\n uint indexed donationValue,\r\n uint donationTimestamp,\r\n uint postid\r\n );\r\n \r\n //get post donations\r\n function getPostDonations(uint postId) public view returns (uint) {\r\n return postEarnings[postId];\r\n }\r\n \r\n //get user balance\r\n function getBalance(address user) public view returns (uint) {\r\n return balances[user];\r\n }\r\n \r\n // Username System\r\n //Invoked when the post has been created, so that the dApp can access the content\r\n event UsernameCreated (\r\n address indexed user,\r\n bytes32 indexed username\r\n );\r\n \r\n //create a new post, done by storing data in the logs. data can be in any form as long as it is byte data. This means data can be compressed\r\n function SetUsername(bytes32 username) public {\r\n \r\n require (usernamesTaken[username] == false, \"username is registered to an owner already\");\r\n \r\n bytes32 currentUsername = usernames[msg.sender];\r\n require(currentUsername != username, \"This username is already set to the sender\");\r\n \r\n //if the user does not have a username then set it\r\n if(currentUsername == 0x0){\r\n usernames[msg.sender] = username;\r\n usernamesTaken[username] = true;\r\n }else{\r\n //else update the currently known username and make the old username available to other users\r\n usernames[msg.sender] = username;\r\n usernamesTaken[username] = true;\r\n usernamesTaken[currentUsername] = false;\r\n }\r\n //posts are stored in logs, it allows to reduce post invocation cost\r\n emit UsernameCreated(msg.sender, username);\r\n \r\n }\r\n \r\n //get the stored username for a given address\r\n function getUsername(address user) public view returns (bytes32) {\r\n return usernames[user];\r\n }\r\n\r\n //UTIL FUNCTIONS\r\n\r\n //get the user\r\n function getSenderAddress() public view returns (address) {\r\n return msg.sender;\r\n }\r\n}\r\n", + "bytecode": "0x608060405234801561001057600080fd5b506000805561173e806100246000396000f3006080604052600436106101065763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630cbe957e811461010b5780630d898f48146101e25780630dad041e1461020c57806335c8d82b1461022457806342948e181461025557806349ad53ee146102935780634e595e3a146102c7578063582e0488146102e257806368b6883e146102f75780637bc43f56146103595780637dc1aae4146103745780637e6ab9161461038f578063a0a5c2b6146103a7578063a4245e67146103c2578063b219f916146103da578063c41a360a146103e5578063ce43c032146103fd578063d121c61a1461042b578063e6e5533314610443575b600080fd5b34801561011757600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526101e094369492936024939284019190819084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a99988101979196509182019450925082915084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a99988101979196509182019450925082915084018382808284375094975061045b9650505050505050565b005b3480156101ee57600080fd5b506101fa60043561074f565b60408051918252519081900360200190f35b34801561021857600080fd5b506101e0600435610761565b34801561023057600080fd5b506101fa60043573ffffffffffffffffffffffffffffffffffffffff602435166108e6565b34801561026157600080fd5b5061026a610918565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561029f57600080fd5b506101fa60043560243573ffffffffffffffffffffffffffffffffffffffff6044351661091c565b3480156102d357600080fd5b506101e0600435602435610958565b3480156102ee57600080fd5b506101fa610bec565b34801561030357600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526101e0943694929360249392840191908190840183828082843750949750508435955050506020909201359150610bf29050565b34801561036557600080fd5b506101e0600435602435610e93565b34801561038057600080fd5b506101fa600435602435611126565b34801561039b57600080fd5b506101fa600435611143565b3480156103b357600080fd5b506101fa600435602435611155565b3480156103ce57600080fd5b506101fa600435611172565b6101e0600435611184565b3480156103f157600080fd5b5061026a600435611350565b34801561040957600080fd5b506101fa73ffffffffffffffffffffffffffffffffffffffff60043516611378565b34801561043757600080fd5b506101e06004356113a0565b34801561044f57600080fd5b506101e0600435611568565b60008084511115156104bc57604080516000805160206116f3833981519152815260206004820152600d60248201527f496e76616c6964207469746c6500000000000000000000000000000000000000604482015290519081900360640190fd5b825160001061051a57604080516000805160206116f3833981519152815260206004820152600c60248201527f496e76616c696420746578740000000000000000000000000000000000000000604482015290519081900360640190fd5b815160001061057857604080516000805160206116f3833981519152815260206004820152600c60248201527f496e76616c696420746167730000000000000000000000000000000000000000604482015290519081900360640190fd5b5060008054808252600160208181526040808520805473ffffffffffffffffffffffffffffffffffffffff191633908117909155600283528186208490558086526004835281862085875283528186209390935580514281840181905260808083528851908301528751959687967fdc220f0be468e8336935034fc4829e5d0e772978345b486fa47d2d09bd32cc11958a9593948d948d949193849391840192606085019260a0860192908b01918190849084905b8381101561064557818101518382015260200161062d565b50505050905090810190601f1680156106725780820380516001836020036101000a031916815260200191505b50848103835286518152865160209182019188019080838360005b838110156106a557818101518382015260200161068d565b50505050905090810190601f1680156106d25780820380516001836020036101000a031916815260200191505b50848103825285518152855160209182019187019080838360005b838110156107055781810151838201526020016106ed565b50505050905090810190601f1680156107325780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390a3600101600055505050565b60009081526003602052604090205490565b6000808210156107c057604080516000805160206116f3833981519152815260206004820152601d60248201527f766f746573206973206e6f7420666f7220612076616c696420706f7374000000604482015290519081900360640190fd5b600054821061081e57604080516000805160206116f3833981519152815260206004820181905260248201527f766f74657320697320666f722061206e6f6e206578697374656e7420706f7374604482015290519081900360640190fd5b50336000908152600460209081526040808320848452909152902054600281141561089857604080516000805160206116f3833981519152815260206004820152601560248201527f646f776e766f746520616c726561647920646f6e650000000000000000000000604482015290519081900360640190fd5b80600114156108b857600082815260026020526040902080546000190190555b5033600090815260046020908152604080832093835292815282822060029055600390522080546001019055565b73ffffffffffffffffffffffffffffffffffffffff166000908152600460209081526040808320938352929052205490565b3390565b73ffffffffffffffffffffffffffffffffffffffff16600090815260096020908152604080832094835293815283822092825291909152205490565b60008210156109b657604080516000805160206116f3833981519152815260206004820152601d60248201527f766f746573206973206e6f7420666f7220612076616c696420706f7374000000604482015290519081900360640190fd5b6000548210610a1457604080516000805160206116f3833981519152815260206004820181905260248201527f766f74657320697320666f722061206e6f6e206578697374656e7420706f7374604482015290519081900360640190fd5b6000811015610a7257604080516000805160206116f3833981519152815260206004820152601760248201527f636f6d6d656e74206964206973206e6f742076616c6964000000000000000000604482015290519081900360640190fd5b600082815260056020526040902054811115610add57604080516000805160206116f3833981519152815260206004820152601a60248201527f636f6d6d656e74206964206973206e6f6e206578697374656e74000000000000604482015290519081900360640190fd5b336000908152600960209081526040808320858452825280832084845290915290205460011415610b5d57604080516000805160206116f3833981519152815260206004820152601360248201527f5570766f746520616c726561647920646f6e6500000000000000000000000000604482015290519081900360640190fd5b336000908152600960209081526040808320858452825280832084845290915290205460021415610baa576000828152600860209081526040808320848452909152902080546000190190555b33600090815260096020908152604080832085845282528083208484528252808320600190819055948352600782528083209383529290522080549091019055565b60005490565b600080831015610c5157604080516000805160206116f3833981519152815260206004820152601f60248201527f636f6d6d656e74206973206e6f7420666f7220612076616c696420706f737400604482015290519081900360640190fd5b6000548310610cd557604080516000805160206116f3833981519152815260206004820152602260248201527f636f6d6d656e7420697320666f722061206e6f6e206578697374656e7420706f60448201527f7374000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b8351600010610d3357604080516000805160206116f3833981519152815260206004820152601860248201527f636f6d6d656e7420636f6d6d656e7420697320656d7074790000000000000000604482015290519081900360640190fd5b60056000848152602001908152602001600020549050823373ffffffffffffffffffffffffffffffffffffffff167f5c7252053e11b0d1b89164a47c163c5f5027f50b79dc32cc22920d6bc21e189a868542866040518080602001858152602001848152602001838152602001828103825286818151815260200191508051906020019080838360005b83811015610dd5578181015183820152602001610dbd565b50505050905090810190601f168015610e025780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a360008381526006602090815260408083208484528252808320805473ffffffffffffffffffffffffffffffffffffffff19163390811790915586845260078352818420858552835281842060019081905590845260098352818420878552835281842085855283528184208190559583526005909152902092019091555050565b6000821015610ef157604080516000805160206116f3833981519152815260206004820152601d60248201527f766f746573206973206e6f7420666f7220612076616c696420706f7374000000604482015290519081900360640190fd5b6000548210610f4f57604080516000805160206116f3833981519152815260206004820181905260248201527f766f74657320697320666f722061206e6f6e206578697374656e7420706f7374604482015290519081900360640190fd5b6000811015610fad57604080516000805160206116f3833981519152815260206004820152601760248201527f636f6d6d656e74206964206973206e6f742076616c6964000000000000000000604482015290519081900360640190fd5b60008281526005602052604090205481111561101857604080516000805160206116f3833981519152815260206004820152601a60248201527f636f6d6d656e74206964206973206e6f6e206578697374656e74000000000000604482015290519081900360640190fd5b33600090815260096020908152604080832085845282528083208484529091529020546002141561109857604080516000805160206116f3833981519152815260206004820152601360248201527f5570766f746520616c726561647920646f6e6500000000000000000000000000604482015290519081900360640190fd5b3360009081526009602090815260408083208584528252808320848452909152902054600114156110e5576000828152600760209081526040808320848452909152902080546000190190555b336000908152600960209081526040808320858452825280832084845282528083206002905593825260088152838220928252919091522080546001019055565b600091825260076020908152604080842092845291905290205490565b60009081526002602052604090205490565b600091825260086020908152604080842092845291905290205490565b6000908152600a602052604090205490565b60003481106111e257604080516000805160206116f3833981519152815260206004820152601160248201527f6e6f2061747461636865642076616c7565000000000000000000000000000000604482015290519081900360640190fd5b600082101561124057604080516000805160206116f3833981519152815260206004820152601d60248201527f766f746573206973206e6f7420666f7220612076616c696420706f7374000000604482015290519081900360640190fd5b600054821061129e57604080516000805160206116f3833981519152815260206004820181905260248201527f766f74657320697320666f722061206e6f6e206578697374656e7420706f7374604482015290519081900360640190fd5b5060008181526001602052604080822054905173ffffffffffffffffffffffffffffffffffffffff9091169182913480156108fc0292909190818181858888f193505050501580156112f4573d6000803e3d6000fd5b506000828152600a602090815260409182902080543490810190915582514281529182018590528251909233927fd7570171f3eec5b5e70a829a2f7b1a40853d0159967de2efe2bf99208b9a560d929081900390910190a35050565b60009081526001602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff166000908152600c602052604090205490565b6000818152600b602052604081205460ff161561143257604080516000805160206116f3833981519152815260206004820152602a60248201527f757365726e616d65206973207265676973746572656420746f20616e206f776e60448201527f657220616c726561647900000000000000000000000000000000000000000000606482015290519081900360840190fd5b50336000908152600c6020526040902054818114156114c657604080516000805160206116f3833981519152815260206004820152602a60248201527f5468697320757365726e616d6520697320616c72656164792073657420746f2060448201527f7468652073656e64657200000000000000000000000000000000000000000000606482015290519081900360840190fd5b8015156114fc57336000908152600c60209081526040808320859055848352600b9091529020805460ff19166001179055611537565b336000908152600c60209081526040808320859055848352600b909152808220805460ff199081166001179091558383529120805490911690555b604051829033907f98669deded710d3d7f0c348e87e0a023ce76d0784aa090cb348048e3f9c88a3490600090a35050565b6000808210156115c757604080516000805160206116f3833981519152815260206004820152601d60248201527f766f746573206973206e6f7420666f7220612076616c696420706f7374000000604482015290519081900360640190fd5b600054821061162557604080516000805160206116f3833981519152815260206004820181905260248201527f766f74657320697320666f722061206e6f6e206578697374656e7420706f7374604482015290519081900360640190fd5b50336000908152600460209081526040808320848452909152902054600181141561169f57604080516000805160206116f3833981519152815260206004820152601360248201527f5570766f746520616c726561647920646f6e6500000000000000000000000000604482015290519081900360640190fd5b80600214156116bf57600082815260036020526040902080546000190190555b50336000908152600460209081526040808320938352928152828220600190819055600290915291902080549091019055560008c379a000000000000000000000000000000000000000000000000000000000a165627a7a72305820024c559518ef7b95569bbc66b312da7349f34667e03d2baaea4db20d3f2b801b0029", + "deployedBytecode": "0x6080604052600436106101065763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630cbe957e811461010b5780630d898f48146101e25780630dad041e1461020c57806335c8d82b1461022457806342948e181461025557806349ad53ee146102935780634e595e3a146102c7578063582e0488146102e257806368b6883e146102f75780637bc43f56146103595780637dc1aae4146103745780637e6ab9161461038f578063a0a5c2b6146103a7578063a4245e67146103c2578063b219f916146103da578063c41a360a146103e5578063ce43c032146103fd578063d121c61a1461042b578063e6e5533314610443575b600080fd5b34801561011757600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526101e094369492936024939284019190819084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a99988101979196509182019450925082915084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a99988101979196509182019450925082915084018382808284375094975061045b9650505050505050565b005b3480156101ee57600080fd5b506101fa60043561074f565b60408051918252519081900360200190f35b34801561021857600080fd5b506101e0600435610761565b34801561023057600080fd5b506101fa60043573ffffffffffffffffffffffffffffffffffffffff602435166108e6565b34801561026157600080fd5b5061026a610918565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561029f57600080fd5b506101fa60043560243573ffffffffffffffffffffffffffffffffffffffff6044351661091c565b3480156102d357600080fd5b506101e0600435602435610958565b3480156102ee57600080fd5b506101fa610bec565b34801561030357600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526101e0943694929360249392840191908190840183828082843750949750508435955050506020909201359150610bf29050565b34801561036557600080fd5b506101e0600435602435610e93565b34801561038057600080fd5b506101fa600435602435611126565b34801561039b57600080fd5b506101fa600435611143565b3480156103b357600080fd5b506101fa600435602435611155565b3480156103ce57600080fd5b506101fa600435611172565b6101e0600435611184565b3480156103f157600080fd5b5061026a600435611350565b34801561040957600080fd5b506101fa73ffffffffffffffffffffffffffffffffffffffff60043516611378565b34801561043757600080fd5b506101e06004356113a0565b34801561044f57600080fd5b506101e0600435611568565b60008084511115156104bc57604080516000805160206116f3833981519152815260206004820152600d60248201527f496e76616c6964207469746c6500000000000000000000000000000000000000604482015290519081900360640190fd5b825160001061051a57604080516000805160206116f3833981519152815260206004820152600c60248201527f496e76616c696420746578740000000000000000000000000000000000000000604482015290519081900360640190fd5b815160001061057857604080516000805160206116f3833981519152815260206004820152600c60248201527f496e76616c696420746167730000000000000000000000000000000000000000604482015290519081900360640190fd5b5060008054808252600160208181526040808520805473ffffffffffffffffffffffffffffffffffffffff191633908117909155600283528186208490558086526004835281862085875283528186209390935580514281840181905260808083528851908301528751959687967fdc220f0be468e8336935034fc4829e5d0e772978345b486fa47d2d09bd32cc11958a9593948d948d949193849391840192606085019260a0860192908b01918190849084905b8381101561064557818101518382015260200161062d565b50505050905090810190601f1680156106725780820380516001836020036101000a031916815260200191505b50848103835286518152865160209182019188019080838360005b838110156106a557818101518382015260200161068d565b50505050905090810190601f1680156106d25780820380516001836020036101000a031916815260200191505b50848103825285518152855160209182019187019080838360005b838110156107055781810151838201526020016106ed565b50505050905090810190601f1680156107325780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390a3600101600055505050565b60009081526003602052604090205490565b6000808210156107c057604080516000805160206116f3833981519152815260206004820152601d60248201527f766f746573206973206e6f7420666f7220612076616c696420706f7374000000604482015290519081900360640190fd5b600054821061081e57604080516000805160206116f3833981519152815260206004820181905260248201527f766f74657320697320666f722061206e6f6e206578697374656e7420706f7374604482015290519081900360640190fd5b50336000908152600460209081526040808320848452909152902054600281141561089857604080516000805160206116f3833981519152815260206004820152601560248201527f646f776e766f746520616c726561647920646f6e650000000000000000000000604482015290519081900360640190fd5b80600114156108b857600082815260026020526040902080546000190190555b5033600090815260046020908152604080832093835292815282822060029055600390522080546001019055565b73ffffffffffffffffffffffffffffffffffffffff166000908152600460209081526040808320938352929052205490565b3390565b73ffffffffffffffffffffffffffffffffffffffff16600090815260096020908152604080832094835293815283822092825291909152205490565b60008210156109b657604080516000805160206116f3833981519152815260206004820152601d60248201527f766f746573206973206e6f7420666f7220612076616c696420706f7374000000604482015290519081900360640190fd5b6000548210610a1457604080516000805160206116f3833981519152815260206004820181905260248201527f766f74657320697320666f722061206e6f6e206578697374656e7420706f7374604482015290519081900360640190fd5b6000811015610a7257604080516000805160206116f3833981519152815260206004820152601760248201527f636f6d6d656e74206964206973206e6f742076616c6964000000000000000000604482015290519081900360640190fd5b600082815260056020526040902054811115610add57604080516000805160206116f3833981519152815260206004820152601a60248201527f636f6d6d656e74206964206973206e6f6e206578697374656e74000000000000604482015290519081900360640190fd5b336000908152600960209081526040808320858452825280832084845290915290205460011415610b5d57604080516000805160206116f3833981519152815260206004820152601360248201527f5570766f746520616c726561647920646f6e6500000000000000000000000000604482015290519081900360640190fd5b336000908152600960209081526040808320858452825280832084845290915290205460021415610baa576000828152600860209081526040808320848452909152902080546000190190555b33600090815260096020908152604080832085845282528083208484528252808320600190819055948352600782528083209383529290522080549091019055565b60005490565b600080831015610c5157604080516000805160206116f3833981519152815260206004820152601f60248201527f636f6d6d656e74206973206e6f7420666f7220612076616c696420706f737400604482015290519081900360640190fd5b6000548310610cd557604080516000805160206116f3833981519152815260206004820152602260248201527f636f6d6d656e7420697320666f722061206e6f6e206578697374656e7420706f60448201527f7374000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b8351600010610d3357604080516000805160206116f3833981519152815260206004820152601860248201527f636f6d6d656e7420636f6d6d656e7420697320656d7074790000000000000000604482015290519081900360640190fd5b60056000848152602001908152602001600020549050823373ffffffffffffffffffffffffffffffffffffffff167f5c7252053e11b0d1b89164a47c163c5f5027f50b79dc32cc22920d6bc21e189a868542866040518080602001858152602001848152602001838152602001828103825286818151815260200191508051906020019080838360005b83811015610dd5578181015183820152602001610dbd565b50505050905090810190601f168015610e025780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a360008381526006602090815260408083208484528252808320805473ffffffffffffffffffffffffffffffffffffffff19163390811790915586845260078352818420858552835281842060019081905590845260098352818420878552835281842085855283528184208190559583526005909152902092019091555050565b6000821015610ef157604080516000805160206116f3833981519152815260206004820152601d60248201527f766f746573206973206e6f7420666f7220612076616c696420706f7374000000604482015290519081900360640190fd5b6000548210610f4f57604080516000805160206116f3833981519152815260206004820181905260248201527f766f74657320697320666f722061206e6f6e206578697374656e7420706f7374604482015290519081900360640190fd5b6000811015610fad57604080516000805160206116f3833981519152815260206004820152601760248201527f636f6d6d656e74206964206973206e6f742076616c6964000000000000000000604482015290519081900360640190fd5b60008281526005602052604090205481111561101857604080516000805160206116f3833981519152815260206004820152601a60248201527f636f6d6d656e74206964206973206e6f6e206578697374656e74000000000000604482015290519081900360640190fd5b33600090815260096020908152604080832085845282528083208484529091529020546002141561109857604080516000805160206116f3833981519152815260206004820152601360248201527f5570766f746520616c726561647920646f6e6500000000000000000000000000604482015290519081900360640190fd5b3360009081526009602090815260408083208584528252808320848452909152902054600114156110e5576000828152600760209081526040808320848452909152902080546000190190555b336000908152600960209081526040808320858452825280832084845282528083206002905593825260088152838220928252919091522080546001019055565b600091825260076020908152604080842092845291905290205490565b60009081526002602052604090205490565b600091825260086020908152604080842092845291905290205490565b6000908152600a602052604090205490565b60003481106111e257604080516000805160206116f3833981519152815260206004820152601160248201527f6e6f2061747461636865642076616c7565000000000000000000000000000000604482015290519081900360640190fd5b600082101561124057604080516000805160206116f3833981519152815260206004820152601d60248201527f766f746573206973206e6f7420666f7220612076616c696420706f7374000000604482015290519081900360640190fd5b600054821061129e57604080516000805160206116f3833981519152815260206004820181905260248201527f766f74657320697320666f722061206e6f6e206578697374656e7420706f7374604482015290519081900360640190fd5b5060008181526001602052604080822054905173ffffffffffffffffffffffffffffffffffffffff9091169182913480156108fc0292909190818181858888f193505050501580156112f4573d6000803e3d6000fd5b506000828152600a602090815260409182902080543490810190915582514281529182018590528251909233927fd7570171f3eec5b5e70a829a2f7b1a40853d0159967de2efe2bf99208b9a560d929081900390910190a35050565b60009081526001602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff166000908152600c602052604090205490565b6000818152600b602052604081205460ff161561143257604080516000805160206116f3833981519152815260206004820152602a60248201527f757365726e616d65206973207265676973746572656420746f20616e206f776e60448201527f657220616c726561647900000000000000000000000000000000000000000000606482015290519081900360840190fd5b50336000908152600c6020526040902054818114156114c657604080516000805160206116f3833981519152815260206004820152602a60248201527f5468697320757365726e616d6520697320616c72656164792073657420746f2060448201527f7468652073656e64657200000000000000000000000000000000000000000000606482015290519081900360840190fd5b8015156114fc57336000908152600c60209081526040808320859055848352600b9091529020805460ff19166001179055611537565b336000908152600c60209081526040808320859055848352600b909152808220805460ff199081166001179091558383529120805490911690555b604051829033907f98669deded710d3d7f0c348e87e0a023ce76d0784aa090cb348048e3f9c88a3490600090a35050565b6000808210156115c757604080516000805160206116f3833981519152815260206004820152601d60248201527f766f746573206973206e6f7420666f7220612076616c696420706f7374000000604482015290519081900360640190fd5b600054821061162557604080516000805160206116f3833981519152815260206004820181905260248201527f766f74657320697320666f722061206e6f6e206578697374656e7420706f7374604482015290519081900360640190fd5b50336000908152600460209081526040808320848452909152902054600181141561169f57604080516000805160206116f3833981519152815260206004820152601360248201527f5570766f746520616c726561647920646f6e6500000000000000000000000000604482015290519081900360640190fd5b80600214156116bf57600082815260036020526040902080546000190190555b50336000908152600460209081526040808320938352928152828220600190819055600290915291902080549091019055560008c379a000000000000000000000000000000000000000000000000000000000a165627a7a72305820024c559518ef7b95569bbc66b312da7349f34667e03d2baaea4db20d3f2b801b0029", + "sourceMap": "434:10155:0:-;;;1835:55;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1881:1:0;1868:14;;434:10155;;;;;;", + "deployedSourceMap": "434:10155:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2368:774;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2368:774:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;2368:774:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2368:774:0;;;;-1:-1:-1;2368:774:0;-1:-1:-1;2368:774:0;;-1:-1:-1;2368:774:0;;;;;;;;-1:-1:-1;;2368:774:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2368:774:0;;;;-1:-1:-1;2368:774:0;-1:-1:-1;2368:774:0;;-1:-1:-1;2368:774:0;;;;;;;;-1:-1:-1;2368:774:0;;-1:-1:-1;2368:774:0;;-1:-1:-1;;;;;;;2368:774:0;;;4445:105;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;4445:105:0;;;;;;;;;;;;;;;;;;;;;3819:455;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3819:455:0;;;;;4588:124;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;4588:124:0;;;;;;;;;10492:94;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10492:94:0;;;;;;;;;;;;;;;;;;;;;;;7736:173;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;7736:173:0;;;;;;;;;;;5874:698;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;5874:698:0;;;;;;;7955:89;;8:9:-1;5:2;;;30:1;27;20:12;5:2;7955:89:0;;;;5027:813;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;5027:813:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;5027:813:0;;-1:-1:-1;;5027:813:0;;;-1:-1:-1;;;5027:813:0;;;;;;-1:-1:-1;5027:813:0;;-1:-1:-1;5027:813:0;6608:708;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;6608:708:0;;;;;;;7361:142;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;7361:142:0;;;;;;;4311:101;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;4311:101:0;;;;;7544:146;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;7544:146:0;;;;;;;8839:112;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;8839:112:0;;;;;8115:482;;;;;;3185:105;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3185:105:0;;;;;10334:106;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;10334:106:0;;;;;;;9328:943;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;9328:943:0;;;;;3324:459;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3324:459:0;;;;;2368:774;2660:11;2518:1;2503:5;:12;:16;2495:42;;;;;;;-1:-1:-1;;;;;;;;;;;2495:42:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;2556:11;;2570:1;-1:-1:-1;2548:40:0;;;;;-1:-1:-1;;;;;;;;;;;2548:40:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;2607:11;;2621:1;-1:-1:-1;2599:40:0;;;;;-1:-1:-1;;;;;;;;;;;2599:40:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2674:10:0;;;2755:18;;;:10;:18;;;;;;;;:31;;-1:-1:-1;;2755:31:0;2776:10;2755:31;;;;;;2871:7;:15;;;;;:19;;;2901:18;;;:6;:18;;;;;:26;;;;;;;;:30;;;;3035:55;;3073:3;3035:55;;;;;;;;;;;;;;;;;;2674:10;;;;3035:55;;3067:4;;3073:3;;3078:5;;3085:4;;3035:55;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;3035:55:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3035:55:0;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;3035:55:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3035:55:0;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;3035:55:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3133:1;3124:10;3111;:23;-1:-1:-1;;;2368:774:0:o;4445:105::-;4501:4;4525:17;;;:9;:17;;;;;;;4445:105::o;3819:455::-;4013:14;3880:11;;;;3872:53;;;;;-1:-1:-1;;;;;;;;;;;3872:53:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;3953:10;;3944:19;;3936:64;;;;;-1:-1:-1;;;;;;;;;;;3936:64:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4037:10:0;4030:18;;;;:6;:18;;;;;;;;:26;;;;;;;;;4088:1;4075:14;;;4067:48;;;;;-1:-1:-1;;;;;;;;;;;4067:48:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;4130:9;4143:1;4130:14;4126:67;;;4161:15;;;;:7;:15;;;;;:20;;-1:-1:-1;;4161:20:0;;;4126:67;-1:-1:-1;4210:10:0;4203:18;;;;:6;:18;;;;;;;;:26;;;;;;;;;4232:1;4203:30;;4244:9;:17;;;:22;;4265:1;4244:22;;;3819:455::o;4588:124::-;4683:13;;4659:4;4683:13;;;:6;:13;;;;;;;;:21;;;;;;;;;4588:124::o;10492:94::-;10568:10;10492:94;:::o;7736:173::-;7858:24;;7834:4;7858:24;;;:13;:24;;;;;;;;:32;;;;;;;;;:43;;;;;;;;;;7736:173::o;5874:698::-;5962:1;5952:11;;;5944:53;;;;;-1:-1:-1;;;;;;;;;;;5944:53:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;6025:10;;6016:19;;6008:64;;;;;-1:-1:-1;;;;;;;;;;;6008:64:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6114:1;6101:14;;;6093:50;;;;;-1:-1:-1;;;;;;;;;;;6093:50:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;6175:22;;;;:14;:22;;;;;;6162:35;;;6154:74;;;;;-1:-1:-1;;;;;;;;;;;6154:74:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;6261:10;6247:25;;;;:13;:25;;;;;;;;:33;;;;;;;;:44;;;;;;;;;6295:1;6247:49;;6239:81;;;;;-1:-1:-1;;;;;;;;;;;6239:81:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;6351:10;6337:25;;;;:13;:25;;;;;;;;:33;;;;;;;;:44;;;;;;;;;6385:1;6337:49;6333:122;;;6403:24;;;;:16;:24;;;;;;;;:35;;;;;;;;:40;;-1:-1:-1;;6403:40:0;;;6333:122;6481:10;6467:25;;;;:13;:25;;;;;;;;:33;;;;;;;;:44;;;;;;;;6514:1;6467:48;;;;6526:22;;;:14;:22;;;;;:33;;;;;;;:38;;;;;;;5874:698::o;7955:89::-;8002:4;8026:10;7955:89;:::o;5027:813::-;5359:14;5119:11;;;;5111:55;;;;;-1:-1:-1;;;;;;;;;;;5111:55:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;5194:10;;5185:19;;5177:66;;;;;-1:-1:-1;;;;;;;;;;;5177:66:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5262:11;;5276:1;-1:-1:-1;5254:52:0;;;;;-1:-1:-1;;;;;;;;;;;5254:52:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;5376:14;:22;5391:6;5376:22;;;;;;;;;;;;5359:39;;5473:6;5461:10;5446:71;;;5481:4;5487:13;5502:3;5507:9;5446:71;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;5446:71:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5540:20;;;;:12;:20;;;;;;;;:31;;;;;;;;:44;;-1:-1:-1;;5540:44:0;5574:10;5540:44;;;;;;5638:22;;;:14;:22;;;;;:33;;;;;;;;5540:44;5638:37;;;;5686:25;;;:13;:25;;;;;:33;;;;;;;;:44;;;;;;;;:48;;;5794:22;;;:14;:22;;;;;5819:13;;5794:38;;;-1:-1:-1;;5027:813:0:o;6608:708::-;6698:1;6688:11;;;6680:53;;;;;-1:-1:-1;;;;;;;;;;;6680:53:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;6761:10;;6752:19;;6744:64;;;;;-1:-1:-1;;;;;;;;;;;6744:64:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6850:1;6837:14;;;6829:50;;;;;-1:-1:-1;;;;;;;;;;;6829:50:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;6911:22;;;;:14;:22;;;;;;6898:35;;;6890:74;;;;;-1:-1:-1;;;;;;;;;;;6890:74:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;6997:10;6983:25;;;;:13;:25;;;;;;;;:33;;;;;;;;:44;;;;;;;;;7031:1;6983:49;;6975:81;;;;;-1:-1:-1;;;;;;;;;;;6975:81:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;7095:10;7081:25;;;;:13;:25;;;;;;;;:33;;;;;;;;:44;;;;;;;;;7129:1;7081:49;7077:120;;;7147:22;;;;:14;:22;;;;;;;;:33;;;;;;;;:38;;-1:-1:-1;;7147:38:0;;;7077:120;7223:10;7209:25;;;;:13;:25;;;;;;;;:33;;;;;;;;:44;;;;;;;;7256:1;7209:48;;7268:24;;;:16;:24;;;;;:35;;;;;;;;:40;;7307:1;7268:40;;;6608:708::o;7361:142::-;7438:4;7462:22;;;:14;:22;;;;;;;;:33;;;;;;;;;;7361:142::o;4311:101::-;4365:4;4389:15;;;:7;:15;;;;;;;4311:101::o;7544:146::-;7623:4;7647:24;;;:16;:24;;;;;;;;:35;;;;;;;;;;7544:146::o;8839:112::-;8899:4;8923:20;;;:12;:20;;;;;;;8839:112::o;8115:482::-;8379:13;8184:9;:13;-1:-1:-1;8176:43:0;;;;;-1:-1:-1;;;;;;;;;;;8176:43:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;8248:1;8238:11;;;8230:53;;;;;-1:-1:-1;;;;;;;;;;;8230:53:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;8311:10;;8302:19;;8294:64;;;;;-1:-1:-1;;;;;;;;;;;8294:64:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;8395:18:0;;;;:10;:18;;;;;;;8424:25;;8395:18;;;;;;;8439:9;8424:25;;;;;8439:9;;8424:25;;8395:18;8424:25;8439:9;8395:18;8424:25;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;8492:20:0;;;;:12;:20;;;;;;;;;:33;;8516:9;8492:33;;;;;;8541:48;;8577:3;8541:48;;;;;;;;;;8516:9;;8554:10;;8541:48;;;;;;;;;;;8115:482;;:::o;3185:105::-;3237:7;3264:18;;;:10;:18;;;;;;;;;3185:105::o;10334:106::-;10417:15;;10390:7;10417:15;;;:9;:15;;;;;;;10334:106::o;9328:943::-;9505:23;9404:24;;;:14;:24;;;;;;;;:33;9395:89;;;;;-1:-1:-1;;;;;;;;;;;9395:89:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;9541:10:0;9531:21;;;;:9;:21;;;;;;9571:27;;;;9563:82;;;;;-1:-1:-1;;;;;;;;;;;9563:82:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9729:22;;9726:397;;;9777:10;9767:21;;;;:9;:21;;;;;;;;:32;;;9814:24;;;:14;:24;;;;;:31;;-1:-1:-1;;9814:31:0;9841:4;9814:31;;;9726:397;;;9989:10;9979:21;;;;:9;:21;;;;;;;;:32;;;10026:24;;;:14;:24;;;;;;:31;;-1:-1:-1;;10026:31:0;;;10053:4;10026:31;;;;10072;;;;;:39;;;;;;;9726:397;10216:37;;10244:8;;10232:10;;10216:37;;;;;9328:943;;:::o;3324:459::-;3524:14;3383:11;;;;3375:53;;;;;-1:-1:-1;;;;;;;;;;;3375:53:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;3456:10;;3447:19;;3439:64;;;;;-1:-1:-1;;;;;;;;;;;3439:64:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3548:10:0;3541:18;;;;:6;:18;;;;;;;;:26;;;;;;;;;3599:1;3586:14;;;3578:46;;;;;-1:-1:-1;;;;;;;;;;;3578:46:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;3639:9;3652:1;3639:14;3635:69;;;3670:17;;;;:9;:17;;;;;:22;;-1:-1:-1;;3670:22:0;;;3635:69;-1:-1:-1;3721:10:0;3714:18;;;;:6;:18;;;;;;;;:26;;;;;;;;;3743:1;3714:30;;;;3755:7;:15;;;;;;:20;;;;;;;3324:459::o", + "source": "pragma solidity >=0.4.23;\r\n\r\n//No Filter is a dApp created for the Tron Accelerator\r\n//The smart contract enables content creation\r\n//as well as metric tracking and other logic\r\n//When coupled with the frontend, it creates an experience similar to a \r\n//traditional blog style social website such as medium and reddit\r\n//Created By Harnick Khera (Github.com/Hephyrius)\r\n//Repository can be found at (Github.com/Hephyrius/Nofilter)\r\n\r\ncontract NoFilter {\r\n \r\n //post related variables\r\n uint postNumber; // keeps track of posts so that every one is unique\r\n mapping (uint => address) postOwners; //Keeps track of who owns a specific post\r\n mapping (uint => uint) upvotes; // keeps track of a posts vote counter\r\n mapping (uint => uint) downvotes; // keeps track of a posts vote counter\r\n mapping (address => mapping(uint => uint)) voters; //keeps track of a users voting history, helps to prevent vote spamming from a single account\r\n \r\n //comment related variables\r\n mapping (uint => uint) commentCounter; // keeps track of posts so that every one is unique\r\n mapping (uint => mapping(uint => address)) commentOwner; //Keeps track of who owns a specific post\r\n mapping (uint => mapping(uint => uint)) commentUpVotes; // keeps track of a posts vote counter\r\n mapping (uint => mapping(uint => uint)) commentDownVotes; // keeps track of a posts vote counter\r\n mapping (address => mapping(uint => mapping(uint => uint))) commentVoters; //keeps track of a users voting history, helps to prevent vote spamming from a single account\r\n \r\n //Donation System\r\n mapping (uint => uint) postEarnings;\r\n //mapping (uint => mapping(uint => uint)) commentEarnings;\r\n \r\n //username System\r\n mapping (bytes32 => bool) usernamesTaken;\r\n mapping (address => bytes32) usernames;\r\n \r\n constructor () public {\r\n postNumber = 0;\r\n }\r\n \r\n //Invoked when the post has been created, so that the dApp can access the content\r\n event PostContent (\r\n address indexed author,\r\n uint indexed id,\r\n bytes tags,\r\n uint postTimestamp, //used to generate private post unique key\r\n bytes title,\r\n bytes text\r\n );\r\n \r\n //create a new post, done by storing data in the logs. data can be in any form as long as it is byte data. This means data can be compressed\r\n function CreatePost(bytes title, bytes text, bytes tags) public {\r\n \r\n //check that the data is correct\r\n require(title.length > 0, \"Invalid title\");\r\n require(text.length > 0, \"Invalid text\");\r\n require(tags.length > 0, \"Invalid tags\");\r\n \r\n uint postId = postNumber;\r\n //init the mapping and set the owner as the sender\r\n postOwners[postId] = msg.sender;\r\n \r\n //init votes so that the owner has upvoted by default.\r\n upvotes[postId] = 1;\r\n voters[msg.sender][postId] = 1;\r\n \r\n //posts are stored in logs, it allows to reduce post invocation cost\r\n emit PostContent(msg.sender, postId, tags, now, title, text);\r\n \r\n postNumber = postId + 1;\r\n }\r\n \r\n //get the owner of a post\r\n function getOwner(uint postId) public view returns (address) {\r\n return postOwners[postId];\r\n }\r\n \r\n //upvote a post \r\n function UpvotePost(uint postId) public {\r\n require(postId >= 0, \"votes is not for a valid post\");\r\n require(postId < postNumber, \"votes is for a non existent post\");\r\n \r\n uint knownType = voters[msg.sender][postId];\r\n require(knownType != 1, \"Upvote already done\");\r\n if (knownType == 2) {\r\n downvotes[postId] -= 1;\r\n }\r\n voters[msg.sender][postId] = 1;\r\n upvotes[postId] += 1;\r\n }\r\n \r\n //downvote a post \r\n function DownvotePost(uint postId) public {\r\n require(postId >= 0, \"votes is not for a valid post\");\r\n require(postId < postNumber, \"votes is for a non existent post\");\r\n\r\n uint knownType = voters[msg.sender][postId];\r\n require(knownType != 2, \"downvote already done\");\r\n if (knownType == 1) {\r\n upvotes[postId] -= 1;\r\n }\r\n voters[msg.sender][postId] = 2;\r\n downvotes[postId] += 1;\r\n }\r\n \r\n //get the vote data\r\n function getUpVotes(uint postId) public view returns (uint) {\r\n return upvotes[postId];\r\n }\r\n\r\n //get the vote data\r\n function getDownVotes(uint postId) public view returns (uint) {\r\n return downvotes[postId];\r\n }\r\n \r\n //get the voter data\r\n function getVoterData(uint postId, address voter) public view returns (uint) {\r\n return voters[voter][postId];\r\n }\r\n\r\n /////////// Comment functionality\r\n\r\n //stores a log comment on the blockchain when commented\r\n event CommentCreated (\r\n address indexed commenter,\r\n uint indexed postId,\r\n bytes comment,\r\n uint parentComment,\r\n\t\tuint commentTimestamp,\r\n\t\tuint commentId\r\n );\r\n \r\n function PostComment(bytes text, uint postId, uint parentComment) public {\r\n require(postId >= 0, \"comment is not for a valid post\");\r\n require(postId < postNumber, \"comment is for a non existent post\");\r\n require(text.length > 0, \"comment comment is empty\");\r\n\t\t\r\n\t\t//update comment related variables\r\n uint commentId = commentCounter[postId];\r\n\t\t\r\n\t\t//emit to the blockchain\r\n emit CommentCreated(msg.sender, postId, text, parentComment, now, commentId);\r\n \r\n\r\n commentOwner[postId][commentId] = msg.sender;\r\n \r\n //deal with upvote data\r\n commentUpVotes[postId][commentId] = 1;\r\n commentVoters[msg.sender][postId][commentId] = 1;\r\n \r\n //increment counter when done\r\n commentCounter[postId] = commentId + 1;\r\n }\r\n \r\n //upvote a post \r\n function UpvoteComment(uint postId, uint commendId) public {\r\n require(postId >= 0, \"votes is not for a valid post\");\r\n require(postId < postNumber, \"votes is for a non existent post\");\r\n \r\n require(commendId >= 0, \"comment id is not valid\");\r\n require(commendId <= commentCounter[postId], \"comment id is non existent\");\r\n require(commentVoters[msg.sender][postId][commendId] != 1, \"Upvote already done\");\r\n\r\n if (commentVoters[msg.sender][postId][commendId] == 2) {\r\n commentDownVotes[postId][commendId] -= 1;\r\n }\r\n\r\n commentVoters[msg.sender][postId][commendId] = 1;\r\n commentUpVotes[postId][commendId] += 1;\r\n }\r\n \r\n //downvote a post \r\n function DownvoteComment(uint postId, uint commendId) public {\r\n require(postId >= 0, \"votes is not for a valid post\");\r\n require(postId < postNumber, \"votes is for a non existent post\");\r\n \r\n require(commendId >= 0, \"comment id is not valid\");\r\n require(commendId <= commentCounter[postId], \"comment id is non existent\");\r\n require(commentVoters[msg.sender][postId][commendId] != 2, \"Upvote already done\");\r\n \r\n if (commentVoters[msg.sender][postId][commendId] == 1) {\r\n commentUpVotes[postId][commendId] -= 1;\r\n }\r\n\r\n commentVoters[msg.sender][postId][commendId] = 2;\r\n commentDownVotes[postId][commendId] += 1;\r\n }\r\n \r\n //get the comment vote data\r\n function getCommentUpVotes(uint postId, uint commendId) public view returns (uint) {\r\n return commentUpVotes[postId][commendId];\r\n }\r\n\r\n //get the comment vote data\r\n function getCommentDownVotes(uint postId, uint commendId) public view returns (uint) {\r\n return commentDownVotes[postId][commendId];\r\n }\r\n \r\n //get the comment voter data\r\n function getCommentVoterData(uint postId, uint commendId, address commenter) public view returns (uint) {\r\n return commentVoters[commenter][postId][commendId];\r\n } \r\n\r\n //get the total number of posts\r\n function getPostCounter() public view returns (uint) {\r\n return postNumber;\r\n }\r\n\r\n //Donation System \r\n \r\n //make a donation to a post\r\n function makeDonation(uint postId) public payable {\r\n require(msg.value > 0, \"no attached value\");\r\n require(postId >= 0, \"votes is not for a valid post\");\r\n require(postId < postNumber, \"votes is for a non existent post\");\r\n \r\n address owner = postOwners[postId];\r\n owner.transfer(msg.value);\r\n \r\n //post owner\r\n postEarnings[postId] += msg.value;\r\n emit DonationMade(msg.sender, msg.value, now, postId);\r\n }\r\n \r\n //Invoked when a donation is made\r\n event DonationMade (\r\n address indexed donator,\r\n uint indexed donationValue,\r\n uint donationTimestamp,\r\n uint postid\r\n );\r\n \r\n //get post donations\r\n function getPostDonations(uint postId) public view returns (uint) {\r\n return postEarnings[postId];\r\n }\r\n \r\n // Username System\r\n //Invoked when the post has been created, so that the dApp can access the content\r\n event UsernameCreated (\r\n address indexed user,\r\n bytes32 indexed username\r\n );\r\n \r\n //create a new post, done by storing data in the logs. data can be in any form as long as it is byte data. This means data can be compressed\r\n function SetUsername(bytes32 username) public {\r\n \r\n require (usernamesTaken[username] == false, \"username is registered to an owner already\");\r\n \r\n bytes32 currentUsername = usernames[msg.sender];\r\n require(currentUsername != username, \"This username is already set to the sender\");\r\n \r\n //if the user does not have a username then set it\r\n if(currentUsername == 0x0){\r\n usernames[msg.sender] = username;\r\n usernamesTaken[username] = true;\r\n }else{\r\n //else update the currently known username and make the old username available to other users\r\n usernames[msg.sender] = username;\r\n usernamesTaken[username] = true;\r\n usernamesTaken[currentUsername] = false;\r\n }\r\n //posts are stored in logs, it allows to reduce post invocation cost\r\n emit UsernameCreated(msg.sender, username);\r\n \r\n }\r\n \r\n //get the stored username for a given address\r\n function getUsername(address user) public view returns (bytes32) {\r\n return usernames[user];\r\n }\r\n\r\n //UTIL FUNCTIONS\r\n\r\n //get the user\r\n function getSenderAddress() public view returns (address) {\r\n return msg.sender;\r\n }\r\n}\r\n", "sourcePath": "C:\\Users\\Khera\\Documents\\GitHub\\TronDappSteedium\\Solidity\\contracts\\NoFilter.sol", "ast": { "absolutePath": "/C/Users/Khera/Documents/GitHub/TronDappSteedium/Solidity/contracts/NoFilter.sol", "exportedSymbols": { "NoFilter": [ - 1070 + 857 ] }, - "id": 1071, + "id": 858, "nodeType": "SourceUnit", "nodes": [ { - "id": 58, + "id": 1, "literals": [ "solidity", ">=", @@ -590,7 +506,7 @@ ".23" ], "nodeType": "PragmaDirective", - "src": "0:25:1" + "src": "0:25:0" }, { "baseContracts": [], @@ -598,20 +514,20 @@ "contractKind": "contract", "documentation": null, "fullyImplemented": true, - "id": 1070, + "id": 857, "linearizedBaseContracts": [ - 1070 + 857 ], "name": "NoFilter", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, - "id": 60, + "id": 3, "name": "postNumber", "nodeType": "VariableDeclaration", - "scope": 1070, - "src": "495:15:1", + "scope": 857, + "src": "495:15:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -619,10 +535,10 @@ "typeString": "uint256" }, "typeName": { - "id": 59, + "id": 2, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "495:4:1", + "src": "495:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -633,11 +549,11 @@ }, { "constant": false, - "id": 64, + "id": 7, "name": "postOwners", "nodeType": "VariableDeclaration", - "scope": 1070, - "src": "569:36:1", + "scope": 857, + "src": "569:36:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -645,28 +561,28 @@ "typeString": "mapping(uint256 => address)" }, "typeName": { - "id": 63, + "id": 6, "keyType": { - "id": 61, + "id": 4, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "578:4:1", + "src": "578:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Mapping", - "src": "569:25:1", + "src": "569:25:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", "typeString": "mapping(uint256 => address)" }, "valueType": { - "id": 62, + "id": 5, "name": "address", "nodeType": "ElementaryTypeName", - "src": "586:7:1", + "src": "586:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -678,11 +594,11 @@ }, { "constant": false, - "id": 68, + "id": 11, "name": "upvotes", "nodeType": "VariableDeclaration", - "scope": 1070, - "src": "654:30:1", + "scope": 857, + "src": "654:30:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -690,28 +606,28 @@ "typeString": "mapping(uint256 => uint256)" }, "typeName": { - "id": 67, + "id": 10, "keyType": { - "id": 65, + "id": 8, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "663:4:1", + "src": "663:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Mapping", - "src": "654:22:1", + "src": "654:22:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" }, "valueType": { - "id": 66, + "id": 9, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "671:4:1", + "src": "671:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -723,11 +639,11 @@ }, { "constant": false, - "id": 72, + "id": 15, "name": "downvotes", "nodeType": "VariableDeclaration", - "scope": 1070, - "src": "730:32:1", + "scope": 857, + "src": "730:32:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -735,28 +651,28 @@ "typeString": "mapping(uint256 => uint256)" }, "typeName": { - "id": 71, + "id": 14, "keyType": { - "id": 69, + "id": 12, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "739:4:1", + "src": "739:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Mapping", - "src": "730:22:1", + "src": "730:22:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" }, "valueType": { - "id": 70, + "id": 13, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "747:4:1", + "src": "747:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -768,11 +684,11 @@ }, { "constant": false, - "id": 78, + "id": 21, "name": "voters", "nodeType": "VariableDeclaration", - "scope": 1070, - "src": "808:49:1", + "scope": 857, + "src": "808:49:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -780,46 +696,46 @@ "typeString": "mapping(address => mapping(uint256 => uint256))" }, "typeName": { - "id": 77, + "id": 20, "keyType": { - "id": 73, + "id": 16, "name": "address", "nodeType": "ElementaryTypeName", - "src": "817:7:1", + "src": "817:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", - "src": "808:42:1", + "src": "808:42:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_uint256_$_$", "typeString": "mapping(address => mapping(uint256 => uint256))" }, "valueType": { - "id": 76, + "id": 19, "keyType": { - "id": 74, + "id": 17, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "836:4:1", + "src": "836:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Mapping", - "src": "828:21:1", + "src": "828:21:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" }, "valueType": { - "id": 75, + "id": 18, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "844:4:1", + "src": "844:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -832,11 +748,11 @@ }, { "constant": false, - "id": 82, + "id": 25, "name": "commentCounter", "nodeType": "VariableDeclaration", - "scope": 1070, - "src": "997:37:1", + "scope": 857, + "src": "997:37:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -844,28 +760,28 @@ "typeString": "mapping(uint256 => uint256)" }, "typeName": { - "id": 81, + "id": 24, "keyType": { - "id": 79, + "id": 22, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "1006:4:1", + "src": "1006:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Mapping", - "src": "997:22:1", + "src": "997:22:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" }, "valueType": { - "id": 80, + "id": 23, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "1014:4:1", + "src": "1014:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -877,11 +793,11 @@ }, { "constant": false, - "id": 88, + "id": 31, "name": "commentOwner", "nodeType": "VariableDeclaration", - "scope": 1070, - "src": "1093:55:1", + "scope": 857, + "src": "1093:55:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -889,46 +805,46 @@ "typeString": "mapping(uint256 => mapping(uint256 => address))" }, "typeName": { - "id": 87, + "id": 30, "keyType": { - "id": 83, + "id": 26, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "1102:4:1", + "src": "1102:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Mapping", - "src": "1093:42:1", + "src": "1093:42:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_address_$_$", "typeString": "mapping(uint256 => mapping(uint256 => address))" }, "valueType": { - "id": 86, + "id": 29, "keyType": { - "id": 84, + "id": 27, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "1118:4:1", + "src": "1118:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Mapping", - "src": "1110:24:1", + "src": "1110:24:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", "typeString": "mapping(uint256 => address)" }, "valueType": { - "id": 85, + "id": 28, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1126:7:1", + "src": "1126:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -941,11 +857,11 @@ }, { "constant": false, - "id": 94, + "id": 37, "name": "commentUpVotes", "nodeType": "VariableDeclaration", - "scope": 1070, - "src": "1197:54:1", + "scope": 857, + "src": "1197:54:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -953,46 +869,46 @@ "typeString": "mapping(uint256 => mapping(uint256 => uint256))" }, "typeName": { - "id": 93, + "id": 36, "keyType": { - "id": 89, + "id": 32, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "1206:4:1", + "src": "1206:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Mapping", - "src": "1197:39:1", + "src": "1197:39:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$", "typeString": "mapping(uint256 => mapping(uint256 => uint256))" }, "valueType": { - "id": 92, + "id": 35, "keyType": { - "id": 90, + "id": 33, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "1222:4:1", + "src": "1222:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Mapping", - "src": "1214:21:1", + "src": "1214:21:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" }, "valueType": { - "id": 91, + "id": 34, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "1230:4:1", + "src": "1230:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1005,11 +921,11 @@ }, { "constant": false, - "id": 100, + "id": 43, "name": "commentDownVotes", "nodeType": "VariableDeclaration", - "scope": 1070, - "src": "1297:56:1", + "scope": 857, + "src": "1297:56:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -1017,46 +933,46 @@ "typeString": "mapping(uint256 => mapping(uint256 => uint256))" }, "typeName": { - "id": 99, + "id": 42, "keyType": { - "id": 95, + "id": 38, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "1306:4:1", + "src": "1306:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Mapping", - "src": "1297:39:1", + "src": "1297:39:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$", "typeString": "mapping(uint256 => mapping(uint256 => uint256))" }, "valueType": { - "id": 98, + "id": 41, "keyType": { - "id": 96, + "id": 39, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "1322:4:1", + "src": "1322:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Mapping", - "src": "1314:21:1", + "src": "1314:21:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" }, "valueType": { - "id": 97, + "id": 40, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "1330:4:1", + "src": "1330:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1069,11 +985,11 @@ }, { "constant": false, - "id": 108, + "id": 51, "name": "commentVoters", "nodeType": "VariableDeclaration", - "scope": 1070, - "src": "1399:73:1", + "scope": 857, + "src": "1399:73:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -1081,64 +997,64 @@ "typeString": "mapping(address => mapping(uint256 => mapping(uint256 => uint256)))" }, "typeName": { - "id": 107, + "id": 50, "keyType": { - "id": 101, + "id": 44, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1408:7:1", + "src": "1408:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", - "src": "1399:59:1", + "src": "1399:59:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$_$", "typeString": "mapping(address => mapping(uint256 => mapping(uint256 => uint256)))" }, "valueType": { - "id": 106, + "id": 49, "keyType": { - "id": 102, + "id": 45, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "1427:4:1", + "src": "1427:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Mapping", - "src": "1419:38:1", + "src": "1419:38:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$", "typeString": "mapping(uint256 => mapping(uint256 => uint256))" }, "valueType": { - "id": 105, + "id": 48, "keyType": { - "id": 103, + "id": 46, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "1443:4:1", + "src": "1443:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Mapping", - "src": "1435:21:1", + "src": "1435:21:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" }, "valueType": { - "id": 104, + "id": 47, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "1451:4:1", + "src": "1451:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1152,56 +1068,11 @@ }, { "constant": false, - "id": 112, - "name": "balances", - "nodeType": "VariableDeclaration", - "scope": 1070, - "src": "1602:34:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 111, - "keyType": { - "id": 109, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1611:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "1602:25:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 110, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1622:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 116, + "id": 55, "name": "postEarnings", "nodeType": "VariableDeclaration", - "scope": 1070, - "src": "1643:35:1", + "scope": 857, + "src": "1602:35:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -1209,28 +1080,28 @@ "typeString": "mapping(uint256 => uint256)" }, "typeName": { - "id": 115, + "id": 54, "keyType": { - "id": 113, + "id": 52, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "1652:4:1", + "src": "1611:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Mapping", - "src": "1643:22:1", + "src": "1602:22:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" }, "valueType": { - "id": 114, + "id": 53, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "1660:4:1", + "src": "1619:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1242,11 +1113,11 @@ }, { "constant": false, - "id": 120, + "id": 59, "name": "usernamesTaken", "nodeType": "VariableDeclaration", - "scope": 1070, - "src": "1778:40:1", + "scope": 857, + "src": "1737:40:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -1254,28 +1125,28 @@ "typeString": "mapping(bytes32 => bool)" }, "typeName": { - "id": 119, + "id": 58, "keyType": { - "id": 117, + "id": 56, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "1787:7:1", + "src": "1746:7:0", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "nodeType": "Mapping", - "src": "1778:25:1", + "src": "1737:25:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", "typeString": "mapping(bytes32 => bool)" }, "valueType": { - "id": 118, + "id": 57, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "1798:4:1", + "src": "1757:4:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1287,11 +1158,11 @@ }, { "constant": false, - "id": 124, + "id": 63, "name": "usernames", "nodeType": "VariableDeclaration", - "scope": 1070, - "src": "1825:38:1", + "scope": 857, + "src": "1784:38:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -1299,28 +1170,28 @@ "typeString": "mapping(address => bytes32)" }, "typeName": { - "id": 123, + "id": 62, "keyType": { - "id": 121, + "id": 60, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1834:7:1", + "src": "1793:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", - "src": "1825:28:1", + "src": "1784:28:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_bytes32_$", "typeString": "mapping(address => bytes32)" }, "valueType": { - "id": 122, + "id": 61, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "1845:7:1", + "src": "1804:7:0", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -1332,26 +1203,26 @@ }, { "body": { - "id": 131, + "id": 70, "nodeType": "Block", - "src": "1898:33:1", + "src": "1857:33:0", "statements": [ { "expression": { "argumentTypes": null, - "id": 129, + "id": 68, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 127, + "id": 66, "name": "postNumber", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 60, - "src": "1909:10:1", + "referencedDeclaration": 3, + "src": "1868:10:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1362,14 +1233,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "30", - "id": 128, + "id": 67, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "1922:1:1", + "src": "1881:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -1377,20 +1248,20 @@ }, "value": "0" }, - "src": "1909:14:1", + "src": "1868:14:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 130, + "id": 69, "nodeType": "ExpressionStatement", - "src": "1909:14:1" + "src": "1868:14:0" } ] }, "documentation": null, - "id": 132, + "id": 71, "implemented": true, "isConstructor": true, "isDeclaredConst": false, @@ -1398,20 +1269,20 @@ "name": "", "nodeType": "FunctionDefinition", "parameters": { - "id": 125, + "id": 64, "nodeType": "ParameterList", "parameters": [], - "src": "1888:2:1" + "src": "1847:2:0" }, "payable": false, "returnParameters": { - "id": 126, + "id": 65, "nodeType": "ParameterList", "parameters": [], - "src": "1898:0:1" + "src": "1857:0:0" }, - "scope": 1070, - "src": "1876:55:1", + "scope": 857, + "src": "1835:55:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" @@ -1419,21 +1290,21 @@ { "anonymous": false, "documentation": null, - "id": 146, + "id": 85, "name": "PostContent", "nodeType": "EventDefinition", "parameters": { - "id": 145, + "id": 84, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 134, + "id": 73, "indexed": true, "name": "author", "nodeType": "VariableDeclaration", - "scope": 146, - "src": "2059:22:1", + "scope": 85, + "src": "2018:22:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1441,10 +1312,10 @@ "typeString": "address" }, "typeName": { - "id": 133, + "id": 72, "name": "address", "nodeType": "ElementaryTypeName", - "src": "2059:7:1", + "src": "2018:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1455,12 +1326,12 @@ }, { "constant": false, - "id": 136, + "id": 75, "indexed": true, "name": "id", "nodeType": "VariableDeclaration", - "scope": 146, - "src": "2092:15:1", + "scope": 85, + "src": "2051:15:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1468,10 +1339,10 @@ "typeString": "uint256" }, "typeName": { - "id": 135, + "id": 74, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "2092:4:1", + "src": "2051:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1482,12 +1353,12 @@ }, { "constant": false, - "id": 138, + "id": 77, "indexed": false, "name": "tags", "nodeType": "VariableDeclaration", - "scope": 146, - "src": "2118:10:1", + "scope": 85, + "src": "2077:10:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1495,10 +1366,10 @@ "typeString": "bytes" }, "typeName": { - "id": 137, + "id": 76, "name": "bytes", "nodeType": "ElementaryTypeName", - "src": "2118:5:1", + "src": "2077:5:0", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" @@ -1509,12 +1380,12 @@ }, { "constant": false, - "id": 140, + "id": 79, "indexed": false, "name": "postTimestamp", "nodeType": "VariableDeclaration", - "scope": 146, - "src": "2139:18:1", + "scope": 85, + "src": "2098:18:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1522,10 +1393,10 @@ "typeString": "uint256" }, "typeName": { - "id": 139, + "id": 78, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "2139:4:1", + "src": "2098:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1536,12 +1407,12 @@ }, { "constant": false, - "id": 142, + "id": 81, "indexed": false, "name": "title", "nodeType": "VariableDeclaration", - "scope": 146, - "src": "2211:11:1", + "scope": 85, + "src": "2170:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1549,10 +1420,10 @@ "typeString": "bytes" }, "typeName": { - "id": 141, + "id": 80, "name": "bytes", "nodeType": "ElementaryTypeName", - "src": "2211:5:1", + "src": "2170:5:0", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" @@ -1563,12 +1434,12 @@ }, { "constant": false, - "id": 144, + "id": 83, "indexed": false, "name": "text", "nodeType": "VariableDeclaration", - "scope": 146, - "src": "2233:10:1", + "scope": 85, + "src": "2192:10:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1576,10 +1447,10 @@ "typeString": "bytes" }, "typeName": { - "id": 143, + "id": 82, "name": "bytes", "nodeType": "ElementaryTypeName", - "src": "2233:5:1", + "src": "2192:5:0", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" @@ -1589,15 +1460,15 @@ "visibility": "internal" } ], - "src": "2048:202:1" + "src": "2007:202:0" }, - "src": "2030:221:1" + "src": "1989:221:0" }, { "body": { - "id": 221, + "id": 160, "nodeType": "Block", - "src": "2473:710:1", + "src": "2432:710:0", "statements": [ { "expression": { @@ -1609,7 +1480,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 159, + "id": 98, "isConstant": false, "isLValue": false, "isPure": false, @@ -1618,18 +1489,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 156, + "id": 95, "name": "title", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 148, - "src": "2544:5:1", + "referencedDeclaration": 87, + "src": "2503:5:0", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, - "id": 157, + "id": 96, "isConstant": false, "isLValue": false, "isPure": false, @@ -1637,7 +1508,7 @@ "memberName": "length", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "2544:12:1", + "src": "2503:12:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1648,14 +1519,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 158, + "id": 97, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2559:1:1", + "src": "2518:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -1663,7 +1534,7 @@ }, "value": "0" }, - "src": "2544:16:1", + "src": "2503:16:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1672,14 +1543,14 @@ { "argumentTypes": null, "hexValue": "496e76616c6964207469746c65", - "id": 160, + "id": 99, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "2562:15:1", + "src": "2521:15:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_80585e438708ccfc2fdeab91f4729387a2489c7d8404a3554a0dd993b1a74008", @@ -1699,21 +1570,21 @@ "typeString": "literal_string \"Invalid title\"" } ], - "id": 155, + "id": 94, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1088, - 1089 + 875, + 876 ], - "referencedDeclaration": 1089, - "src": "2536:7:1", + "referencedDeclaration": 876, + "src": "2495:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 161, + "id": 100, "isConstant": false, "isLValue": false, "isPure": false, @@ -1721,15 +1592,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2536:42:1", + "src": "2495:42:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 162, + "id": 101, "nodeType": "ExpressionStatement", - "src": "2536:42:1" + "src": "2495:42:0" }, { "expression": { @@ -1741,7 +1612,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 167, + "id": 106, "isConstant": false, "isLValue": false, "isPure": false, @@ -1750,18 +1621,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 164, + "id": 103, "name": "text", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 150, - "src": "2597:4:1", + "referencedDeclaration": 89, + "src": "2556:4:0", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, - "id": 165, + "id": 104, "isConstant": false, "isLValue": false, "isPure": false, @@ -1769,7 +1640,7 @@ "memberName": "length", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "2597:11:1", + "src": "2556:11:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1780,14 +1651,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 166, + "id": 105, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2611:1:1", + "src": "2570:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -1795,7 +1666,7 @@ }, "value": "0" }, - "src": "2597:15:1", + "src": "2556:15:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1804,14 +1675,14 @@ { "argumentTypes": null, "hexValue": "496e76616c69642074657874", - "id": 168, + "id": 107, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "2614:14:1", + "src": "2573:14:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_45dddbce7fa4b79a973f059a441f6fe10ee0ec48a6d7a54e092857a4f15c5eea", @@ -1831,21 +1702,21 @@ "typeString": "literal_string \"Invalid text\"" } ], - "id": 163, + "id": 102, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1088, - 1089 + 875, + 876 ], - "referencedDeclaration": 1089, - "src": "2589:7:1", + "referencedDeclaration": 876, + "src": "2548:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 169, + "id": 108, "isConstant": false, "isLValue": false, "isPure": false, @@ -1853,15 +1724,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2589:40:1", + "src": "2548:40:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 170, + "id": 109, "nodeType": "ExpressionStatement", - "src": "2589:40:1" + "src": "2548:40:0" }, { "expression": { @@ -1873,7 +1744,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 175, + "id": 114, "isConstant": false, "isLValue": false, "isPure": false, @@ -1882,18 +1753,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 172, + "id": 111, "name": "tags", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 152, - "src": "2648:4:1", + "referencedDeclaration": 91, + "src": "2607:4:0", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, - "id": 173, + "id": 112, "isConstant": false, "isLValue": false, "isPure": false, @@ -1901,7 +1772,7 @@ "memberName": "length", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "2648:11:1", + "src": "2607:11:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1912,14 +1783,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 174, + "id": 113, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2662:1:1", + "src": "2621:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -1927,7 +1798,7 @@ }, "value": "0" }, - "src": "2648:15:1", + "src": "2607:15:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1936,14 +1807,14 @@ { "argumentTypes": null, "hexValue": "496e76616c69642074616773", - "id": 176, + "id": 115, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "2665:14:1", + "src": "2624:14:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_7a9201aa9910499695931b3a163439a039c7f74763c01825f2936b9d81958c13", @@ -1963,21 +1834,21 @@ "typeString": "literal_string \"Invalid tags\"" } ], - "id": 171, + "id": 110, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1088, - 1089 + 875, + 876 ], - "referencedDeclaration": 1089, - "src": "2640:7:1", + "referencedDeclaration": 876, + "src": "2599:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 177, + "id": 116, "isConstant": false, "isLValue": false, "isPure": false, @@ -1985,28 +1856,28 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2640:40:1", + "src": "2599:40:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 178, + "id": 117, "nodeType": "ExpressionStatement", - "src": "2640:40:1" + "src": "2599:40:0" }, { "assignments": [ - 180 + 119 ], "declarations": [ { "constant": false, - "id": 180, + "id": 119, "name": "postId", "nodeType": "VariableDeclaration", - "scope": 222, - "src": "2701:11:1", + "scope": 161, + "src": "2660:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2014,10 +1885,10 @@ "typeString": "uint256" }, "typeName": { - "id": 179, + "id": 118, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "2701:4:1", + "src": "2660:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2027,27 +1898,27 @@ "visibility": "internal" } ], - "id": 182, + "id": 121, "initialValue": { "argumentTypes": null, - "id": 181, + "id": 120, "name": "postNumber", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 60, - "src": "2715:10:1", + "referencedDeclaration": 3, + "src": "2674:10:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", - "src": "2701:24:1" + "src": "2660:24:0" }, { "expression": { "argumentTypes": null, - "id": 188, + "id": 127, "isConstant": false, "isLValue": false, "isPure": false, @@ -2056,26 +1927,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 183, + "id": 122, "name": "postOwners", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 64, - "src": "2796:10:1", + "referencedDeclaration": 7, + "src": "2755:10:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", "typeString": "mapping(uint256 => address)" } }, - "id": 185, + "id": 124, "indexExpression": { "argumentTypes": null, - "id": 184, + "id": 123, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 180, - "src": "2807:6:1", + "referencedDeclaration": 119, + "src": "2766:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2086,7 +1957,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "2796:18:1", + "src": "2755:18:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2098,18 +1969,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 186, + "id": 125, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "2817:3:1", + "referencedDeclaration": 872, + "src": "2776:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 187, + "id": 126, "isConstant": false, "isLValue": false, "isPure": false, @@ -2117,26 +1988,26 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "2817:10:1", + "src": "2776:10:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "2796:31:1", + "src": "2755:31:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 189, + "id": 128, "nodeType": "ExpressionStatement", - "src": "2796:31:1" + "src": "2755:31:0" }, { "expression": { "argumentTypes": null, - "id": 194, + "id": 133, "isConstant": false, "isLValue": false, "isPure": false, @@ -2145,26 +2016,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 190, + "id": 129, "name": "upvotes", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "2912:7:1", + "referencedDeclaration": 11, + "src": "2871:7:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" } }, - "id": 192, + "id": 131, "indexExpression": { "argumentTypes": null, - "id": 191, + "id": 130, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 180, - "src": "2920:6:1", + "referencedDeclaration": 119, + "src": "2879:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2175,7 +2046,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "2912:15:1", + "src": "2871:15:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2186,14 +2057,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "31", - "id": 193, + "id": 132, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2930:1:1", + "src": "2889:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", @@ -2201,20 +2072,20 @@ }, "value": "1" }, - "src": "2912:19:1", + "src": "2871:19:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 195, + "id": 134, "nodeType": "ExpressionStatement", - "src": "2912:19:1" + "src": "2871:19:0" }, { "expression": { "argumentTypes": null, - "id": 203, + "id": 142, "isConstant": false, "isLValue": false, "isPure": false, @@ -2225,34 +2096,34 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 196, + "id": 135, "name": "voters", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 78, - "src": "2942:6:1", + "referencedDeclaration": 21, + "src": "2901:6:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_uint256_$_$", "typeString": "mapping(address => mapping(uint256 => uint256))" } }, - "id": 200, + "id": 139, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 197, + "id": 136, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "2949:3:1", + "referencedDeclaration": 872, + "src": "2908:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 198, + "id": 137, "isConstant": false, "isLValue": false, "isPure": false, @@ -2260,7 +2131,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "2949:10:1", + "src": "2908:10:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2271,21 +2142,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "2942:18:1", + "src": "2901:18:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" } }, - "id": 201, + "id": 140, "indexExpression": { "argumentTypes": null, - "id": 199, + "id": 138, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 180, - "src": "2961:6:1", + "referencedDeclaration": 119, + "src": "2920:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2296,7 +2167,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "2942:26:1", + "src": "2901:26:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2307,14 +2178,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "31", - "id": 202, + "id": 141, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "2971:1:1", + "src": "2930:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", @@ -2322,15 +2193,15 @@ }, "value": "1" }, - "src": "2942:30:1", + "src": "2901:30:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 204, + "id": 143, "nodeType": "ExpressionStatement", - "src": "2942:30:1" + "src": "2901:30:0" }, { "eventCall": { @@ -2340,18 +2211,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 206, + "id": 145, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "3088:3:1", + "referencedDeclaration": 872, + "src": "3047:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 207, + "id": 146, "isConstant": false, "isLValue": false, "isPure": false, @@ -2359,7 +2230,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "3088:10:1", + "src": "3047:10:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2367,12 +2238,12 @@ }, { "argumentTypes": null, - "id": 208, + "id": 147, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 180, - "src": "3100:6:1", + "referencedDeclaration": 119, + "src": "3059:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2380,12 +2251,12 @@ }, { "argumentTypes": null, - "id": 209, + "id": 148, "name": "tags", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 152, - "src": "3108:4:1", + "referencedDeclaration": 91, + "src": "3067:4:0", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" @@ -2393,12 +2264,12 @@ }, { "argumentTypes": null, - "id": 210, + "id": 149, "name": "now", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1087, - "src": "3114:3:1", + "referencedDeclaration": 874, + "src": "3073:3:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2406,12 +2277,12 @@ }, { "argumentTypes": null, - "id": 211, + "id": 150, "name": "title", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 148, - "src": "3119:5:1", + "referencedDeclaration": 87, + "src": "3078:5:0", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" @@ -2419,12 +2290,12 @@ }, { "argumentTypes": null, - "id": 212, + "id": 151, "name": "text", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 150, - "src": "3126:4:1", + "referencedDeclaration": 89, + "src": "3085:4:0", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" @@ -2458,18 +2329,18 @@ "typeString": "bytes memory" } ], - "id": 205, + "id": 144, "name": "PostContent", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 146, - "src": "3076:11:1", + "referencedDeclaration": 85, + "src": "3035:11:0", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$_t_uint256_$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$returns$__$", "typeString": "function (address,uint256,bytes memory,uint256,bytes memory,bytes memory)" } }, - "id": 213, + "id": 152, "isConstant": false, "isLValue": false, "isPure": false, @@ -2477,32 +2348,32 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3076:55:1", + "src": "3035:55:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 214, + "id": 153, "nodeType": "EmitStatement", - "src": "3071:60:1" + "src": "3030:60:0" }, { "expression": { "argumentTypes": null, - "id": 219, + "id": 158, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 215, + "id": 154, "name": "postNumber", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 60, - "src": "3152:10:1", + "referencedDeclaration": 3, + "src": "3111:10:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2516,19 +2387,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 218, + "id": 157, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 216, + "id": 155, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 180, - "src": "3165:6:1", + "referencedDeclaration": 119, + "src": "3124:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2539,14 +2410,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "31", - "id": 217, + "id": 156, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "3174:1:1", + "src": "3133:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", @@ -2554,26 +2425,26 @@ }, "value": "1" }, - "src": "3165:10:1", + "src": "3124:10:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "3152:23:1", + "src": "3111:23:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 220, + "id": 159, "nodeType": "ExpressionStatement", - "src": "3152:23:1" + "src": "3111:23:0" } ] }, "documentation": null, - "id": 222, + "id": 161, "implemented": true, "isConstructor": false, "isDeclaredConst": false, @@ -2581,16 +2452,16 @@ "name": "CreatePost", "nodeType": "FunctionDefinition", "parameters": { - "id": 153, + "id": 92, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 148, + "id": 87, "name": "title", "nodeType": "VariableDeclaration", - "scope": 222, - "src": "2429:11:1", + "scope": 161, + "src": "2388:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2598,10 +2469,10 @@ "typeString": "bytes" }, "typeName": { - "id": 147, + "id": 86, "name": "bytes", "nodeType": "ElementaryTypeName", - "src": "2429:5:1", + "src": "2388:5:0", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" @@ -2612,11 +2483,11 @@ }, { "constant": false, - "id": 150, + "id": 89, "name": "text", "nodeType": "VariableDeclaration", - "scope": 222, - "src": "2442:10:1", + "scope": 161, + "src": "2401:10:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2624,10 +2495,10 @@ "typeString": "bytes" }, "typeName": { - "id": 149, + "id": 88, "name": "bytes", "nodeType": "ElementaryTypeName", - "src": "2442:5:1", + "src": "2401:5:0", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" @@ -2638,11 +2509,11 @@ }, { "constant": false, - "id": 152, + "id": 91, "name": "tags", "nodeType": "VariableDeclaration", - "scope": 222, - "src": "2454:10:1", + "scope": 161, + "src": "2413:10:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2650,10 +2521,10 @@ "typeString": "bytes" }, "typeName": { - "id": 151, + "id": 90, "name": "bytes", "nodeType": "ElementaryTypeName", - "src": "2454:5:1", + "src": "2413:5:0", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" @@ -2663,52 +2534,52 @@ "visibility": "internal" } ], - "src": "2428:37:1" + "src": "2387:37:0" }, "payable": false, "returnParameters": { - "id": 154, + "id": 93, "nodeType": "ParameterList", "parameters": [], - "src": "2473:0:1" + "src": "2432:0:0" }, - "scope": 1070, - "src": "2409:774:1", + "scope": 857, + "src": "2368:774:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { - "id": 233, + "id": 172, "nodeType": "Block", - "src": "3287:44:1", + "src": "3246:44:0", "statements": [ { "expression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 229, + "id": 168, "name": "postOwners", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 64, - "src": "3305:10:1", + "referencedDeclaration": 7, + "src": "3264:10:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", "typeString": "mapping(uint256 => address)" } }, - "id": 231, + "id": 170, "indexExpression": { "argumentTypes": null, - "id": 230, + "id": 169, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 224, - "src": "3316:6:1", + "referencedDeclaration": 163, + "src": "3275:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2719,21 +2590,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "3305:18:1", + "src": "3264:18:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "functionReturnParameters": 228, - "id": 232, + "functionReturnParameters": 167, + "id": 171, "nodeType": "Return", - "src": "3298:25:1" + "src": "3257:25:0" } ] }, "documentation": null, - "id": 234, + "id": 173, "implemented": true, "isConstructor": false, "isDeclaredConst": true, @@ -2741,16 +2612,16 @@ "name": "getOwner", "nodeType": "FunctionDefinition", "parameters": { - "id": 225, + "id": 164, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 224, + "id": 163, "name": "postId", "nodeType": "VariableDeclaration", - "scope": 234, - "src": "3244:11:1", + "scope": 173, + "src": "3203:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2758,10 +2629,10 @@ "typeString": "uint256" }, "typeName": { - "id": 223, + "id": 162, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "3244:4:1", + "src": "3203:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2771,20 +2642,20 @@ "visibility": "internal" } ], - "src": "3243:13:1" + "src": "3202:13:0" }, "payable": false, "returnParameters": { - "id": 228, + "id": 167, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 227, + "id": 166, "name": "", "nodeType": "VariableDeclaration", - "scope": 234, - "src": "3278:7:1", + "scope": 173, + "src": "3237:7:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2792,10 +2663,10 @@ "typeString": "address" }, "typeName": { - "id": 226, + "id": 165, "name": "address", "nodeType": "ElementaryTypeName", - "src": "3278:7:1", + "src": "3237:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2805,19 +2676,19 @@ "visibility": "internal" } ], - "src": "3277:9:1" + "src": "3236:9:0" }, - "scope": 1070, - "src": "3226:105:1", + "scope": 857, + "src": "3185:105:0", "stateMutability": "view", "superFunction": null, "visibility": "public" }, { "body": { - "id": 295, + "id": 234, "nodeType": "Block", - "src": "3405:419:1", + "src": "3364:419:0", "statements": [ { "expression": { @@ -2829,19 +2700,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 242, + "id": 181, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 240, + "id": 179, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 236, - "src": "3424:6:1", + "referencedDeclaration": 175, + "src": "3383:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2852,14 +2723,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 241, + "id": 180, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "3434:1:1", + "src": "3393:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -2867,7 +2738,7 @@ }, "value": "0" }, - "src": "3424:11:1", + "src": "3383:11:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -2876,14 +2747,14 @@ { "argumentTypes": null, "hexValue": "766f746573206973206e6f7420666f7220612076616c696420706f7374", - "id": 243, + "id": 182, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "3437:31:1", + "src": "3396:31:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_ff3dacff5ff4f61cab4f46ef6127fdb7fdc77ddfb8b67e7ad2650377bf778ed8", @@ -2903,21 +2774,21 @@ "typeString": "literal_string \"votes is not for a valid post\"" } ], - "id": 239, + "id": 178, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1088, - 1089 + 875, + 876 ], - "referencedDeclaration": 1089, - "src": "3416:7:1", + "referencedDeclaration": 876, + "src": "3375:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 244, + "id": 183, "isConstant": false, "isLValue": false, "isPure": false, @@ -2925,15 +2796,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3416:53:1", + "src": "3375:53:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 245, + "id": 184, "nodeType": "ExpressionStatement", - "src": "3416:53:1" + "src": "3375:53:0" }, { "expression": { @@ -2945,19 +2816,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 249, + "id": 188, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 247, + "id": 186, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 236, - "src": "3488:6:1", + "referencedDeclaration": 175, + "src": "3447:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2967,18 +2838,18 @@ "operator": "<", "rightExpression": { "argumentTypes": null, - "id": 248, + "id": 187, "name": "postNumber", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 60, - "src": "3497:10:1", + "referencedDeclaration": 3, + "src": "3456:10:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "3488:19:1", + "src": "3447:19:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -2987,14 +2858,14 @@ { "argumentTypes": null, "hexValue": "766f74657320697320666f722061206e6f6e206578697374656e7420706f7374", - "id": 250, + "id": 189, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "3509:34:1", + "src": "3468:34:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_c5c2b6bc9661424e678d353e544becf16e7105065d06cadc50a2e92c037d1b9b", @@ -3014,21 +2885,21 @@ "typeString": "literal_string \"votes is for a non existent post\"" } ], - "id": 246, + "id": 185, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1088, - 1089 + 875, + 876 ], - "referencedDeclaration": 1089, - "src": "3480:7:1", + "referencedDeclaration": 876, + "src": "3439:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 251, + "id": 190, "isConstant": false, "isLValue": false, "isPure": false, @@ -3036,28 +2907,28 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3480:64:1", + "src": "3439:64:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 252, + "id": 191, "nodeType": "ExpressionStatement", - "src": "3480:64:1" + "src": "3439:64:0" }, { "assignments": [ - 254 + 193 ], "declarations": [ { "constant": false, - "id": 254, + "id": 193, "name": "knownType", "nodeType": "VariableDeclaration", - "scope": 296, - "src": "3565:14:1", + "scope": 235, + "src": "3524:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3065,10 +2936,10 @@ "typeString": "uint256" }, "typeName": { - "id": 253, + "id": 192, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "3565:4:1", + "src": "3524:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3078,41 +2949,41 @@ "visibility": "internal" } ], - "id": 261, + "id": 200, "initialValue": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 255, + "id": 194, "name": "voters", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 78, - "src": "3582:6:1", + "referencedDeclaration": 21, + "src": "3541:6:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_uint256_$_$", "typeString": "mapping(address => mapping(uint256 => uint256))" } }, - "id": 258, + "id": 197, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 256, + "id": 195, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "3589:3:1", + "referencedDeclaration": 872, + "src": "3548:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 257, + "id": 196, "isConstant": false, "isLValue": false, "isPure": false, @@ -3120,7 +2991,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "3589:10:1", + "src": "3548:10:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -3131,21 +3002,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "3582:18:1", + "src": "3541:18:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" } }, - "id": 260, + "id": 199, "indexExpression": { "argumentTypes": null, - "id": 259, + "id": 198, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 236, - "src": "3601:6:1", + "referencedDeclaration": 175, + "src": "3560:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3156,14 +3027,14 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "3582:26:1", + "src": "3541:26:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", - "src": "3565:43:1" + "src": "3524:43:0" }, { "expression": { @@ -3175,19 +3046,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 265, + "id": 204, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 263, + "id": 202, "name": "knownType", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 254, - "src": "3627:9:1", + "referencedDeclaration": 193, + "src": "3586:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3198,14 +3069,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "31", - "id": 264, + "id": 203, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "3640:1:1", + "src": "3599:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", @@ -3213,7 +3084,7 @@ }, "value": "1" }, - "src": "3627:14:1", + "src": "3586:14:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -3222,14 +3093,14 @@ { "argumentTypes": null, "hexValue": "5570766f746520616c726561647920646f6e65", - "id": 266, + "id": 205, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "3643:21:1", + "src": "3602:21:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_df24b86cc4620336f368688345ca505ad90fcac9d2a55b94a3e3f9a021ddf783", @@ -3249,21 +3120,21 @@ "typeString": "literal_string \"Upvote already done\"" } ], - "id": 262, + "id": 201, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1088, - 1089 + 875, + 876 ], - "referencedDeclaration": 1089, - "src": "3619:7:1", + "referencedDeclaration": 876, + "src": "3578:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 267, + "id": 206, "isConstant": false, "isLValue": false, "isPure": false, @@ -3271,15 +3142,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3619:46:1", + "src": "3578:46:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 268, + "id": 207, "nodeType": "ExpressionStatement", - "src": "3619:46:1" + "src": "3578:46:0" }, { "condition": { @@ -3288,19 +3159,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 271, + "id": 210, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 269, + "id": 208, "name": "knownType", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 254, - "src": "3680:9:1", + "referencedDeclaration": 193, + "src": "3639:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3311,14 +3182,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "32", - "id": 270, + "id": 209, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "3693:1:1", + "src": "3652:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_2_by_1", @@ -3326,25 +3197,25 @@ }, "value": "2" }, - "src": "3680:14:1", + "src": "3639:14:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, - "id": 279, + "id": 218, "nodeType": "IfStatement", - "src": "3676:69:1", + "src": "3635:69:0", "trueBody": { - "id": 278, + "id": 217, "nodeType": "Block", - "src": "3696:49:1", + "src": "3655:49:0", "statements": [ { "expression": { "argumentTypes": null, - "id": 276, + "id": 215, "isConstant": false, "isLValue": false, "isPure": false, @@ -3353,26 +3224,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 272, + "id": 211, "name": "downvotes", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 72, - "src": "3711:9:1", + "referencedDeclaration": 15, + "src": "3670:9:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" } }, - "id": 274, + "id": 213, "indexExpression": { "argumentTypes": null, - "id": 273, + "id": 212, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 236, - "src": "3721:6:1", + "referencedDeclaration": 175, + "src": "3680:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3383,7 +3254,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "3711:17:1", + "src": "3670:17:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3394,14 +3265,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "31", - "id": 275, + "id": 214, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "3732:1:1", + "src": "3691:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", @@ -3409,15 +3280,15 @@ }, "value": "1" }, - "src": "3711:22:1", + "src": "3670:22:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 277, + "id": 216, "nodeType": "ExpressionStatement", - "src": "3711:22:1" + "src": "3670:22:0" } ] } @@ -3425,7 +3296,7 @@ { "expression": { "argumentTypes": null, - "id": 287, + "id": 226, "isConstant": false, "isLValue": false, "isPure": false, @@ -3436,34 +3307,34 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 280, + "id": 219, "name": "voters", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 78, - "src": "3755:6:1", + "referencedDeclaration": 21, + "src": "3714:6:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_uint256_$_$", "typeString": "mapping(address => mapping(uint256 => uint256))" } }, - "id": 284, + "id": 223, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 281, + "id": 220, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "3762:3:1", + "referencedDeclaration": 872, + "src": "3721:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 282, + "id": 221, "isConstant": false, "isLValue": false, "isPure": false, @@ -3471,7 +3342,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "3762:10:1", + "src": "3721:10:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -3482,21 +3353,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "3755:18:1", + "src": "3714:18:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" } }, - "id": 285, + "id": 224, "indexExpression": { "argumentTypes": null, - "id": 283, + "id": 222, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 236, - "src": "3774:6:1", + "referencedDeclaration": 175, + "src": "3733:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3507,7 +3378,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "3755:26:1", + "src": "3714:26:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3518,14 +3389,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "31", - "id": 286, + "id": 225, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "3784:1:1", + "src": "3743:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", @@ -3533,20 +3404,20 @@ }, "value": "1" }, - "src": "3755:30:1", + "src": "3714:30:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 288, + "id": 227, "nodeType": "ExpressionStatement", - "src": "3755:30:1" + "src": "3714:30:0" }, { "expression": { "argumentTypes": null, - "id": 293, + "id": 232, "isConstant": false, "isLValue": false, "isPure": false, @@ -3555,26 +3426,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 289, + "id": 228, "name": "upvotes", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "3796:7:1", + "referencedDeclaration": 11, + "src": "3755:7:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" } }, - "id": 291, + "id": 230, "indexExpression": { "argumentTypes": null, - "id": 290, + "id": 229, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 236, - "src": "3804:6:1", + "referencedDeclaration": 175, + "src": "3763:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3585,7 +3456,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "3796:15:1", + "src": "3755:15:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3596,14 +3467,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "31", - "id": 292, + "id": 231, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "3815:1:1", + "src": "3774:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", @@ -3611,20 +3482,20 @@ }, "value": "1" }, - "src": "3796:20:1", + "src": "3755:20:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 294, + "id": 233, "nodeType": "ExpressionStatement", - "src": "3796:20:1" + "src": "3755:20:0" } ] }, "documentation": null, - "id": 296, + "id": 235, "implemented": true, "isConstructor": false, "isDeclaredConst": false, @@ -3632,16 +3503,16 @@ "name": "UpvotePost", "nodeType": "FunctionDefinition", "parameters": { - "id": 237, + "id": 176, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 236, + "id": 175, "name": "postId", "nodeType": "VariableDeclaration", - "scope": 296, - "src": "3385:11:1", + "scope": 235, + "src": "3344:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3649,10 +3520,10 @@ "typeString": "uint256" }, "typeName": { - "id": 235, + "id": 174, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "3385:4:1", + "src": "3344:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3662,26 +3533,26 @@ "visibility": "internal" } ], - "src": "3384:13:1" + "src": "3343:13:0" }, "payable": false, "returnParameters": { - "id": 238, + "id": 177, "nodeType": "ParameterList", "parameters": [], - "src": "3405:0:1" + "src": "3364:0:0" }, - "scope": 1070, - "src": "3365:459:1", + "scope": 857, + "src": "3324:459:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { - "id": 357, + "id": 296, "nodeType": "Block", - "src": "3902:413:1", + "src": "3861:413:0", "statements": [ { "expression": { @@ -3693,19 +3564,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 304, + "id": 243, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 302, + "id": 241, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 298, - "src": "3921:6:1", + "referencedDeclaration": 237, + "src": "3880:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3716,14 +3587,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 303, + "id": 242, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "3931:1:1", + "src": "3890:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -3731,7 +3602,7 @@ }, "value": "0" }, - "src": "3921:11:1", + "src": "3880:11:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -3740,14 +3611,14 @@ { "argumentTypes": null, "hexValue": "766f746573206973206e6f7420666f7220612076616c696420706f7374", - "id": 305, + "id": 244, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "3934:31:1", + "src": "3893:31:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_ff3dacff5ff4f61cab4f46ef6127fdb7fdc77ddfb8b67e7ad2650377bf778ed8", @@ -3767,21 +3638,21 @@ "typeString": "literal_string \"votes is not for a valid post\"" } ], - "id": 301, + "id": 240, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1088, - 1089 + 875, + 876 ], - "referencedDeclaration": 1089, - "src": "3913:7:1", + "referencedDeclaration": 876, + "src": "3872:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 306, + "id": 245, "isConstant": false, "isLValue": false, "isPure": false, @@ -3789,15 +3660,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3913:53:1", + "src": "3872:53:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 307, + "id": 246, "nodeType": "ExpressionStatement", - "src": "3913:53:1" + "src": "3872:53:0" }, { "expression": { @@ -3809,19 +3680,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 311, + "id": 250, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 309, + "id": 248, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 298, - "src": "3985:6:1", + "referencedDeclaration": 237, + "src": "3944:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3831,18 +3702,18 @@ "operator": "<", "rightExpression": { "argumentTypes": null, - "id": 310, + "id": 249, "name": "postNumber", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 60, - "src": "3994:10:1", + "referencedDeclaration": 3, + "src": "3953:10:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "3985:19:1", + "src": "3944:19:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -3851,14 +3722,14 @@ { "argumentTypes": null, "hexValue": "766f74657320697320666f722061206e6f6e206578697374656e7420706f7374", - "id": 312, + "id": 251, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "4006:34:1", + "src": "3965:34:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_c5c2b6bc9661424e678d353e544becf16e7105065d06cadc50a2e92c037d1b9b", @@ -3878,21 +3749,21 @@ "typeString": "literal_string \"votes is for a non existent post\"" } ], - "id": 308, + "id": 247, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1088, - 1089 + 875, + 876 ], - "referencedDeclaration": 1089, - "src": "3977:7:1", + "referencedDeclaration": 876, + "src": "3936:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 313, + "id": 252, "isConstant": false, "isLValue": false, "isPure": false, @@ -3900,28 +3771,28 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3977:64:1", + "src": "3936:64:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 314, + "id": 253, "nodeType": "ExpressionStatement", - "src": "3977:64:1" + "src": "3936:64:0" }, { "assignments": [ - 316 + 255 ], "declarations": [ { "constant": false, - "id": 316, + "id": 255, "name": "knownType", "nodeType": "VariableDeclaration", - "scope": 358, - "src": "4054:14:1", + "scope": 297, + "src": "4013:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3929,10 +3800,10 @@ "typeString": "uint256" }, "typeName": { - "id": 315, + "id": 254, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "4054:4:1", + "src": "4013:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3942,41 +3813,41 @@ "visibility": "internal" } ], - "id": 323, + "id": 262, "initialValue": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 317, + "id": 256, "name": "voters", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 78, - "src": "4071:6:1", + "referencedDeclaration": 21, + "src": "4030:6:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_uint256_$_$", "typeString": "mapping(address => mapping(uint256 => uint256))" } }, - "id": 320, + "id": 259, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 318, + "id": 257, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "4078:3:1", + "referencedDeclaration": 872, + "src": "4037:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 319, + "id": 258, "isConstant": false, "isLValue": false, "isPure": false, @@ -3984,7 +3855,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "4078:10:1", + "src": "4037:10:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -3995,21 +3866,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "4071:18:1", + "src": "4030:18:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" } }, - "id": 322, + "id": 261, "indexExpression": { "argumentTypes": null, - "id": 321, + "id": 260, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 298, - "src": "4090:6:1", + "referencedDeclaration": 237, + "src": "4049:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4020,14 +3891,14 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "4071:26:1", + "src": "4030:26:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", - "src": "4054:43:1" + "src": "4013:43:0" }, { "expression": { @@ -4039,19 +3910,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 327, + "id": 266, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 325, + "id": 264, "name": "knownType", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 316, - "src": "4116:9:1", + "referencedDeclaration": 255, + "src": "4075:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4062,14 +3933,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "32", - "id": 326, + "id": 265, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "4129:1:1", + "src": "4088:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_2_by_1", @@ -4077,7 +3948,7 @@ }, "value": "2" }, - "src": "4116:14:1", + "src": "4075:14:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -4086,14 +3957,14 @@ { "argumentTypes": null, "hexValue": "646f776e766f746520616c726561647920646f6e65", - "id": 328, + "id": 267, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "4132:23:1", + "src": "4091:23:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_749e4eea76fb668a5aa4702533cac2ca4e79cdc17aca5f347852f7e651aaaa78", @@ -4113,21 +3984,21 @@ "typeString": "literal_string \"downvote already done\"" } ], - "id": 324, + "id": 263, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1088, - 1089 + 875, + 876 ], - "referencedDeclaration": 1089, - "src": "4108:7:1", + "referencedDeclaration": 876, + "src": "4067:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 329, + "id": 268, "isConstant": false, "isLValue": false, "isPure": false, @@ -4135,15 +4006,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "4108:48:1", + "src": "4067:48:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 330, + "id": 269, "nodeType": "ExpressionStatement", - "src": "4108:48:1" + "src": "4067:48:0" }, { "condition": { @@ -4152,19 +4023,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 333, + "id": 272, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 331, + "id": 270, "name": "knownType", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 316, - "src": "4171:9:1", + "referencedDeclaration": 255, + "src": "4130:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4175,14 +4046,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "31", - "id": 332, + "id": 271, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "4184:1:1", + "src": "4143:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", @@ -4190,25 +4061,25 @@ }, "value": "1" }, - "src": "4171:14:1", + "src": "4130:14:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, - "id": 341, + "id": 280, "nodeType": "IfStatement", - "src": "4167:67:1", + "src": "4126:67:0", "trueBody": { - "id": 340, + "id": 279, "nodeType": "Block", - "src": "4187:47:1", + "src": "4146:47:0", "statements": [ { "expression": { "argumentTypes": null, - "id": 338, + "id": 277, "isConstant": false, "isLValue": false, "isPure": false, @@ -4217,26 +4088,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 334, + "id": 273, "name": "upvotes", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "4202:7:1", + "referencedDeclaration": 11, + "src": "4161:7:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" } }, - "id": 336, + "id": 275, "indexExpression": { "argumentTypes": null, - "id": 335, + "id": 274, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 298, - "src": "4210:6:1", + "referencedDeclaration": 237, + "src": "4169:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4247,7 +4118,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "4202:15:1", + "src": "4161:15:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4258,14 +4129,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "31", - "id": 337, + "id": 276, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "4221:1:1", + "src": "4180:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", @@ -4273,15 +4144,15 @@ }, "value": "1" }, - "src": "4202:20:1", + "src": "4161:20:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 339, + "id": 278, "nodeType": "ExpressionStatement", - "src": "4202:20:1" + "src": "4161:20:0" } ] } @@ -4289,7 +4160,7 @@ { "expression": { "argumentTypes": null, - "id": 349, + "id": 288, "isConstant": false, "isLValue": false, "isPure": false, @@ -4300,34 +4171,34 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 342, + "id": 281, "name": "voters", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 78, - "src": "4244:6:1", + "referencedDeclaration": 21, + "src": "4203:6:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_uint256_$_$", "typeString": "mapping(address => mapping(uint256 => uint256))" } }, - "id": 346, + "id": 285, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 343, + "id": 282, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "4251:3:1", + "referencedDeclaration": 872, + "src": "4210:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 344, + "id": 283, "isConstant": false, "isLValue": false, "isPure": false, @@ -4335,7 +4206,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "4251:10:1", + "src": "4210:10:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -4346,21 +4217,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "4244:18:1", + "src": "4203:18:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" } }, - "id": 347, + "id": 286, "indexExpression": { "argumentTypes": null, - "id": 345, + "id": 284, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 298, - "src": "4263:6:1", + "referencedDeclaration": 237, + "src": "4222:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4371,7 +4242,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "4244:26:1", + "src": "4203:26:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4382,14 +4253,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "32", - "id": 348, + "id": 287, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "4273:1:1", + "src": "4232:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_2_by_1", @@ -4397,20 +4268,20 @@ }, "value": "2" }, - "src": "4244:30:1", + "src": "4203:30:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 350, + "id": 289, "nodeType": "ExpressionStatement", - "src": "4244:30:1" + "src": "4203:30:0" }, { "expression": { "argumentTypes": null, - "id": 355, + "id": 294, "isConstant": false, "isLValue": false, "isPure": false, @@ -4419,26 +4290,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 351, + "id": 290, "name": "downvotes", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 72, - "src": "4285:9:1", + "referencedDeclaration": 15, + "src": "4244:9:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" } }, - "id": 353, + "id": 292, "indexExpression": { "argumentTypes": null, - "id": 352, + "id": 291, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 298, - "src": "4295:6:1", + "referencedDeclaration": 237, + "src": "4254:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4449,7 +4320,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "4285:17:1", + "src": "4244:17:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4460,14 +4331,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "31", - "id": 354, + "id": 293, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "4306:1:1", + "src": "4265:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", @@ -4475,20 +4346,20 @@ }, "value": "1" }, - "src": "4285:22:1", + "src": "4244:22:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 356, + "id": 295, "nodeType": "ExpressionStatement", - "src": "4285:22:1" + "src": "4244:22:0" } ] }, "documentation": null, - "id": 358, + "id": 297, "implemented": true, "isConstructor": false, "isDeclaredConst": false, @@ -4496,16 +4367,16 @@ "name": "DownvotePost", "nodeType": "FunctionDefinition", "parameters": { - "id": 299, + "id": 238, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 298, + "id": 237, "name": "postId", "nodeType": "VariableDeclaration", - "scope": 358, - "src": "3882:11:1", + "scope": 297, + "src": "3841:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4513,10 +4384,10 @@ "typeString": "uint256" }, "typeName": { - "id": 297, + "id": 236, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "3882:4:1", + "src": "3841:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4526,52 +4397,52 @@ "visibility": "internal" } ], - "src": "3881:13:1" + "src": "3840:13:0" }, "payable": false, "returnParameters": { - "id": 300, + "id": 239, "nodeType": "ParameterList", "parameters": [], - "src": "3902:0:1" + "src": "3861:0:0" }, - "scope": 1070, - "src": "3860:455:1", + "scope": 857, + "src": "3819:455:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { - "id": 369, + "id": 308, "nodeType": "Block", - "src": "4412:41:1", + "src": "4371:41:0", "statements": [ { "expression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 365, + "id": 304, "name": "upvotes", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "4430:7:1", + "referencedDeclaration": 11, + "src": "4389:7:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" } }, - "id": 367, + "id": 306, "indexExpression": { "argumentTypes": null, - "id": 366, + "id": 305, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 360, - "src": "4438:6:1", + "referencedDeclaration": 299, + "src": "4397:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4582,21 +4453,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "4430:15:1", + "src": "4389:15:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 364, - "id": 368, + "functionReturnParameters": 303, + "id": 307, "nodeType": "Return", - "src": "4423:22:1" + "src": "4382:22:0" } ] }, "documentation": null, - "id": 370, + "id": 309, "implemented": true, "isConstructor": false, "isDeclaredConst": true, @@ -4604,16 +4475,16 @@ "name": "getUpVotes", "nodeType": "FunctionDefinition", "parameters": { - "id": 361, + "id": 300, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 360, + "id": 299, "name": "postId", "nodeType": "VariableDeclaration", - "scope": 370, - "src": "4372:11:1", + "scope": 309, + "src": "4331:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4621,10 +4492,10 @@ "typeString": "uint256" }, "typeName": { - "id": 359, + "id": 298, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "4372:4:1", + "src": "4331:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4634,20 +4505,20 @@ "visibility": "internal" } ], - "src": "4371:13:1" + "src": "4330:13:0" }, "payable": false, "returnParameters": { - "id": 364, + "id": 303, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 363, + "id": 302, "name": "", "nodeType": "VariableDeclaration", - "scope": 370, - "src": "4406:4:1", + "scope": 309, + "src": "4365:4:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4655,10 +4526,10 @@ "typeString": "uint256" }, "typeName": { - "id": 362, + "id": 301, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "4406:4:1", + "src": "4365:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4668,45 +4539,45 @@ "visibility": "internal" } ], - "src": "4405:6:1" + "src": "4364:6:0" }, - "scope": 1070, - "src": "4352:101:1", + "scope": 857, + "src": "4311:101:0", "stateMutability": "view", "superFunction": null, "visibility": "public" }, { "body": { - "id": 381, + "id": 320, "nodeType": "Block", - "src": "4548:43:1", + "src": "4507:43:0", "statements": [ { "expression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 377, + "id": 316, "name": "downvotes", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 72, - "src": "4566:9:1", + "referencedDeclaration": 15, + "src": "4525:9:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" } }, - "id": 379, + "id": 318, "indexExpression": { "argumentTypes": null, - "id": 378, + "id": 317, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 372, - "src": "4576:6:1", + "referencedDeclaration": 311, + "src": "4535:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4717,21 +4588,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "4566:17:1", + "src": "4525:17:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 376, - "id": 380, + "functionReturnParameters": 315, + "id": 319, "nodeType": "Return", - "src": "4559:24:1" + "src": "4518:24:0" } ] }, "documentation": null, - "id": 382, + "id": 321, "implemented": true, "isConstructor": false, "isDeclaredConst": true, @@ -4739,16 +4610,16 @@ "name": "getDownVotes", "nodeType": "FunctionDefinition", "parameters": { - "id": 373, + "id": 312, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 372, + "id": 311, "name": "postId", "nodeType": "VariableDeclaration", - "scope": 382, - "src": "4508:11:1", + "scope": 321, + "src": "4467:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4756,10 +4627,10 @@ "typeString": "uint256" }, "typeName": { - "id": 371, + "id": 310, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "4508:4:1", + "src": "4467:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4769,20 +4640,20 @@ "visibility": "internal" } ], - "src": "4507:13:1" + "src": "4466:13:0" }, "payable": false, "returnParameters": { - "id": 376, + "id": 315, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 375, + "id": 314, "name": "", "nodeType": "VariableDeclaration", - "scope": 382, - "src": "4542:4:1", + "scope": 321, + "src": "4501:4:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4790,10 +4661,10 @@ "typeString": "uint256" }, "typeName": { - "id": 374, + "id": 313, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "4542:4:1", + "src": "4501:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4803,19 +4674,19 @@ "visibility": "internal" } ], - "src": "4541:6:1" + "src": "4500:6:0" }, - "scope": 1070, - "src": "4486:105:1", + "scope": 857, + "src": "4445:105:0", "stateMutability": "view", "superFunction": null, "visibility": "public" }, { "body": { - "id": 397, + "id": 336, "nodeType": "Block", - "src": "4706:47:1", + "src": "4665:47:0", "statements": [ { "expression": { @@ -4824,26 +4695,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 391, + "id": 330, "name": "voters", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 78, - "src": "4724:6:1", + "referencedDeclaration": 21, + "src": "4683:6:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_uint256_$_$", "typeString": "mapping(address => mapping(uint256 => uint256))" } }, - "id": 393, + "id": 332, "indexExpression": { "argumentTypes": null, - "id": 392, + "id": 331, "name": "voter", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 386, - "src": "4731:5:1", + "referencedDeclaration": 325, + "src": "4690:5:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -4854,21 +4725,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "4724:13:1", + "src": "4683:13:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" } }, - "id": 395, + "id": 334, "indexExpression": { "argumentTypes": null, - "id": 394, + "id": 333, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 384, - "src": "4738:6:1", + "referencedDeclaration": 323, + "src": "4697:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4879,21 +4750,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "4724:21:1", + "src": "4683:21:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 390, - "id": 396, + "functionReturnParameters": 329, + "id": 335, "nodeType": "Return", - "src": "4717:28:1" + "src": "4676:28:0" } ] }, "documentation": null, - "id": 398, + "id": 337, "implemented": true, "isConstructor": false, "isDeclaredConst": true, @@ -4901,16 +4772,16 @@ "name": "getVoterData", "nodeType": "FunctionDefinition", "parameters": { - "id": 387, + "id": 326, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 384, + "id": 323, "name": "postId", "nodeType": "VariableDeclaration", - "scope": 398, - "src": "4651:11:1", + "scope": 337, + "src": "4610:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4918,10 +4789,10 @@ "typeString": "uint256" }, "typeName": { - "id": 383, + "id": 322, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "4651:4:1", + "src": "4610:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4932,11 +4803,11 @@ }, { "constant": false, - "id": 386, + "id": 325, "name": "voter", "nodeType": "VariableDeclaration", - "scope": 398, - "src": "4664:13:1", + "scope": 337, + "src": "4623:13:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4944,10 +4815,10 @@ "typeString": "address" }, "typeName": { - "id": 385, + "id": 324, "name": "address", "nodeType": "ElementaryTypeName", - "src": "4664:7:1", + "src": "4623:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -4957,20 +4828,20 @@ "visibility": "internal" } ], - "src": "4650:28:1" + "src": "4609:28:0" }, "payable": false, "returnParameters": { - "id": 390, + "id": 329, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 389, + "id": 328, "name": "", "nodeType": "VariableDeclaration", - "scope": 398, - "src": "4700:4:1", + "scope": 337, + "src": "4659:4:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4978,10 +4849,10 @@ "typeString": "uint256" }, "typeName": { - "id": 388, + "id": 327, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "4700:4:1", + "src": "4659:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4991,10 +4862,10 @@ "visibility": "internal" } ], - "src": "4699:6:1" + "src": "4658:6:0" }, - "scope": 1070, - "src": "4629:124:1", + "scope": 857, + "src": "4588:124:0", "stateMutability": "view", "superFunction": null, "visibility": "public" @@ -5002,21 +4873,21 @@ { "anonymous": false, "documentation": "//////// Comment functionality\r", - "id": 412, + "id": 351, "name": "CommentCreated", "nodeType": "EventDefinition", "parameters": { - "id": 411, + "id": 350, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 400, + "id": 339, "indexed": true, "name": "commenter", "nodeType": "VariableDeclaration", - "scope": 412, - "src": "4895:25:1", + "scope": 351, + "src": "4854:25:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5024,10 +4895,10 @@ "typeString": "address" }, "typeName": { - "id": 399, + "id": 338, "name": "address", "nodeType": "ElementaryTypeName", - "src": "4895:7:1", + "src": "4854:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -5038,12 +4909,12 @@ }, { "constant": false, - "id": 402, + "id": 341, "indexed": true, "name": "postId", "nodeType": "VariableDeclaration", - "scope": 412, - "src": "4931:19:1", + "scope": 351, + "src": "4890:19:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5051,10 +4922,10 @@ "typeString": "uint256" }, "typeName": { - "id": 401, + "id": 340, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "4931:4:1", + "src": "4890:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5065,12 +4936,12 @@ }, { "constant": false, - "id": 404, + "id": 343, "indexed": false, "name": "comment", "nodeType": "VariableDeclaration", - "scope": 412, - "src": "4961:13:1", + "scope": 351, + "src": "4920:13:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5078,10 +4949,10 @@ "typeString": "bytes" }, "typeName": { - "id": 403, + "id": 342, "name": "bytes", "nodeType": "ElementaryTypeName", - "src": "4961:5:1", + "src": "4920:5:0", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" @@ -5092,12 +4963,12 @@ }, { "constant": false, - "id": 406, + "id": 345, "indexed": false, "name": "parentComment", "nodeType": "VariableDeclaration", - "scope": 412, - "src": "4985:18:1", + "scope": 351, + "src": "4944:18:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5105,10 +4976,10 @@ "typeString": "uint256" }, "typeName": { - "id": 405, + "id": 344, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "4985:4:1", + "src": "4944:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5119,12 +4990,12 @@ }, { "constant": false, - "id": 408, + "id": 347, "indexed": false, "name": "commentTimestamp", "nodeType": "VariableDeclaration", - "scope": 412, - "src": "5008:21:1", + "scope": 351, + "src": "4967:21:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5132,10 +5003,10 @@ "typeString": "uint256" }, "typeName": { - "id": 407, + "id": 346, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "5008:4:1", + "src": "4967:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5146,12 +5017,12 @@ }, { "constant": false, - "id": 410, + "id": 349, "indexed": false, "name": "commentId", "nodeType": "VariableDeclaration", - "scope": 412, - "src": "5034:14:1", + "scope": 351, + "src": "4993:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5159,10 +5030,10 @@ "typeString": "uint256" }, "typeName": { - "id": 409, + "id": 348, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "5034:4:1", + "src": "4993:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5172,15 +5043,15 @@ "visibility": "internal" } ], - "src": "4884:171:1" + "src": "4843:171:0" }, - "src": "4863:193:1" + "src": "4822:193:0" }, { "body": { - "id": 495, + "id": 434, "nodeType": "Block", - "src": "5141:740:1", + "src": "5100:740:0", "statements": [ { "expression": { @@ -5192,19 +5063,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 424, + "id": 363, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 422, + "id": 361, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 416, - "src": "5160:6:1", + "referencedDeclaration": 355, + "src": "5119:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5215,14 +5086,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 423, + "id": 362, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "5170:1:1", + "src": "5129:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -5230,7 +5101,7 @@ }, "value": "0" }, - "src": "5160:11:1", + "src": "5119:11:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -5239,14 +5110,14 @@ { "argumentTypes": null, "hexValue": "636f6d6d656e74206973206e6f7420666f7220612076616c696420706f7374", - "id": 425, + "id": 364, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "5173:33:1", + "src": "5132:33:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_0eb102993c6ce63b6bf90c80ddf03b1e9536f3495e80364b1b7b77b868e9b110", @@ -5266,21 +5137,21 @@ "typeString": "literal_string \"comment is not for a valid post\"" } ], - "id": 421, + "id": 360, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1088, - 1089 + 875, + 876 ], - "referencedDeclaration": 1089, - "src": "5152:7:1", + "referencedDeclaration": 876, + "src": "5111:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 426, + "id": 365, "isConstant": false, "isLValue": false, "isPure": false, @@ -5288,15 +5159,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "5152:55:1", + "src": "5111:55:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 427, + "id": 366, "nodeType": "ExpressionStatement", - "src": "5152:55:1" + "src": "5111:55:0" }, { "expression": { @@ -5308,19 +5179,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 431, + "id": 370, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 429, + "id": 368, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 416, - "src": "5226:6:1", + "referencedDeclaration": 355, + "src": "5185:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5330,18 +5201,18 @@ "operator": "<", "rightExpression": { "argumentTypes": null, - "id": 430, + "id": 369, "name": "postNumber", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 60, - "src": "5235:10:1", + "referencedDeclaration": 3, + "src": "5194:10:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "5226:19:1", + "src": "5185:19:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -5350,14 +5221,14 @@ { "argumentTypes": null, "hexValue": "636f6d6d656e7420697320666f722061206e6f6e206578697374656e7420706f7374", - "id": 432, + "id": 371, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "5247:36:1", + "src": "5206:36:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_94bb335858cd8a7d087f3331b0c6a338c2080f1b2c1ae7a5791494534c86f621", @@ -5377,21 +5248,21 @@ "typeString": "literal_string \"comment is for a non existent post\"" } ], - "id": 428, + "id": 367, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1088, - 1089 + 875, + 876 ], - "referencedDeclaration": 1089, - "src": "5218:7:1", + "referencedDeclaration": 876, + "src": "5177:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 433, + "id": 372, "isConstant": false, "isLValue": false, "isPure": false, @@ -5399,15 +5270,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "5218:66:1", + "src": "5177:66:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 434, + "id": 373, "nodeType": "ExpressionStatement", - "src": "5218:66:1" + "src": "5177:66:0" }, { "expression": { @@ -5419,7 +5290,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 439, + "id": 378, "isConstant": false, "isLValue": false, "isPure": false, @@ -5428,18 +5299,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 436, + "id": 375, "name": "text", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 414, - "src": "5303:4:1", + "referencedDeclaration": 353, + "src": "5262:4:0", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, - "id": 437, + "id": 376, "isConstant": false, "isLValue": false, "isPure": false, @@ -5447,7 +5318,7 @@ "memberName": "length", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "5303:11:1", + "src": "5262:11:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5458,14 +5329,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 438, + "id": 377, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "5317:1:1", + "src": "5276:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -5473,7 +5344,7 @@ }, "value": "0" }, - "src": "5303:15:1", + "src": "5262:15:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -5482,14 +5353,14 @@ { "argumentTypes": null, "hexValue": "636f6d6d656e7420636f6d6d656e7420697320656d707479", - "id": 440, + "id": 379, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "5320:26:1", + "src": "5279:26:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_86e7a1ab6a30f4dffb45e2144b047a5c3e897c143cb54acb6a1526a0a202db30", @@ -5509,21 +5380,21 @@ "typeString": "literal_string \"comment comment is empty\"" } ], - "id": 435, + "id": 374, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1088, - 1089 + 875, + 876 ], - "referencedDeclaration": 1089, - "src": "5295:7:1", + "referencedDeclaration": 876, + "src": "5254:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 441, + "id": 380, "isConstant": false, "isLValue": false, "isPure": false, @@ -5531,28 +5402,28 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "5295:52:1", + "src": "5254:52:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 442, + "id": 381, "nodeType": "ExpressionStatement", - "src": "5295:52:1" + "src": "5254:52:0" }, { "assignments": [ - 444 + 383 ], "declarations": [ { "constant": false, - "id": 444, + "id": 383, "name": "commentId", "nodeType": "VariableDeclaration", - "scope": 496, - "src": "5400:14:1", + "scope": 435, + "src": "5359:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5560,10 +5431,10 @@ "typeString": "uint256" }, "typeName": { - "id": 443, + "id": 382, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "5400:4:1", + "src": "5359:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5573,31 +5444,31 @@ "visibility": "internal" } ], - "id": 448, + "id": 387, "initialValue": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 445, + "id": 384, "name": "commentCounter", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 82, - "src": "5417:14:1", + "referencedDeclaration": 25, + "src": "5376:14:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" } }, - "id": 447, + "id": 386, "indexExpression": { "argumentTypes": null, - "id": 446, + "id": 385, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 416, - "src": "5432:6:1", + "referencedDeclaration": 355, + "src": "5391:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5608,14 +5479,14 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "5417:22:1", + "src": "5376:22:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", - "src": "5400:39:1" + "src": "5359:39:0" }, { "eventCall": { @@ -5625,18 +5496,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 450, + "id": 389, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "5502:3:1", + "referencedDeclaration": 872, + "src": "5461:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 451, + "id": 390, "isConstant": false, "isLValue": false, "isPure": false, @@ -5644,7 +5515,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "5502:10:1", + "src": "5461:10:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -5652,12 +5523,12 @@ }, { "argumentTypes": null, - "id": 452, + "id": 391, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 416, - "src": "5514:6:1", + "referencedDeclaration": 355, + "src": "5473:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5665,12 +5536,12 @@ }, { "argumentTypes": null, - "id": 453, + "id": 392, "name": "text", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 414, - "src": "5522:4:1", + "referencedDeclaration": 353, + "src": "5481:4:0", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" @@ -5678,12 +5549,12 @@ }, { "argumentTypes": null, - "id": 454, + "id": 393, "name": "parentComment", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 418, - "src": "5528:13:1", + "referencedDeclaration": 357, + "src": "5487:13:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5691,12 +5562,12 @@ }, { "argumentTypes": null, - "id": 455, + "id": 394, "name": "now", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1087, - "src": "5543:3:1", + "referencedDeclaration": 874, + "src": "5502:3:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5704,12 +5575,12 @@ }, { "argumentTypes": null, - "id": 456, + "id": 395, "name": "commentId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 444, - "src": "5548:9:1", + "referencedDeclaration": 383, + "src": "5507:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5743,18 +5614,18 @@ "typeString": "uint256" } ], - "id": 449, + "id": 388, "name": "CommentCreated", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 412, - "src": "5487:14:1", + "referencedDeclaration": 351, + "src": "5446:14:0", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", "typeString": "function (address,uint256,bytes memory,uint256,uint256,uint256)" } }, - "id": 457, + "id": 396, "isConstant": false, "isLValue": false, "isPure": false, @@ -5762,20 +5633,20 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "5487:71:1", + "src": "5446:71:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 458, + "id": 397, "nodeType": "EmitStatement", - "src": "5482:76:1" + "src": "5441:76:0" }, { "expression": { "argumentTypes": null, - "id": 466, + "id": 405, "isConstant": false, "isLValue": false, "isPure": false, @@ -5786,26 +5657,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 459, + "id": 398, "name": "commentOwner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 88, - "src": "5581:12:1", + "referencedDeclaration": 31, + "src": "5540:12:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_address_$_$", "typeString": "mapping(uint256 => mapping(uint256 => address))" } }, - "id": 462, + "id": 401, "indexExpression": { "argumentTypes": null, - "id": 460, + "id": 399, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 416, - "src": "5594:6:1", + "referencedDeclaration": 355, + "src": "5553:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5816,21 +5687,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "5581:20:1", + "src": "5540:20:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", "typeString": "mapping(uint256 => address)" } }, - "id": 463, + "id": 402, "indexExpression": { "argumentTypes": null, - "id": 461, + "id": 400, "name": "commentId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 444, - "src": "5602:9:1", + "referencedDeclaration": 383, + "src": "5561:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5841,7 +5712,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "5581:31:1", + "src": "5540:31:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -5853,18 +5724,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 464, + "id": 403, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "5615:3:1", + "referencedDeclaration": 872, + "src": "5574:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 465, + "id": 404, "isConstant": false, "isLValue": false, "isPure": false, @@ -5872,26 +5743,26 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "5615:10:1", + "src": "5574:10:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "5581:44:1", + "src": "5540:44:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 467, + "id": 406, "nodeType": "ExpressionStatement", - "src": "5581:44:1" + "src": "5540:44:0" }, { "expression": { "argumentTypes": null, - "id": 474, + "id": 413, "isConstant": false, "isLValue": false, "isPure": false, @@ -5902,26 +5773,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 468, + "id": 407, "name": "commentUpVotes", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "5679:14:1", + "referencedDeclaration": 37, + "src": "5638:14:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$", "typeString": "mapping(uint256 => mapping(uint256 => uint256))" } }, - "id": 471, + "id": 410, "indexExpression": { "argumentTypes": null, - "id": 469, + "id": 408, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 416, - "src": "5694:6:1", + "referencedDeclaration": 355, + "src": "5653:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5932,21 +5803,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "5679:22:1", + "src": "5638:22:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" } }, - "id": 472, + "id": 411, "indexExpression": { "argumentTypes": null, - "id": 470, + "id": 409, "name": "commentId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 444, - "src": "5702:9:1", + "referencedDeclaration": 383, + "src": "5661:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5957,7 +5828,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "5679:33:1", + "src": "5638:33:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5968,14 +5839,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "31", - "id": 473, + "id": 412, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "5715:1:1", + "src": "5674:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", @@ -5983,20 +5854,20 @@ }, "value": "1" }, - "src": "5679:37:1", + "src": "5638:37:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 475, + "id": 414, "nodeType": "ExpressionStatement", - "src": "5679:37:1" + "src": "5638:37:0" }, { "expression": { "argumentTypes": null, - "id": 485, + "id": 424, "isConstant": false, "isLValue": false, "isPure": false, @@ -6009,34 +5880,34 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 476, + "id": 415, "name": "commentVoters", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 108, - "src": "5727:13:1", + "referencedDeclaration": 51, + "src": "5686:13:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$_$", "typeString": "mapping(address => mapping(uint256 => mapping(uint256 => uint256)))" } }, - "id": 481, + "id": 420, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 477, + "id": 416, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "5741:3:1", + "referencedDeclaration": 872, + "src": "5700:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 478, + "id": 417, "isConstant": false, "isLValue": false, "isPure": false, @@ -6044,7 +5915,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "5741:10:1", + "src": "5700:10:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -6055,21 +5926,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "5727:25:1", + "src": "5686:25:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$", "typeString": "mapping(uint256 => mapping(uint256 => uint256))" } }, - "id": 482, + "id": 421, "indexExpression": { "argumentTypes": null, - "id": 479, + "id": 418, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 416, - "src": "5753:6:1", + "referencedDeclaration": 355, + "src": "5712:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6080,21 +5951,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "5727:33:1", + "src": "5686:33:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" } }, - "id": 483, + "id": 422, "indexExpression": { "argumentTypes": null, - "id": 480, + "id": 419, "name": "commentId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 444, - "src": "5761:9:1", + "referencedDeclaration": 383, + "src": "5720:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6105,7 +5976,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "5727:44:1", + "src": "5686:44:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6116,14 +5987,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "31", - "id": 484, + "id": 423, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "5774:1:1", + "src": "5733:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", @@ -6131,20 +6002,20 @@ }, "value": "1" }, - "src": "5727:48:1", + "src": "5686:48:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 486, + "id": 425, "nodeType": "ExpressionStatement", - "src": "5727:48:1" + "src": "5686:48:0" }, { "expression": { "argumentTypes": null, - "id": 493, + "id": 432, "isConstant": false, "isLValue": false, "isPure": false, @@ -6153,26 +6024,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 487, + "id": 426, "name": "commentCounter", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 82, - "src": "5835:14:1", + "referencedDeclaration": 25, + "src": "5794:14:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" } }, - "id": 489, + "id": 428, "indexExpression": { "argumentTypes": null, - "id": 488, + "id": 427, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 416, - "src": "5850:6:1", + "referencedDeclaration": 355, + "src": "5809:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6183,7 +6054,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "5835:22:1", + "src": "5794:22:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6197,19 +6068,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 492, + "id": 431, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 490, + "id": 429, "name": "commentId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 444, - "src": "5860:9:1", + "referencedDeclaration": 383, + "src": "5819:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6220,14 +6091,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "31", - "id": 491, + "id": 430, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "5872:1:1", + "src": "5831:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", @@ -6235,26 +6106,26 @@ }, "value": "1" }, - "src": "5860:13:1", + "src": "5819:13:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "5835:38:1", + "src": "5794:38:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 494, + "id": 433, "nodeType": "ExpressionStatement", - "src": "5835:38:1" + "src": "5794:38:0" } ] }, "documentation": null, - "id": 496, + "id": 435, "implemented": true, "isConstructor": false, "isDeclaredConst": false, @@ -6262,16 +6133,16 @@ "name": "PostComment", "nodeType": "FunctionDefinition", "parameters": { - "id": 419, + "id": 358, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 414, + "id": 353, "name": "text", "nodeType": "VariableDeclaration", - "scope": 496, - "src": "5089:10:1", + "scope": 435, + "src": "5048:10:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -6279,10 +6150,10 @@ "typeString": "bytes" }, "typeName": { - "id": 413, + "id": 352, "name": "bytes", "nodeType": "ElementaryTypeName", - "src": "5089:5:1", + "src": "5048:5:0", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" @@ -6293,11 +6164,11 @@ }, { "constant": false, - "id": 416, + "id": 355, "name": "postId", "nodeType": "VariableDeclaration", - "scope": 496, - "src": "5101:11:1", + "scope": 435, + "src": "5060:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -6305,10 +6176,10 @@ "typeString": "uint256" }, "typeName": { - "id": 415, + "id": 354, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "5101:4:1", + "src": "5060:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6319,11 +6190,11 @@ }, { "constant": false, - "id": 418, + "id": 357, "name": "parentComment", "nodeType": "VariableDeclaration", - "scope": 496, - "src": "5114:18:1", + "scope": 435, + "src": "5073:18:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -6331,10 +6202,10 @@ "typeString": "uint256" }, "typeName": { - "id": 417, + "id": 356, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "5114:4:1", + "src": "5073:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6344,26 +6215,26 @@ "visibility": "internal" } ], - "src": "5088:45:1" + "src": "5047:45:0" }, "payable": false, "returnParameters": { - "id": 420, + "id": 359, "nodeType": "ParameterList", "parameters": [], - "src": "5141:0:1" + "src": "5100:0:0" }, - "scope": 1070, - "src": "5068:813:1", + "scope": 857, + "src": "5027:813:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { - "id": 586, + "id": 525, "nodeType": "Block", - "src": "5974:639:1", + "src": "5933:639:0", "statements": [ { "expression": { @@ -6375,19 +6246,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 506, + "id": 445, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 504, + "id": 443, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 498, - "src": "5993:6:1", + "referencedDeclaration": 437, + "src": "5952:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6398,14 +6269,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 505, + "id": 444, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "6003:1:1", + "src": "5962:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -6413,7 +6284,7 @@ }, "value": "0" }, - "src": "5993:11:1", + "src": "5952:11:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -6422,14 +6293,14 @@ { "argumentTypes": null, "hexValue": "766f746573206973206e6f7420666f7220612076616c696420706f7374", - "id": 507, + "id": 446, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "6006:31:1", + "src": "5965:31:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_ff3dacff5ff4f61cab4f46ef6127fdb7fdc77ddfb8b67e7ad2650377bf778ed8", @@ -6449,21 +6320,21 @@ "typeString": "literal_string \"votes is not for a valid post\"" } ], - "id": 503, + "id": 442, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1088, - 1089 + 875, + 876 ], - "referencedDeclaration": 1089, - "src": "5985:7:1", + "referencedDeclaration": 876, + "src": "5944:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 508, + "id": 447, "isConstant": false, "isLValue": false, "isPure": false, @@ -6471,15 +6342,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "5985:53:1", + "src": "5944:53:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 509, + "id": 448, "nodeType": "ExpressionStatement", - "src": "5985:53:1" + "src": "5944:53:0" }, { "expression": { @@ -6491,19 +6362,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 513, + "id": 452, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 511, + "id": 450, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 498, - "src": "6057:6:1", + "referencedDeclaration": 437, + "src": "6016:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6513,18 +6384,18 @@ "operator": "<", "rightExpression": { "argumentTypes": null, - "id": 512, + "id": 451, "name": "postNumber", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 60, - "src": "6066:10:1", + "referencedDeclaration": 3, + "src": "6025:10:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "6057:19:1", + "src": "6016:19:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -6533,14 +6404,14 @@ { "argumentTypes": null, "hexValue": "766f74657320697320666f722061206e6f6e206578697374656e7420706f7374", - "id": 514, + "id": 453, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "6078:34:1", + "src": "6037:34:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_c5c2b6bc9661424e678d353e544becf16e7105065d06cadc50a2e92c037d1b9b", @@ -6560,21 +6431,21 @@ "typeString": "literal_string \"votes is for a non existent post\"" } ], - "id": 510, + "id": 449, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1088, - 1089 + 875, + 876 ], - "referencedDeclaration": 1089, - "src": "6049:7:1", + "referencedDeclaration": 876, + "src": "6008:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 515, + "id": 454, "isConstant": false, "isLValue": false, "isPure": false, @@ -6582,15 +6453,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "6049:64:1", + "src": "6008:64:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 516, + "id": 455, "nodeType": "ExpressionStatement", - "src": "6049:64:1" + "src": "6008:64:0" }, { "expression": { @@ -6602,19 +6473,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 520, + "id": 459, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 518, + "id": 457, "name": "commendId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 500, - "src": "6142:9:1", + "referencedDeclaration": 439, + "src": "6101:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6625,14 +6496,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 519, + "id": 458, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "6155:1:1", + "src": "6114:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -6640,7 +6511,7 @@ }, "value": "0" }, - "src": "6142:14:1", + "src": "6101:14:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -6649,14 +6520,14 @@ { "argumentTypes": null, "hexValue": "636f6d6d656e74206964206973206e6f742076616c6964", - "id": 521, + "id": 460, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "6158:25:1", + "src": "6117:25:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_96da188f723c48153c2c1f113109dc9470d321813883d9bae2ecaddc392a27a1", @@ -6676,21 +6547,21 @@ "typeString": "literal_string \"comment id is not valid\"" } ], - "id": 517, + "id": 456, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1088, - 1089 + 875, + 876 ], - "referencedDeclaration": 1089, - "src": "6134:7:1", + "referencedDeclaration": 876, + "src": "6093:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 522, + "id": 461, "isConstant": false, "isLValue": false, "isPure": false, @@ -6698,15 +6569,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "6134:50:1", + "src": "6093:50:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 523, + "id": 462, "nodeType": "ExpressionStatement", - "src": "6134:50:1" + "src": "6093:50:0" }, { "expression": { @@ -6718,19 +6589,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 529, + "id": 468, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 525, + "id": 464, "name": "commendId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 500, - "src": "6203:9:1", + "referencedDeclaration": 439, + "src": "6162:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6742,26 +6613,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 526, + "id": 465, "name": "commentCounter", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 82, - "src": "6216:14:1", + "referencedDeclaration": 25, + "src": "6175:14:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" } }, - "id": 528, + "id": 467, "indexExpression": { "argumentTypes": null, - "id": 527, + "id": 466, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 498, - "src": "6231:6:1", + "referencedDeclaration": 437, + "src": "6190:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6772,13 +6643,13 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "6216:22:1", + "src": "6175:22:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "6203:35:1", + "src": "6162:35:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -6787,14 +6658,14 @@ { "argumentTypes": null, "hexValue": "636f6d6d656e74206964206973206e6f6e206578697374656e74", - "id": 530, + "id": 469, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "6240:28:1", + "src": "6199:28:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_60864667c45bf066f975096e955f868c455194279a1628fdcd83ec0b3d5a120c", @@ -6814,21 +6685,21 @@ "typeString": "literal_string \"comment id is non existent\"" } ], - "id": 524, + "id": 463, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1088, - 1089 + 875, + 876 ], - "referencedDeclaration": 1089, - "src": "6195:7:1", + "referencedDeclaration": 876, + "src": "6154:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 531, + "id": 470, "isConstant": false, "isLValue": false, "isPure": false, @@ -6836,15 +6707,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "6195:74:1", + "src": "6154:74:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 532, + "id": 471, "nodeType": "ExpressionStatement", - "src": "6195:74:1" + "src": "6154:74:0" }, { "expression": { @@ -6856,7 +6727,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 543, + "id": 482, "isConstant": false, "isLValue": false, "isPure": false, @@ -6869,34 +6740,34 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 534, + "id": 473, "name": "commentVoters", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 108, - "src": "6288:13:1", + "referencedDeclaration": 51, + "src": "6247:13:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$_$", "typeString": "mapping(address => mapping(uint256 => mapping(uint256 => uint256)))" } }, - "id": 537, + "id": 476, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 535, + "id": 474, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "6302:3:1", + "referencedDeclaration": 872, + "src": "6261:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 536, + "id": 475, "isConstant": false, "isLValue": false, "isPure": false, @@ -6904,7 +6775,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "6302:10:1", + "src": "6261:10:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -6915,21 +6786,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "6288:25:1", + "src": "6247:25:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$", "typeString": "mapping(uint256 => mapping(uint256 => uint256))" } }, - "id": 539, + "id": 478, "indexExpression": { "argumentTypes": null, - "id": 538, + "id": 477, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 498, - "src": "6314:6:1", + "referencedDeclaration": 437, + "src": "6273:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6940,21 +6811,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "6288:33:1", + "src": "6247:33:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" } }, - "id": 541, + "id": 480, "indexExpression": { "argumentTypes": null, - "id": 540, + "id": 479, "name": "commendId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 500, - "src": "6322:9:1", + "referencedDeclaration": 439, + "src": "6281:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6965,7 +6836,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "6288:44:1", + "src": "6247:44:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6976,14 +6847,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "31", - "id": 542, + "id": 481, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "6336:1:1", + "src": "6295:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", @@ -6991,7 +6862,7 @@ }, "value": "1" }, - "src": "6288:49:1", + "src": "6247:49:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -7000,14 +6871,14 @@ { "argumentTypes": null, "hexValue": "5570766f746520616c726561647920646f6e65", - "id": 544, + "id": 483, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "6339:21:1", + "src": "6298:21:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_df24b86cc4620336f368688345ca505ad90fcac9d2a55b94a3e3f9a021ddf783", @@ -7027,21 +6898,21 @@ "typeString": "literal_string \"Upvote already done\"" } ], - "id": 533, + "id": 472, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1088, - 1089 + 875, + 876 ], - "referencedDeclaration": 1089, - "src": "6280:7:1", + "referencedDeclaration": 876, + "src": "6239:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 545, + "id": 484, "isConstant": false, "isLValue": false, "isPure": false, @@ -7049,15 +6920,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "6280:81:1", + "src": "6239:81:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 546, + "id": 485, "nodeType": "ExpressionStatement", - "src": "6280:81:1" + "src": "6239:81:0" }, { "condition": { @@ -7066,7 +6937,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 556, + "id": 495, "isConstant": false, "isLValue": false, "isPure": false, @@ -7079,34 +6950,34 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 547, + "id": 486, "name": "commentVoters", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 108, - "src": "6378:13:1", + "referencedDeclaration": 51, + "src": "6337:13:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$_$", "typeString": "mapping(address => mapping(uint256 => mapping(uint256 => uint256)))" } }, - "id": 550, + "id": 489, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 548, + "id": 487, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "6392:3:1", + "referencedDeclaration": 872, + "src": "6351:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 549, + "id": 488, "isConstant": false, "isLValue": false, "isPure": false, @@ -7114,7 +6985,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "6392:10:1", + "src": "6351:10:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -7125,21 +6996,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "6378:25:1", + "src": "6337:25:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$", "typeString": "mapping(uint256 => mapping(uint256 => uint256))" } }, - "id": 552, + "id": 491, "indexExpression": { "argumentTypes": null, - "id": 551, + "id": 490, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 498, - "src": "6404:6:1", + "referencedDeclaration": 437, + "src": "6363:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -7150,21 +7021,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "6378:33:1", + "src": "6337:33:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" } }, - "id": 554, + "id": 493, "indexExpression": { "argumentTypes": null, - "id": 553, + "id": 492, "name": "commendId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 500, - "src": "6412:9:1", + "referencedDeclaration": 439, + "src": "6371:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -7175,7 +7046,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "6378:44:1", + "src": "6337:44:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -7186,14 +7057,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "32", - "id": 555, + "id": 494, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "6426:1:1", + "src": "6385:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_2_by_1", @@ -7201,25 +7072,25 @@ }, "value": "2" }, - "src": "6378:49:1", + "src": "6337:49:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, - "id": 566, + "id": 505, "nodeType": "IfStatement", - "src": "6374:122:1", + "src": "6333:122:0", "trueBody": { - "id": 565, + "id": 504, "nodeType": "Block", - "src": "6429:67:1", + "src": "6388:67:0", "statements": [ { "expression": { "argumentTypes": null, - "id": 563, + "id": 502, "isConstant": false, "isLValue": false, "isPure": false, @@ -7230,26 +7101,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 557, + "id": 496, "name": "commentDownVotes", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 100, - "src": "6444:16:1", + "referencedDeclaration": 43, + "src": "6403:16:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$", "typeString": "mapping(uint256 => mapping(uint256 => uint256))" } }, - "id": 560, + "id": 499, "indexExpression": { "argumentTypes": null, - "id": 558, + "id": 497, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 498, - "src": "6461:6:1", + "referencedDeclaration": 437, + "src": "6420:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -7260,21 +7131,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "6444:24:1", + "src": "6403:24:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" } }, - "id": 561, + "id": 500, "indexExpression": { "argumentTypes": null, - "id": 559, + "id": 498, "name": "commendId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 500, - "src": "6469:9:1", + "referencedDeclaration": 439, + "src": "6428:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -7285,7 +7156,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "6444:35:1", + "src": "6403:35:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -7296,14 +7167,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "31", - "id": 562, + "id": 501, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "6483:1:1", + "src": "6442:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", @@ -7311,15 +7182,15 @@ }, "value": "1" }, - "src": "6444:40:1", + "src": "6403:40:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 564, + "id": 503, "nodeType": "ExpressionStatement", - "src": "6444:40:1" + "src": "6403:40:0" } ] } @@ -7327,7 +7198,7 @@ { "expression": { "argumentTypes": null, - "id": 576, + "id": 515, "isConstant": false, "isLValue": false, "isPure": false, @@ -7340,34 +7211,34 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 567, + "id": 506, "name": "commentVoters", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 108, - "src": "6508:13:1", + "referencedDeclaration": 51, + "src": "6467:13:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$_$", "typeString": "mapping(address => mapping(uint256 => mapping(uint256 => uint256)))" } }, - "id": 572, + "id": 511, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 568, + "id": 507, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "6522:3:1", + "referencedDeclaration": 872, + "src": "6481:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 569, + "id": 508, "isConstant": false, "isLValue": false, "isPure": false, @@ -7375,7 +7246,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "6522:10:1", + "src": "6481:10:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -7386,21 +7257,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "6508:25:1", + "src": "6467:25:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$", "typeString": "mapping(uint256 => mapping(uint256 => uint256))" } }, - "id": 573, + "id": 512, "indexExpression": { "argumentTypes": null, - "id": 570, + "id": 509, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 498, - "src": "6534:6:1", + "referencedDeclaration": 437, + "src": "6493:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -7411,21 +7282,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "6508:33:1", + "src": "6467:33:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" } }, - "id": 574, + "id": 513, "indexExpression": { "argumentTypes": null, - "id": 571, + "id": 510, "name": "commendId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 500, - "src": "6542:9:1", + "referencedDeclaration": 439, + "src": "6501:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -7436,7 +7307,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "6508:44:1", + "src": "6467:44:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -7447,14 +7318,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "31", - "id": 575, + "id": 514, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "6555:1:1", + "src": "6514:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", @@ -7462,20 +7333,20 @@ }, "value": "1" }, - "src": "6508:48:1", + "src": "6467:48:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 577, + "id": 516, "nodeType": "ExpressionStatement", - "src": "6508:48:1" + "src": "6467:48:0" }, { "expression": { "argumentTypes": null, - "id": 584, + "id": 523, "isConstant": false, "isLValue": false, "isPure": false, @@ -7486,26 +7357,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 578, + "id": 517, "name": "commentUpVotes", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "6567:14:1", + "referencedDeclaration": 37, + "src": "6526:14:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$", "typeString": "mapping(uint256 => mapping(uint256 => uint256))" } }, - "id": 581, + "id": 520, "indexExpression": { "argumentTypes": null, - "id": 579, + "id": 518, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 498, - "src": "6582:6:1", + "referencedDeclaration": 437, + "src": "6541:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -7516,21 +7387,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "6567:22:1", + "src": "6526:22:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" } }, - "id": 582, + "id": 521, "indexExpression": { "argumentTypes": null, - "id": 580, + "id": 519, "name": "commendId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 500, - "src": "6590:9:1", + "referencedDeclaration": 439, + "src": "6549:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -7541,7 +7412,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "6567:33:1", + "src": "6526:33:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -7552,14 +7423,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "31", - "id": 583, + "id": 522, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "6604:1:1", + "src": "6563:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", @@ -7567,20 +7438,20 @@ }, "value": "1" }, - "src": "6567:38:1", + "src": "6526:38:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 585, + "id": 524, "nodeType": "ExpressionStatement", - "src": "6567:38:1" + "src": "6526:38:0" } ] }, "documentation": null, - "id": 587, + "id": 526, "implemented": true, "isConstructor": false, "isDeclaredConst": false, @@ -7588,16 +7459,16 @@ "name": "UpvoteComment", "nodeType": "FunctionDefinition", "parameters": { - "id": 501, + "id": 440, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 498, + "id": 437, "name": "postId", "nodeType": "VariableDeclaration", - "scope": 587, - "src": "5938:11:1", + "scope": 526, + "src": "5897:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -7605,10 +7476,10 @@ "typeString": "uint256" }, "typeName": { - "id": 497, + "id": 436, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "5938:4:1", + "src": "5897:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -7619,11 +7490,11 @@ }, { "constant": false, - "id": 500, + "id": 439, "name": "commendId", "nodeType": "VariableDeclaration", - "scope": 587, - "src": "5951:14:1", + "scope": 526, + "src": "5910:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -7631,10 +7502,10 @@ "typeString": "uint256" }, "typeName": { - "id": 499, + "id": 438, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "5951:4:1", + "src": "5910:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -7644,26 +7515,26 @@ "visibility": "internal" } ], - "src": "5937:29:1" + "src": "5896:29:0" }, "payable": false, "returnParameters": { - "id": 502, + "id": 441, "nodeType": "ParameterList", "parameters": [], - "src": "5974:0:1" + "src": "5933:0:0" }, - "scope": 1070, - "src": "5915:698:1", + "scope": 857, + "src": "5874:698:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { - "id": 677, + "id": 616, "nodeType": "Block", - "src": "6710:647:1", + "src": "6669:647:0", "statements": [ { "expression": { @@ -7675,19 +7546,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 597, + "id": 536, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 595, + "id": 534, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 589, - "src": "6729:6:1", + "referencedDeclaration": 528, + "src": "6688:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -7698,14 +7569,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 596, + "id": 535, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "6739:1:1", + "src": "6698:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -7713,7 +7584,7 @@ }, "value": "0" }, - "src": "6729:11:1", + "src": "6688:11:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -7722,14 +7593,14 @@ { "argumentTypes": null, "hexValue": "766f746573206973206e6f7420666f7220612076616c696420706f7374", - "id": 598, + "id": 537, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "6742:31:1", + "src": "6701:31:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_ff3dacff5ff4f61cab4f46ef6127fdb7fdc77ddfb8b67e7ad2650377bf778ed8", @@ -7749,21 +7620,21 @@ "typeString": "literal_string \"votes is not for a valid post\"" } ], - "id": 594, + "id": 533, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1088, - 1089 + 875, + 876 ], - "referencedDeclaration": 1089, - "src": "6721:7:1", + "referencedDeclaration": 876, + "src": "6680:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 599, + "id": 538, "isConstant": false, "isLValue": false, "isPure": false, @@ -7771,15 +7642,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "6721:53:1", + "src": "6680:53:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 600, + "id": 539, "nodeType": "ExpressionStatement", - "src": "6721:53:1" + "src": "6680:53:0" }, { "expression": { @@ -7791,19 +7662,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 604, + "id": 543, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 602, + "id": 541, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 589, - "src": "6793:6:1", + "referencedDeclaration": 528, + "src": "6752:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -7813,18 +7684,18 @@ "operator": "<", "rightExpression": { "argumentTypes": null, - "id": 603, + "id": 542, "name": "postNumber", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 60, - "src": "6802:10:1", + "referencedDeclaration": 3, + "src": "6761:10:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "6793:19:1", + "src": "6752:19:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -7833,14 +7704,14 @@ { "argumentTypes": null, "hexValue": "766f74657320697320666f722061206e6f6e206578697374656e7420706f7374", - "id": 605, + "id": 544, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "6814:34:1", + "src": "6773:34:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_c5c2b6bc9661424e678d353e544becf16e7105065d06cadc50a2e92c037d1b9b", @@ -7860,21 +7731,21 @@ "typeString": "literal_string \"votes is for a non existent post\"" } ], - "id": 601, + "id": 540, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1088, - 1089 + 875, + 876 ], - "referencedDeclaration": 1089, - "src": "6785:7:1", + "referencedDeclaration": 876, + "src": "6744:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 606, + "id": 545, "isConstant": false, "isLValue": false, "isPure": false, @@ -7882,15 +7753,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "6785:64:1", + "src": "6744:64:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 607, + "id": 546, "nodeType": "ExpressionStatement", - "src": "6785:64:1" + "src": "6744:64:0" }, { "expression": { @@ -7902,19 +7773,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 611, + "id": 550, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 609, + "id": 548, "name": "commendId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 591, - "src": "6878:9:1", + "referencedDeclaration": 530, + "src": "6837:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -7925,14 +7796,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 610, + "id": 549, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "6891:1:1", + "src": "6850:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -7940,7 +7811,7 @@ }, "value": "0" }, - "src": "6878:14:1", + "src": "6837:14:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -7949,14 +7820,14 @@ { "argumentTypes": null, "hexValue": "636f6d6d656e74206964206973206e6f742076616c6964", - "id": 612, + "id": 551, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "6894:25:1", + "src": "6853:25:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_96da188f723c48153c2c1f113109dc9470d321813883d9bae2ecaddc392a27a1", @@ -7976,21 +7847,21 @@ "typeString": "literal_string \"comment id is not valid\"" } ], - "id": 608, + "id": 547, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1088, - 1089 + 875, + 876 ], - "referencedDeclaration": 1089, - "src": "6870:7:1", + "referencedDeclaration": 876, + "src": "6829:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 613, + "id": 552, "isConstant": false, "isLValue": false, "isPure": false, @@ -7998,15 +7869,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "6870:50:1", + "src": "6829:50:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 614, + "id": 553, "nodeType": "ExpressionStatement", - "src": "6870:50:1" + "src": "6829:50:0" }, { "expression": { @@ -8018,19 +7889,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 620, + "id": 559, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 616, + "id": 555, "name": "commendId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 591, - "src": "6939:9:1", + "referencedDeclaration": 530, + "src": "6898:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8042,26 +7913,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 617, + "id": 556, "name": "commentCounter", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 82, - "src": "6952:14:1", + "referencedDeclaration": 25, + "src": "6911:14:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" } }, - "id": 619, + "id": 558, "indexExpression": { "argumentTypes": null, - "id": 618, + "id": 557, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 589, - "src": "6967:6:1", + "referencedDeclaration": 528, + "src": "6926:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8072,13 +7943,13 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "6952:22:1", + "src": "6911:22:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "6939:35:1", + "src": "6898:35:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -8087,14 +7958,14 @@ { "argumentTypes": null, "hexValue": "636f6d6d656e74206964206973206e6f6e206578697374656e74", - "id": 621, + "id": 560, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "6976:28:1", + "src": "6935:28:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_60864667c45bf066f975096e955f868c455194279a1628fdcd83ec0b3d5a120c", @@ -8114,21 +7985,21 @@ "typeString": "literal_string \"comment id is non existent\"" } ], - "id": 615, + "id": 554, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1088, - 1089 + 875, + 876 ], - "referencedDeclaration": 1089, - "src": "6931:7:1", + "referencedDeclaration": 876, + "src": "6890:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 622, + "id": 561, "isConstant": false, "isLValue": false, "isPure": false, @@ -8136,15 +8007,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "6931:74:1", + "src": "6890:74:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 623, + "id": 562, "nodeType": "ExpressionStatement", - "src": "6931:74:1" + "src": "6890:74:0" }, { "expression": { @@ -8156,7 +8027,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 634, + "id": 573, "isConstant": false, "isLValue": false, "isPure": false, @@ -8169,34 +8040,34 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 625, + "id": 564, "name": "commentVoters", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 108, - "src": "7024:13:1", + "referencedDeclaration": 51, + "src": "6983:13:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$_$", "typeString": "mapping(address => mapping(uint256 => mapping(uint256 => uint256)))" } }, - "id": 628, + "id": 567, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 626, + "id": 565, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "7038:3:1", + "referencedDeclaration": 872, + "src": "6997:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 627, + "id": 566, "isConstant": false, "isLValue": false, "isPure": false, @@ -8204,7 +8075,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "7038:10:1", + "src": "6997:10:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -8215,21 +8086,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "7024:25:1", + "src": "6983:25:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$", "typeString": "mapping(uint256 => mapping(uint256 => uint256))" } }, - "id": 630, + "id": 569, "indexExpression": { "argumentTypes": null, - "id": 629, + "id": 568, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 589, - "src": "7050:6:1", + "referencedDeclaration": 528, + "src": "7009:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8240,21 +8111,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "7024:33:1", + "src": "6983:33:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" } }, - "id": 632, + "id": 571, "indexExpression": { "argumentTypes": null, - "id": 631, + "id": 570, "name": "commendId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 591, - "src": "7058:9:1", + "referencedDeclaration": 530, + "src": "7017:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8265,7 +8136,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "7024:44:1", + "src": "6983:44:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8276,14 +8147,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "32", - "id": 633, + "id": 572, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "7072:1:1", + "src": "7031:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_2_by_1", @@ -8291,7 +8162,7 @@ }, "value": "2" }, - "src": "7024:49:1", + "src": "6983:49:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -8300,14 +8171,14 @@ { "argumentTypes": null, "hexValue": "5570766f746520616c726561647920646f6e65", - "id": 635, + "id": 574, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "7075:21:1", + "src": "7034:21:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_df24b86cc4620336f368688345ca505ad90fcac9d2a55b94a3e3f9a021ddf783", @@ -8327,21 +8198,21 @@ "typeString": "literal_string \"Upvote already done\"" } ], - "id": 624, + "id": 563, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1088, - 1089 + 875, + 876 ], - "referencedDeclaration": 1089, - "src": "7016:7:1", + "referencedDeclaration": 876, + "src": "6975:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 636, + "id": 575, "isConstant": false, "isLValue": false, "isPure": false, @@ -8349,15 +8220,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "7016:81:1", + "src": "6975:81:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 637, + "id": 576, "nodeType": "ExpressionStatement", - "src": "7016:81:1" + "src": "6975:81:0" }, { "condition": { @@ -8366,7 +8237,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 647, + "id": 586, "isConstant": false, "isLValue": false, "isPure": false, @@ -8379,34 +8250,34 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 638, + "id": 577, "name": "commentVoters", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 108, - "src": "7122:13:1", + "referencedDeclaration": 51, + "src": "7081:13:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$_$", "typeString": "mapping(address => mapping(uint256 => mapping(uint256 => uint256)))" } }, - "id": 641, + "id": 580, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 639, + "id": 578, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "7136:3:1", + "referencedDeclaration": 872, + "src": "7095:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 640, + "id": 579, "isConstant": false, "isLValue": false, "isPure": false, @@ -8414,7 +8285,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "7136:10:1", + "src": "7095:10:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -8425,21 +8296,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "7122:25:1", + "src": "7081:25:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$", "typeString": "mapping(uint256 => mapping(uint256 => uint256))" } }, - "id": 643, + "id": 582, "indexExpression": { "argumentTypes": null, - "id": 642, + "id": 581, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 589, - "src": "7148:6:1", + "referencedDeclaration": 528, + "src": "7107:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8450,21 +8321,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "7122:33:1", + "src": "7081:33:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" } }, - "id": 645, + "id": 584, "indexExpression": { "argumentTypes": null, - "id": 644, + "id": 583, "name": "commendId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 591, - "src": "7156:9:1", + "referencedDeclaration": 530, + "src": "7115:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8475,7 +8346,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "7122:44:1", + "src": "7081:44:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8486,14 +8357,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "31", - "id": 646, + "id": 585, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "7170:1:1", + "src": "7129:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", @@ -8501,25 +8372,25 @@ }, "value": "1" }, - "src": "7122:49:1", + "src": "7081:49:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, - "id": 657, + "id": 596, "nodeType": "IfStatement", - "src": "7118:120:1", + "src": "7077:120:0", "trueBody": { - "id": 656, + "id": 595, "nodeType": "Block", - "src": "7173:65:1", + "src": "7132:65:0", "statements": [ { "expression": { "argumentTypes": null, - "id": 654, + "id": 593, "isConstant": false, "isLValue": false, "isPure": false, @@ -8530,26 +8401,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 648, + "id": 587, "name": "commentUpVotes", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "7188:14:1", + "referencedDeclaration": 37, + "src": "7147:14:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$", "typeString": "mapping(uint256 => mapping(uint256 => uint256))" } }, - "id": 651, + "id": 590, "indexExpression": { "argumentTypes": null, - "id": 649, + "id": 588, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 589, - "src": "7203:6:1", + "referencedDeclaration": 528, + "src": "7162:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8560,21 +8431,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "7188:22:1", + "src": "7147:22:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" } }, - "id": 652, + "id": 591, "indexExpression": { "argumentTypes": null, - "id": 650, + "id": 589, "name": "commendId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 591, - "src": "7211:9:1", + "referencedDeclaration": 530, + "src": "7170:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8585,7 +8456,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "7188:33:1", + "src": "7147:33:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8596,14 +8467,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "31", - "id": 653, + "id": 592, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "7225:1:1", + "src": "7184:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", @@ -8611,15 +8482,15 @@ }, "value": "1" }, - "src": "7188:38:1", + "src": "7147:38:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 655, + "id": 594, "nodeType": "ExpressionStatement", - "src": "7188:38:1" + "src": "7147:38:0" } ] } @@ -8627,7 +8498,7 @@ { "expression": { "argumentTypes": null, - "id": 667, + "id": 606, "isConstant": false, "isLValue": false, "isPure": false, @@ -8640,34 +8511,34 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 658, + "id": 597, "name": "commentVoters", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 108, - "src": "7250:13:1", + "referencedDeclaration": 51, + "src": "7209:13:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$_$", "typeString": "mapping(address => mapping(uint256 => mapping(uint256 => uint256)))" } }, - "id": 663, + "id": 602, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 659, + "id": 598, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "7264:3:1", + "referencedDeclaration": 872, + "src": "7223:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 660, + "id": 599, "isConstant": false, "isLValue": false, "isPure": false, @@ -8675,7 +8546,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "7264:10:1", + "src": "7223:10:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -8686,21 +8557,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "7250:25:1", + "src": "7209:25:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$", "typeString": "mapping(uint256 => mapping(uint256 => uint256))" } }, - "id": 664, + "id": 603, "indexExpression": { "argumentTypes": null, - "id": 661, + "id": 600, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 589, - "src": "7276:6:1", + "referencedDeclaration": 528, + "src": "7235:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8711,21 +8582,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "7250:33:1", + "src": "7209:33:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" } }, - "id": 665, + "id": 604, "indexExpression": { "argumentTypes": null, - "id": 662, + "id": 601, "name": "commendId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 591, - "src": "7284:9:1", + "referencedDeclaration": 530, + "src": "7243:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8736,7 +8607,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "7250:44:1", + "src": "7209:44:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8747,14 +8618,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "32", - "id": 666, + "id": 605, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "7297:1:1", + "src": "7256:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_2_by_1", @@ -8762,20 +8633,20 @@ }, "value": "2" }, - "src": "7250:48:1", + "src": "7209:48:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 668, + "id": 607, "nodeType": "ExpressionStatement", - "src": "7250:48:1" + "src": "7209:48:0" }, { "expression": { "argumentTypes": null, - "id": 675, + "id": 614, "isConstant": false, "isLValue": false, "isPure": false, @@ -8786,26 +8657,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 669, + "id": 608, "name": "commentDownVotes", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 100, - "src": "7309:16:1", + "referencedDeclaration": 43, + "src": "7268:16:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$", "typeString": "mapping(uint256 => mapping(uint256 => uint256))" } }, - "id": 672, + "id": 611, "indexExpression": { "argumentTypes": null, - "id": 670, + "id": 609, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 589, - "src": "7326:6:1", + "referencedDeclaration": 528, + "src": "7285:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8816,21 +8687,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "7309:24:1", + "src": "7268:24:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" } }, - "id": 673, + "id": 612, "indexExpression": { "argumentTypes": null, - "id": 671, + "id": 610, "name": "commendId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 591, - "src": "7334:9:1", + "referencedDeclaration": 530, + "src": "7293:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8841,7 +8712,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "7309:35:1", + "src": "7268:35:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8852,14 +8723,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "31", - "id": 674, + "id": 613, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "7348:1:1", + "src": "7307:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", @@ -8867,20 +8738,20 @@ }, "value": "1" }, - "src": "7309:40:1", + "src": "7268:40:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 676, + "id": 615, "nodeType": "ExpressionStatement", - "src": "7309:40:1" + "src": "7268:40:0" } ] }, "documentation": null, - "id": 678, + "id": 617, "implemented": true, "isConstructor": false, "isDeclaredConst": false, @@ -8888,16 +8759,16 @@ "name": "DownvoteComment", "nodeType": "FunctionDefinition", "parameters": { - "id": 592, + "id": 531, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 589, + "id": 528, "name": "postId", "nodeType": "VariableDeclaration", - "scope": 678, - "src": "6674:11:1", + "scope": 617, + "src": "6633:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -8905,10 +8776,10 @@ "typeString": "uint256" }, "typeName": { - "id": 588, + "id": 527, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "6674:4:1", + "src": "6633:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8919,11 +8790,11 @@ }, { "constant": false, - "id": 591, + "id": 530, "name": "commendId", "nodeType": "VariableDeclaration", - "scope": 678, - "src": "6687:14:1", + "scope": 617, + "src": "6646:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -8931,10 +8802,10 @@ "typeString": "uint256" }, "typeName": { - "id": 590, + "id": 529, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "6687:4:1", + "src": "6646:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8944,26 +8815,26 @@ "visibility": "internal" } ], - "src": "6673:29:1" + "src": "6632:29:0" }, "payable": false, "returnParameters": { - "id": 593, + "id": 532, "nodeType": "ParameterList", "parameters": [], - "src": "6710:0:1" + "src": "6669:0:0" }, - "scope": 1070, - "src": "6649:708:1", + "scope": 857, + "src": "6608:708:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { - "id": 693, + "id": 632, "nodeType": "Block", - "src": "7485:59:1", + "src": "7444:59:0", "statements": [ { "expression": { @@ -8972,26 +8843,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 687, + "id": 626, "name": "commentUpVotes", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "7503:14:1", + "referencedDeclaration": 37, + "src": "7462:14:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$", "typeString": "mapping(uint256 => mapping(uint256 => uint256))" } }, - "id": 689, + "id": 628, "indexExpression": { "argumentTypes": null, - "id": 688, + "id": 627, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 680, - "src": "7518:6:1", + "referencedDeclaration": 619, + "src": "7477:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -9002,21 +8873,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "7503:22:1", + "src": "7462:22:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" } }, - "id": 691, + "id": 630, "indexExpression": { "argumentTypes": null, - "id": 690, + "id": 629, "name": "commendId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 682, - "src": "7526:9:1", + "referencedDeclaration": 621, + "src": "7485:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -9027,21 +8898,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "7503:33:1", + "src": "7462:33:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 686, - "id": 692, + "functionReturnParameters": 625, + "id": 631, "nodeType": "Return", - "src": "7496:40:1" + "src": "7455:40:0" } ] }, "documentation": null, - "id": 694, + "id": 633, "implemented": true, "isConstructor": false, "isDeclaredConst": true, @@ -9049,16 +8920,16 @@ "name": "getCommentUpVotes", "nodeType": "FunctionDefinition", "parameters": { - "id": 683, + "id": 622, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 680, + "id": 619, "name": "postId", "nodeType": "VariableDeclaration", - "scope": 694, - "src": "7429:11:1", + "scope": 633, + "src": "7388:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -9066,10 +8937,10 @@ "typeString": "uint256" }, "typeName": { - "id": 679, + "id": 618, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "7429:4:1", + "src": "7388:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -9080,11 +8951,11 @@ }, { "constant": false, - "id": 682, + "id": 621, "name": "commendId", "nodeType": "VariableDeclaration", - "scope": 694, - "src": "7442:14:1", + "scope": 633, + "src": "7401:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -9092,10 +8963,10 @@ "typeString": "uint256" }, "typeName": { - "id": 681, + "id": 620, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "7442:4:1", + "src": "7401:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -9105,20 +8976,20 @@ "visibility": "internal" } ], - "src": "7428:29:1" + "src": "7387:29:0" }, "payable": false, "returnParameters": { - "id": 686, + "id": 625, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 685, + "id": 624, "name": "", "nodeType": "VariableDeclaration", - "scope": 694, - "src": "7479:4:1", + "scope": 633, + "src": "7438:4:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -9126,10 +8997,10 @@ "typeString": "uint256" }, "typeName": { - "id": 684, + "id": 623, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "7479:4:1", + "src": "7438:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -9139,19 +9010,19 @@ "visibility": "internal" } ], - "src": "7478:6:1" + "src": "7437:6:0" }, - "scope": 1070, - "src": "7402:142:1", + "scope": 857, + "src": "7361:142:0", "stateMutability": "view", "superFunction": null, "visibility": "public" }, { "body": { - "id": 709, + "id": 648, "nodeType": "Block", - "src": "7670:61:1", + "src": "7629:61:0", "statements": [ { "expression": { @@ -9160,26 +9031,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 703, + "id": 642, "name": "commentDownVotes", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 100, - "src": "7688:16:1", + "referencedDeclaration": 43, + "src": "7647:16:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$", "typeString": "mapping(uint256 => mapping(uint256 => uint256))" } }, - "id": 705, + "id": 644, "indexExpression": { "argumentTypes": null, - "id": 704, + "id": 643, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 696, - "src": "7705:6:1", + "referencedDeclaration": 635, + "src": "7664:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -9190,21 +9061,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "7688:24:1", + "src": "7647:24:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" } }, - "id": 707, + "id": 646, "indexExpression": { "argumentTypes": null, - "id": 706, + "id": 645, "name": "commendId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 698, - "src": "7713:9:1", + "referencedDeclaration": 637, + "src": "7672:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -9215,21 +9086,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "7688:35:1", + "src": "7647:35:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 702, - "id": 708, + "functionReturnParameters": 641, + "id": 647, "nodeType": "Return", - "src": "7681:42:1" + "src": "7640:42:0" } ] }, "documentation": null, - "id": 710, + "id": 649, "implemented": true, "isConstructor": false, "isDeclaredConst": true, @@ -9237,16 +9108,16 @@ "name": "getCommentDownVotes", "nodeType": "FunctionDefinition", "parameters": { - "id": 699, + "id": 638, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 696, + "id": 635, "name": "postId", "nodeType": "VariableDeclaration", - "scope": 710, - "src": "7614:11:1", + "scope": 649, + "src": "7573:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -9254,10 +9125,10 @@ "typeString": "uint256" }, "typeName": { - "id": 695, + "id": 634, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "7614:4:1", + "src": "7573:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -9268,11 +9139,11 @@ }, { "constant": false, - "id": 698, + "id": 637, "name": "commendId", "nodeType": "VariableDeclaration", - "scope": 710, - "src": "7627:14:1", + "scope": 649, + "src": "7586:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -9280,10 +9151,10 @@ "typeString": "uint256" }, "typeName": { - "id": 697, + "id": 636, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "7627:4:1", + "src": "7586:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -9293,20 +9164,20 @@ "visibility": "internal" } ], - "src": "7613:29:1" + "src": "7572:29:0" }, "payable": false, "returnParameters": { - "id": 702, + "id": 641, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 701, + "id": 640, "name": "", "nodeType": "VariableDeclaration", - "scope": 710, - "src": "7664:4:1", + "scope": 649, + "src": "7623:4:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -9314,10 +9185,10 @@ "typeString": "uint256" }, "typeName": { - "id": 700, + "id": 639, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "7664:4:1", + "src": "7623:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -9327,19 +9198,19 @@ "visibility": "internal" } ], - "src": "7663:6:1" + "src": "7622:6:0" }, - "scope": 1070, - "src": "7585:146:1", + "scope": 857, + "src": "7544:146:0", "stateMutability": "view", "superFunction": null, "visibility": "public" }, { "body": { - "id": 729, + "id": 668, "nodeType": "Block", - "src": "7881:69:1", + "src": "7840:69:0", "statements": [ { "expression": { @@ -9350,26 +9221,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 721, + "id": 660, "name": "commentVoters", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 108, - "src": "7899:13:1", + "referencedDeclaration": 51, + "src": "7858:13:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$_$", "typeString": "mapping(address => mapping(uint256 => mapping(uint256 => uint256)))" } }, - "id": 723, + "id": 662, "indexExpression": { "argumentTypes": null, - "id": 722, + "id": 661, "name": "commenter", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 716, - "src": "7913:9:1", + "referencedDeclaration": 655, + "src": "7872:9:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -9380,21 +9251,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "7899:24:1", + "src": "7858:24:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$", "typeString": "mapping(uint256 => mapping(uint256 => uint256))" } }, - "id": 725, + "id": 664, "indexExpression": { "argumentTypes": null, - "id": 724, + "id": 663, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 712, - "src": "7924:6:1", + "referencedDeclaration": 651, + "src": "7883:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -9405,21 +9276,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "7899:32:1", + "src": "7858:32:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" } }, - "id": 727, + "id": 666, "indexExpression": { "argumentTypes": null, - "id": 726, + "id": 665, "name": "commendId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 714, - "src": "7932:9:1", + "referencedDeclaration": 653, + "src": "7891:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -9430,21 +9301,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "7899:43:1", + "src": "7858:43:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 720, - "id": 728, + "functionReturnParameters": 659, + "id": 667, "nodeType": "Return", - "src": "7892:50:1" + "src": "7851:50:0" } ] }, "documentation": null, - "id": 730, + "id": 669, "implemented": true, "isConstructor": false, "isDeclaredConst": true, @@ -9452,16 +9323,16 @@ "name": "getCommentVoterData", "nodeType": "FunctionDefinition", "parameters": { - "id": 717, + "id": 656, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 712, + "id": 651, "name": "postId", "nodeType": "VariableDeclaration", - "scope": 730, - "src": "7806:11:1", + "scope": 669, + "src": "7765:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -9469,10 +9340,10 @@ "typeString": "uint256" }, "typeName": { - "id": 711, + "id": 650, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "7806:4:1", + "src": "7765:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -9483,11 +9354,11 @@ }, { "constant": false, - "id": 714, + "id": 653, "name": "commendId", "nodeType": "VariableDeclaration", - "scope": 730, - "src": "7819:14:1", + "scope": 669, + "src": "7778:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -9495,10 +9366,10 @@ "typeString": "uint256" }, "typeName": { - "id": 713, + "id": 652, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "7819:4:1", + "src": "7778:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -9509,11 +9380,11 @@ }, { "constant": false, - "id": 716, + "id": 655, "name": "commenter", "nodeType": "VariableDeclaration", - "scope": 730, - "src": "7835:17:1", + "scope": 669, + "src": "7794:17:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -9521,10 +9392,10 @@ "typeString": "address" }, "typeName": { - "id": 715, + "id": 654, "name": "address", "nodeType": "ElementaryTypeName", - "src": "7835:7:1", + "src": "7794:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -9534,20 +9405,20 @@ "visibility": "internal" } ], - "src": "7805:48:1" + "src": "7764:48:0" }, "payable": false, "returnParameters": { - "id": 720, + "id": 659, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 719, + "id": 658, "name": "", "nodeType": "VariableDeclaration", - "scope": 730, - "src": "7875:4:1", + "scope": 669, + "src": "7834:4:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -9555,10 +9426,10 @@ "typeString": "uint256" }, "typeName": { - "id": 718, + "id": 657, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "7875:4:1", + "src": "7834:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -9568,43 +9439,43 @@ "visibility": "internal" } ], - "src": "7874:6:1" + "src": "7833:6:0" }, - "scope": 1070, - "src": "7777:173:1", + "scope": 857, + "src": "7736:173:0", "stateMutability": "view", "superFunction": null, "visibility": "public" }, { "body": { - "id": 737, + "id": 676, "nodeType": "Block", - "src": "8049:36:1", + "src": "8008:36:0", "statements": [ { "expression": { "argumentTypes": null, - "id": 735, + "id": 674, "name": "postNumber", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 60, - "src": "8067:10:1", + "referencedDeclaration": 3, + "src": "8026:10:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 734, - "id": 736, + "functionReturnParameters": 673, + "id": 675, "nodeType": "Return", - "src": "8060:17:1" + "src": "8019:17:0" } ] }, "documentation": null, - "id": 738, + "id": 677, "implemented": true, "isConstructor": false, "isDeclaredConst": true, @@ -9612,23 +9483,23 @@ "name": "getPostCounter", "nodeType": "FunctionDefinition", "parameters": { - "id": 731, + "id": 670, "nodeType": "ParameterList", "parameters": [], - "src": "8019:2:1" + "src": "7978:2:0" }, "payable": false, "returnParameters": { - "id": 734, + "id": 673, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 733, + "id": 672, "name": "", "nodeType": "VariableDeclaration", - "scope": 738, - "src": "8043:4:1", + "scope": 677, + "src": "8002:4:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -9636,10 +9507,10 @@ "typeString": "uint256" }, "typeName": { - "id": 732, + "id": 671, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "8043:4:1", + "src": "8002:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -9649,88 +9520,19 @@ "visibility": "internal" } ], - "src": "8042:6:1" + "src": "8001:6:0" }, - "scope": 1070, - "src": "7996:89:1", + "scope": 857, + "src": "7955:89:0", "stateMutability": "view", "superFunction": null, "visibility": "public" }, - { - "anonymous": false, - "documentation": null, - "id": 744, - "name": "Deposited", - "nodeType": "EventDefinition", - "parameters": { - "id": 743, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 740, - "indexed": true, - "name": "depositer", - "nodeType": "VariableDeclaration", - "scope": 744, - "src": "8206:25:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 739, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8206:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 742, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 744, - "src": "8242:10:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 741, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "8242:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8195:64:1" - }, - "src": "8179:81:1" - }, { "body": { - "id": 770, + "id": 733, "nodeType": "Block", - "src": "8349:154:1", + "src": "8165:432:0", "statements": [ { "expression": { @@ -9742,7 +9544,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 751, + "id": 686, "isConstant": false, "isLValue": false, "isPure": false, @@ -9751,18 +9553,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 748, + "id": 683, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "8368:3:1", + "referencedDeclaration": 872, + "src": "8184:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 749, + "id": 684, "isConstant": false, "isLValue": false, "isPure": false, @@ -9770,7 +9572,7 @@ "memberName": "value", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "8368:9:1", + "src": "8184:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -9781,14 +9583,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 750, + "id": 685, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "8380:1:1", + "src": "8196:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -9796,7 +9598,7 @@ }, "value": "0" }, - "src": "8368:13:1", + "src": "8184:13:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -9805,14 +9607,14 @@ { "argumentTypes": null, "hexValue": "6e6f2061747461636865642076616c7565", - "id": 752, + "id": 687, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "8383:19:1", + "src": "8199:19:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_fea247e0dfa13d79b1ed7c5055f96c2d0046eebcf2ab0c7588fc5c796c66b665", @@ -9832,21 +9634,21 @@ "typeString": "literal_string \"no attached value\"" } ], - "id": 747, + "id": 682, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1088, - 1089 + 875, + 876 ], - "referencedDeclaration": 1089, - "src": "8360:7:1", + "referencedDeclaration": 876, + "src": "8176:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 753, + "id": 688, "isConstant": false, "isLValue": false, "isPure": false, @@ -9854,170 +9656,339 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "8360:43:1", + "src": "8176:43:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 754, + "id": 689, "nodeType": "ExpressionStatement", - "src": "8360:43:1" + "src": "8176:43:0" }, { "expression": { "argumentTypes": null, - "id": 761, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 755, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 112, - "src": "8414:8:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 758, - "indexExpression": { + "arguments": [ + { "argumentTypes": null, - "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 693, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { "argumentTypes": null, - "id": 756, - "name": "msg", + "id": 691, + "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "8423:3:1", + "referencedDeclaration": 679, + "src": "8238:6:0", "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 757, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8423:10:1", + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 692, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8248:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "8238:11:0", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "8414:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "expression": { + { "argumentTypes": null, - "id": 759, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "8438:3:1", + "hexValue": "766f746573206973206e6f7420666f7220612076616c696420706f7374", + "id": 694, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8251:31:0", + "subdenomination": null, "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" + "typeIdentifier": "t_stringliteral_ff3dacff5ff4f61cab4f46ef6127fdb7fdc77ddfb8b67e7ad2650377bf778ed8", + "typeString": "literal_string \"votes is not for a valid post\"" + }, + "value": "votes is not for a valid post" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_ff3dacff5ff4f61cab4f46ef6127fdb7fdc77ddfb8b67e7ad2650377bf778ed8", + "typeString": "literal_string \"votes is not for a valid post\"" } - }, - "id": 760, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8438:9:1", + ], + "id": 690, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 875, + 876 + ], + "referencedDeclaration": 876, + "src": "8230:7:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" } }, - "src": "8414:33:1", + "id": 695, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8230:53:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" } }, - "id": 762, + "id": 696, "nodeType": "ExpressionStatement", - "src": "8414:33:1" + "src": "8230:53:0" }, { - "eventCall": { + "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, - "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 700, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { "argumentTypes": null, - "id": 764, - "name": "msg", + "id": 698, + "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "8473:3:1", + "referencedDeclaration": 679, + "src": "8302:6:0", "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 765, - "isConstant": false, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 699, + "name": "postNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "8311:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8302:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "766f74657320697320666f722061206e6f6e206578697374656e7420706f7374", + "id": 701, + "isConstant": false, "isLValue": false, - "isPure": false, + "isPure": true, + "kind": "string", "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8473:10:1", + "nodeType": "Literal", + "src": "8323:34:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5c2b6bc9661424e678d353e544becf16e7105065d06cadc50a2e92c037d1b9b", + "typeString": "literal_string \"votes is for a non existent post\"" + }, + "value": "votes is for a non existent post" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c5c2b6bc9661424e678d353e544becf16e7105065d06cadc50a2e92c037d1b9b", + "typeString": "literal_string \"votes is for a non existent post\"" + } + ], + "id": 697, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 875, + 876 + ], + "referencedDeclaration": 876, + "src": "8294:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 702, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8294:64:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 703, + "nodeType": "ExpressionStatement", + "src": "8294:64:0" + }, + { + "assignments": [ + 705 + ], + "declarations": [ + { + "constant": false, + "id": 705, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 734, + "src": "8379:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 704, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8379:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, + "value": null, + "visibility": "internal" + } + ], + "id": 709, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 706, + "name": "postOwners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7, + "src": "8395:10:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 708, + "indexExpression": { + "argumentTypes": null, + "id": 707, + "name": "postId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 679, + "src": "8406:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8395:18:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8379:34:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 766, + "id": 713, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "8485:3:1", + "referencedDeclaration": 872, + "src": "8439:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 767, + "id": 714, "isConstant": false, "isLValue": false, "isPure": false, @@ -10025,7 +9996,7 @@ "memberName": "value", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "8485:9:1", + "src": "8439:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -10034,27 +10005,39 @@ ], "expression": { "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], - "id": 763, - "name": "Deposited", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 744, - "src": "8463:9:1", + "expression": { + "argumentTypes": null, + "id": 710, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 705, + "src": "8424:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 712, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8424:14:0", "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" } }, - "id": 768, + "id": 715, "isConstant": false, "isLValue": false, "isPure": false, @@ -10062,1243 +10045,263 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "8463:32:1", + "src": "8424:25:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 769, - "nodeType": "EmitStatement", - "src": "8458:37:1" - } - ] - }, - "documentation": null, - "id": 771, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "deposit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 745, - "nodeType": "ParameterList", - "parameters": [], - "src": "8331:2:1" - }, - "payable": true, - "returnParameters": { - "id": 746, - "nodeType": "ParameterList", - "parameters": [], - "src": "8349:0:1" - }, - "scope": 1070, - "src": "8315:188:1", - "stateMutability": "payable", - "superFunction": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 777, - "name": "Withdrawal", - "nodeType": "EventDefinition", - "parameters": { - "id": 776, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 773, - "indexed": true, - "name": "taker", - "nodeType": "VariableDeclaration", - "scope": 777, - "src": "8584:21:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 772, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8584:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" + "id": 716, + "nodeType": "ExpressionStatement", + "src": "8424:25:0" }, { - "constant": false, - "id": 775, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 777, - "src": "8616:10:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 774, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "8616:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8573:60:1" - }, - "src": "8556:78:1" - }, - { - "body": { - "id": 863, - "nodeType": "Block", - "src": "8734:738:1", - "statements": [ - { - "condition": { + "expression": { "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 786, + "id": 722, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 784, - "name": "withdrawall", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 779, - "src": "8811:11:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { + "leftHandSide": { "argumentTypes": null, - "hexValue": "74727565", - "id": 785, - "isConstant": false, + "baseExpression": { + "argumentTypes": null, + "id": 717, + "name": "postEarnings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "8492:12:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + } + }, + "id": 719, + "indexExpression": { + "argumentTypes": null, + "id": 718, + "name": "postId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 679, + "src": "8505:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "8492:20:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 720, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 872, + "src": "8516:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 721, + "isConstant": false, "isLValue": false, - "isPure": true, - "kind": "bool", + "isPure": false, "lValueRequested": false, - "nodeType": "Literal", - "src": "8826:4:1", - "subdenomination": null, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8516:9:0", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } }, - "src": "8811:19:1", + "src": "8492:33:0", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "falseBody": { - "id": 861, - "nodeType": "Block", - "src": "9105:360:1", - "statements": [ + "id": 723, + "nodeType": "ExpressionStatement", + "src": "8492:33:0" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ { + "argumentTypes": null, "expression": { "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 826, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 824, - "name": "trxAmmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 781, - "src": "9168:10:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 825, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9181:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "9168:14:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "496e636f72726563742077697468647261772076616c7565", - "id": 827, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9184:26:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_80153b85564bec6619e4b3c9d237a29e03670836c2a3f1bdc56b101b5bd3570b", - "typeString": "literal_string \"Incorrect withdraw value\"" - }, - "value": "Incorrect withdraw value" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_80153b85564bec6619e4b3c9d237a29e03670836c2a3f1bdc56b101b5bd3570b", - "typeString": "literal_string \"Incorrect withdraw value\"" - } - ], - "id": 823, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1088, - 1089 - ], - "referencedDeclaration": 1089, - "src": "9160:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 828, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9160:51:1", + "id": 725, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 872, + "src": "8554:3:0", "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" + "typeIdentifier": "t_magic_message", + "typeString": "msg" } }, - "id": 829, - "nodeType": "ExpressionStatement", - "src": "9160:51:1" + "id": 726, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8554:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } }, { + "argumentTypes": null, "expression": { "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 836, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 831, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 112, - "src": "9234:8:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 834, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 832, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "9243:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 833, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9243:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9234:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 835, - "name": "trxAmmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 781, - "src": "9258:10:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9234:34:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "617474656d7074696e6720746f20776974686472617720746f6f206d756368", - "id": 837, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9270:33:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_167690802acbac1725ba020ceb69a63d0f442d86e9bc17f983a1baf15f05bd23", - "typeString": "literal_string \"attempting to withdraw too much\"" - }, - "value": "attempting to withdraw too much" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_167690802acbac1725ba020ceb69a63d0f442d86e9bc17f983a1baf15f05bd23", - "typeString": "literal_string \"attempting to withdraw too much\"" - } - ], - "id": 830, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1088, - 1089 - ], - "referencedDeclaration": 1089, - "src": "9226:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 838, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9226:78:1", + "id": 727, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 872, + "src": "8566:3:0", "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" + "typeIdentifier": "t_magic_message", + "typeString": "msg" } }, - "id": 839, - "nodeType": "ExpressionStatement", - "src": "9226:78:1" + "id": 728, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8566:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } }, { - "expression": { - "argumentTypes": null, - "id": 845, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 840, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 112, - "src": "9319:8:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 843, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 841, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "9328:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 842, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9328:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "9319:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "-=", - "rightHandSide": { - "argumentTypes": null, - "id": 844, - "name": "trxAmmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 781, - "src": "9343:10:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9319:34:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 846, - "nodeType": "ExpressionStatement", - "src": "9319:34:1" + "argumentTypes": null, + "id": 729, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 874, + "src": "8577:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } }, { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 852, - "name": "trxAmmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 781, - "src": "9388:10:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 847, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "9368:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 850, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9368:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 851, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9368:19:1", - "typeDescriptions": { - "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 853, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9368:31:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } + "argumentTypes": null, + "id": 730, + "name": "postId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 679, + "src": "8582:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" }, - "id": 854, - "nodeType": "ExpressionStatement", - "src": "9368:31:1" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 856, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "9430:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 857, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9430:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 858, - "name": "trxAmmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 781, - "src": "9442:10:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 855, - "name": "Withdrawal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 777, - "src": "9419:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 859, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9419:34:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, - "id": 860, - "nodeType": "EmitStatement", - "src": "9414:39:1" + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 724, + "name": "DonationMade", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 744, + "src": "8541:12:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256,uint256)" } - ] + }, + "id": 731, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8541:48:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } }, - "id": 862, - "nodeType": "IfStatement", - "src": "8808:657:1", - "trueBody": { - "id": 822, - "nodeType": "Block", - "src": "8831:260:1", - "statements": [ - { - "assignments": [ - 788 - ], - "declarations": [ - { - "constant": false, - "id": 788, - "name": "balance", - "nodeType": "VariableDeclaration", - "scope": 864, - "src": "8846:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 787, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "8846:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 793, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 789, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 112, - "src": "8861:8:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 792, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 790, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "8870:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 791, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8870:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8861:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "8846:35:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 797, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 795, - "name": "balance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 788, - "src": "8904:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 796, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8914:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "8904:11:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "53656e64657220646f6573206e6f7420686176652066756e6473", - "id": 798, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8917:28:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c0b27c3a749305c8b7eb4c0009dca1d425f6f2b45469bb6d582aac7b5df20b11", - "typeString": "literal_string \"Sender does not have funds\"" - }, - "value": "Sender does not have funds" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_c0b27c3a749305c8b7eb4c0009dca1d425f6f2b45469bb6d582aac7b5df20b11", - "typeString": "literal_string \"Sender does not have funds\"" - } - ], - "id": 794, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1088, - 1089 - ], - "referencedDeclaration": 1089, - "src": "8896:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 799, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8896:50:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 800, - "nodeType": "ExpressionStatement", - "src": "8896:50:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 806, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 801, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 112, - "src": "8961:8:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 804, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 802, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "8970:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 803, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8970:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "8961:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 805, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8984:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "8961:24:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 807, - "nodeType": "ExpressionStatement", - "src": "8961:24:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 813, - "name": "balance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 788, - "src": "9020:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 808, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "9000:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 811, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9000:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 812, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9000:19:1", - "typeDescriptions": { - "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 814, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9000:28:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 815, - "nodeType": "ExpressionStatement", - "src": "9000:28:1" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 817, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "9059:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 818, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9059:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 819, - "name": "balance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 788, - "src": "9071:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 816, - "name": "Withdrawal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 777, - "src": "9048:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 820, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9048:31:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 821, - "nodeType": "EmitStatement", - "src": "9043:36:1" - } - ] - } + "id": 732, + "nodeType": "EmitStatement", + "src": "8536:53:0" } ] }, "documentation": null, - "id": 864, + "id": 734, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [], - "name": "withdraw", + "name": "makeDonation", "nodeType": "FunctionDefinition", "parameters": { - "id": 782, + "id": 680, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 779, - "name": "withdrawall", - "nodeType": "VariableDeclaration", - "scope": 864, - "src": "8692:16:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 778, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "8692:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 781, - "name": "trxAmmount", + "id": 679, + "name": "postId", "nodeType": "VariableDeclaration", - "scope": 864, - "src": "8710:15:1", + "scope": 734, + "src": "8137:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -11306,10 +10309,10 @@ "typeString": "uint256" }, "typeName": { - "id": 780, + "id": 678, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "8710:4:1", + "src": "8137:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -11319,254 +10322,354 @@ "visibility": "internal" } ], - "src": "8691:35:1" + "src": "8136:13:0" }, - "payable": false, + "payable": true, "returnParameters": { - "id": 783, + "id": 681, "nodeType": "ParameterList", "parameters": [], - "src": "8734:0:1" + "src": "8165:0:0" }, - "scope": 1070, - "src": "8674:798:1", - "stateMutability": "nonpayable", + "scope": 857, + "src": "8115:482:0", + "stateMutability": "payable", "superFunction": null, "visibility": "public" }, { - "body": { - "id": 934, - "nodeType": "Block", - "src": "9609:586:1", - "statements": [ + "anonymous": false, + "documentation": null, + "id": 744, + "name": "DonationMade", + "nodeType": "EventDefinition", + "parameters": { + "id": 743, + "nodeType": "ParameterList", + "parameters": [ { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 874, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 872, - "name": "postId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 866, - "src": "9638:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 873, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9648:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "9638:11:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "766f746573206973206e6f7420666f7220612076616c696420706f7374", - "id": 875, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9651:31:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ff3dacff5ff4f61cab4f46ef6127fdb7fdc77ddfb8b67e7ad2650377bf778ed8", - "typeString": "literal_string \"votes is not for a valid post\"" - }, - "value": "votes is not for a valid post" + "constant": false, + "id": 736, + "indexed": true, + "name": "donator", + "nodeType": "VariableDeclaration", + "scope": 744, + "src": "8678:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 735, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8678:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 738, + "indexed": true, + "name": "donationValue", + "nodeType": "VariableDeclaration", + "scope": 744, + "src": "8712:26:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 737, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8712:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 740, + "indexed": false, + "name": "donationTimestamp", + "nodeType": "VariableDeclaration", + "scope": 744, + "src": "8749:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 739, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8749:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 742, + "indexed": false, + "name": "postid", + "nodeType": "VariableDeclaration", + "scope": 744, + "src": "8782:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 741, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8782:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8667:133:0" + }, + "src": "8648:153:0" + }, + { + "body": { + "id": 755, + "nodeType": "Block", + "src": "8905:46:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 751, + "name": "postEarnings", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "8923:12:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ff3dacff5ff4f61cab4f46ef6127fdb7fdc77ddfb8b67e7ad2650377bf778ed8", - "typeString": "literal_string \"votes is not for a valid post\"" - } - ], - "id": 871, - "name": "require", + }, + "id": 753, + "indexExpression": { + "argumentTypes": null, + "id": 752, + "name": "postId", "nodeType": "Identifier", - "overloadedDeclarations": [ - 1088, - 1089 - ], - "referencedDeclaration": 1089, - "src": "9630:7:1", + "overloadedDeclarations": [], + "referencedDeclaration": 746, + "src": "8936:6:0", "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 876, "isConstant": false, - "isLValue": false, + "isLValue": true, "isPure": false, - "kind": "functionCall", "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9630:53:1", + "nodeType": "IndexAccess", + "src": "8923:20:0", "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 877, - "nodeType": "ExpressionStatement", - "src": "9630:53:1" - }, + "functionReturnParameters": 750, + "id": 754, + "nodeType": "Return", + "src": "8916:27:0" + } + ] + }, + "documentation": null, + "id": 756, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getPostDonations", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 747, + "nodeType": "ParameterList", + "parameters": [ { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 881, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 879, - "name": "postId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 866, - "src": "9702:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 880, - "name": "postNumber", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 60, - "src": "9711:10:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9702:19:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "766f74657320697320666f722061206e6f6e206578697374656e7420706f7374", - "id": 882, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9723:34:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5c2b6bc9661424e678d353e544becf16e7105065d06cadc50a2e92c037d1b9b", - "typeString": "literal_string \"votes is for a non existent post\"" - }, - "value": "votes is for a non existent post" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_c5c2b6bc9661424e678d353e544becf16e7105065d06cadc50a2e92c037d1b9b", - "typeString": "literal_string \"votes is for a non existent post\"" - } - ], - "id": 878, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1088, - 1089 - ], - "referencedDeclaration": 1089, - "src": "9694:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 883, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9694:64:1", + "constant": false, + "id": 746, + "name": "postId", + "nodeType": "VariableDeclaration", + "scope": 756, + "src": "8865:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 745, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8865:4:0", "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 884, - "nodeType": "ExpressionStatement", - "src": "9694:64:1" + "value": null, + "visibility": "internal" + } + ], + "src": "8864:13:0" + }, + "payable": false, + "returnParameters": { + "id": 750, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 749, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 756, + "src": "8899:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 748, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8899:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8898:6:0" + }, + "scope": 857, + "src": "8839:112:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 762, + "name": "UsernameCreated", + "nodeType": "EventDefinition", + "parameters": { + "id": 761, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 758, + "indexed": true, + "name": "user", + "nodeType": "VariableDeclaration", + "scope": 762, + "src": "9107:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 757, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9107:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" }, + { + "constant": false, + "id": 760, + "indexed": true, + "name": "username", + "nodeType": "VariableDeclaration", + "scope": 762, + "src": "9138:24:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 759, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "9138:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9096:73:0" + }, + "src": "9074:96:0" + }, + { + "body": { + "id": 834, + "nodeType": "Block", + "src": "9374:897:0", + "statements": [ { "expression": { "argumentTypes": null, @@ -11574,48 +10677,75 @@ { "argumentTypes": null, "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bool", + "typeString": "bool" }, - "id": 888, + "id": 772, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 886, - "name": "donationValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 868, - "src": "9787:13:1", + "baseExpression": { + "argumentTypes": null, + "id": 768, + "name": "usernamesTaken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "9404:14:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", + "typeString": "mapping(bytes32 => bool)" + } + }, + "id": 770, + "indexExpression": { + "argumentTypes": null, + "id": 769, + "name": "username", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 764, + "src": "9419:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9404:24:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, "nodeType": "BinaryOperation", - "operator": ">", + "operator": "==", "rightExpression": { "argumentTypes": null, - "hexValue": "30", - "id": 887, + "hexValue": "66616c7365", + "id": 771, "isConstant": false, "isLValue": false, "isPure": true, - "kind": "number", + "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "9803:1:1", + "src": "9432:5:0", "subdenomination": null, "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" + "typeIdentifier": "t_bool", + "typeString": "bool" }, - "value": "0" + "value": "false" }, - "src": "9787:17:1", + "src": "9404:33:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -11623,21 +10753,21 @@ }, { "argumentTypes": null, - "hexValue": "6e6f2061747461636865642076616c7565", - "id": 889, + "hexValue": "757365726e616d65206973207265676973746572656420746f20616e206f776e657220616c7265616479", + "id": 773, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "9806:19:1", + "src": "9439:44:0", "subdenomination": null, "typeDescriptions": { - "typeIdentifier": "t_stringliteral_fea247e0dfa13d79b1ed7c5055f96c2d0046eebcf2ab0c7588fc5c796c66b665", - "typeString": "literal_string \"no attached value\"" + "typeIdentifier": "t_stringliteral_fbf43060efdf793cb629c84c6e9dae246e51698989dd65981609d20142614fe1", + "typeString": "literal_string \"username is registered to an owner already\"" }, - "value": "no attached value" + "value": "username is registered to an owner already" } ], "expression": { @@ -11647,25 +10777,25 @@ "typeString": "bool" }, { - "typeIdentifier": "t_stringliteral_fea247e0dfa13d79b1ed7c5055f96c2d0046eebcf2ab0c7588fc5c796c66b665", - "typeString": "literal_string \"no attached value\"" + "typeIdentifier": "t_stringliteral_fbf43060efdf793cb629c84c6e9dae246e51698989dd65981609d20142614fe1", + "typeString": "literal_string \"username is registered to an owner already\"" } ], - "id": 885, + "id": 767, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1088, - 1089 + 875, + 876 ], - "referencedDeclaration": 1089, - "src": "9779:7:1", + "referencedDeclaration": 876, + "src": "9395:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 890, + "id": 774, "isConstant": false, "isLValue": false, "isPure": false, @@ -11673,107 +10803,174 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "9779:47:1", + "src": "9395:89:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 891, + "id": 775, "nodeType": "ExpressionStatement", - "src": "9779:47:1" + "src": "9395:89:0" }, { - "expression": { + "assignments": [ + 777 + ], + "declarations": [ + { + "constant": false, + "id": 777, + "name": "currentUsername", + "nodeType": "VariableDeclaration", + "scope": 835, + "src": "9505:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 776, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "9505:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 782, + "initialValue": { "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "baseExpression": { + "argumentTypes": null, + "id": 778, + "name": "usernames", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 63, + "src": "9531:9:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bytes32_$", + "typeString": "mapping(address => bytes32)" + } + }, + "id": 781, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 779, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 872, + "src": "9541:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 780, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9541:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9531:21:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9505:47:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" }, - "id": 898, + "id": 786, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 893, - "name": "donationValue", + "id": 784, + "name": "currentUsername", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 868, - "src": "9845:13:1", + "referencedDeclaration": 777, + "src": "9571:15:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } }, "nodeType": "BinaryOperation", - "operator": "<=", + "operator": "!=", "rightExpression": { "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 894, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 112, - "src": "9862:8:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 897, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 895, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "9871:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 896, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9871:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9862:20:1", + "id": 785, + "name": "username", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 764, + "src": "9590:8:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } }, - "src": "9845:37:1", + "src": "9571:27:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } + }, + { + "argumentTypes": null, + "hexValue": "5468697320757365726e616d6520697320616c72656164792073657420746f207468652073656e646572", + "id": 787, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9600:44:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_858348defba9cefd4bdc844c763b23f8e29a869d7cafac8088106bc53b8bd203", + "typeString": "literal_string \"This username is already set to the sender\"" + }, + "value": "This username is already set to the sender" } ], "expression": { @@ -11781,23 +10978,27 @@ { "typeIdentifier": "t_bool", "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_858348defba9cefd4bdc844c763b23f8e29a869d7cafac8088106bc53b8bd203", + "typeString": "literal_string \"This username is already set to the sender\"" } ], - "id": 892, + "id": 783, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1088, - 1089 + 875, + 876 ], - "referencedDeclaration": 1088, - "src": "9837:7:1", + "referencedDeclaration": 876, + "src": "9563:7:0", "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" } }, - "id": 899, + "id": 788, "isConstant": false, "isLValue": false, "isPure": false, @@ -11805,3350 +11006,567 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "9837:46:1", + "src": "9563:82:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 900, + "id": 789, "nodeType": "ExpressionStatement", - "src": "9837:46:1" + "src": "9563:82:0" }, { - "expression": { + "condition": { "argumentTypes": null, - "id": 906, + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 792, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "leftHandSide": { + "leftExpression": { "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 901, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 112, - "src": "9914:8:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 904, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 902, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "9923:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 903, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9923:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "9914:20:1", + "id": 790, + "name": "currentUsername", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 777, + "src": "9729:15:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } }, - "nodeType": "Assignment", - "operator": "-=", - "rightHandSide": { + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { "argumentTypes": null, - "id": 905, - "name": "donationValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 868, - "src": "9938:13:1", + "hexValue": "307830", + "id": 791, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9748:3:0", + "subdenomination": null, "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" }, - "src": "9914:37:1", + "src": "9729:22:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "id": 907, - "nodeType": "ExpressionStatement", - "src": "9914:37:1" - }, - { - "assignments": [ - 909 - ], - "declarations": [ - { - "constant": false, - "id": 909, - "name": "owner", - "nodeType": "VariableDeclaration", - "scope": 935, - "src": "9994:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 908, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9994:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 913, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 910, - "name": "postOwners", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 64, - "src": "10010:10:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", - "typeString": "mapping(uint256 => address)" - } - }, - "id": 912, - "indexExpression": { - "argumentTypes": null, - "id": 911, - "name": "postId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 866, - "src": "10021:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10010:18:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9994:34:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 918, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 914, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 112, - "src": "10039:8:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 916, - "indexExpression": { - "argumentTypes": null, - "id": 915, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 909, - "src": "10048:5:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "10039:15:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "id": 917, - "name": "donationValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 868, - "src": "10058:13:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10039:32:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 919, - "nodeType": "ExpressionStatement", - "src": "10039:32:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 924, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 920, - "name": "postEarnings", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 116, - "src": "10082:12:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", - "typeString": "mapping(uint256 => uint256)" - } - }, - "id": 922, - "indexExpression": { - "argumentTypes": null, - "id": 921, - "name": "postId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 866, - "src": "10095:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "10082:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "id": 923, - "name": "donationValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 868, - "src": "10106:13:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10082:37:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 925, - "nodeType": "ExpressionStatement", - "src": "10082:37:1" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ + "falseBody": { + "id": 826, + "nodeType": "Block", + "src": "9861:262:0", + "statements": [ { - "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 927, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "10148:3:1", + "id": 812, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 807, + "name": "usernames", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 63, + "src": "9979:9:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bytes32_$", + "typeString": "mapping(address => bytes32)" + } + }, + "id": 810, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 808, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 872, + "src": "9989:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 809, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9989:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9979:21:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 811, + "name": "username", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 764, + "src": "10003:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "9979:32:0", "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } }, - "id": 928, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10148:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 929, - "name": "donationValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 868, - "src": "10160:13:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 930, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1087, - "src": "10175:3:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } + "id": 813, + "nodeType": "ExpressionStatement", + "src": "9979:32:0" }, { - "argumentTypes": null, - "id": 931, - "name": "postId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 866, - "src": "10180:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 926, - "name": "DonationMade", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 945, - "src": "10135:12:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256,uint256,uint256)" - } - }, - "id": 932, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10135:52:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 933, - "nodeType": "EmitStatement", - "src": "10130:57:1" - } - ] - }, - "documentation": null, - "id": 935, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "makeDonation", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 869, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 866, - "name": "postId", - "nodeType": "VariableDeclaration", - "scope": 935, - "src": "9569:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 865, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "9569:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 868, - "name": "donationValue", - "nodeType": "VariableDeclaration", - "scope": 935, - "src": "9582:18:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 867, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "9582:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9568:33:1" - }, - "payable": false, - "returnParameters": { - "id": 870, - "nodeType": "ParameterList", - "parameters": [], - "src": "9609:0:1" - }, - "scope": 1070, - "src": "9547:648:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 945, - "name": "DonationMade", - "nodeType": "EventDefinition", - "parameters": { - "id": 944, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 937, - "indexed": true, - "name": "donator", - "nodeType": "VariableDeclaration", - "scope": 945, - "src": "10276:23:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 936, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10276:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 939, - "indexed": true, - "name": "donationValue", - "nodeType": "VariableDeclaration", - "scope": 945, - "src": "10310:26:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 938, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "10310:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 941, - "indexed": false, - "name": "donationTimestamp", - "nodeType": "VariableDeclaration", - "scope": 945, - "src": "10347:22:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 940, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "10347:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 943, - "indexed": false, - "name": "postid", - "nodeType": "VariableDeclaration", - "scope": 945, - "src": "10380:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 942, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "10380:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10265:133:1" - }, - "src": "10246:153:1" - }, - { - "body": { - "id": 956, - "nodeType": "Block", - "src": "10503:46:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 952, - "name": "postEarnings", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 116, - "src": "10521:12:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", - "typeString": "mapping(uint256 => uint256)" - } - }, - "id": 954, - "indexExpression": { - "argumentTypes": null, - "id": 953, - "name": "postId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 947, - "src": "10534:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10521:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 951, - "id": 955, - "nodeType": "Return", - "src": "10514:27:1" - } - ] - }, - "documentation": null, - "id": 957, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getPostDonations", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 948, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 947, - "name": "postId", - "nodeType": "VariableDeclaration", - "scope": 957, - "src": "10463:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 946, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "10463:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10462:13:1" - }, - "payable": false, - "returnParameters": { - "id": 951, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 950, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 957, - "src": "10497:4:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 949, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "10497:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10496:6:1" - }, - "scope": 1070, - "src": "10437:112:1", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 968, - "nodeType": "Block", - "src": "10646:40:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 964, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 112, - "src": "10664:8:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 966, - "indexExpression": { - "argumentTypes": null, - "id": 965, - "name": "user", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 959, - "src": "10673:4:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10664:14:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 963, - "id": 967, - "nodeType": "Return", - "src": "10657:21:1" - } - ] - }, - "documentation": null, - "id": 969, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getBalance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 960, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 959, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 969, - "src": "10605:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 958, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10605:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10604:14:1" - }, - "payable": false, - "returnParameters": { - "id": 963, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 962, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 969, - "src": "10640:4:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 961, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "10640:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10639:6:1" - }, - "scope": 1070, - "src": "10585:101:1", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 975, - "name": "UsernameCreated", - "nodeType": "EventDefinition", - "parameters": { - "id": 974, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 971, - "indexed": true, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 975, - "src": "10842:20:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 970, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10842:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 973, - "indexed": true, - "name": "username", - "nodeType": "VariableDeclaration", - "scope": 975, - "src": "10873:24:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 972, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "10873:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10831:73:1" - }, - "src": "10809:96:1" - }, - { - "body": { - "id": 1047, - "nodeType": "Block", - "src": "11109:897:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 985, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 981, - "name": "usernamesTaken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 120, - "src": "11139:14:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 983, - "indexExpression": { - "argumentTypes": null, - "id": 982, - "name": "username", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 977, - "src": "11154:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11139:24:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 984, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11167:5:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "11139:33:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "757365726e616d65206973207265676973746572656420746f20616e206f776e657220616c7265616479", - "id": 986, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11174:44:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_fbf43060efdf793cb629c84c6e9dae246e51698989dd65981609d20142614fe1", - "typeString": "literal_string \"username is registered to an owner already\"" - }, - "value": "username is registered to an owner already" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_fbf43060efdf793cb629c84c6e9dae246e51698989dd65981609d20142614fe1", - "typeString": "literal_string \"username is registered to an owner already\"" - } - ], - "id": 980, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1088, - 1089 - ], - "referencedDeclaration": 1089, - "src": "11130:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 987, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11130:89:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 988, - "nodeType": "ExpressionStatement", - "src": "11130:89:1" - }, - { - "assignments": [ - 990 - ], - "declarations": [ - { - "constant": false, - "id": 990, - "name": "currentUsername", - "nodeType": "VariableDeclaration", - "scope": 1048, - "src": "11240:23:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 989, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "11240:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 995, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 991, - "name": "usernames", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 124, - "src": "11266:9:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_bytes32_$", - "typeString": "mapping(address => bytes32)" - } - }, - "id": 994, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 992, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "11276:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 993, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11276:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11266:21:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "11240:47:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 999, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 997, - "name": "currentUsername", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 990, - "src": "11306:15:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "id": 998, - "name": "username", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 977, - "src": "11325:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "11306:27:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "5468697320757365726e616d6520697320616c72656164792073657420746f207468652073656e646572", - "id": 1000, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11335:44:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_858348defba9cefd4bdc844c763b23f8e29a869d7cafac8088106bc53b8bd203", - "typeString": "literal_string \"This username is already set to the sender\"" - }, - "value": "This username is already set to the sender" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_858348defba9cefd4bdc844c763b23f8e29a869d7cafac8088106bc53b8bd203", - "typeString": "literal_string \"This username is already set to the sender\"" - } - ], - "id": 996, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1088, - 1089 - ], - "referencedDeclaration": 1089, - "src": "11298:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1001, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11298:82:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1002, - "nodeType": "ExpressionStatement", - "src": "11298:82:1" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "id": 1005, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 1003, - "name": "currentUsername", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 990, - "src": "11464:15:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "307830", - "id": 1004, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11483:3:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - }, - "src": "11464:22:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 1039, - "nodeType": "Block", - "src": "11596:262:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1025, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1020, - "name": "usernames", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 124, - "src": "11714:9:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_bytes32_$", - "typeString": "mapping(address => bytes32)" - } - }, - "id": 1023, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1021, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "11724:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1022, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11724:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "11714:21:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1024, - "name": "username", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 977, - "src": "11738:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "11714:32:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1026, - "nodeType": "ExpressionStatement", - "src": "11714:32:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 1031, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1027, - "name": "usernamesTaken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 120, - "src": "11761:14:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 1029, - "indexExpression": { - "argumentTypes": null, - "id": 1028, - "name": "username", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 977, - "src": "11776:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "11761:24:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1030, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11788:4:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "11761:31:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 1032, - "nodeType": "ExpressionStatement", - "src": "11761:31:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 1037, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1033, - "name": "usernamesTaken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 120, - "src": "11807:14:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 1035, - "indexExpression": { - "argumentTypes": null, - "id": 1034, - "name": "currentUsername", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 990, - "src": "11822:15:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "11807:31:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 1036, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11841:5:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "11807:39:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 1038, - "nodeType": "ExpressionStatement", - "src": "11807:39:1" - } - ] - }, - "id": 1040, - "nodeType": "IfStatement", - "src": "11461:397:1", - "trueBody": { - "id": 1019, - "nodeType": "Block", - "src": "11487:105:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1011, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1006, - "name": "usernames", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 124, - "src": "11502:9:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_bytes32_$", - "typeString": "mapping(address => bytes32)" - } - }, - "id": 1009, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1007, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "11512:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1008, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11512:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "11502:21:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1010, - "name": "username", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 977, - "src": "11526:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "src": "11502:32:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "id": 1012, - "nodeType": "ExpressionStatement", - "src": "11502:32:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 1017, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1013, - "name": "usernamesTaken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 120, - "src": "11549:14:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 1015, - "indexExpression": { - "argumentTypes": null, - "id": 1014, - "name": "username", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 977, - "src": "11564:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "11549:24:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1016, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11576:4:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "11549:31:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 1018, - "nodeType": "ExpressionStatement", - "src": "11549:31:1" - } - ] - } - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1042, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "11967:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1043, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11967:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1044, - "name": "username", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 977, - "src": "11979:8:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 1041, - "name": "UsernameCreated", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "11951:15:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bytes32_$returns$__$", - "typeString": "function (address,bytes32)" - } - }, - "id": 1045, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11951:37:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1046, - "nodeType": "EmitStatement", - "src": "11946:42:1" - } - ] - }, - "documentation": null, - "id": 1048, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "SetUsername", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 978, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 977, - "name": "username", - "nodeType": "VariableDeclaration", - "scope": 1048, - "src": "11084:16:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 976, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "11084:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11083:18:1" - }, - "payable": false, - "returnParameters": { - "id": 979, - "nodeType": "ParameterList", - "parameters": [], - "src": "11109:0:1" - }, - "scope": 1070, - "src": "11063:943:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1059, - "nodeType": "Block", - "src": "12134:41:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1055, - "name": "usernames", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 124, - "src": "12152:9:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_bytes32_$", - "typeString": "mapping(address => bytes32)" - } - }, - "id": 1057, - "indexExpression": { - "argumentTypes": null, - "id": 1056, - "name": "user", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1050, - "src": "12162:4:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "12152:15:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "functionReturnParameters": 1054, - "id": 1058, - "nodeType": "Return", - "src": "12145:22:1" - } - ] - }, - "documentation": null, - "id": 1060, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getUsername", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1051, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1050, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 1060, - "src": "12090:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1049, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12090:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12089:14:1" - }, - "payable": false, - "returnParameters": { - "id": 1054, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1053, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1060, - "src": "12125:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1052, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "12125:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12124:9:1" - }, - "scope": 1070, - "src": "12069:106:1", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1068, - "nodeType": "Block", - "src": "12285:36:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1065, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "12303:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1066, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12303:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 1064, - "id": 1067, - "nodeType": "Return", - "src": "12296:17:1" - } - ] - }, - "documentation": null, - "id": 1069, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getSenderAddress", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1061, - "nodeType": "ParameterList", - "parameters": [], - "src": "12252:2:1" - }, - "payable": false, - "returnParameters": { - "id": 1064, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1063, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1069, - "src": "12276:7:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1062, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12276:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "12275:9:1" - }, - "scope": 1070, - "src": "12227:94:1", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 1071, - "src": "434:11890:1" - } - ], - "src": "0:12326:1" - }, - "legacyAST": { - "absolutePath": "/C/Users/Khera/Documents/GitHub/TronDappSteedium/Solidity/contracts/NoFilter.sol", - "exportedSymbols": { - "NoFilter": [ - 1070 - ] - }, - "id": 1071, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 58, - "literals": [ - "solidity", - ">=", - "0.4", - ".23" - ], - "nodeType": "PragmaDirective", - "src": "0:25:1" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 1070, - "linearizedBaseContracts": [ - 1070 - ], - "name": "NoFilter", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 60, - "name": "postNumber", - "nodeType": "VariableDeclaration", - "scope": 1070, - "src": "495:15:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 59, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "495:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 64, - "name": "postOwners", - "nodeType": "VariableDeclaration", - "scope": 1070, - "src": "569:36:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", - "typeString": "mapping(uint256 => address)" - }, - "typeName": { - "id": 63, - "keyType": { - "id": 61, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "578:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Mapping", - "src": "569:25:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", - "typeString": "mapping(uint256 => address)" - }, - "valueType": { - "id": 62, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "586:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 68, - "name": "upvotes", - "nodeType": "VariableDeclaration", - "scope": 1070, - "src": "654:30:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", - "typeString": "mapping(uint256 => uint256)" - }, - "typeName": { - "id": 67, - "keyType": { - "id": 65, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "663:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Mapping", - "src": "654:22:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", - "typeString": "mapping(uint256 => uint256)" - }, - "valueType": { - "id": 66, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "671:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 72, - "name": "downvotes", - "nodeType": "VariableDeclaration", - "scope": 1070, - "src": "730:32:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", - "typeString": "mapping(uint256 => uint256)" - }, - "typeName": { - "id": 71, - "keyType": { - "id": 69, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "739:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Mapping", - "src": "730:22:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", - "typeString": "mapping(uint256 => uint256)" - }, - "valueType": { - "id": 70, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "747:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 78, - "name": "voters", - "nodeType": "VariableDeclaration", - "scope": 1070, - "src": "808:49:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(uint256 => uint256))" - }, - "typeName": { - "id": 77, - "keyType": { - "id": 73, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "817:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "808:42:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(uint256 => uint256))" - }, - "valueType": { - "id": 76, - "keyType": { - "id": 74, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "836:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Mapping", - "src": "828:21:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", - "typeString": "mapping(uint256 => uint256)" - }, - "valueType": { - "id": 75, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "844:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 82, - "name": "commentCounter", - "nodeType": "VariableDeclaration", - "scope": 1070, - "src": "997:37:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", - "typeString": "mapping(uint256 => uint256)" - }, - "typeName": { - "id": 81, - "keyType": { - "id": 79, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1006:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Mapping", - "src": "997:22:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", - "typeString": "mapping(uint256 => uint256)" - }, - "valueType": { - "id": 80, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1014:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 88, - "name": "commentOwner", - "nodeType": "VariableDeclaration", - "scope": 1070, - "src": "1093:55:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_address_$_$", - "typeString": "mapping(uint256 => mapping(uint256 => address))" - }, - "typeName": { - "id": 87, - "keyType": { - "id": 83, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1102:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Mapping", - "src": "1093:42:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_address_$_$", - "typeString": "mapping(uint256 => mapping(uint256 => address))" - }, - "valueType": { - "id": 86, - "keyType": { - "id": 84, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1118:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Mapping", - "src": "1110:24:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", - "typeString": "mapping(uint256 => address)" - }, - "valueType": { - "id": 85, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1126:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 94, - "name": "commentUpVotes", - "nodeType": "VariableDeclaration", - "scope": 1070, - "src": "1197:54:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(uint256 => uint256))" - }, - "typeName": { - "id": 93, - "keyType": { - "id": 89, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1206:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Mapping", - "src": "1197:39:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(uint256 => uint256))" - }, - "valueType": { - "id": 92, - "keyType": { - "id": 90, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1222:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Mapping", - "src": "1214:21:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", - "typeString": "mapping(uint256 => uint256)" - }, - "valueType": { - "id": 91, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1230:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 100, - "name": "commentDownVotes", - "nodeType": "VariableDeclaration", - "scope": 1070, - "src": "1297:56:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(uint256 => uint256))" - }, - "typeName": { - "id": 99, - "keyType": { - "id": 95, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1306:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Mapping", - "src": "1297:39:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(uint256 => uint256))" - }, - "valueType": { - "id": 98, - "keyType": { - "id": 96, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1322:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Mapping", - "src": "1314:21:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", - "typeString": "mapping(uint256 => uint256)" - }, - "valueType": { - "id": 97, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1330:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 108, - "name": "commentVoters", - "nodeType": "VariableDeclaration", - "scope": 1070, - "src": "1399:73:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$_$", - "typeString": "mapping(address => mapping(uint256 => mapping(uint256 => uint256)))" - }, - "typeName": { - "id": 107, - "keyType": { - "id": 101, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1408:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "1399:59:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$_$", - "typeString": "mapping(address => mapping(uint256 => mapping(uint256 => uint256)))" - }, - "valueType": { - "id": 106, - "keyType": { - "id": 102, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1427:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Mapping", - "src": "1419:38:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(uint256 => uint256))" - }, - "valueType": { - "id": 105, - "keyType": { - "id": 103, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1443:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Mapping", - "src": "1435:21:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", - "typeString": "mapping(uint256 => uint256)" - }, - "valueType": { - "id": 104, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1451:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - } - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 112, - "name": "balances", - "nodeType": "VariableDeclaration", - "scope": 1070, - "src": "1602:34:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "typeName": { - "id": 111, - "keyType": { - "id": 109, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1611:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "1602:25:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - }, - "valueType": { - "id": 110, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1622:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 116, - "name": "postEarnings", - "nodeType": "VariableDeclaration", - "scope": 1070, - "src": "1643:35:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", - "typeString": "mapping(uint256 => uint256)" - }, - "typeName": { - "id": 115, - "keyType": { - "id": 113, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1652:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Mapping", - "src": "1643:22:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", - "typeString": "mapping(uint256 => uint256)" - }, - "valueType": { - "id": 114, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1660:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 120, - "name": "usernamesTaken", - "nodeType": "VariableDeclaration", - "scope": 1070, - "src": "1778:40:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - }, - "typeName": { - "id": 119, - "keyType": { - "id": 117, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1787:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Mapping", - "src": "1778:25:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - }, - "valueType": { - "id": 118, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1798:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 124, - "name": "usernames", - "nodeType": "VariableDeclaration", - "scope": 1070, - "src": "1825:38:1", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_bytes32_$", - "typeString": "mapping(address => bytes32)" - }, - "typeName": { - "id": 123, - "keyType": { - "id": 121, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1834:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "1825:28:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_bytes32_$", - "typeString": "mapping(address => bytes32)" - }, - "valueType": { - "id": 122, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1845:7:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - }, - "value": null, - "visibility": "internal" - }, - { - "body": { - "id": 131, - "nodeType": "Block", - "src": "1898:33:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 129, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 127, - "name": "postNumber", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 60, - "src": "1909:10:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 128, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1922:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "1909:14:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 130, - "nodeType": "ExpressionStatement", - "src": "1909:14:1" - } - ] - }, - "documentation": null, - "id": 132, - "implemented": true, - "isConstructor": true, - "isDeclaredConst": false, - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 125, - "nodeType": "ParameterList", - "parameters": [], - "src": "1888:2:1" - }, - "payable": false, - "returnParameters": { - "id": 126, - "nodeType": "ParameterList", - "parameters": [], - "src": "1898:0:1" - }, - "scope": 1070, - "src": "1876:55:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 146, - "name": "PostContent", - "nodeType": "EventDefinition", - "parameters": { - "id": 145, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 134, - "indexed": true, - "name": "author", - "nodeType": "VariableDeclaration", - "scope": 146, - "src": "2059:22:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 133, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2059:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 136, - "indexed": true, - "name": "id", - "nodeType": "VariableDeclaration", - "scope": 146, - "src": "2092:15:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 135, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2092:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 138, - "indexed": false, - "name": "tags", - "nodeType": "VariableDeclaration", - "scope": 146, - "src": "2118:10:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 137, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "2118:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 140, - "indexed": false, - "name": "postTimestamp", - "nodeType": "VariableDeclaration", - "scope": 146, - "src": "2139:18:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 139, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2139:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 142, - "indexed": false, - "name": "title", - "nodeType": "VariableDeclaration", - "scope": 146, - "src": "2211:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 141, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "2211:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 144, - "indexed": false, - "name": "text", - "nodeType": "VariableDeclaration", - "scope": 146, - "src": "2233:10:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 143, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "2233:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2048:202:1" - }, - "src": "2030:221:1" - }, - { - "body": { - "id": 221, - "nodeType": "Block", - "src": "2473:710:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "expression": { + "argumentTypes": null, + "id": 818, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 814, + "name": "usernamesTaken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "10026:14:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", + "typeString": "mapping(bytes32 => bool)" + } + }, + "id": 816, + "indexExpression": { + "argumentTypes": null, + "id": 815, + "name": "username", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 764, + "src": "10041:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "10026:24:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 817, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10053:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "10026:31:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } }, - "id": 159, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { + "id": 819, + "nodeType": "ExpressionStatement", + "src": "10026:31:0" + }, + { + "expression": { "argumentTypes": null, - "expression": { + "id": 824, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { "argumentTypes": null, - "id": 156, - "name": "title", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 148, - "src": "2544:5:1", + "baseExpression": { + "argumentTypes": null, + "id": 820, + "name": "usernamesTaken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "10072:14:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", + "typeString": "mapping(bytes32 => bool)" + } + }, + "id": 822, + "indexExpression": { + "argumentTypes": null, + "id": 821, + "name": "currentUsername", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 777, + "src": "10087:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "10072:31:0", "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "id": 157, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 823, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10106:5:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "10072:39:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 825, + "nodeType": "ExpressionStatement", + "src": "10072:39:0" + } + ] + }, + "id": 827, + "nodeType": "IfStatement", + "src": "9726:397:0", + "trueBody": { + "id": 806, + "nodeType": "Block", + "src": "9752:105:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 798, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2544:12:1", + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 793, + "name": "usernames", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 63, + "src": "9767:9:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bytes32_$", + "typeString": "mapping(address => bytes32)" + } + }, + "id": 796, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 794, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 872, + "src": "9777:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 795, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9777:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9767:21:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 797, + "name": "username", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 764, + "src": "9791:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "9767:32:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { + "id": 799, + "nodeType": "ExpressionStatement", + "src": "9767:32:0" + }, + { + "expression": { "argumentTypes": null, - "hexValue": "30", - "id": 158, + "id": 804, "isConstant": false, "isLValue": false, - "isPure": true, - "kind": "number", + "isPure": false, "lValueRequested": false, - "nodeType": "Literal", - "src": "2559:1:1", - "subdenomination": null, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 800, + "name": "usernamesTaken", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "9814:14:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", + "typeString": "mapping(bytes32 => bool)" + } + }, + "id": 802, + "indexExpression": { + "argumentTypes": null, + "id": 801, + "name": "username", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 764, + "src": "9829:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9814:24:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 803, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9841:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "9814:31:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 805, + "nodeType": "ExpressionStatement", + "src": "9814:31:0" + } + ] + } + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 829, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 872, + "src": "10232:3:0", "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } }, - "src": "2544:16:1", + "id": 830, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10232:10:0", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_address", + "typeString": "address" } }, { "argumentTypes": null, - "hexValue": "496e76616c6964207469746c65", - "id": 160, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2562:15:1", - "subdenomination": null, + "id": 831, + "name": "username", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 764, + "src": "10244:8:0", "typeDescriptions": { - "typeIdentifier": "t_stringliteral_80585e438708ccfc2fdeab91f4729387a2489c7d8404a3554a0dd993b1a74008", - "typeString": "literal_string \"Invalid title\"" - }, - "value": "Invalid title" + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } } ], "expression": { "argumentTypes": [ { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_address", + "typeString": "address" }, { - "typeIdentifier": "t_stringliteral_80585e438708ccfc2fdeab91f4729387a2489c7d8404a3554a0dd993b1a74008", - "typeString": "literal_string \"Invalid title\"" + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" } ], - "id": 155, - "name": "require", + "id": 828, + "name": "UsernameCreated", "nodeType": "Identifier", - "overloadedDeclarations": [ - 1088, - 1089 - ], - "referencedDeclaration": 1089, - "src": "2536:7:1", + "overloadedDeclarations": [], + "referencedDeclaration": 762, + "src": "10216:15:0", "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bytes32_$returns$__$", + "typeString": "function (address,bytes32)" } }, - "id": 161, + "id": 832, "isConstant": false, "isLValue": false, "isPure": false, @@ -15156,788 +11574,1047 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "2536:42:1", + "src": "10216:37:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 162, - "nodeType": "ExpressionStatement", - "src": "2536:42:1" - }, + "id": 833, + "nodeType": "EmitStatement", + "src": "10211:42:0" + } + ] + }, + "documentation": null, + "id": 835, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "SetUsername", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 765, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 764, + "name": "username", + "nodeType": "VariableDeclaration", + "scope": 835, + "src": "9349:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 763, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "9349:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9348:18:0" + }, + "payable": false, + "returnParameters": { + "id": 766, + "nodeType": "ParameterList", + "parameters": [], + "src": "9374:0:0" + }, + "scope": 857, + "src": "9328:943:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 846, + "nodeType": "Block", + "src": "10399:41:0", + "statements": [ { "expression": { "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 167, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 164, - "name": "text", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 150, - "src": "2597:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 165, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2597:11:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 166, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2611:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "2597:15:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "496e76616c69642074657874", - "id": 168, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2614:14:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_45dddbce7fa4b79a973f059a441f6fe10ee0ec48a6d7a54e092857a4f15c5eea", - "typeString": "literal_string \"Invalid text\"" - }, - "value": "Invalid text" + "baseExpression": { + "argumentTypes": null, + "id": 842, + "name": "usernames", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 63, + "src": "10417:9:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bytes32_$", + "typeString": "mapping(address => bytes32)" } - ], + }, + "id": 844, + "indexExpression": { + "argumentTypes": null, + "id": 843, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 837, + "src": "10427:4:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10417:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "functionReturnParameters": 841, + "id": 845, + "nodeType": "Return", + "src": "10410:22:0" + } + ] + }, + "documentation": null, + "id": 847, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getUsername", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 838, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 837, + "name": "user", + "nodeType": "VariableDeclaration", + "scope": 847, + "src": "10355:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 836, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10355:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10354:14:0" + }, + "payable": false, + "returnParameters": { + "id": 841, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 840, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 847, + "src": "10390:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 839, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "10390:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10389:9:0" + }, + "scope": 857, + "src": "10334:106:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 855, + "nodeType": "Block", + "src": "10550:36:0", + "statements": [ + { + "expression": { + "argumentTypes": null, "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_45dddbce7fa4b79a973f059a441f6fe10ee0ec48a6d7a54e092857a4f15c5eea", - "typeString": "literal_string \"Invalid text\"" - } - ], - "id": 163, - "name": "require", + "argumentTypes": null, + "id": 852, + "name": "msg", "nodeType": "Identifier", - "overloadedDeclarations": [ - 1088, - 1089 - ], - "referencedDeclaration": 1089, - "src": "2589:7:1", + "overloadedDeclarations": [], + "referencedDeclaration": 872, + "src": "10568:3:0", "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" + "typeIdentifier": "t_magic_message", + "typeString": "msg" } }, - "id": 169, + "id": 853, "isConstant": false, "isLValue": false, "isPure": false, - "kind": "functionCall", "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2589:40:1", + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10568:10:0", "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "id": 170, - "nodeType": "ExpressionStatement", - "src": "2589:40:1" + "functionReturnParameters": 851, + "id": 854, + "nodeType": "Return", + "src": "10561:17:0" + } + ] + }, + "documentation": null, + "id": 856, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getSenderAddress", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 848, + "nodeType": "ParameterList", + "parameters": [], + "src": "10517:2:0" + }, + "payable": false, + "returnParameters": { + "id": 851, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 850, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 856, + "src": "10541:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 849, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10541:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10540:9:0" + }, + "scope": 857, + "src": "10492:94:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 858, + "src": "434:10155:0" + } + ], + "src": "0:10591:0" + }, + "legacyAST": { + "absolutePath": "/C/Users/Khera/Documents/GitHub/TronDappSteedium/Solidity/contracts/NoFilter.sol", + "exportedSymbols": { + "NoFilter": [ + 857 + ] + }, + "id": 858, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + ">=", + "0.4", + ".23" + ], + "nodeType": "PragmaDirective", + "src": "0:25:0" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 857, + "linearizedBaseContracts": [ + 857 + ], + "name": "NoFilter", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 3, + "name": "postNumber", + "nodeType": "VariableDeclaration", + "scope": 857, + "src": "495:15:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "495:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 7, + "name": "postOwners", + "nodeType": "VariableDeclaration", + "scope": 857, + "src": "569:36:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + }, + "typeName": { + "id": 6, + "keyType": { + "id": 4, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "578:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "569:25:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + }, + "valueType": { + "id": 5, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "586:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 11, + "name": "upvotes", + "nodeType": "VariableDeclaration", + "scope": 857, + "src": "654:30:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + }, + "typeName": { + "id": 10, + "keyType": { + "id": 8, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "663:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "654:22:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + }, + "valueType": { + "id": 9, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "671:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 15, + "name": "downvotes", + "nodeType": "VariableDeclaration", + "scope": 857, + "src": "730:32:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + }, + "typeName": { + "id": 14, + "keyType": { + "id": 12, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "739:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "730:22:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + }, + "valueType": { + "id": 13, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "747:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 21, + "name": "voters", + "nodeType": "VariableDeclaration", + "scope": 857, + "src": "808:49:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(uint256 => uint256))" + }, + "typeName": { + "id": 20, + "keyType": { + "id": 16, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "817:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "808:42:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(uint256 => uint256))" + }, + "valueType": { + "id": 19, + "keyType": { + "id": 17, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "836:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 175, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 172, - "name": "tags", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 152, - "src": "2648:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 173, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2648:11:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 174, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2662:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "2648:15:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "496e76616c69642074616773", - "id": 176, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2665:14:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_7a9201aa9910499695931b3a163439a039c7f74763c01825f2936b9d81958c13", - "typeString": "literal_string \"Invalid tags\"" - }, - "value": "Invalid tags" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_7a9201aa9910499695931b3a163439a039c7f74763c01825f2936b9d81958c13", - "typeString": "literal_string \"Invalid tags\"" - } - ], - "id": 171, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1088, - 1089 - ], - "referencedDeclaration": 1089, - "src": "2640:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 177, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2640:40:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 178, - "nodeType": "ExpressionStatement", - "src": "2640:40:1" + "nodeType": "Mapping", + "src": "828:21:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" }, - { - "assignments": [ - 180 - ], - "declarations": [ - { - "constant": false, - "id": 180, - "name": "postId", - "nodeType": "VariableDeclaration", - "scope": 222, - "src": "2701:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 179, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2701:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 182, - "initialValue": { - "argumentTypes": null, - "id": 181, - "name": "postNumber", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 60, - "src": "2715:10:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2701:24:1" + "valueType": { + "id": 18, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "844:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 25, + "name": "commentCounter", + "nodeType": "VariableDeclaration", + "scope": 857, + "src": "997:37:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + }, + "typeName": { + "id": 24, + "keyType": { + "id": 22, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1006:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "997:22:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + }, + "valueType": { + "id": 23, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1014:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 31, + "name": "commentOwner", + "nodeType": "VariableDeclaration", + "scope": 857, + "src": "1093:55:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_address_$_$", + "typeString": "mapping(uint256 => mapping(uint256 => address))" + }, + "typeName": { + "id": 30, + "keyType": { + "id": 26, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1102:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "1093:42:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_address_$_$", + "typeString": "mapping(uint256 => mapping(uint256 => address))" + }, + "valueType": { + "id": 29, + "keyType": { + "id": 27, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1118:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } }, - { - "expression": { - "argumentTypes": null, - "id": 188, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 183, - "name": "postOwners", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 64, - "src": "2796:10:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", - "typeString": "mapping(uint256 => address)" - } - }, - "id": 185, - "indexExpression": { - "argumentTypes": null, - "id": 184, - "name": "postId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 180, - "src": "2807:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "2796:18:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 186, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "2817:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 187, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2817:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "2796:31:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 189, - "nodeType": "ExpressionStatement", - "src": "2796:31:1" + "nodeType": "Mapping", + "src": "1110:24:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" }, - { - "expression": { - "argumentTypes": null, - "id": 194, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 190, - "name": "upvotes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "2912:7:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", - "typeString": "mapping(uint256 => uint256)" - } - }, - "id": 192, - "indexExpression": { - "argumentTypes": null, - "id": 191, - "name": "postId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 180, - "src": "2920:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "2912:15:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "31", - "id": 193, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2930:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "2912:19:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 195, - "nodeType": "ExpressionStatement", - "src": "2912:19:1" + "valueType": { + "id": 28, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1126:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 37, + "name": "commentUpVotes", + "nodeType": "VariableDeclaration", + "scope": 857, + "src": "1197:54:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(uint256 => uint256))" + }, + "typeName": { + "id": 36, + "keyType": { + "id": 32, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1206:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "1197:39:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(uint256 => uint256))" + }, + "valueType": { + "id": 35, + "keyType": { + "id": 33, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1222:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "1214:21:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + }, + "valueType": { + "id": 34, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1230:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 43, + "name": "commentDownVotes", + "nodeType": "VariableDeclaration", + "scope": 857, + "src": "1297:56:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(uint256 => uint256))" + }, + "typeName": { + "id": 42, + "keyType": { + "id": 38, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1306:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "1297:39:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(uint256 => uint256))" + }, + "valueType": { + "id": 41, + "keyType": { + "id": 39, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1322:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } }, - { - "expression": { - "argumentTypes": null, - "id": 203, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 196, - "name": "voters", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 78, - "src": "2942:6:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(uint256 => uint256))" - } - }, - "id": 200, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 197, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "2949:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 198, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2949:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2942:18:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", - "typeString": "mapping(uint256 => uint256)" - } - }, - "id": 201, - "indexExpression": { - "argumentTypes": null, - "id": 199, - "name": "postId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 180, - "src": "2961:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "2942:26:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "31", - "id": 202, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2971:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "2942:30:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 204, - "nodeType": "ExpressionStatement", - "src": "2942:30:1" + "nodeType": "Mapping", + "src": "1314:21:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 206, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "3088:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 207, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3088:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 208, - "name": "postId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 180, - "src": "3100:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 209, - "name": "tags", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 152, - "src": "3108:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 210, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1087, - "src": "3114:3:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 211, - "name": "title", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 148, - "src": "3119:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 212, - "name": "text", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 150, - "src": "3126:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 205, - "name": "PostContent", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 146, - "src": "3076:11:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$_t_uint256_$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$returns$__$", - "typeString": "function (address,uint256,bytes memory,uint256,bytes memory,bytes memory)" - } - }, - "id": 213, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3076:55:1", + "valueType": { + "id": 40, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1330:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 51, + "name": "commentVoters", + "nodeType": "VariableDeclaration", + "scope": 857, + "src": "1399:73:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$_$", + "typeString": "mapping(address => mapping(uint256 => mapping(uint256 => uint256)))" + }, + "typeName": { + "id": 50, + "keyType": { + "id": 44, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1408:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1399:59:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$_$", + "typeString": "mapping(address => mapping(uint256 => mapping(uint256 => uint256)))" + }, + "valueType": { + "id": 49, + "keyType": { + "id": 45, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1427:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "1419:38:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(uint256 => uint256))" + }, + "valueType": { + "id": 48, + "keyType": { + "id": 46, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1443:4:0", "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 214, - "nodeType": "EmitStatement", - "src": "3071:60:1" - }, + "nodeType": "Mapping", + "src": "1435:21:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + }, + "valueType": { + "id": 47, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1451:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + } + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 55, + "name": "postEarnings", + "nodeType": "VariableDeclaration", + "scope": 857, + "src": "1602:35:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + }, + "typeName": { + "id": 54, + "keyType": { + "id": 52, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1611:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Mapping", + "src": "1602:22:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + }, + "valueType": { + "id": 53, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "1619:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 59, + "name": "usernamesTaken", + "nodeType": "VariableDeclaration", + "scope": 857, + "src": "1737:40:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", + "typeString": "mapping(bytes32 => bool)" + }, + "typeName": { + "id": 58, + "keyType": { + "id": 56, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1746:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Mapping", + "src": "1737:25:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", + "typeString": "mapping(bytes32 => bool)" + }, + "valueType": { + "id": 57, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1757:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 63, + "name": "usernames", + "nodeType": "VariableDeclaration", + "scope": 857, + "src": "1784:38:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bytes32_$", + "typeString": "mapping(address => bytes32)" + }, + "typeName": { + "id": 62, + "keyType": { + "id": 60, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1793:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1784:28:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bytes32_$", + "typeString": "mapping(address => bytes32)" + }, + "valueType": { + "id": 61, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1804:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + }, + "value": null, + "visibility": "internal" + }, + { + "body": { + "id": 70, + "nodeType": "Block", + "src": "1857:33:0", + "statements": [ { "expression": { "argumentTypes": null, - "id": 219, + "id": 68, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 215, + "id": 66, "name": "postNumber", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 60, - "src": "3152:10:1", + "referencedDeclaration": 3, + "src": "1868:10:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -15947,99 +12624,120 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 218, + "hexValue": "30", + "id": 67, "isConstant": false, "isLValue": false, - "isPure": false, + "isPure": true, + "kind": "number", "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 216, - "name": "postId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 180, - "src": "3165:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 217, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3174:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "3165:10:1", + "nodeType": "Literal", + "src": "1881:1:0", + "subdenomination": null, "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" }, - "src": "3152:23:1", + "src": "1868:14:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 220, + "id": 69, "nodeType": "ExpressionStatement", - "src": "3152:23:1" + "src": "1868:14:0" } ] }, "documentation": null, - "id": 222, + "id": 71, "implemented": true, - "isConstructor": false, + "isConstructor": true, "isDeclaredConst": false, "modifiers": [], - "name": "CreatePost", + "name": "", "nodeType": "FunctionDefinition", "parameters": { - "id": 153, + "id": 64, + "nodeType": "ParameterList", + "parameters": [], + "src": "1847:2:0" + }, + "payable": false, + "returnParameters": { + "id": 65, + "nodeType": "ParameterList", + "parameters": [], + "src": "1857:0:0" + }, + "scope": 857, + "src": "1835:55:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 85, + "name": "PostContent", + "nodeType": "EventDefinition", + "parameters": { + "id": 84, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 148, - "name": "title", + "id": 73, + "indexed": true, + "name": "author", + "nodeType": "VariableDeclaration", + "scope": 85, + "src": "2018:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 72, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2018:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 75, + "indexed": true, + "name": "id", "nodeType": "VariableDeclaration", - "scope": 222, - "src": "2429:11:1", + "scope": 85, + "src": "2051:15:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, "typeName": { - "id": 147, - "name": "bytes", + "id": 74, + "name": "uint", "nodeType": "ElementaryTypeName", - "src": "2429:5:1", + "src": "2051:4:0", "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, "value": null, @@ -16047,11 +12745,12 @@ }, { "constant": false, - "id": 150, - "name": "text", + "id": 77, + "indexed": false, + "name": "tags", "nodeType": "VariableDeclaration", - "scope": 222, - "src": "2442:10:1", + "scope": 85, + "src": "2077:10:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -16059,10 +12758,10 @@ "typeString": "bytes" }, "typeName": { - "id": 149, + "id": 76, "name": "bytes", "nodeType": "ElementaryTypeName", - "src": "2442:5:1", + "src": "2077:5:0", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" @@ -16073,186 +12772,95 @@ }, { "constant": false, - "id": 152, - "name": "tags", + "id": 79, + "indexed": false, + "name": "postTimestamp", "nodeType": "VariableDeclaration", - "scope": 222, - "src": "2454:10:1", + "scope": 85, + "src": "2098:18:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, "typeName": { - "id": 151, - "name": "bytes", + "id": 78, + "name": "uint", "nodeType": "ElementaryTypeName", - "src": "2454:5:1", + "src": "2098:4:0", "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, "value": null, "visibility": "internal" - } - ], - "src": "2428:37:1" - }, - "payable": false, - "returnParameters": { - "id": 154, - "nodeType": "ParameterList", - "parameters": [], - "src": "2473:0:1" - }, - "scope": 1070, - "src": "2409:774:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 233, - "nodeType": "Block", - "src": "3287:44:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 229, - "name": "postOwners", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 64, - "src": "3305:10:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", - "typeString": "mapping(uint256 => address)" - } - }, - "id": 231, - "indexExpression": { - "argumentTypes": null, - "id": 230, - "name": "postId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 224, - "src": "3316:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3305:18:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 228, - "id": 232, - "nodeType": "Return", - "src": "3298:25:1" - } - ] - }, - "documentation": null, - "id": 234, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getOwner", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 225, - "nodeType": "ParameterList", - "parameters": [ + }, { "constant": false, - "id": 224, - "name": "postId", + "id": 81, + "indexed": false, + "name": "title", "nodeType": "VariableDeclaration", - "scope": 234, - "src": "3244:11:1", + "scope": 85, + "src": "2170:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" }, "typeName": { - "id": 223, - "name": "uint", + "id": 80, + "name": "bytes", "nodeType": "ElementaryTypeName", - "src": "3244:4:1", + "src": "2170:5:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" } }, "value": null, "visibility": "internal" - } - ], - "src": "3243:13:1" - }, - "payable": false, - "returnParameters": { - "id": 228, - "nodeType": "ParameterList", - "parameters": [ + }, { "constant": false, - "id": 227, - "name": "", + "id": 83, + "indexed": false, + "name": "text", "nodeType": "VariableDeclaration", - "scope": 234, - "src": "3278:7:1", + "scope": 85, + "src": "2192:10:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" }, "typeName": { - "id": 226, - "name": "address", + "id": 82, + "name": "bytes", "nodeType": "ElementaryTypeName", - "src": "3278:7:1", + "src": "2192:5:0", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" } }, "value": null, "visibility": "internal" } ], - "src": "3277:9:1" + "src": "2007:202:0" }, - "scope": 1070, - "src": "3226:105:1", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" + "src": "1989:221:0" }, { "body": { - "id": 295, + "id": 160, "nodeType": "Block", - "src": "3405:419:1", + "src": "2432:710:0", "statements": [ { "expression": { @@ -16264,37 +12872,185 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 242, + "id": 98, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 240, - "name": "postId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 236, - "src": "3424:6:1", + "expression": { + "argumentTypes": null, + "id": 95, + "name": "title", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 87, + "src": "2503:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 96, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2503:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 97, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2518:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2503:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "496e76616c6964207469746c65", + "id": 99, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2521:15:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_80585e438708ccfc2fdeab91f4729387a2489c7d8404a3554a0dd993b1a74008", + "typeString": "literal_string \"Invalid title\"" + }, + "value": "Invalid title" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_80585e438708ccfc2fdeab91f4729387a2489c7d8404a3554a0dd993b1a74008", + "typeString": "literal_string \"Invalid title\"" + } + ], + "id": 94, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 875, + 876 + ], + "referencedDeclaration": 876, + "src": "2495:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 100, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2495:42:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 101, + "nodeType": "ExpressionStatement", + "src": "2495:42:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 106, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 103, + "name": "text", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 89, + "src": "2556:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2556:11:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", - "operator": ">=", + "operator": ">", "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 241, + "id": 105, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "3434:1:1", + "src": "2570:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -16302,7 +13058,7 @@ }, "value": "0" }, - "src": "3424:11:1", + "src": "2556:15:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -16310,21 +13066,21 @@ }, { "argumentTypes": null, - "hexValue": "766f746573206973206e6f7420666f7220612076616c696420706f7374", - "id": 243, + "hexValue": "496e76616c69642074657874", + "id": 107, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "3437:31:1", + "src": "2573:14:0", "subdenomination": null, "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ff3dacff5ff4f61cab4f46ef6127fdb7fdc77ddfb8b67e7ad2650377bf778ed8", - "typeString": "literal_string \"votes is not for a valid post\"" + "typeIdentifier": "t_stringliteral_45dddbce7fa4b79a973f059a441f6fe10ee0ec48a6d7a54e092857a4f15c5eea", + "typeString": "literal_string \"Invalid text\"" }, - "value": "votes is not for a valid post" + "value": "Invalid text" } ], "expression": { @@ -16334,25 +13090,25 @@ "typeString": "bool" }, { - "typeIdentifier": "t_stringliteral_ff3dacff5ff4f61cab4f46ef6127fdb7fdc77ddfb8b67e7ad2650377bf778ed8", - "typeString": "literal_string \"votes is not for a valid post\"" + "typeIdentifier": "t_stringliteral_45dddbce7fa4b79a973f059a441f6fe10ee0ec48a6d7a54e092857a4f15c5eea", + "typeString": "literal_string \"Invalid text\"" } ], - "id": 239, + "id": 102, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1088, - 1089 + 875, + 876 ], - "referencedDeclaration": 1089, - "src": "3416:7:1", + "referencedDeclaration": 876, + "src": "2548:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 244, + "id": 108, "isConstant": false, "isLValue": false, "isPure": false, @@ -16360,15 +13116,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3416:53:1", + "src": "2548:40:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 245, + "id": 109, "nodeType": "ExpressionStatement", - "src": "3416:53:1" + "src": "2548:40:0" }, { "expression": { @@ -16380,40 +13136,61 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 249, + "id": 114, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 247, - "name": "postId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 236, - "src": "3488:6:1", + "expression": { + "argumentTypes": null, + "id": 111, + "name": "tags", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 91, + "src": "2607:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 112, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2607:11:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", - "operator": "<", + "operator": ">", "rightExpression": { "argumentTypes": null, - "id": 248, - "name": "postNumber", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 60, - "src": "3497:10:1", + "hexValue": "30", + "id": 113, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2621:1:0", + "subdenomination": null, "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" }, - "src": "3488:19:1", + "src": "2607:15:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -16421,21 +13198,21 @@ }, { "argumentTypes": null, - "hexValue": "766f74657320697320666f722061206e6f6e206578697374656e7420706f7374", - "id": 250, + "hexValue": "496e76616c69642074616773", + "id": 115, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "3509:34:1", + "src": "2624:14:0", "subdenomination": null, "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5c2b6bc9661424e678d353e544becf16e7105065d06cadc50a2e92c037d1b9b", - "typeString": "literal_string \"votes is for a non existent post\"" + "typeIdentifier": "t_stringliteral_7a9201aa9910499695931b3a163439a039c7f74763c01825f2936b9d81958c13", + "typeString": "literal_string \"Invalid tags\"" }, - "value": "votes is for a non existent post" + "value": "Invalid tags" } ], "expression": { @@ -16445,25 +13222,25 @@ "typeString": "bool" }, { - "typeIdentifier": "t_stringliteral_c5c2b6bc9661424e678d353e544becf16e7105065d06cadc50a2e92c037d1b9b", - "typeString": "literal_string \"votes is for a non existent post\"" + "typeIdentifier": "t_stringliteral_7a9201aa9910499695931b3a163439a039c7f74763c01825f2936b9d81958c13", + "typeString": "literal_string \"Invalid tags\"" } ], - "id": 246, + "id": 110, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1088, - 1089 + 875, + 876 ], - "referencedDeclaration": 1089, - "src": "3480:7:1", + "referencedDeclaration": 876, + "src": "2599:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 251, + "id": 116, "isConstant": false, "isLValue": false, "isPure": false, @@ -16471,28 +13248,28 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "3480:64:1", + "src": "2599:40:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 252, + "id": 117, "nodeType": "ExpressionStatement", - "src": "3480:64:1" + "src": "2599:40:0" }, { "assignments": [ - 254 + 119 ], "declarations": [ { "constant": false, - "id": 254, - "name": "knownType", + "id": 119, + "name": "postId", "nodeType": "VariableDeclaration", - "scope": 296, - "src": "3565:14:1", + "scope": 161, + "src": "2660:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -16500,10 +13277,10 @@ "typeString": "uint256" }, "typeName": { - "id": 253, + "id": 118, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "3565:4:1", + "src": "2660:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -16513,354 +13290,194 @@ "visibility": "internal" } ], - "id": 261, + "id": 121, "initialValue": { "argumentTypes": null, - "baseExpression": { + "id": 120, + "name": "postNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "2674:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2660:24:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 127, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 255, - "name": "voters", + "id": 122, + "name": "postOwners", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 78, - "src": "3582:6:1", + "referencedDeclaration": 7, + "src": "2755:10:0", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(uint256 => uint256))" + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" } }, - "id": 258, + "id": 124, "indexExpression": { "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 256, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "3589:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 257, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3589:10:1", + "id": 123, + "name": "postId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 119, + "src": "2766:6:0", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, "isConstant": false, "isLValue": true, "isPure": false, - "lValueRequested": false, + "lValueRequested": true, "nodeType": "IndexAccess", - "src": "3582:18:1", + "src": "2755:18:0", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", - "typeString": "mapping(uint256 => uint256)" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "id": 260, - "indexExpression": { + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { "argumentTypes": null, - "id": 259, - "name": "postId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 236, - "src": "3601:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3582:26:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3565:43:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { + "expression": { "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 265, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 263, - "name": "knownType", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 254, - "src": "3627:9:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 264, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3640:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "3627:14:1", + "id": 125, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 872, + "src": "2776:3:0", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_magic_message", + "typeString": "msg" } }, - { - "argumentTypes": null, - "hexValue": "5570766f746520616c726561647920646f6e65", - "id": 266, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3643:21:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_df24b86cc4620336f368688345ca505ad90fcac9d2a55b94a3e3f9a021ddf783", - "typeString": "literal_string \"Upvote already done\"" - }, - "value": "Upvote already done" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_df24b86cc4620336f368688345ca505ad90fcac9d2a55b94a3e3f9a021ddf783", - "typeString": "literal_string \"Upvote already done\"" - } - ], - "id": 262, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1088, - 1089 - ], - "referencedDeclaration": 1089, - "src": "3619:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" + "id": 126, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2776:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" } }, - "id": 267, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3619:46:1", + "src": "2755:31:0", "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "id": 268, + "id": 128, "nodeType": "ExpressionStatement", - "src": "3619:46:1" + "src": "2755:31:0" }, { - "condition": { + "expression": { "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 271, + "id": 133, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "leftExpression": { + "leftHandSide": { "argumentTypes": null, - "id": 269, - "name": "knownType", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 254, - "src": "3680:9:1", + "baseExpression": { + "argumentTypes": null, + "id": 129, + "name": "upvotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11, + "src": "2871:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + } + }, + "id": 131, + "indexExpression": { + "argumentTypes": null, + "id": 130, + "name": "postId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 119, + "src": "2879:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2871:15:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { "argumentTypes": null, - "hexValue": "32", - "id": 270, + "hexValue": "31", + "id": 132, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "3693:1:1", + "src": "2889:1:0", "subdenomination": null, "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" }, - "value": "2" + "value": "1" }, - "src": "3680:14:1", + "src": "2871:19:0", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "falseBody": null, - "id": 279, - "nodeType": "IfStatement", - "src": "3676:69:1", - "trueBody": { - "id": 278, - "nodeType": "Block", - "src": "3696:49:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 276, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 272, - "name": "downvotes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 72, - "src": "3711:9:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", - "typeString": "mapping(uint256 => uint256)" - } - }, - "id": 274, - "indexExpression": { - "argumentTypes": null, - "id": 273, - "name": "postId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 236, - "src": "3721:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "3711:17:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "-=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "31", - "id": 275, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3732:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "3711:22:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 277, - "nodeType": "ExpressionStatement", - "src": "3711:22:1" - } - ] - } + "id": 134, + "nodeType": "ExpressionStatement", + "src": "2871:19:0" }, { "expression": { "argumentTypes": null, - "id": 287, + "id": 142, "isConstant": false, "isLValue": false, "isPure": false, @@ -16871,34 +13488,34 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 280, + "id": 135, "name": "voters", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 78, - "src": "3755:6:1", + "referencedDeclaration": 21, + "src": "2901:6:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_uint256_$_$", "typeString": "mapping(address => mapping(uint256 => uint256))" } }, - "id": 284, + "id": 139, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 281, + "id": 136, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "3762:3:1", + "referencedDeclaration": 872, + "src": "2908:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 282, + "id": 137, "isConstant": false, "isLValue": false, "isPure": false, @@ -16906,7 +13523,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "3762:10:1", + "src": "2908:10:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -16917,166 +13534,486 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "3755:18:1", + "src": "2901:18:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + } + }, + "id": 140, + "indexExpression": { + "argumentTypes": null, + "id": 138, + "name": "postId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 119, + "src": "2920:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2901:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "31", + "id": 141, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2930:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "2901:30:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 143, + "nodeType": "ExpressionStatement", + "src": "2901:30:0" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 145, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 872, + "src": "3047:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 146, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3047:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 147, + "name": "postId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 119, + "src": "3059:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 148, + "name": "tags", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 91, + "src": "3067:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "id": 149, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 874, + "src": "3073:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 150, + "name": "title", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 87, + "src": "3078:5:0", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", - "typeString": "mapping(uint256 => uint256)" + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" } }, - "id": 285, - "indexExpression": { + { "argumentTypes": null, - "id": 283, - "name": "postId", + "id": 151, + "name": "text", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 236, - "src": "3774:6:1", + "referencedDeclaration": 89, + "src": "3085:4:0", "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { "typeIdentifier": "t_uint256", "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "3755:26:1", + ], + "id": 144, + "name": "PostContent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 85, + "src": "3035:11:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$_t_uint256_$_t_bytes_memory_ptr_$_t_bytes_memory_ptr_$returns$__$", + "typeString": "function (address,uint256,bytes memory,uint256,bytes memory,bytes memory)" } }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "31", - "id": 286, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3784:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "3755:30:1", + "id": 152, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3035:55:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" } }, - "id": 288, - "nodeType": "ExpressionStatement", - "src": "3755:30:1" + "id": 153, + "nodeType": "EmitStatement", + "src": "3030:60:0" }, { "expression": { "argumentTypes": null, - "id": 293, + "id": 158, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 289, - "name": "upvotes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "3796:7:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", - "typeString": "mapping(uint256 => uint256)" - } + "id": 154, + "name": "postNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "3111:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, - "id": 291, - "indexExpression": { + "id": 157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { "argumentTypes": null, - "id": 290, + "id": 155, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 236, - "src": "3804:6:1", + "referencedDeclaration": 119, + "src": "3124:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "3796:15:1", + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 156, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3133:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "3124:10:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { + "src": "3111:23:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 159, + "nodeType": "ExpressionStatement", + "src": "3111:23:0" + } + ] + }, + "documentation": null, + "id": 161, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "CreatePost", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 92, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 87, + "name": "title", + "nodeType": "VariableDeclaration", + "scope": 161, + "src": "2388:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 86, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2388:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 89, + "name": "text", + "nodeType": "VariableDeclaration", + "scope": 161, + "src": "2401:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 88, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2401:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 91, + "name": "tags", + "nodeType": "VariableDeclaration", + "scope": 161, + "src": "2413:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 90, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2413:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2387:37:0" + }, + "payable": false, + "returnParameters": { + "id": 93, + "nodeType": "ParameterList", + "parameters": [], + "src": "2432:0:0" + }, + "scope": 857, + "src": "2368:774:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 172, + "nodeType": "Block", + "src": "3246:44:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { "argumentTypes": null, - "hexValue": "31", - "id": 292, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3815:1:1", - "subdenomination": null, + "id": 168, + "name": "postOwners", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 7, + "src": "3264:10:0", "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" + } + }, + "id": 170, + "indexExpression": { + "argumentTypes": null, + "id": 169, + "name": "postId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 163, + "src": "3275:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } }, - "src": "3796:20:1", + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3264:18:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "id": 294, - "nodeType": "ExpressionStatement", - "src": "3796:20:1" + "functionReturnParameters": 167, + "id": 171, + "nodeType": "Return", + "src": "3257:25:0" } ] }, "documentation": null, - "id": 296, + "id": 173, "implemented": true, "isConstructor": false, - "isDeclaredConst": false, + "isDeclaredConst": true, "modifiers": [], - "name": "UpvotePost", + "name": "getOwner", "nodeType": "FunctionDefinition", "parameters": { - "id": 237, + "id": 164, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 236, + "id": 163, "name": "postId", "nodeType": "VariableDeclaration", - "scope": 296, - "src": "3385:11:1", + "scope": 173, + "src": "3203:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -17084,10 +14021,10 @@ "typeString": "uint256" }, "typeName": { - "id": 235, + "id": 162, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "3385:4:1", + "src": "3203:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -17097,26 +14034,53 @@ "visibility": "internal" } ], - "src": "3384:13:1" + "src": "3202:13:0" }, "payable": false, "returnParameters": { - "id": 238, + "id": 167, "nodeType": "ParameterList", - "parameters": [], - "src": "3405:0:1" + "parameters": [ + { + "constant": false, + "id": 166, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 173, + "src": "3237:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 165, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3237:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3236:9:0" }, - "scope": 1070, - "src": "3365:459:1", - "stateMutability": "nonpayable", + "scope": 857, + "src": "3185:105:0", + "stateMutability": "view", "superFunction": null, "visibility": "public" }, { "body": { - "id": 357, + "id": 234, "nodeType": "Block", - "src": "3902:413:1", + "src": "3364:419:0", "statements": [ { "expression": { @@ -17128,19 +14092,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 304, + "id": 181, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 302, + "id": 179, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 298, - "src": "3921:6:1", + "referencedDeclaration": 175, + "src": "3383:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -17151,14 +14115,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 303, + "id": 180, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "3931:1:1", + "src": "3393:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -17166,7 +14130,7 @@ }, "value": "0" }, - "src": "3921:11:1", + "src": "3383:11:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -17175,14 +14139,14 @@ { "argumentTypes": null, "hexValue": "766f746573206973206e6f7420666f7220612076616c696420706f7374", - "id": 305, + "id": 182, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "3934:31:1", + "src": "3396:31:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_ff3dacff5ff4f61cab4f46ef6127fdb7fdc77ddfb8b67e7ad2650377bf778ed8", @@ -17202,267 +14166,37 @@ "typeString": "literal_string \"votes is not for a valid post\"" } ], - "id": 301, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1088, - 1089 - ], - "referencedDeclaration": 1089, - "src": "3913:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 306, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3913:53:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 307, - "nodeType": "ExpressionStatement", - "src": "3913:53:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 311, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 309, - "name": "postId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 298, - "src": "3985:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 310, - "name": "postNumber", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 60, - "src": "3994:10:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3985:19:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "766f74657320697320666f722061206e6f6e206578697374656e7420706f7374", - "id": 312, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4006:34:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5c2b6bc9661424e678d353e544becf16e7105065d06cadc50a2e92c037d1b9b", - "typeString": "literal_string \"votes is for a non existent post\"" - }, - "value": "votes is for a non existent post" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_c5c2b6bc9661424e678d353e544becf16e7105065d06cadc50a2e92c037d1b9b", - "typeString": "literal_string \"votes is for a non existent post\"" - } - ], - "id": 308, + "id": 178, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1088, - 1089 + 875, + 876 ], - "referencedDeclaration": 1089, - "src": "3977:7:1", + "referencedDeclaration": 876, + "src": "3375:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 313, + "id": 183, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3977:64:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 314, - "nodeType": "ExpressionStatement", - "src": "3977:64:1" - }, - { - "assignments": [ - 316 - ], - "declarations": [ - { - "constant": false, - "id": 316, - "name": "knownType", - "nodeType": "VariableDeclaration", - "scope": 358, - "src": "4054:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 315, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4054:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 323, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 317, - "name": "voters", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 78, - "src": "4071:6:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(uint256 => uint256))" - } - }, - "id": 320, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 318, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "4078:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 319, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4078:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4071:18:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", - "typeString": "mapping(uint256 => uint256)" - } - }, - "id": 322, - "indexExpression": { - "argumentTypes": null, - "id": 321, - "name": "postId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 298, - "src": "4090:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4071:26:1", + "names": [], + "nodeType": "FunctionCall", + "src": "3375:53:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" } }, - "nodeType": "VariableDeclarationStatement", - "src": "4054:43:1" + "id": 184, + "nodeType": "ExpressionStatement", + "src": "3375:53:0" }, { "expression": { @@ -17474,45 +14208,40 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 327, + "id": 188, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 325, - "name": "knownType", + "id": 186, + "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 316, - "src": "4116:9:1", + "referencedDeclaration": 175, + "src": "3447:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", - "operator": "!=", + "operator": "<", "rightExpression": { "argumentTypes": null, - "hexValue": "32", - "id": 326, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4129:1:1", - "subdenomination": null, + "id": 187, + "name": "postNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "3456:10:0", "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } }, - "src": "4116:14:1", + "src": "3447:19:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -17520,21 +14249,21 @@ }, { "argumentTypes": null, - "hexValue": "646f776e766f746520616c726561647920646f6e65", - "id": 328, + "hexValue": "766f74657320697320666f722061206e6f6e206578697374656e7420706f7374", + "id": 189, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "4132:23:1", + "src": "3468:34:0", "subdenomination": null, "typeDescriptions": { - "typeIdentifier": "t_stringliteral_749e4eea76fb668a5aa4702533cac2ca4e79cdc17aca5f347852f7e651aaaa78", - "typeString": "literal_string \"downvote already done\"" + "typeIdentifier": "t_stringliteral_c5c2b6bc9661424e678d353e544becf16e7105065d06cadc50a2e92c037d1b9b", + "typeString": "literal_string \"votes is for a non existent post\"" }, - "value": "downvote already done" + "value": "votes is for a non existent post" } ], "expression": { @@ -17544,25 +14273,25 @@ "typeString": "bool" }, { - "typeIdentifier": "t_stringliteral_749e4eea76fb668a5aa4702533cac2ca4e79cdc17aca5f347852f7e651aaaa78", - "typeString": "literal_string \"downvote already done\"" + "typeIdentifier": "t_stringliteral_c5c2b6bc9661424e678d353e544becf16e7105065d06cadc50a2e92c037d1b9b", + "typeString": "literal_string \"votes is for a non existent post\"" } ], - "id": 324, + "id": 185, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1088, - 1089 + 875, + 876 ], - "referencedDeclaration": 1089, - "src": "4108:7:1", + "referencedDeclaration": 876, + "src": "3439:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 329, + "id": 190, "isConstant": false, "isLValue": false, "isPure": false, @@ -17570,443 +14299,116 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "4108:48:1", + "src": "3439:64:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 330, + "id": 191, "nodeType": "ExpressionStatement", - "src": "4108:48:1" + "src": "3439:64:0" }, { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 333, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 331, + "assignments": [ + 193 + ], + "declarations": [ + { + "constant": false, + "id": 193, "name": "knownType", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 316, - "src": "4171:9:1", + "nodeType": "VariableDeclaration", + "scope": 235, + "src": "3524:14:0", + "stateVariable": false, + "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 332, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4184:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "4171:14:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 341, - "nodeType": "IfStatement", - "src": "4167:67:1", - "trueBody": { - "id": 340, - "nodeType": "Block", - "src": "4187:47:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 338, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 334, - "name": "upvotes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "4202:7:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", - "typeString": "mapping(uint256 => uint256)" - } - }, - "id": 336, - "indexExpression": { - "argumentTypes": null, - "id": 335, - "name": "postId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 298, - "src": "4210:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "4202:15:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "-=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "31", - "id": 337, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4221:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "4202:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 339, - "nodeType": "ExpressionStatement", - "src": "4202:20:1" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 349, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 342, - "name": "voters", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 78, - "src": "4244:6:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(uint256 => uint256))" - } - }, - "id": 346, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 343, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "4251:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 344, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4251:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4244:18:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", - "typeString": "mapping(uint256 => uint256)" - } }, - "id": 347, - "indexExpression": { - "argumentTypes": null, - "id": 345, - "name": "postId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 298, - "src": "4263:6:1", + "typeName": { + "id": 192, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3524:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "4244:26:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "32", - "id": 348, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4273:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" + } }, - "value": "2" - }, - "src": "4244:30:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "value": null, + "visibility": "internal" } - }, - "id": 350, - "nodeType": "ExpressionStatement", - "src": "4244:30:1" - }, - { - "expression": { + ], + "id": 200, + "initialValue": { "argumentTypes": null, - "id": 355, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { + "baseExpression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 351, - "name": "downvotes", + "id": 194, + "name": "voters", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 72, - "src": "4285:9:1", + "referencedDeclaration": 21, + "src": "3541:6:0", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", - "typeString": "mapping(uint256 => uint256)" + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(uint256 => uint256))" } }, - "id": 353, + "id": 197, "indexExpression": { "argumentTypes": null, - "id": 352, - "name": "postId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 298, - "src": "4295:6:1", + "expression": { + "argumentTypes": null, + "id": 195, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 872, + "src": "3548:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 196, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3548:10:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_address", + "typeString": "address" } }, "isConstant": false, "isLValue": true, "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "4285:17:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "31", - "id": 354, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", "lValueRequested": false, - "nodeType": "Literal", - "src": "4306:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "4285:22:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 356, - "nodeType": "ExpressionStatement", - "src": "4285:22:1" - } - ] - }, - "documentation": null, - "id": 358, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "DownvotePost", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 299, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 298, - "name": "postId", - "nodeType": "VariableDeclaration", - "scope": 358, - "src": "3882:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 297, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3882:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3881:13:1" - }, - "payable": false, - "returnParameters": { - "id": 300, - "nodeType": "ParameterList", - "parameters": [], - "src": "3902:0:1" - }, - "scope": 1070, - "src": "3860:455:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 369, - "nodeType": "Block", - "src": "4412:41:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 365, - "name": "upvotes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "4430:7:1", + "nodeType": "IndexAccess", + "src": "3541:18:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" } }, - "id": 367, + "id": 199, "indexExpression": { "argumentTypes": null, - "id": 366, + "id": 198, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 360, - "src": "4438:6:1", + "referencedDeclaration": 175, + "src": "3560:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -18017,576 +14419,492 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "4430:15:1", + "src": "3541:26:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 364, - "id": 368, - "nodeType": "Return", - "src": "4423:22:1" - } - ] - }, - "documentation": null, - "id": 370, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getUpVotes", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 361, - "nodeType": "ParameterList", - "parameters": [ + "nodeType": "VariableDeclarationStatement", + "src": "3524:43:0" + }, { - "constant": false, - "id": 360, - "name": "postId", - "nodeType": "VariableDeclaration", - "scope": 370, - "src": "4372:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 359, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4372:4:1", + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 204, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 202, + "name": "knownType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 193, + "src": "3586:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 203, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3599:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "3586:14:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "5570766f746520616c726561647920646f6e65", + "id": 205, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3602:21:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_df24b86cc4620336f368688345ca505ad90fcac9d2a55b94a3e3f9a021ddf783", + "typeString": "literal_string \"Upvote already done\"" + }, + "value": "Upvote already done" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_df24b86cc4620336f368688345ca505ad90fcac9d2a55b94a3e3f9a021ddf783", + "typeString": "literal_string \"Upvote already done\"" + } + ], + "id": 201, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 875, + 876 + ], + "referencedDeclaration": 876, + "src": "3578:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 206, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3578:46:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" } }, - "value": null, - "visibility": "internal" - } - ], - "src": "4371:13:1" - }, - "payable": false, - "returnParameters": { - "id": 364, - "nodeType": "ParameterList", - "parameters": [ + "id": 207, + "nodeType": "ExpressionStatement", + "src": "3578:46:0" + }, { - "constant": false, - "id": 363, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 370, - "src": "4406:4:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 362, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4406:4:1", - "typeDescriptions": { + "condition": { + "argumentTypes": null, + "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4405:6:1" - }, - "scope": 1070, - "src": "4352:101:1", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 381, - "nodeType": "Block", - "src": "4548:43:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 377, - "name": "downvotes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 72, - "src": "4566:9:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", - "typeString": "mapping(uint256 => uint256)" - } }, - "id": 379, - "indexExpression": { + "id": 210, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { "argumentTypes": null, - "id": 378, - "name": "postId", + "id": 208, + "name": "knownType", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 372, - "src": "4576:6:1", + "referencedDeclaration": 193, + "src": "3639:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4566:17:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 376, - "id": 380, - "nodeType": "Return", - "src": "4559:24:1" - } - ] - }, - "documentation": null, - "id": 382, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getDownVotes", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 373, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 372, - "name": "postId", - "nodeType": "VariableDeclaration", - "scope": 382, - "src": "4508:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 371, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4508:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4507:13:1" - }, - "payable": false, - "returnParameters": { - "id": 376, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 375, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 382, - "src": "4542:4:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 374, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4542:4:1", + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 209, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3652:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "3639:14:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "value": null, - "visibility": "internal" - } - ], - "src": "4541:6:1" - }, - "scope": 1070, - "src": "4486:105:1", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 397, - "nodeType": "Block", - "src": "4706:47:1", - "statements": [ + "falseBody": null, + "id": 218, + "nodeType": "IfStatement", + "src": "3635:69:0", + "trueBody": { + "id": 217, + "nodeType": "Block", + "src": "3655:49:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 215, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 211, + "name": "downvotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15, + "src": "3670:9:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + } + }, + "id": 213, + "indexExpression": { + "argumentTypes": null, + "id": 212, + "name": "postId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 175, + "src": "3680:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3670:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "31", + "id": 214, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3691:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "3670:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 216, + "nodeType": "ExpressionStatement", + "src": "3670:22:0" + } + ] + } + }, { "expression": { "argumentTypes": null, - "baseExpression": { + "id": 226, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 391, - "name": "voters", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 78, - "src": "4724:6:1", + "baseExpression": { + "argumentTypes": null, + "id": 219, + "name": "voters", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21, + "src": "3714:6:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(uint256 => uint256))" + } + }, + "id": 223, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 220, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 872, + "src": "3721:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3721:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3714:18:0", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(uint256 => uint256))" + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" } }, - "id": 393, + "id": 224, "indexExpression": { "argumentTypes": null, - "id": 392, - "name": "voter", + "id": 222, + "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 386, - "src": "4731:5:1", + "referencedDeclaration": 175, + "src": "3733:6:0", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, "isConstant": false, "isLValue": true, "isPure": false, - "lValueRequested": false, + "lValueRequested": true, "nodeType": "IndexAccess", - "src": "4724:13:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", - "typeString": "mapping(uint256 => uint256)" - } - }, - "id": 395, - "indexExpression": { - "argumentTypes": null, - "id": 394, - "name": "postId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 384, - "src": "4738:6:1", + "src": "3714:26:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4724:21:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 390, - "id": 396, - "nodeType": "Return", - "src": "4717:28:1" - } - ] - }, - "documentation": null, - "id": 398, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getVoterData", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 387, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 384, - "name": "postId", - "nodeType": "VariableDeclaration", - "scope": 398, - "src": "4651:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 383, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4651:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 386, - "name": "voter", - "nodeType": "VariableDeclaration", - "scope": 398, - "src": "4664:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 385, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4664:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4650:28:1" - }, - "payable": false, - "returnParameters": { - "id": 390, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 389, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 398, - "src": "4700:4:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 388, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4700:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4699:6:1" - }, - "scope": 1070, - "src": "4629:124:1", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": "//////// Comment functionality\r", - "id": 412, - "name": "CommentCreated", - "nodeType": "EventDefinition", - "parameters": { - "id": 411, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 400, - "indexed": true, - "name": "commenter", - "nodeType": "VariableDeclaration", - "scope": 412, - "src": "4895:25:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 399, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4895:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 402, - "indexed": true, - "name": "postId", - "nodeType": "VariableDeclaration", - "scope": 412, - "src": "4931:19:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 401, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4931:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 404, - "indexed": false, - "name": "comment", - "nodeType": "VariableDeclaration", - "scope": 412, - "src": "4961:13:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 403, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4961:5:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 406, - "indexed": false, - "name": "parentComment", - "nodeType": "VariableDeclaration", - "scope": 412, - "src": "4985:18:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 405, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4985:4:1", + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "31", + "id": 225, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3743:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "3714:30:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, - "visibility": "internal" + "id": 227, + "nodeType": "ExpressionStatement", + "src": "3714:30:0" }, { - "constant": false, - "id": 408, - "indexed": false, - "name": "commentTimestamp", - "nodeType": "VariableDeclaration", - "scope": 412, - "src": "5008:21:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 407, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5008:4:1", + "expression": { + "argumentTypes": null, + "id": 232, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 228, + "name": "upvotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11, + "src": "3755:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + } + }, + "id": 230, + "indexExpression": { + "argumentTypes": null, + "id": 229, + "name": "postId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 175, + "src": "3763:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3755:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "31", + "id": 231, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3774:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "3755:20:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, - "visibility": "internal" - }, + "id": 233, + "nodeType": "ExpressionStatement", + "src": "3755:20:0" + } + ] + }, + "documentation": null, + "id": 235, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "UpvotePost", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 176, + "nodeType": "ParameterList", + "parameters": [ { "constant": false, - "id": 410, - "indexed": false, - "name": "commentId", + "id": 175, + "name": "postId", "nodeType": "VariableDeclaration", - "scope": 412, - "src": "5034:14:1", + "scope": 235, + "src": "3344:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -18594,10 +14912,10 @@ "typeString": "uint256" }, "typeName": { - "id": 409, + "id": 174, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "5034:4:1", + "src": "3344:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -18607,15 +14925,26 @@ "visibility": "internal" } ], - "src": "4884:171:1" + "src": "3343:13:0" + }, + "payable": false, + "returnParameters": { + "id": 177, + "nodeType": "ParameterList", + "parameters": [], + "src": "3364:0:0" }, - "src": "4863:193:1" + "scope": 857, + "src": "3324:459:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" }, { "body": { - "id": 495, + "id": 296, "nodeType": "Block", - "src": "5141:740:1", + "src": "3861:413:0", "statements": [ { "expression": { @@ -18627,19 +14956,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 424, + "id": 243, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 422, + "id": 241, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 416, - "src": "5160:6:1", + "referencedDeclaration": 237, + "src": "3880:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -18650,14 +14979,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 423, + "id": 242, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "5170:1:1", + "src": "3890:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -18665,7 +14994,7 @@ }, "value": "0" }, - "src": "5160:11:1", + "src": "3880:11:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -18673,21 +15002,21 @@ }, { "argumentTypes": null, - "hexValue": "636f6d6d656e74206973206e6f7420666f7220612076616c696420706f7374", - "id": 425, + "hexValue": "766f746573206973206e6f7420666f7220612076616c696420706f7374", + "id": 244, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "5173:33:1", + "src": "3893:31:0", "subdenomination": null, "typeDescriptions": { - "typeIdentifier": "t_stringliteral_0eb102993c6ce63b6bf90c80ddf03b1e9536f3495e80364b1b7b77b868e9b110", - "typeString": "literal_string \"comment is not for a valid post\"" + "typeIdentifier": "t_stringliteral_ff3dacff5ff4f61cab4f46ef6127fdb7fdc77ddfb8b67e7ad2650377bf778ed8", + "typeString": "literal_string \"votes is not for a valid post\"" }, - "value": "comment is not for a valid post" + "value": "votes is not for a valid post" } ], "expression": { @@ -18697,25 +15026,25 @@ "typeString": "bool" }, { - "typeIdentifier": "t_stringliteral_0eb102993c6ce63b6bf90c80ddf03b1e9536f3495e80364b1b7b77b868e9b110", - "typeString": "literal_string \"comment is not for a valid post\"" + "typeIdentifier": "t_stringliteral_ff3dacff5ff4f61cab4f46ef6127fdb7fdc77ddfb8b67e7ad2650377bf778ed8", + "typeString": "literal_string \"votes is not for a valid post\"" } ], - "id": 421, + "id": 240, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1088, - 1089 + 875, + 876 ], - "referencedDeclaration": 1089, - "src": "5152:7:1", + "referencedDeclaration": 876, + "src": "3872:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 426, + "id": 245, "isConstant": false, "isLValue": false, "isPure": false, @@ -18723,15 +15052,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "5152:55:1", + "src": "3872:53:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 427, + "id": 246, "nodeType": "ExpressionStatement", - "src": "5152:55:1" + "src": "3872:53:0" }, { "expression": { @@ -18743,19 +15072,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 431, + "id": 250, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 429, + "id": 248, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 416, - "src": "5226:6:1", + "referencedDeclaration": 237, + "src": "3944:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -18765,18 +15094,18 @@ "operator": "<", "rightExpression": { "argumentTypes": null, - "id": 430, + "id": 249, "name": "postNumber", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 60, - "src": "5235:10:1", + "referencedDeclaration": 3, + "src": "3953:10:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "5226:19:1", + "src": "3944:19:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -18784,21 +15113,21 @@ }, { "argumentTypes": null, - "hexValue": "636f6d6d656e7420697320666f722061206e6f6e206578697374656e7420706f7374", - "id": 432, + "hexValue": "766f74657320697320666f722061206e6f6e206578697374656e7420706f7374", + "id": 251, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "5247:36:1", + "src": "3965:34:0", "subdenomination": null, "typeDescriptions": { - "typeIdentifier": "t_stringliteral_94bb335858cd8a7d087f3331b0c6a338c2080f1b2c1ae7a5791494534c86f621", - "typeString": "literal_string \"comment is for a non existent post\"" + "typeIdentifier": "t_stringliteral_c5c2b6bc9661424e678d353e544becf16e7105065d06cadc50a2e92c037d1b9b", + "typeString": "literal_string \"votes is for a non existent post\"" }, - "value": "comment is for a non existent post" + "value": "votes is for a non existent post" } ], "expression": { @@ -18808,25 +15137,25 @@ "typeString": "bool" }, { - "typeIdentifier": "t_stringliteral_94bb335858cd8a7d087f3331b0c6a338c2080f1b2c1ae7a5791494534c86f621", - "typeString": "literal_string \"comment is for a non existent post\"" + "typeIdentifier": "t_stringliteral_c5c2b6bc9661424e678d353e544becf16e7105065d06cadc50a2e92c037d1b9b", + "typeString": "literal_string \"votes is for a non existent post\"" } ], - "id": 428, + "id": 247, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1088, - 1089 + 875, + 876 ], - "referencedDeclaration": 1089, - "src": "5218:7:1", + "referencedDeclaration": 876, + "src": "3936:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 433, + "id": 252, "isConstant": false, "isLValue": false, "isPure": false, @@ -18834,15 +15163,134 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "5218:66:1", + "src": "3936:64:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 434, + "id": 253, "nodeType": "ExpressionStatement", - "src": "5218:66:1" + "src": "3936:64:0" + }, + { + "assignments": [ + 255 + ], + "declarations": [ + { + "constant": false, + "id": 255, + "name": "knownType", + "nodeType": "VariableDeclaration", + "scope": 297, + "src": "4013:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 254, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4013:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 262, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 256, + "name": "voters", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 21, + "src": "4030:6:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(uint256 => uint256))" + } + }, + "id": 259, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 257, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 872, + "src": "4037:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 258, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4037:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4030:18:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + } + }, + "id": 261, + "indexExpression": { + "argumentTypes": null, + "id": 260, + "name": "postId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 237, + "src": "4049:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4030:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4013:43:0" }, { "expression": { @@ -18854,61 +15302,45 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 439, + "id": 266, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 436, - "name": "text", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 414, - "src": "5303:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "id": 437, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5303:11:1", + "id": 264, + "name": "knownType", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 255, + "src": "4075:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", - "operator": ">", + "operator": "!=", "rightExpression": { "argumentTypes": null, - "hexValue": "30", - "id": 438, + "hexValue": "32", + "id": 265, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "5317:1:1", + "src": "4088:1:0", "subdenomination": null, "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" }, - "value": "0" + "value": "2" }, - "src": "5303:15:1", + "src": "4075:14:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -18916,21 +15348,21 @@ }, { "argumentTypes": null, - "hexValue": "636f6d6d656e7420636f6d6d656e7420697320656d707479", - "id": 440, + "hexValue": "646f776e766f746520616c726561647920646f6e65", + "id": 267, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "5320:26:1", + "src": "4091:23:0", "subdenomination": null, "typeDescriptions": { - "typeIdentifier": "t_stringliteral_86e7a1ab6a30f4dffb45e2144b047a5c3e897c143cb54acb6a1526a0a202db30", - "typeString": "literal_string \"comment comment is empty\"" + "typeIdentifier": "t_stringliteral_749e4eea76fb668a5aa4702533cac2ca4e79cdc17aca5f347852f7e651aaaa78", + "typeString": "literal_string \"downvote already done\"" }, - "value": "comment comment is empty" + "value": "downvote already done" } ], "expression": { @@ -18940,25 +15372,25 @@ "typeString": "bool" }, { - "typeIdentifier": "t_stringliteral_86e7a1ab6a30f4dffb45e2144b047a5c3e897c143cb54acb6a1526a0a202db30", - "typeString": "literal_string \"comment comment is empty\"" + "typeIdentifier": "t_stringliteral_749e4eea76fb668a5aa4702533cac2ca4e79cdc17aca5f347852f7e651aaaa78", + "typeString": "literal_string \"downvote already done\"" } ], - "id": 435, + "id": 263, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1088, - 1089 + 875, + 876 ], - "referencedDeclaration": 1089, - "src": "5295:7:1", + "referencedDeclaration": 876, + "src": "4067:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 441, + "id": 268, "isConstant": false, "isLValue": false, "isPure": false, @@ -18966,251 +15398,161 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "5295:52:1", + "src": "4067:48:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 442, + "id": 269, "nodeType": "ExpressionStatement", - "src": "5295:52:1" + "src": "4067:48:0" }, { - "assignments": [ - 444 - ], - "declarations": [ - { - "constant": false, - "id": 444, - "name": "commentId", - "nodeType": "VariableDeclaration", - "scope": 496, - "src": "5400:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 443, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5400:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 448, - "initialValue": { + "condition": { "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 445, - "name": "commentCounter", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 82, - "src": "5417:14:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", - "typeString": "mapping(uint256 => uint256)" - } + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, - "id": 447, - "indexExpression": { + "id": 272, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { "argumentTypes": null, - "id": 446, - "name": "postId", + "id": 270, + "name": "knownType", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 416, - "src": "5432:6:1", + "referencedDeclaration": 255, + "src": "4130:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5417:22:1", + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 271, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4143:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "4130:14:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "nodeType": "VariableDeclarationStatement", - "src": "5400:39:1" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ + "falseBody": null, + "id": 280, + "nodeType": "IfStatement", + "src": "4126:67:0", + "trueBody": { + "id": 279, + "nodeType": "Block", + "src": "4146:47:0", + "statements": [ { - "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 450, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "5502:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 451, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5502:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 452, - "name": "postId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 416, - "src": "5514:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 453, - "name": "text", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 414, - "src": "5522:4:1", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - { - "argumentTypes": null, - "id": 454, - "name": "parentComment", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 418, - "src": "5528:13:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 455, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1087, - "src": "5543:3:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 456, - "name": "commentId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 444, - "src": "5548:9:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "id": 277, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 273, + "name": "upvotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11, + "src": "4161:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + } + }, + "id": 275, + "indexExpression": { + "argumentTypes": null, + "id": 274, + "name": "postId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 237, + "src": "4169:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4161:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "31", + "id": 276, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4180:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "4161:20:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 449, - "name": "CommentCreated", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 412, - "src": "5487:14:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256,bytes memory,uint256,uint256,uint256)" + "id": 278, + "nodeType": "ExpressionStatement", + "src": "4161:20:0" } - }, - "id": 457, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5487:71:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 458, - "nodeType": "EmitStatement", - "src": "5482:76:1" + ] + } }, { "expression": { "argumentTypes": null, - "id": 466, + "id": 288, "isConstant": false, "isLValue": false, "isPure": false, @@ -19221,29 +15563,45 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 459, - "name": "commentOwner", + "id": 281, + "name": "voters", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 88, - "src": "5581:12:1", + "referencedDeclaration": 21, + "src": "4203:6:0", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_address_$_$", - "typeString": "mapping(uint256 => mapping(uint256 => address))" + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(uint256 => uint256))" } }, - "id": 462, + "id": 285, "indexExpression": { "argumentTypes": null, - "id": 460, - "name": "postId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 416, - "src": "5594:6:1", + "expression": { + "argumentTypes": null, + "id": 282, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 872, + "src": "4210:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 283, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4210:10:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_address", + "typeString": "address" } }, "isConstant": false, @@ -19251,21 +15609,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "5581:20:1", + "src": "4203:18:0", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", - "typeString": "mapping(uint256 => address)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" } }, - "id": 463, + "id": 286, "indexExpression": { "argumentTypes": null, - "id": 461, - "name": "commentId", + "id": 284, + "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 444, - "src": "5602:9:1", + "referencedDeclaration": 237, + "src": "4222:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -19276,57 +15634,46 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "5581:31:1", + "src": "4203:26:0", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 464, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "5615:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 465, + "hexValue": "32", + "id": 287, "isConstant": false, "isLValue": false, - "isPure": false, + "isPure": true, + "kind": "number", "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5615:10:1", + "nodeType": "Literal", + "src": "4232:1:0", + "subdenomination": null, "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" }, - "src": "5581:44:1", + "src": "4203:30:0", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 467, + "id": 289, "nodeType": "ExpressionStatement", - "src": "5581:44:1" + "src": "4203:30:0" }, { "expression": { "argumentTypes": null, - "id": 474, + "id": 294, "isConstant": false, "isLValue": false, "isPure": false, @@ -19335,53 +15682,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 468, - "name": "commentUpVotes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "5679:14:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(uint256 => uint256))" - } - }, - "id": 471, - "indexExpression": { - "argumentTypes": null, - "id": 469, - "name": "postId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 416, - "src": "5694:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5679:22:1", + "id": 290, + "name": "downvotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15, + "src": "4244:9:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" } }, - "id": 472, + "id": 292, "indexExpression": { "argumentTypes": null, - "id": 470, - "name": "commentId", + "id": 291, + "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 444, - "src": "5702:9:1", + "referencedDeclaration": 237, + "src": "4254:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -19392,25 +15712,25 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "5679:33:1", + "src": "4244:17:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", - "operator": "=", + "operator": "+=", "rightHandSide": { "argumentTypes": null, "hexValue": "31", - "id": 473, + "id": 293, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "5715:1:1", + "src": "4265:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", @@ -19418,295 +15738,602 @@ }, "value": "1" }, - "src": "5679:37:1", + "src": "4244:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 295, + "nodeType": "ExpressionStatement", + "src": "4244:22:0" + } + ] + }, + "documentation": null, + "id": 297, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "DownvotePost", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 238, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 237, + "name": "postId", + "nodeType": "VariableDeclaration", + "scope": 297, + "src": "3841:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 236, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3841:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3840:13:0" + }, + "payable": false, + "returnParameters": { + "id": 239, + "nodeType": "ParameterList", + "parameters": [], + "src": "3861:0:0" + }, + "scope": 857, + "src": "3819:455:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 308, + "nodeType": "Block", + "src": "4371:41:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 304, + "name": "upvotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 11, + "src": "4389:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + } + }, + "id": 306, + "indexExpression": { + "argumentTypes": null, + "id": 305, + "name": "postId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 299, + "src": "4397:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4389:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 303, + "id": 307, + "nodeType": "Return", + "src": "4382:22:0" + } + ] + }, + "documentation": null, + "id": 309, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getUpVotes", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 300, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 299, + "name": "postId", + "nodeType": "VariableDeclaration", + "scope": 309, + "src": "4331:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 298, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4331:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 475, - "nodeType": "ExpressionStatement", - "src": "5679:37:1" - }, + "value": null, + "visibility": "internal" + } + ], + "src": "4330:13:0" + }, + "payable": false, + "returnParameters": { + "id": 303, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 302, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 309, + "src": "4365:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 301, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4365:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4364:6:0" + }, + "scope": 857, + "src": "4311:101:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 320, + "nodeType": "Block", + "src": "4507:43:0", + "statements": [ { "expression": { "argumentTypes": null, - "id": 485, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { + "baseExpression": { "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 476, - "name": "commentVoters", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 108, - "src": "5727:13:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$_$", - "typeString": "mapping(address => mapping(uint256 => mapping(uint256 => uint256)))" - } - }, - "id": 481, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 477, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "5741:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 478, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "5741:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5727:25:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(uint256 => uint256))" - } - }, - "id": 482, - "indexExpression": { - "argumentTypes": null, - "id": 479, - "name": "postId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 416, - "src": "5753:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5727:33:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", - "typeString": "mapping(uint256 => uint256)" - } - }, - "id": 483, - "indexExpression": { - "argumentTypes": null, - "id": 480, - "name": "commentId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 444, - "src": "5761:9:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "5727:44:1", + "id": 316, + "name": "downvotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 15, + "src": "4525:9:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" } }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { + "id": 318, + "indexExpression": { "argumentTypes": null, - "hexValue": "31", - "id": 484, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5774:1:1", - "subdenomination": null, + "id": 317, + "name": "postId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 311, + "src": "4535:6:0", "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } }, - "src": "5727:48:1", + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4525:17:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 486, - "nodeType": "ExpressionStatement", - "src": "5727:48:1" - }, + "functionReturnParameters": 315, + "id": 319, + "nodeType": "Return", + "src": "4518:24:0" + } + ] + }, + "documentation": null, + "id": 321, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getDownVotes", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 312, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 311, + "name": "postId", + "nodeType": "VariableDeclaration", + "scope": 321, + "src": "4467:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 310, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4467:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4466:13:0" + }, + "payable": false, + "returnParameters": { + "id": 315, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 314, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 321, + "src": "4501:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 313, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4501:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4500:6:0" + }, + "scope": 857, + "src": "4445:105:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 336, + "nodeType": "Block", + "src": "4665:47:0", + "statements": [ { "expression": { "argumentTypes": null, - "id": 493, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { + "baseExpression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 487, - "name": "commentCounter", + "id": 330, + "name": "voters", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 82, - "src": "5835:14:1", + "referencedDeclaration": 21, + "src": "4683:6:0", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", - "typeString": "mapping(uint256 => uint256)" + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(uint256 => uint256))" } }, - "id": 489, + "id": 332, "indexExpression": { "argumentTypes": null, - "id": 488, - "name": "postId", + "id": 331, + "name": "voter", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 416, - "src": "5850:6:1", + "referencedDeclaration": 325, + "src": "4690:5:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_address", + "typeString": "address" } }, "isConstant": false, "isLValue": true, "isPure": false, - "lValueRequested": true, + "lValueRequested": false, "nodeType": "IndexAccess", - "src": "5835:22:1", + "src": "4683:13:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" } }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { + "id": 334, + "indexExpression": { "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 492, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 490, - "name": "commentId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 444, - "src": "5860:9:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 491, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5872:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "5860:13:1", + "id": 333, + "name": "postId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 323, + "src": "4697:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "5835:38:1", + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4683:21:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 494, - "nodeType": "ExpressionStatement", - "src": "5835:38:1" + "functionReturnParameters": 329, + "id": 335, + "nodeType": "Return", + "src": "4676:28:0" } ] }, "documentation": null, - "id": 496, + "id": 337, "implemented": true, "isConstructor": false, - "isDeclaredConst": false, + "isDeclaredConst": true, "modifiers": [], - "name": "PostComment", + "name": "getVoterData", "nodeType": "FunctionDefinition", "parameters": { - "id": 419, + "id": 326, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 414, - "name": "text", + "id": 323, + "name": "postId", + "nodeType": "VariableDeclaration", + "scope": 337, + "src": "4610:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 322, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4610:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 325, + "name": "voter", + "nodeType": "VariableDeclaration", + "scope": 337, + "src": "4623:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 324, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4623:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4609:28:0" + }, + "payable": false, + "returnParameters": { + "id": 329, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 328, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 337, + "src": "4659:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 327, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4659:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4658:6:0" + }, + "scope": 857, + "src": "4588:124:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": "//////// Comment functionality\r", + "id": 351, + "name": "CommentCreated", + "nodeType": "EventDefinition", + "parameters": { + "id": 350, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 339, + "indexed": true, + "name": "commenter", + "nodeType": "VariableDeclaration", + "scope": 351, + "src": "4854:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 338, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4854:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 341, + "indexed": true, + "name": "postId", + "nodeType": "VariableDeclaration", + "scope": 351, + "src": "4890:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 340, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4890:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 343, + "indexed": false, + "name": "comment", "nodeType": "VariableDeclaration", - "scope": 496, - "src": "5089:10:1", + "scope": 351, + "src": "4920:13:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -19714,10 +16341,10 @@ "typeString": "bytes" }, "typeName": { - "id": 413, + "id": 342, "name": "bytes", "nodeType": "ElementaryTypeName", - "src": "5089:5:1", + "src": "4920:5:0", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" @@ -19728,11 +16355,12 @@ }, { "constant": false, - "id": 416, - "name": "postId", + "id": 345, + "indexed": false, + "name": "parentComment", "nodeType": "VariableDeclaration", - "scope": 496, - "src": "5101:11:1", + "scope": 351, + "src": "4944:18:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -19740,10 +16368,10 @@ "typeString": "uint256" }, "typeName": { - "id": 415, + "id": 344, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "5101:4:1", + "src": "4944:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -19754,11 +16382,39 @@ }, { "constant": false, - "id": 418, - "name": "parentComment", + "id": 347, + "indexed": false, + "name": "commentTimestamp", + "nodeType": "VariableDeclaration", + "scope": 351, + "src": "4967:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 346, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4967:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 349, + "indexed": false, + "name": "commentId", "nodeType": "VariableDeclaration", - "scope": 496, - "src": "5114:18:1", + "scope": 351, + "src": "4993:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -19766,10 +16422,10 @@ "typeString": "uint256" }, "typeName": { - "id": 417, + "id": 348, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "5114:4:1", + "src": "4993:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -19779,26 +16435,15 @@ "visibility": "internal" } ], - "src": "5088:45:1" - }, - "payable": false, - "returnParameters": { - "id": 420, - "nodeType": "ParameterList", - "parameters": [], - "src": "5141:0:1" - }, - "scope": 1070, - "src": "5068:813:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" + "src": "4843:171:0" + }, + "src": "4822:193:0" }, { "body": { - "id": 586, + "id": 434, "nodeType": "Block", - "src": "5974:639:1", + "src": "5100:740:0", "statements": [ { "expression": { @@ -19810,19 +16455,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 506, + "id": 363, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 504, + "id": 361, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 498, - "src": "5993:6:1", + "referencedDeclaration": 355, + "src": "5119:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -19833,14 +16478,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 505, + "id": 362, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "6003:1:1", + "src": "5129:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -19848,7 +16493,7 @@ }, "value": "0" }, - "src": "5993:11:1", + "src": "5119:11:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -19856,21 +16501,21 @@ }, { "argumentTypes": null, - "hexValue": "766f746573206973206e6f7420666f7220612076616c696420706f7374", - "id": 507, + "hexValue": "636f6d6d656e74206973206e6f7420666f7220612076616c696420706f7374", + "id": 364, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "6006:31:1", + "src": "5132:33:0", "subdenomination": null, "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ff3dacff5ff4f61cab4f46ef6127fdb7fdc77ddfb8b67e7ad2650377bf778ed8", - "typeString": "literal_string \"votes is not for a valid post\"" + "typeIdentifier": "t_stringliteral_0eb102993c6ce63b6bf90c80ddf03b1e9536f3495e80364b1b7b77b868e9b110", + "typeString": "literal_string \"comment is not for a valid post\"" }, - "value": "votes is not for a valid post" + "value": "comment is not for a valid post" } ], "expression": { @@ -19880,25 +16525,25 @@ "typeString": "bool" }, { - "typeIdentifier": "t_stringliteral_ff3dacff5ff4f61cab4f46ef6127fdb7fdc77ddfb8b67e7ad2650377bf778ed8", - "typeString": "literal_string \"votes is not for a valid post\"" + "typeIdentifier": "t_stringliteral_0eb102993c6ce63b6bf90c80ddf03b1e9536f3495e80364b1b7b77b868e9b110", + "typeString": "literal_string \"comment is not for a valid post\"" } ], - "id": 503, + "id": 360, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1088, - 1089 + 875, + 876 ], - "referencedDeclaration": 1089, - "src": "5985:7:1", + "referencedDeclaration": 876, + "src": "5111:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 508, + "id": 365, "isConstant": false, "isLValue": false, "isPure": false, @@ -19906,15 +16551,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "5985:53:1", + "src": "5111:55:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 509, + "id": 366, "nodeType": "ExpressionStatement", - "src": "5985:53:1" + "src": "5111:55:0" }, { "expression": { @@ -19926,19 +16571,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 513, + "id": 370, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 511, + "id": 368, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 498, - "src": "6057:6:1", + "referencedDeclaration": 355, + "src": "5185:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -19948,18 +16593,18 @@ "operator": "<", "rightExpression": { "argumentTypes": null, - "id": 512, + "id": 369, "name": "postNumber", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 60, - "src": "6066:10:1", + "referencedDeclaration": 3, + "src": "5194:10:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "6057:19:1", + "src": "5185:19:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -19967,21 +16612,21 @@ }, { "argumentTypes": null, - "hexValue": "766f74657320697320666f722061206e6f6e206578697374656e7420706f7374", - "id": 514, + "hexValue": "636f6d6d656e7420697320666f722061206e6f6e206578697374656e7420706f7374", + "id": 371, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "6078:34:1", + "src": "5206:36:0", "subdenomination": null, "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5c2b6bc9661424e678d353e544becf16e7105065d06cadc50a2e92c037d1b9b", - "typeString": "literal_string \"votes is for a non existent post\"" + "typeIdentifier": "t_stringliteral_94bb335858cd8a7d087f3331b0c6a338c2080f1b2c1ae7a5791494534c86f621", + "typeString": "literal_string \"comment is for a non existent post\"" }, - "value": "votes is for a non existent post" + "value": "comment is for a non existent post" } ], "expression": { @@ -19991,25 +16636,25 @@ "typeString": "bool" }, { - "typeIdentifier": "t_stringliteral_c5c2b6bc9661424e678d353e544becf16e7105065d06cadc50a2e92c037d1b9b", - "typeString": "literal_string \"votes is for a non existent post\"" + "typeIdentifier": "t_stringliteral_94bb335858cd8a7d087f3331b0c6a338c2080f1b2c1ae7a5791494534c86f621", + "typeString": "literal_string \"comment is for a non existent post\"" } ], - "id": 510, + "id": 367, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1088, - 1089 + 875, + 876 ], - "referencedDeclaration": 1089, - "src": "6049:7:1", + "referencedDeclaration": 876, + "src": "5177:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 515, + "id": 372, "isConstant": false, "isLValue": false, "isPure": false, @@ -20017,15 +16662,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "6049:64:1", + "src": "5177:66:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 516, + "id": 373, "nodeType": "ExpressionStatement", - "src": "6049:64:1" + "src": "5177:66:0" }, { "expression": { @@ -20037,37 +16682,53 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 520, + "id": 378, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 518, - "name": "commendId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 500, - "src": "6142:9:1", + "expression": { + "argumentTypes": null, + "id": 375, + "name": "text", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 353, + "src": "5262:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 376, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5262:11:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", - "operator": ">=", + "operator": ">", "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 519, + "id": 377, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "6155:1:1", + "src": "5276:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -20075,7 +16736,7 @@ }, "value": "0" }, - "src": "6142:14:1", + "src": "5262:15:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -20083,21 +16744,21 @@ }, { "argumentTypes": null, - "hexValue": "636f6d6d656e74206964206973206e6f742076616c6964", - "id": 521, + "hexValue": "636f6d6d656e7420636f6d6d656e7420697320656d707479", + "id": 379, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "6158:25:1", + "src": "5279:26:0", "subdenomination": null, "typeDescriptions": { - "typeIdentifier": "t_stringliteral_96da188f723c48153c2c1f113109dc9470d321813883d9bae2ecaddc392a27a1", - "typeString": "literal_string \"comment id is not valid\"" + "typeIdentifier": "t_stringliteral_86e7a1ab6a30f4dffb45e2144b047a5c3e897c143cb54acb6a1526a0a202db30", + "typeString": "literal_string \"comment comment is empty\"" }, - "value": "comment id is not valid" + "value": "comment comment is empty" } ], "expression": { @@ -20107,25 +16768,25 @@ "typeString": "bool" }, { - "typeIdentifier": "t_stringliteral_96da188f723c48153c2c1f113109dc9470d321813883d9bae2ecaddc392a27a1", - "typeString": "literal_string \"comment id is not valid\"" + "typeIdentifier": "t_stringliteral_86e7a1ab6a30f4dffb45e2144b047a5c3e897c143cb54acb6a1526a0a202db30", + "typeString": "literal_string \"comment comment is empty\"" } ], - "id": 517, + "id": 374, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1088, - 1089 + 875, + 876 ], - "referencedDeclaration": 1089, - "src": "6134:7:1", + "referencedDeclaration": 876, + "src": "5254:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 522, + "id": 380, "isConstant": false, "isLValue": false, "isPure": false, @@ -20133,137 +16794,230 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "6134:50:1", + "src": "5254:52:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 523, + "id": 381, "nodeType": "ExpressionStatement", - "src": "6134:50:1" + "src": "5254:52:0" }, { - "expression": { + "assignments": [ + 383 + ], + "declarations": [ + { + "constant": false, + "id": 383, + "name": "commentId", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5359:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 382, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5359:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 387, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 384, + "name": "commentCounter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 25, + "src": "5376:14:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + } + }, + "id": 386, + "indexExpression": { + "argumentTypes": null, + "id": 385, + "name": "postId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 355, + "src": "5391:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5376:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5359:39:0" + }, + { + "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 529, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { + "expression": { "argumentTypes": null, - "id": 525, - "name": "commendId", + "id": 389, + "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 500, - "src": "6203:9:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 526, - "name": "commentCounter", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 82, - "src": "6216:14:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", - "typeString": "mapping(uint256 => uint256)" - } - }, - "id": 528, - "indexExpression": { - "argumentTypes": null, - "id": 527, - "name": "postId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 498, - "src": "6231:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6216:22:1", + "referencedDeclaration": 872, + "src": "5461:3:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_magic_message", + "typeString": "msg" } }, - "src": "6203:35:1", + "id": 390, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5461:10:0", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_address", + "typeString": "address" } }, { "argumentTypes": null, - "hexValue": "636f6d6d656e74206964206973206e6f6e206578697374656e74", - "id": 530, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6240:28:1", - "subdenomination": null, + "id": 391, + "name": "postId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 355, + "src": "5473:6:0", "typeDescriptions": { - "typeIdentifier": "t_stringliteral_60864667c45bf066f975096e955f868c455194279a1628fdcd83ec0b3d5a120c", - "typeString": "literal_string \"comment id is non existent\"" + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 392, + "name": "text", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 353, + "src": "5481:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "id": 393, + "name": "parentComment", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 357, + "src": "5487:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 394, + "name": "now", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 874, + "src": "5502:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 395, + "name": "commentId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 383, + "src": "5507:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, - "value": "comment id is non existent" - } - ], - "expression": { - "argumentTypes": [ { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" }, { - "typeIdentifier": "t_stringliteral_60864667c45bf066f975096e955f868c455194279a1628fdcd83ec0b3d5a120c", - "typeString": "literal_string \"comment id is non existent\"" + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } ], - "id": 524, - "name": "require", + "id": 388, + "name": "CommentCreated", "nodeType": "Identifier", - "overloadedDeclarations": [ - 1088, - 1089 - ], - "referencedDeclaration": 1089, - "src": "6195:7:1", + "overloadedDeclarations": [], + "referencedDeclaration": 351, + "src": "5446:14:0", "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,bytes memory,uint256,uint256,uint256)" } }, - "id": 531, + "id": 396, "isConstant": false, "isLValue": false, "isPure": false, @@ -20271,310 +17025,166 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "6195:74:1", + "src": "5446:71:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 532, - "nodeType": "ExpressionStatement", - "src": "6195:74:1" + "id": 397, + "nodeType": "EmitStatement", + "src": "5441:76:0" }, { "expression": { "argumentTypes": null, - "arguments": [ - { + "id": 405, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 543, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { + "baseExpression": { "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 534, - "name": "commentVoters", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 108, - "src": "6288:13:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$_$", - "typeString": "mapping(address => mapping(uint256 => mapping(uint256 => uint256)))" - } - }, - "id": 537, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 535, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "6302:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 536, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6302:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6288:25:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(uint256 => uint256))" - } - }, - "id": 539, - "indexExpression": { - "argumentTypes": null, - "id": 538, - "name": "postId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 498, - "src": "6314:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6288:33:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", - "typeString": "mapping(uint256 => uint256)" - } - }, - "id": 541, - "indexExpression": { - "argumentTypes": null, - "id": 540, - "name": "commendId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 500, - "src": "6322:9:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6288:44:1", + "id": 398, + "name": "commentOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 31, + "src": "5540:12:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_address_$_$", + "typeString": "mapping(uint256 => mapping(uint256 => address))" } }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { + "id": 401, + "indexExpression": { "argumentTypes": null, - "hexValue": "31", - "id": 542, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6336:1:1", - "subdenomination": null, + "id": 399, + "name": "postId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 355, + "src": "5553:6:0", "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } }, - "src": "6288:49:1", + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5540:20:0", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", + "typeString": "mapping(uint256 => address)" } }, - { + "id": 402, + "indexExpression": { "argumentTypes": null, - "hexValue": "5570766f746520616c726561647920646f6e65", - "id": 544, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6339:21:1", - "subdenomination": null, + "id": 400, + "name": "commentId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 383, + "src": "5561:9:0", "typeDescriptions": { - "typeIdentifier": "t_stringliteral_df24b86cc4620336f368688345ca505ad90fcac9d2a55b94a3e3f9a021ddf783", - "typeString": "literal_string \"Upvote already done\"" - }, - "value": "Upvote already done" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_df24b86cc4620336f368688345ca505ad90fcac9d2a55b94a3e3f9a021ddf783", - "typeString": "literal_string \"Upvote already done\"" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } - ], - "id": 533, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1088, - 1089 - ], - "referencedDeclaration": 1089, - "src": "6280:7:1", + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5540:31:0", "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "id": 545, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6280:81:1", + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 403, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 872, + "src": "5574:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 404, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5574:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "5540:44:0", "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "id": 546, + "id": 406, "nodeType": "ExpressionStatement", - "src": "6280:81:1" + "src": "5540:44:0" }, { - "condition": { + "expression": { "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 556, + "id": 413, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "leftExpression": { + "leftHandSide": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 547, - "name": "commentVoters", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 108, - "src": "6378:13:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$_$", - "typeString": "mapping(address => mapping(uint256 => mapping(uint256 => uint256)))" - } - }, - "id": 550, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 548, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "6392:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 549, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6392:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6378:25:1", + "id": 407, + "name": "commentUpVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "5638:14:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$", "typeString": "mapping(uint256 => mapping(uint256 => uint256))" } }, - "id": 552, + "id": 410, "indexExpression": { "argumentTypes": null, - "id": 551, + "id": 408, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 498, - "src": "6404:6:1", + "referencedDeclaration": 355, + "src": "5653:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -20585,21 +17195,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "6378:33:1", + "src": "5638:22:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" } }, - "id": 554, + "id": 411, "indexExpression": { "argumentTypes": null, - "id": 553, - "name": "commendId", + "id": 409, + "name": "commentId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 500, - "src": "6412:9:1", + "referencedDeclaration": 383, + "src": "5661:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -20608,161 +17218,48 @@ "isConstant": false, "isLValue": true, "isPure": false, - "lValueRequested": false, + "lValueRequested": true, "nodeType": "IndexAccess", - "src": "6378:44:1", + "src": "5638:33:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { "argumentTypes": null, - "hexValue": "32", - "id": 555, + "hexValue": "31", + "id": 412, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "6426:1:1", + "src": "5674:1:0", "subdenomination": null, "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" }, - "value": "2" + "value": "1" }, - "src": "6378:49:1", + "src": "5638:37:0", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "falseBody": null, - "id": 566, - "nodeType": "IfStatement", - "src": "6374:122:1", - "trueBody": { - "id": 565, - "nodeType": "Block", - "src": "6429:67:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 563, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 557, - "name": "commentDownVotes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 100, - "src": "6444:16:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(uint256 => uint256))" - } - }, - "id": 560, - "indexExpression": { - "argumentTypes": null, - "id": 558, - "name": "postId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 498, - "src": "6461:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6444:24:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", - "typeString": "mapping(uint256 => uint256)" - } - }, - "id": 561, - "indexExpression": { - "argumentTypes": null, - "id": 559, - "name": "commendId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 500, - "src": "6469:9:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "6444:35:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "-=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "31", - "id": 562, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6483:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "6444:40:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 564, - "nodeType": "ExpressionStatement", - "src": "6444:40:1" - } - ] - } + "id": 414, + "nodeType": "ExpressionStatement", + "src": "5638:37:0" }, { "expression": { "argumentTypes": null, - "id": 576, + "id": 424, "isConstant": false, "isLValue": false, "isPure": false, @@ -20775,34 +17272,34 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 567, + "id": 415, "name": "commentVoters", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 108, - "src": "6508:13:1", + "referencedDeclaration": 51, + "src": "5686:13:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$_$", "typeString": "mapping(address => mapping(uint256 => mapping(uint256 => uint256)))" } }, - "id": 572, + "id": 420, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 568, + "id": 416, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "6522:3:1", + "referencedDeclaration": 872, + "src": "5700:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 569, + "id": 417, "isConstant": false, "isLValue": false, "isPure": false, @@ -20810,7 +17307,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "6522:10:1", + "src": "5700:10:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -20821,21 +17318,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "6508:25:1", + "src": "5686:25:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$", "typeString": "mapping(uint256 => mapping(uint256 => uint256))" } }, - "id": 573, + "id": 421, "indexExpression": { "argumentTypes": null, - "id": 570, + "id": 418, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 498, - "src": "6534:6:1", + "referencedDeclaration": 355, + "src": "5712:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -20846,21 +17343,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "6508:33:1", + "src": "5686:33:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" } }, - "id": 574, + "id": 422, "indexExpression": { "argumentTypes": null, - "id": 571, - "name": "commendId", + "id": 419, + "name": "commentId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 500, - "src": "6542:9:1", + "referencedDeclaration": 383, + "src": "5720:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -20871,7 +17368,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "6508:44:1", + "src": "5686:44:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -20882,14 +17379,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "31", - "id": 575, + "id": 423, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "6555:1:1", + "src": "5733:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", @@ -20897,20 +17394,20 @@ }, "value": "1" }, - "src": "6508:48:1", + "src": "5686:48:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 577, + "id": 425, "nodeType": "ExpressionStatement", - "src": "6508:48:1" + "src": "5686:48:0" }, { "expression": { "argumentTypes": null, - "id": 584, + "id": 432, "isConstant": false, "isLValue": false, "isPure": false, @@ -20919,120 +17416,151 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 578, - "name": "commentUpVotes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "6567:14:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(uint256 => uint256))" - } - }, - "id": 581, - "indexExpression": { - "argumentTypes": null, - "id": 579, - "name": "postId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 498, - "src": "6582:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6567:22:1", + "id": 426, + "name": "commentCounter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 25, + "src": "5794:14:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" } }, - "id": 582, + "id": 428, "indexExpression": { "argumentTypes": null, - "id": 580, - "name": "commendId", + "id": 427, + "name": "postId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 355, + "src": "5809:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5794:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 431, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 429, + "name": "commentId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 500, - "src": "6590:9:1", + "referencedDeclaration": 383, + "src": "5819:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 430, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5831:1:0", + "subdenomination": null, "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "6567:33:1", + "src": "5819:13:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "31", - "id": 583, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6604:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "6567:38:1", + "src": "5794:38:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 585, + "id": 433, "nodeType": "ExpressionStatement", - "src": "6567:38:1" + "src": "5794:38:0" } ] }, "documentation": null, - "id": 587, + "id": 435, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [], - "name": "UpvoteComment", + "name": "PostComment", "nodeType": "FunctionDefinition", "parameters": { - "id": 501, + "id": 358, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 498, + "id": 353, + "name": "text", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5048:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 352, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "5048:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 355, "name": "postId", "nodeType": "VariableDeclaration", - "scope": 587, - "src": "5938:11:1", + "scope": 435, + "src": "5060:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -21040,10 +17568,10 @@ "typeString": "uint256" }, "typeName": { - "id": 497, + "id": 354, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "5938:4:1", + "src": "5060:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -21054,11 +17582,11 @@ }, { "constant": false, - "id": 500, - "name": "commendId", + "id": 357, + "name": "parentComment", "nodeType": "VariableDeclaration", - "scope": 587, - "src": "5951:14:1", + "scope": 435, + "src": "5073:18:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -21066,10 +17594,10 @@ "typeString": "uint256" }, "typeName": { - "id": 499, + "id": 356, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "5951:4:1", + "src": "5073:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -21079,26 +17607,26 @@ "visibility": "internal" } ], - "src": "5937:29:1" + "src": "5047:45:0" }, "payable": false, "returnParameters": { - "id": 502, + "id": 359, "nodeType": "ParameterList", "parameters": [], - "src": "5974:0:1" + "src": "5100:0:0" }, - "scope": 1070, - "src": "5915:698:1", + "scope": 857, + "src": "5027:813:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { - "id": 677, + "id": 525, "nodeType": "Block", - "src": "6710:647:1", + "src": "5933:639:0", "statements": [ { "expression": { @@ -21110,246 +17638,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 597, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 595, - "name": "postId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 589, - "src": "6729:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 596, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6739:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "6729:11:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "766f746573206973206e6f7420666f7220612076616c696420706f7374", - "id": 598, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6742:31:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ff3dacff5ff4f61cab4f46ef6127fdb7fdc77ddfb8b67e7ad2650377bf778ed8", - "typeString": "literal_string \"votes is not for a valid post\"" - }, - "value": "votes is not for a valid post" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ff3dacff5ff4f61cab4f46ef6127fdb7fdc77ddfb8b67e7ad2650377bf778ed8", - "typeString": "literal_string \"votes is not for a valid post\"" - } - ], - "id": 594, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1088, - 1089 - ], - "referencedDeclaration": 1089, - "src": "6721:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 599, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6721:53:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 600, - "nodeType": "ExpressionStatement", - "src": "6721:53:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 604, + "id": 445, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 602, + "id": 443, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 589, - "src": "6793:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 603, - "name": "postNumber", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 60, - "src": "6802:10:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6793:19:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "766f74657320697320666f722061206e6f6e206578697374656e7420706f7374", - "id": 605, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6814:34:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5c2b6bc9661424e678d353e544becf16e7105065d06cadc50a2e92c037d1b9b", - "typeString": "literal_string \"votes is for a non existent post\"" - }, - "value": "votes is for a non existent post" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_c5c2b6bc9661424e678d353e544becf16e7105065d06cadc50a2e92c037d1b9b", - "typeString": "literal_string \"votes is for a non existent post\"" - } - ], - "id": 601, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1088, - 1089 - ], - "referencedDeclaration": 1089, - "src": "6785:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 606, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6785:64:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 607, - "nodeType": "ExpressionStatement", - "src": "6785:64:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 611, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 609, - "name": "commendId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 591, - "src": "6878:9:1", + "referencedDeclaration": 437, + "src": "5952:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -21360,14 +17661,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 610, + "id": 444, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "6891:1:1", + "src": "5962:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -21375,7 +17676,7 @@ }, "value": "0" }, - "src": "6878:14:1", + "src": "5952:11:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -21383,21 +17684,21 @@ }, { "argumentTypes": null, - "hexValue": "636f6d6d656e74206964206973206e6f742076616c6964", - "id": 612, + "hexValue": "766f746573206973206e6f7420666f7220612076616c696420706f7374", + "id": 446, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "6894:25:1", + "src": "5965:31:0", "subdenomination": null, "typeDescriptions": { - "typeIdentifier": "t_stringliteral_96da188f723c48153c2c1f113109dc9470d321813883d9bae2ecaddc392a27a1", - "typeString": "literal_string \"comment id is not valid\"" + "typeIdentifier": "t_stringliteral_ff3dacff5ff4f61cab4f46ef6127fdb7fdc77ddfb8b67e7ad2650377bf778ed8", + "typeString": "literal_string \"votes is not for a valid post\"" }, - "value": "comment id is not valid" + "value": "votes is not for a valid post" } ], "expression": { @@ -21407,25 +17708,25 @@ "typeString": "bool" }, { - "typeIdentifier": "t_stringliteral_96da188f723c48153c2c1f113109dc9470d321813883d9bae2ecaddc392a27a1", - "typeString": "literal_string \"comment id is not valid\"" + "typeIdentifier": "t_stringliteral_ff3dacff5ff4f61cab4f46ef6127fdb7fdc77ddfb8b67e7ad2650377bf778ed8", + "typeString": "literal_string \"votes is not for a valid post\"" } ], - "id": 608, + "id": 442, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1088, - 1089 + 875, + 876 ], - "referencedDeclaration": 1089, - "src": "6870:7:1", + "referencedDeclaration": 876, + "src": "5944:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 613, + "id": 447, "isConstant": false, "isLValue": false, "isPure": false, @@ -21433,15 +17734,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "6870:50:1", + "src": "5944:53:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 614, + "id": 448, "nodeType": "ExpressionStatement", - "src": "6870:50:1" + "src": "5944:53:0" }, { "expression": { @@ -21453,67 +17754,40 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 620, + "id": 452, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 616, - "name": "commendId", + "id": 450, + "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 591, - "src": "6939:9:1", + "referencedDeclaration": 437, + "src": "6016:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", - "operator": "<=", + "operator": "<", "rightExpression": { "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 617, - "name": "commentCounter", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 82, - "src": "6952:14:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", - "typeString": "mapping(uint256 => uint256)" - } - }, - "id": 619, - "indexExpression": { - "argumentTypes": null, - "id": 618, - "name": "postId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 589, - "src": "6967:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6952:22:1", + "id": 451, + "name": "postNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "6025:10:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "6939:35:1", + "src": "6016:19:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -21521,21 +17795,21 @@ }, { "argumentTypes": null, - "hexValue": "636f6d6d656e74206964206973206e6f6e206578697374656e74", - "id": 621, + "hexValue": "766f74657320697320666f722061206e6f6e206578697374656e7420706f7374", + "id": 453, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "6976:28:1", + "src": "6037:34:0", "subdenomination": null, "typeDescriptions": { - "typeIdentifier": "t_stringliteral_60864667c45bf066f975096e955f868c455194279a1628fdcd83ec0b3d5a120c", - "typeString": "literal_string \"comment id is non existent\"" + "typeIdentifier": "t_stringliteral_c5c2b6bc9661424e678d353e544becf16e7105065d06cadc50a2e92c037d1b9b", + "typeString": "literal_string \"votes is for a non existent post\"" }, - "value": "comment id is non existent" + "value": "votes is for a non existent post" } ], "expression": { @@ -21545,25 +17819,25 @@ "typeString": "bool" }, { - "typeIdentifier": "t_stringliteral_60864667c45bf066f975096e955f868c455194279a1628fdcd83ec0b3d5a120c", - "typeString": "literal_string \"comment id is non existent\"" + "typeIdentifier": "t_stringliteral_c5c2b6bc9661424e678d353e544becf16e7105065d06cadc50a2e92c037d1b9b", + "typeString": "literal_string \"votes is for a non existent post\"" } ], - "id": 615, + "id": 449, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1088, - 1089 + 875, + 876 ], - "referencedDeclaration": 1089, - "src": "6931:7:1", + "referencedDeclaration": 876, + "src": "6008:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 622, + "id": 454, "isConstant": false, "isLValue": false, "isPure": false, @@ -21571,15 +17845,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "6931:74:1", + "src": "6008:64:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 623, + "id": 455, "nodeType": "ExpressionStatement", - "src": "6931:74:1" + "src": "6008:64:0" }, { "expression": { @@ -21591,142 +17865,45 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 634, + "id": 459, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 625, - "name": "commentVoters", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 108, - "src": "7024:13:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$_$", - "typeString": "mapping(address => mapping(uint256 => mapping(uint256 => uint256)))" - } - }, - "id": 628, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 626, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "7038:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 627, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7038:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7024:25:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(uint256 => uint256))" - } - }, - "id": 630, - "indexExpression": { - "argumentTypes": null, - "id": 629, - "name": "postId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 589, - "src": "7050:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7024:33:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", - "typeString": "mapping(uint256 => uint256)" - } - }, - "id": 632, - "indexExpression": { - "argumentTypes": null, - "id": 631, - "name": "commendId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 591, - "src": "7058:9:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7024:44:1", + "id": 457, + "name": "commendId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 439, + "src": "6101:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", - "operator": "!=", + "operator": ">=", "rightExpression": { "argumentTypes": null, - "hexValue": "32", - "id": 633, + "hexValue": "30", + "id": 458, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "7072:1:1", + "src": "6114:1:0", "subdenomination": null, "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" }, - "value": "2" + "value": "0" }, - "src": "7024:49:1", + "src": "6101:14:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -21734,21 +17911,21 @@ }, { "argumentTypes": null, - "hexValue": "5570766f746520616c726561647920646f6e65", - "id": 635, + "hexValue": "636f6d6d656e74206964206973206e6f742076616c6964", + "id": 460, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "7075:21:1", + "src": "6117:25:0", "subdenomination": null, "typeDescriptions": { - "typeIdentifier": "t_stringliteral_df24b86cc4620336f368688345ca505ad90fcac9d2a55b94a3e3f9a021ddf783", - "typeString": "literal_string \"Upvote already done\"" + "typeIdentifier": "t_stringliteral_96da188f723c48153c2c1f113109dc9470d321813883d9bae2ecaddc392a27a1", + "typeString": "literal_string \"comment id is not valid\"" }, - "value": "Upvote already done" + "value": "comment id is not valid" } ], "expression": { @@ -21758,25 +17935,25 @@ "typeString": "bool" }, { - "typeIdentifier": "t_stringliteral_df24b86cc4620336f368688345ca505ad90fcac9d2a55b94a3e3f9a021ddf783", - "typeString": "literal_string \"Upvote already done\"" + "typeIdentifier": "t_stringliteral_96da188f723c48153c2c1f113109dc9470d321813883d9bae2ecaddc392a27a1", + "typeString": "literal_string \"comment id is not valid\"" } ], - "id": 624, + "id": 456, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1088, - 1089 + 875, + 876 ], - "referencedDeclaration": 1089, - "src": "7016:7:1", + "referencedDeclaration": 876, + "src": "6093:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 636, + "id": 461, "isConstant": false, "isLValue": false, "isPure": false, @@ -21784,210 +17961,216 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "7016:81:1", + "src": "6093:50:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 637, + "id": 462, "nodeType": "ExpressionStatement", - "src": "7016:81:1" + "src": "6093:50:0" }, { - "condition": { + "expression": { "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 647, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { + "arguments": [ + { "argumentTypes": null, - "baseExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 468, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 464, + "name": "commendId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 439, + "src": "6162:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 638, - "name": "commentVoters", + "id": 465, + "name": "commentCounter", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 108, - "src": "7122:13:1", + "referencedDeclaration": 25, + "src": "6175:14:0", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$_$", - "typeString": "mapping(address => mapping(uint256 => mapping(uint256 => uint256)))" + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" } }, - "id": 641, + "id": 467, "indexExpression": { "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 639, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "7136:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 640, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7136:10:1", + "id": 466, + "name": "postId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 437, + "src": "6190:6:0", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7122:25:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(uint256 => uint256))" - } - }, - "id": 643, - "indexExpression": { - "argumentTypes": null, - "id": 642, - "name": "postId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 589, - "src": "7148:6:1", + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6175:22:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7122:33:1", + "src": "6162:35:0", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", - "typeString": "mapping(uint256 => uint256)" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "id": 645, - "indexExpression": { + { "argumentTypes": null, - "id": 644, - "name": "commendId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 591, - "src": "7156:9:1", + "hexValue": "636f6d6d656e74206964206973206e6f6e206578697374656e74", + "id": 469, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6199:28:0", + "subdenomination": null, "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_stringliteral_60864667c45bf066f975096e955f868c455194279a1628fdcd83ec0b3d5a120c", + "typeString": "literal_string \"comment id is non existent\"" + }, + "value": "comment id is non existent" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_60864667c45bf066f975096e955f868c455194279a1628fdcd83ec0b3d5a120c", + "typeString": "literal_string \"comment id is non existent\"" } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7122:44:1", + ], + "id": 463, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 875, + 876 + ], + "referencedDeclaration": 876, + "src": "6154:7:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" } }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 646, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7170:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "7122:49:1", + "id": 470, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6154:74:0", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" } }, - "falseBody": null, - "id": 657, - "nodeType": "IfStatement", - "src": "7118:120:1", - "trueBody": { - "id": 656, - "nodeType": "Block", - "src": "7173:65:1", - "statements": [ + "id": 471, + "nodeType": "ExpressionStatement", + "src": "6154:74:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ { - "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 482, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { "argumentTypes": null, - "id": 654, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { + "baseExpression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 648, - "name": "commentUpVotes", + "id": 473, + "name": "commentVoters", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "7188:14:1", + "referencedDeclaration": 51, + "src": "6247:13:0", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(uint256 => uint256))" + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$_$", + "typeString": "mapping(address => mapping(uint256 => mapping(uint256 => uint256)))" } }, - "id": 651, + "id": 476, "indexExpression": { "argumentTypes": null, - "id": 649, - "name": "postId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 589, - "src": "7203:6:1", + "expression": { + "argumentTypes": null, + "id": 474, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 872, + "src": "6261:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 475, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6261:10:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_address", + "typeString": "address" } }, "isConstant": false, @@ -21995,21 +18178,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "7188:22:1", + "src": "6247:25:0", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", - "typeString": "mapping(uint256 => uint256)" + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(uint256 => uint256))" } }, - "id": 652, + "id": 478, "indexExpression": { "argumentTypes": null, - "id": 650, - "name": "commendId", + "id": 477, + "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 591, - "src": "7211:9:1", + "referencedDeclaration": 437, + "src": "6273:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -22018,415 +18201,233 @@ "isConstant": false, "isLValue": true, "isPure": false, - "lValueRequested": true, + "lValueRequested": false, "nodeType": "IndexAccess", - "src": "7188:33:1", + "src": "6247:33:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" } }, - "nodeType": "Assignment", - "operator": "-=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "31", - "id": 653, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7225:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "7188:38:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 655, - "nodeType": "ExpressionStatement", - "src": "7188:38:1" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "id": 667, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { + "id": 480, + "indexExpression": { "argumentTypes": null, - "id": 658, - "name": "commentVoters", + "id": 479, + "name": "commendId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 108, - "src": "7250:13:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$_$", - "typeString": "mapping(address => mapping(uint256 => mapping(uint256 => uint256)))" - } - }, - "id": 663, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 659, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "7264:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 660, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7264:10:1", + "referencedDeclaration": 439, + "src": "6281:9:0", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7250:25:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(uint256 => uint256))" - } - }, - "id": 664, - "indexExpression": { - "argumentTypes": null, - "id": 661, - "name": "postId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 589, - "src": "7276:6:1", + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6247:44:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7250:33:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", - "typeString": "mapping(uint256 => uint256)" - } - }, - "id": 665, - "indexExpression": { - "argumentTypes": null, - "id": 662, - "name": "commendId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 591, - "src": "7284:9:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "7250:44:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "32", - "id": 666, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7297:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "src": "7250:48:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 668, - "nodeType": "ExpressionStatement", - "src": "7250:48:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 675, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 669, - "name": "commentDownVotes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 100, - "src": "7309:16:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(uint256 => uint256))" - } - }, - "id": 672, - "indexExpression": { + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { "argumentTypes": null, - "id": 670, - "name": "postId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 589, - "src": "7326:6:1", + "hexValue": "31", + "id": 481, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6295:1:0", + "subdenomination": null, "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7309:24:1", + "src": "6247:49:0", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", - "typeString": "mapping(uint256 => uint256)" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "id": 673, - "indexExpression": { + { "argumentTypes": null, - "id": 671, - "name": "commendId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 591, - "src": "7334:9:1", + "hexValue": "5570766f746520616c726561647920646f6e65", + "id": 483, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6298:21:0", + "subdenomination": null, "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_stringliteral_df24b86cc4620336f368688345ca505ad90fcac9d2a55b94a3e3f9a021ddf783", + "typeString": "literal_string \"Upvote already done\"" + }, + "value": "Upvote already done" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_df24b86cc4620336f368688345ca505ad90fcac9d2a55b94a3e3f9a021ddf783", + "typeString": "literal_string \"Upvote already done\"" } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "7309:35:1", + ], + "id": 472, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 875, + 876 + ], + "referencedDeclaration": 876, + "src": "6239:7:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" } }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "31", - "id": 674, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7348:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "7309:40:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 676, - "nodeType": "ExpressionStatement", - "src": "7309:40:1" - } - ] - }, - "documentation": null, - "id": 678, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "DownvoteComment", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 592, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 589, - "name": "postId", - "nodeType": "VariableDeclaration", - "scope": 678, - "src": "6674:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 588, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6674:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 591, - "name": "commendId", - "nodeType": "VariableDeclaration", - "scope": 678, - "src": "6687:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 590, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6687:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6673:29:1" - }, - "payable": false, - "returnParameters": { - "id": 593, - "nodeType": "ParameterList", - "parameters": [], - "src": "6710:0:1" - }, - "scope": 1070, - "src": "6649:708:1", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 693, - "nodeType": "Block", - "src": "7485:59:1", - "statements": [ + "id": 484, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6239:81:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 485, + "nodeType": "ExpressionStatement", + "src": "6239:81:0" + }, { - "expression": { + "condition": { "argumentTypes": null, - "baseExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 495, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 687, - "name": "commentUpVotes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "7503:14:1", + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 486, + "name": "commentVoters", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51, + "src": "6337:13:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$_$", + "typeString": "mapping(address => mapping(uint256 => mapping(uint256 => uint256)))" + } + }, + "id": 489, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 487, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 872, + "src": "6351:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 488, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6351:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6337:25:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(uint256 => uint256))" + } + }, + "id": 491, + "indexExpression": { + "argumentTypes": null, + "id": 490, + "name": "postId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 437, + "src": "6363:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6337:33:0", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(uint256 => uint256))" + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" } }, - "id": 689, + "id": 493, "indexExpression": { "argumentTypes": null, - "id": 688, - "name": "postId", + "id": 492, + "name": "commendId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 680, - "src": "7518:6:1", + "referencedDeclaration": 439, + "src": "6371:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -22437,184 +18438,257 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "7503:22:1", + "src": "6337:44:0", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", - "typeString": "mapping(uint256 => uint256)" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 691, - "indexExpression": { + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { "argumentTypes": null, - "id": 690, - "name": "commendId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 682, - "src": "7526:9:1", + "hexValue": "32", + "id": 494, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6385:1:0", + "subdenomination": null, "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7503:33:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 686, - "id": 692, - "nodeType": "Return", - "src": "7496:40:1" - } - ] - }, - "documentation": null, - "id": 694, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getCommentUpVotes", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 683, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 680, - "name": "postId", - "nodeType": "VariableDeclaration", - "scope": 694, - "src": "7429:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 679, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "7429:4:1", + "src": "6337:49:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "value": null, - "visibility": "internal" + "falseBody": null, + "id": 505, + "nodeType": "IfStatement", + "src": "6333:122:0", + "trueBody": { + "id": 504, + "nodeType": "Block", + "src": "6388:67:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 502, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 496, + "name": "commentDownVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 43, + "src": "6403:16:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(uint256 => uint256))" + } + }, + "id": 499, + "indexExpression": { + "argumentTypes": null, + "id": 497, + "name": "postId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 437, + "src": "6420:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6403:24:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + } + }, + "id": 500, + "indexExpression": { + "argumentTypes": null, + "id": 498, + "name": "commendId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 439, + "src": "6428:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6403:35:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "31", + "id": 501, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6442:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "6403:40:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 503, + "nodeType": "ExpressionStatement", + "src": "6403:40:0" + } + ] + } }, - { - "constant": false, - "id": 682, - "name": "commendId", - "nodeType": "VariableDeclaration", - "scope": 694, - "src": "7442:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 681, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "7442:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7428:29:1" - }, - "payable": false, - "returnParameters": { - "id": 686, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 685, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 694, - "src": "7479:4:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 684, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "7479:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7478:6:1" - }, - "scope": 1070, - "src": "7402:142:1", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 709, - "nodeType": "Block", - "src": "7670:61:1", - "statements": [ { "expression": { "argumentTypes": null, - "baseExpression": { + "id": 515, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 703, - "name": "commentDownVotes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 100, - "src": "7688:16:1", + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 506, + "name": "commentVoters", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51, + "src": "6467:13:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$_$", + "typeString": "mapping(address => mapping(uint256 => mapping(uint256 => uint256)))" + } + }, + "id": 511, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 507, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 872, + "src": "6481:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 508, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6481:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6467:25:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(uint256 => uint256))" + } + }, + "id": 512, + "indexExpression": { + "argumentTypes": null, + "id": 509, + "name": "postId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 437, + "src": "6493:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6467:33:0", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(uint256 => uint256))" + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" } }, - "id": 705, + "id": 513, "indexExpression": { "argumentTypes": null, - "id": 704, - "name": "postId", + "id": 510, + "name": "commendId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 696, - "src": "7705:6:1", + "referencedDeclaration": 439, + "src": "6501:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -22623,191 +18697,81 @@ "isConstant": false, "isLValue": true, "isPure": false, - "lValueRequested": false, + "lValueRequested": true, "nodeType": "IndexAccess", - "src": "7688:24:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", - "typeString": "mapping(uint256 => uint256)" - } - }, - "id": 707, - "indexExpression": { - "argumentTypes": null, - "id": 706, - "name": "commendId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 698, - "src": "7713:9:1", + "src": "6467:44:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7688:35:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 702, - "id": 708, - "nodeType": "Return", - "src": "7681:42:1" - } - ] - }, - "documentation": null, - "id": 710, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getCommentDownVotes", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 699, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 696, - "name": "postId", - "nodeType": "VariableDeclaration", - "scope": 710, - "src": "7614:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 695, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "7614:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 698, - "name": "commendId", - "nodeType": "VariableDeclaration", - "scope": 710, - "src": "7627:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 697, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "7627:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7613:29:1" - }, - "payable": false, - "returnParameters": { - "id": 702, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 701, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 710, - "src": "7664:4:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 700, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "7664:4:1", + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "31", + "id": 514, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6514:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "6467:48:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "value": null, - "visibility": "internal" - } - ], - "src": "7663:6:1" - }, - "scope": 1070, - "src": "7585:146:1", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 729, - "nodeType": "Block", - "src": "7881:69:1", - "statements": [ + "id": 516, + "nodeType": "ExpressionStatement", + "src": "6467:48:0" + }, { "expression": { "argumentTypes": null, - "baseExpression": { + "id": 523, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 721, - "name": "commentVoters", + "id": 517, + "name": "commentUpVotes", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 108, - "src": "7899:13:1", + "referencedDeclaration": 37, + "src": "6526:14:0", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$_$", - "typeString": "mapping(address => mapping(uint256 => mapping(uint256 => uint256)))" + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(uint256 => uint256))" } }, - "id": 723, + "id": 520, "indexExpression": { "argumentTypes": null, - "id": 722, - "name": "commenter", + "id": 518, + "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 716, - "src": "7913:9:1", + "referencedDeclaration": 437, + "src": "6541:6:0", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, "isConstant": false, @@ -22815,21 +18779,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "7899:24:1", + "src": "6526:22:0", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$", - "typeString": "mapping(uint256 => mapping(uint256 => uint256))" + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" } }, - "id": 725, + "id": 521, "indexExpression": { "argumentTypes": null, - "id": 724, - "name": "postId", + "id": 519, + "name": "commendId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 712, - "src": "7924:6:1", + "referencedDeclaration": 439, + "src": "6549:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -22838,292 +18802,79 @@ "isConstant": false, "isLValue": true, "isPure": false, - "lValueRequested": false, + "lValueRequested": true, "nodeType": "IndexAccess", - "src": "7899:32:1", + "src": "6526:33:0", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", - "typeString": "mapping(uint256 => uint256)" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 727, - "indexExpression": { + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { "argumentTypes": null, - "id": 726, - "name": "commendId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 714, - "src": "7932:9:1", + "hexValue": "31", + "id": 522, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6563:1:0", + "subdenomination": null, "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7899:43:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 720, - "id": 728, - "nodeType": "Return", - "src": "7892:50:1" - } - ] - }, - "documentation": null, - "id": 730, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getCommentVoterData", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 717, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 712, - "name": "postId", - "nodeType": "VariableDeclaration", - "scope": 730, - "src": "7806:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 711, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "7806:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 714, - "name": "commendId", - "nodeType": "VariableDeclaration", - "scope": 730, - "src": "7819:14:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 713, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "7819:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 716, - "name": "commenter", - "nodeType": "VariableDeclaration", - "scope": 730, - "src": "7835:17:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 715, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7835:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7805:48:1" - }, - "payable": false, - "returnParameters": { - "id": 720, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 719, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 730, - "src": "7875:4:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 718, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "7875:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7874:6:1" - }, - "scope": 1070, - "src": "7777:173:1", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 737, - "nodeType": "Block", - "src": "8049:36:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 735, - "name": "postNumber", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 60, - "src": "8067:10:1", + "src": "6526:38:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 734, - "id": 736, - "nodeType": "Return", - "src": "8060:17:1" + "id": 524, + "nodeType": "ExpressionStatement", + "src": "6526:38:0" } ] }, "documentation": null, - "id": 738, + "id": 526, "implemented": true, "isConstructor": false, - "isDeclaredConst": true, + "isDeclaredConst": false, "modifiers": [], - "name": "getPostCounter", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 731, - "nodeType": "ParameterList", - "parameters": [], - "src": "8019:2:1" - }, - "payable": false, - "returnParameters": { - "id": 734, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 733, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 738, - "src": "8043:4:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 732, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "8043:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8042:6:1" - }, - "scope": 1070, - "src": "7996:89:1", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 744, - "name": "Deposited", - "nodeType": "EventDefinition", + "name": "UpvoteComment", + "nodeType": "FunctionDefinition", "parameters": { - "id": 743, + "id": 440, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 740, - "indexed": true, - "name": "depositer", + "id": 437, + "name": "postId", "nodeType": "VariableDeclaration", - "scope": 744, - "src": "8206:25:1", + "scope": 526, + "src": "5897:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, "typeName": { - "id": 739, - "name": "address", + "id": 436, + "name": "uint", "nodeType": "ElementaryTypeName", - "src": "8206:7:1", + "src": "5897:4:0", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, "value": null, @@ -23131,12 +18882,11 @@ }, { "constant": false, - "id": 742, - "indexed": false, - "name": "value", + "id": 439, + "name": "commendId", "nodeType": "VariableDeclaration", - "scope": 744, - "src": "8242:10:1", + "scope": 526, + "src": "5910:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -23144,10 +18894,10 @@ "typeString": "uint256" }, "typeName": { - "id": 741, + "id": 438, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "8242:4:1", + "src": "5910:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -23157,15 +18907,26 @@ "visibility": "internal" } ], - "src": "8195:64:1" + "src": "5896:29:0" + }, + "payable": false, + "returnParameters": { + "id": 441, + "nodeType": "ParameterList", + "parameters": [], + "src": "5933:0:0" }, - "src": "8179:81:1" + "scope": 857, + "src": "5874:698:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" }, { "body": { - "id": 770, + "id": 616, "nodeType": "Block", - "src": "8349:154:1", + "src": "6669:647:0", "statements": [ { "expression": { @@ -23177,53 +18938,37 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 751, + "id": 536, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 748, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "8368:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 749, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8368:9:1", + "id": 534, + "name": "postId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 528, + "src": "6688:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", - "operator": ">", + "operator": ">=", "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 750, + "id": 535, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "8380:1:1", + "src": "6698:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -23231,7 +18976,7 @@ }, "value": "0" }, - "src": "8368:13:1", + "src": "6688:11:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -23239,21 +18984,21 @@ }, { "argumentTypes": null, - "hexValue": "6e6f2061747461636865642076616c7565", - "id": 752, + "hexValue": "766f746573206973206e6f7420666f7220612076616c696420706f7374", + "id": 537, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "8383:19:1", + "src": "6701:31:0", "subdenomination": null, "typeDescriptions": { - "typeIdentifier": "t_stringliteral_fea247e0dfa13d79b1ed7c5055f96c2d0046eebcf2ab0c7588fc5c796c66b665", - "typeString": "literal_string \"no attached value\"" + "typeIdentifier": "t_stringliteral_ff3dacff5ff4f61cab4f46ef6127fdb7fdc77ddfb8b67e7ad2650377bf778ed8", + "typeString": "literal_string \"votes is not for a valid post\"" }, - "value": "no attached value" + "value": "votes is not for a valid post" } ], "expression": { @@ -23263,25 +19008,25 @@ "typeString": "bool" }, { - "typeIdentifier": "t_stringliteral_fea247e0dfa13d79b1ed7c5055f96c2d0046eebcf2ab0c7588fc5c796c66b665", - "typeString": "literal_string \"no attached value\"" + "typeIdentifier": "t_stringliteral_ff3dacff5ff4f61cab4f46ef6127fdb7fdc77ddfb8b67e7ad2650377bf778ed8", + "typeString": "literal_string \"votes is not for a valid post\"" } ], - "id": 747, + "id": 533, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1088, - 1089 + 875, + 876 ], - "referencedDeclaration": 1089, - "src": "8360:7:1", + "referencedDeclaration": 876, + "src": "6680:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 753, + "id": 538, "isConstant": false, "isLValue": false, "isPure": false, @@ -23289,991 +19034,903 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "8360:43:1", + "src": "6680:53:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 754, + "id": 539, "nodeType": "ExpressionStatement", - "src": "8360:43:1" + "src": "6680:53:0" }, { "expression": { "argumentTypes": null, - "id": 761, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 755, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 112, - "src": "8414:8:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 758, - "indexExpression": { + "arguments": [ + { "argumentTypes": null, - "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 543, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { "argumentTypes": null, - "id": 756, - "name": "msg", + "id": 541, + "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "8423:3:1", + "referencedDeclaration": 528, + "src": "6752:6:0", "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 542, + "name": "postNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "6761:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 757, + "src": "6752:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "766f74657320697320666f722061206e6f6e206578697374656e7420706f7374", + "id": 544, "isConstant": false, "isLValue": false, - "isPure": false, + "isPure": true, + "kind": "string", "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8423:10:1", + "nodeType": "Literal", + "src": "6773:34:0", + "subdenomination": null, "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_stringliteral_c5c2b6bc9661424e678d353e544becf16e7105065d06cadc50a2e92c037d1b9b", + "typeString": "literal_string \"votes is for a non existent post\"" + }, + "value": "votes is for a non existent post" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c5c2b6bc9661424e678d353e544becf16e7105065d06cadc50a2e92c037d1b9b", + "typeString": "literal_string \"votes is for a non existent post\"" } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "8414:20:1", + ], + "id": 540, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 875, + 876 + ], + "referencedDeclaration": 876, + "src": "6744:7:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" } }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "expression": { + "id": 545, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6744:64:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 546, + "nodeType": "ExpressionStatement", + "src": "6744:64:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { "argumentTypes": null, - "id": 759, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "8438:3:1", + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 550, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 548, + "name": "commendId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 530, + "src": "6837:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 549, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6850:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "6837:14:0", "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "636f6d6d656e74206964206973206e6f742076616c6964", + "id": 551, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6853:25:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_96da188f723c48153c2c1f113109dc9470d321813883d9bae2ecaddc392a27a1", + "typeString": "literal_string \"comment id is not valid\"" + }, + "value": "comment id is not valid" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_96da188f723c48153c2c1f113109dc9470d321813883d9bae2ecaddc392a27a1", + "typeString": "literal_string \"comment id is not valid\"" } - }, - "id": 760, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8438:9:1", + ], + "id": 547, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 875, + 876 + ], + "referencedDeclaration": 876, + "src": "6829:7:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" } }, - "src": "8414:33:1", + "id": 552, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6829:50:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" } }, - "id": 762, + "id": 553, "nodeType": "ExpressionStatement", - "src": "8414:33:1" + "src": "6829:50:0" }, { - "eventCall": { + "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 764, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "8473:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, - "id": 765, + "id": 559, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8473:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "expression": { + "leftExpression": { "argumentTypes": null, - "id": 766, - "name": "msg", + "id": 555, + "name": "commendId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "8485:3:1", + "referencedDeclaration": 530, + "src": "6898:9:0", "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 767, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 556, + "name": "commentCounter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 25, + "src": "6911:14:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + } + }, + "id": 558, + "indexExpression": { + "argumentTypes": null, + "id": 557, + "name": "postId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 528, + "src": "6926:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6911:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6898:35:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "636f6d6d656e74206964206973206e6f6e206578697374656e74", + "id": 560, "isConstant": false, "isLValue": false, - "isPure": false, + "isPure": true, + "kind": "string", "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8485:9:1", + "nodeType": "Literal", + "src": "6935:28:0", + "subdenomination": null, "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } + "typeIdentifier": "t_stringliteral_60864667c45bf066f975096e955f868c455194279a1628fdcd83ec0b3d5a120c", + "typeString": "literal_string \"comment id is non existent\"" + }, + "value": "comment id is non existent" } ], "expression": { "argumentTypes": [ { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_bool", + "typeString": "bool" }, { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_stringliteral_60864667c45bf066f975096e955f868c455194279a1628fdcd83ec0b3d5a120c", + "typeString": "literal_string \"comment id is non existent\"" } ], - "id": 763, - "name": "Deposited", + "id": 554, + "name": "require", "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 744, - "src": "8463:9:1", + "overloadedDeclarations": [ + 875, + 876 + ], + "referencedDeclaration": 876, + "src": "6890:7:0", "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" } }, - "id": 768, + "id": 561, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8463:32:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 769, - "nodeType": "EmitStatement", - "src": "8458:37:1" - } - ] - }, - "documentation": null, - "id": 771, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, - "modifiers": [], - "name": "deposit", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 745, - "nodeType": "ParameterList", - "parameters": [], - "src": "8331:2:1" - }, - "payable": true, - "returnParameters": { - "id": 746, - "nodeType": "ParameterList", - "parameters": [], - "src": "8349:0:1" - }, - "scope": 1070, - "src": "8315:188:1", - "stateMutability": "payable", - "superFunction": null, - "visibility": "public" - }, - { - "anonymous": false, - "documentation": null, - "id": 777, - "name": "Withdrawal", - "nodeType": "EventDefinition", - "parameters": { - "id": 776, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 773, - "indexed": true, - "name": "taker", - "nodeType": "VariableDeclaration", - "scope": 777, - "src": "8584:21:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 772, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8584:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 775, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 777, - "src": "8616:10:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 774, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "8616:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8573:60:1" - }, - "src": "8556:78:1" - }, - { - "body": { - "id": 863, - "nodeType": "Block", - "src": "8734:738:1", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 786, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 784, - "name": "withdrawall", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 779, - "src": "8811:11:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 785, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8826:4:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "8811:19:1", + "names": [], + "nodeType": "FunctionCall", + "src": "6890:74:0", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" } }, - "falseBody": { - "id": 861, - "nodeType": "Block", - "src": "9105:360:1", - "statements": [ + "id": 562, + "nodeType": "ExpressionStatement", + "src": "6890:74:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ { - "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 573, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { "argumentTypes": null, - "arguments": [ - { + "baseExpression": { + "argumentTypes": null, + "baseExpression": { "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 826, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { + "baseExpression": { "argumentTypes": null, - "id": 824, - "name": "trxAmmount", + "id": 564, + "name": "commentVoters", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 781, - "src": "9168:10:1", + "referencedDeclaration": 51, + "src": "6983:13:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$_$", + "typeString": "mapping(address => mapping(uint256 => mapping(uint256 => uint256)))" } }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 825, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9181:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "9168:14:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "496e636f72726563742077697468647261772076616c7565", - "id": 827, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9184:26:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_80153b85564bec6619e4b3c9d237a29e03670836c2a3f1bdc56b101b5bd3570b", - "typeString": "literal_string \"Incorrect withdraw value\"" - }, - "value": "Incorrect withdraw value" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_80153b85564bec6619e4b3c9d237a29e03670836c2a3f1bdc56b101b5bd3570b", - "typeString": "literal_string \"Incorrect withdraw value\"" - } - ], - "id": 823, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1088, - 1089 - ], - "referencedDeclaration": 1089, - "src": "9160:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 828, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9160:51:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 829, - "nodeType": "ExpressionStatement", - "src": "9160:51:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 836, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { + "id": 567, + "indexExpression": { "argumentTypes": null, - "baseExpression": { + "expression": { "argumentTypes": null, - "id": 831, - "name": "balances", + "id": 565, + "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 112, - "src": "9234:8:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 834, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 832, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "9243:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 833, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9243:10:1", + "referencedDeclaration": 872, + "src": "6997:3:0", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_magic_message", + "typeString": "msg" } }, + "id": 566, "isConstant": false, - "isLValue": true, + "isLValue": false, "isPure": false, "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9234:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 835, - "name": "trxAmmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 781, - "src": "9258:10:1", + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6997:10:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "src": "9234:34:1", + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6983:25:0", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(uint256 => uint256))" } }, - { + "id": 569, + "indexExpression": { "argumentTypes": null, - "hexValue": "617474656d7074696e6720746f20776974686472617720746f6f206d756368", - "id": 837, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9270:33:1", - "subdenomination": null, + "id": 568, + "name": "postId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 528, + "src": "7009:6:0", "typeDescriptions": { - "typeIdentifier": "t_stringliteral_167690802acbac1725ba020ceb69a63d0f442d86e9bc17f983a1baf15f05bd23", - "typeString": "literal_string \"attempting to withdraw too much\"" - }, - "value": "attempting to withdraw too much" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_167690802acbac1725ba020ceb69a63d0f442d86e9bc17f983a1baf15f05bd23", - "typeString": "literal_string \"attempting to withdraw too much\"" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } - ], - "id": 830, - "name": "require", + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6983:33:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + } + }, + "id": 571, + "indexExpression": { + "argumentTypes": null, + "id": 570, + "name": "commendId", "nodeType": "Identifier", - "overloadedDeclarations": [ - 1088, - 1089 - ], - "referencedDeclaration": 1089, - "src": "9226:7:1", + "overloadedDeclarations": [], + "referencedDeclaration": 530, + "src": "7017:9:0", "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 838, "isConstant": false, - "isLValue": false, + "isLValue": true, "isPure": false, - "kind": "functionCall", "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9226:78:1", + "nodeType": "IndexAccess", + "src": "6983:44:0", "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 839, - "nodeType": "ExpressionStatement", - "src": "9226:78:1" - }, - { - "expression": { + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { "argumentTypes": null, - "id": 845, + "hexValue": "32", + "id": 572, "isConstant": false, "isLValue": false, - "isPure": false, + "isPure": true, + "kind": "number", "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 840, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 112, - "src": "9319:8:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 843, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 841, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "9328:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 842, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9328:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "9319:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } + "nodeType": "Literal", + "src": "7031:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" }, - "nodeType": "Assignment", - "operator": "-=", - "rightHandSide": { + "value": "2" + }, + "src": "6983:49:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "5570766f746520616c726561647920646f6e65", + "id": 574, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7034:21:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_df24b86cc4620336f368688345ca505ad90fcac9d2a55b94a3e3f9a021ddf783", + "typeString": "literal_string \"Upvote already done\"" + }, + "value": "Upvote already done" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_df24b86cc4620336f368688345ca505ad90fcac9d2a55b94a3e3f9a021ddf783", + "typeString": "literal_string \"Upvote already done\"" + } + ], + "id": 563, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 875, + 876 + ], + "referencedDeclaration": 876, + "src": "6975:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 575, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6975:81:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 576, + "nodeType": "ExpressionStatement", + "src": "6975:81:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 586, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { "argumentTypes": null, - "id": 844, - "name": "trxAmmount", + "id": 577, + "name": "commentVoters", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 781, - "src": "9343:10:1", + "referencedDeclaration": 51, + "src": "7081:13:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$_$", + "typeString": "mapping(address => mapping(uint256 => mapping(uint256 => uint256)))" } }, - "src": "9319:34:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 846, - "nodeType": "ExpressionStatement", - "src": "9319:34:1" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { + "id": 580, + "indexExpression": { + "argumentTypes": null, + "expression": { "argumentTypes": null, - "id": 852, - "name": "trxAmmount", + "id": 578, + "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 781, - "src": "9388:10:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 847, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "9368:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 850, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9368:10:1", + "referencedDeclaration": 872, + "src": "7095:3:0", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_magic_message", + "typeString": "msg" } }, - "id": 851, + "id": 579, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberName": "transfer", + "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "9368:19:1", + "src": "7095:10:0", "typeDescriptions": { - "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "id": 853, "isConstant": false, - "isLValue": false, + "isLValue": true, "isPure": false, - "kind": "functionCall", "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9368:31:1", + "nodeType": "IndexAccess", + "src": "7081:25:0", "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(uint256 => uint256))" } }, - "id": 854, - "nodeType": "ExpressionStatement", - "src": "9368:31:1" + "id": 582, + "indexExpression": { + "argumentTypes": null, + "id": 581, + "name": "postId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 528, + "src": "7107:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7081:33:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + } + }, + "id": 584, + "indexExpression": { + "argumentTypes": null, + "id": 583, + "name": "commendId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 530, + "src": "7115:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7081:44:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 585, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7129:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "7081:49:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 596, + "nodeType": "IfStatement", + "src": "7077:120:0", + "trueBody": { + "id": 595, + "nodeType": "Block", + "src": "7132:65:0", + "statements": [ { - "eventCall": { + "expression": { "argumentTypes": null, - "arguments": [ - { + "id": 593, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { "argumentTypes": null, - "expression": { + "baseExpression": { "argumentTypes": null, - "id": 856, - "name": "msg", + "id": 587, + "name": "commentUpVotes", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "9430:3:1", + "referencedDeclaration": 37, + "src": "7147:14:0", "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(uint256 => uint256))" + } + }, + "id": 590, + "indexExpression": { + "argumentTypes": null, + "id": 588, + "name": "postId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 528, + "src": "7162:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 857, "isConstant": false, - "isLValue": false, + "isLValue": true, "isPure": false, "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9430:10:1", + "nodeType": "IndexAccess", + "src": "7147:22:0", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" } }, - { + "id": 591, + "indexExpression": { "argumentTypes": null, - "id": 858, - "name": "trxAmmount", + "id": 589, + "name": "commendId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 781, - "src": "9442:10:1", + "referencedDeclaration": 530, + "src": "7170:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 855, - "name": "Withdrawal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 777, - "src": "9419:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 859, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9419:34:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 860, - "nodeType": "EmitStatement", - "src": "9414:39:1" - } - ] - }, - "id": 862, - "nodeType": "IfStatement", - "src": "8808:657:1", - "trueBody": { - "id": 822, - "nodeType": "Block", - "src": "8831:260:1", - "statements": [ - { - "assignments": [ - 788 - ], - "declarations": [ - { - "constant": false, - "id": 788, - "name": "balance", - "nodeType": "VariableDeclaration", - "scope": 864, - "src": "8846:12:1", - "stateVariable": false, - "storageLocation": "default", + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7147:33:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "31", + "id": 592, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7184:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" }, - "typeName": { - "id": 787, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "8846:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" + "value": "1" + }, + "src": "7147:38:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } - ], - "id": 793, - "initialValue": { + }, + "id": 594, + "nodeType": "ExpressionStatement", + "src": "7147:38:0" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "id": 606, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 789, - "name": "balances", + "id": 597, + "name": "commentVoters", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 112, - "src": "8861:8:1", + "referencedDeclaration": 51, + "src": "7209:13:0", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$_$", + "typeString": "mapping(address => mapping(uint256 => mapping(uint256 => uint256)))" } }, - "id": 792, + "id": 602, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 790, + "id": 598, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "8870:3:1", + "referencedDeclaration": 872, + "src": "7223:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 791, + "id": 599, "isConstant": false, "isLValue": false, "isPure": false, @@ -24281,7 +19938,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "8870:10:1", + "src": "7223:10:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -24292,436 +19949,796 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "8861:20:1", + "src": "7209:25:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(uint256 => uint256))" + } + }, + "id": 603, + "indexExpression": { + "argumentTypes": null, + "id": 600, + "name": "postId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 528, + "src": "7235:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7209:33:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + } + }, + "id": 604, + "indexExpression": { + "argumentTypes": null, + "id": 601, + "name": "commendId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 530, + "src": "7243:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7209:44:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "32", + "id": 605, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7256:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "7209:48:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 607, + "nodeType": "ExpressionStatement", + "src": "7209:48:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 614, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 608, + "name": "commentDownVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 43, + "src": "7268:16:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(uint256 => uint256))" + } + }, + "id": 611, + "indexExpression": { + "argumentTypes": null, + "id": 609, + "name": "postId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 528, + "src": "7285:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "nodeType": "VariableDeclarationStatement", - "src": "8846:35:1" + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7268:24:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + } + }, + "id": 612, + "indexExpression": { + "argumentTypes": null, + "id": 610, + "name": "commendId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 530, + "src": "7293:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7268:35:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "31", + "id": 613, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7307:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "7268:40:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 615, + "nodeType": "ExpressionStatement", + "src": "7268:40:0" + } + ] + }, + "documentation": null, + "id": 617, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "DownvoteComment", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 531, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 528, + "name": "postId", + "nodeType": "VariableDeclaration", + "scope": 617, + "src": "6633:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 527, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6633:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 530, + "name": "commendId", + "nodeType": "VariableDeclaration", + "scope": 617, + "src": "6646:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 529, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6646:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6632:29:0" + }, + "payable": false, + "returnParameters": { + "id": 532, + "nodeType": "ParameterList", + "parameters": [], + "src": "6669:0:0" + }, + "scope": 857, + "src": "6608:708:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 632, + "nodeType": "Block", + "src": "7444:59:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 626, + "name": "commentUpVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "7462:14:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(uint256 => uint256))" + } }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 797, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 795, - "name": "balance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 788, - "src": "8904:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 796, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8914:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "8904:11:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "53656e64657220646f6573206e6f7420686176652066756e6473", - "id": 798, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8917:28:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c0b27c3a749305c8b7eb4c0009dca1d425f6f2b45469bb6d582aac7b5df20b11", - "typeString": "literal_string \"Sender does not have funds\"" - }, - "value": "Sender does not have funds" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_c0b27c3a749305c8b7eb4c0009dca1d425f6f2b45469bb6d582aac7b5df20b11", - "typeString": "literal_string \"Sender does not have funds\"" - } - ], - "id": 794, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1088, - 1089 - ], - "referencedDeclaration": 1089, - "src": "8896:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 799, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8896:50:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 800, - "nodeType": "ExpressionStatement", - "src": "8896:50:1" + "id": 628, + "indexExpression": { + "argumentTypes": null, + "id": 627, + "name": "postId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 619, + "src": "7477:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } }, - { - "expression": { - "argumentTypes": null, - "id": 806, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 801, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 112, - "src": "8961:8:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 804, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 802, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "8970:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 803, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8970:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "8961:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 805, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8984:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "8961:24:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 807, - "nodeType": "ExpressionStatement", - "src": "8961:24:1" + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7462:22:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + } + }, + "id": 630, + "indexExpression": { + "argumentTypes": null, + "id": 629, + "name": "commendId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 621, + "src": "7485:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7462:33:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 625, + "id": 631, + "nodeType": "Return", + "src": "7455:40:0" + } + ] + }, + "documentation": null, + "id": 633, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getCommentUpVotes", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 622, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 619, + "name": "postId", + "nodeType": "VariableDeclaration", + "scope": 633, + "src": "7388:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 618, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7388:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 621, + "name": "commendId", + "nodeType": "VariableDeclaration", + "scope": 633, + "src": "7401:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 620, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7401:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7387:29:0" + }, + "payable": false, + "returnParameters": { + "id": 625, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 624, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 633, + "src": "7438:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 623, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7438:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7437:6:0" + }, + "scope": 857, + "src": "7361:142:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 648, + "nodeType": "Block", + "src": "7629:61:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 642, + "name": "commentDownVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 43, + "src": "7647:16:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(uint256 => uint256))" + } }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 813, - "name": "balance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 788, - "src": "9020:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 808, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "9000:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 811, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9000:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 812, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9000:19:1", - "typeDescriptions": { - "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 814, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9000:28:1", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 815, - "nodeType": "ExpressionStatement", - "src": "9000:28:1" + "id": 644, + "indexExpression": { + "argumentTypes": null, + "id": 643, + "name": "postId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 635, + "src": "7664:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 817, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "9059:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 818, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9059:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 819, - "name": "balance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 788, - "src": "9071:7:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 816, - "name": "Withdrawal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 777, - "src": "9048:10:1", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 820, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9048:31:1", + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7647:24:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" + } + }, + "id": 646, + "indexExpression": { + "argumentTypes": null, + "id": 645, + "name": "commendId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 637, + "src": "7672:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7647:35:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 641, + "id": 647, + "nodeType": "Return", + "src": "7640:42:0" + } + ] + }, + "documentation": null, + "id": 649, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getCommentDownVotes", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 638, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 635, + "name": "postId", + "nodeType": "VariableDeclaration", + "scope": 649, + "src": "7573:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 634, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7573:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 637, + "name": "commendId", + "nodeType": "VariableDeclaration", + "scope": 649, + "src": "7586:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 636, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7586:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7572:29:0" + }, + "payable": false, + "returnParameters": { + "id": 641, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 640, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 649, + "src": "7623:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 639, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7623:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7622:6:0" + }, + "scope": 857, + "src": "7544:146:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 668, + "nodeType": "Block", + "src": "7840:69:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 660, + "name": "commentVoters", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 51, + "src": "7858:13:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$_$", + "typeString": "mapping(address => mapping(uint256 => mapping(uint256 => uint256)))" + } + }, + "id": 662, + "indexExpression": { + "argumentTypes": null, + "id": 661, + "name": "commenter", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 655, + "src": "7872:9:0", "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "id": 821, - "nodeType": "EmitStatement", - "src": "9043:36:1" + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7858:24:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_mapping$_t_uint256_$_t_uint256_$_$", + "typeString": "mapping(uint256 => mapping(uint256 => uint256))" + } + }, + "id": 664, + "indexExpression": { + "argumentTypes": null, + "id": 663, + "name": "postId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 651, + "src": "7883:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7858:32:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", + "typeString": "mapping(uint256 => uint256)" } - ] - } + }, + "id": 666, + "indexExpression": { + "argumentTypes": null, + "id": 665, + "name": "commendId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 653, + "src": "7891:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7858:43:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 659, + "id": 667, + "nodeType": "Return", + "src": "7851:50:0" } ] }, "documentation": null, - "id": 864, + "id": 669, "implemented": true, "isConstructor": false, - "isDeclaredConst": false, + "isDeclaredConst": true, "modifiers": [], - "name": "withdraw", + "name": "getCommentVoterData", "nodeType": "FunctionDefinition", "parameters": { - "id": 782, + "id": 656, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 779, - "name": "withdrawall", + "id": 651, + "name": "postId", "nodeType": "VariableDeclaration", - "scope": 864, - "src": "8692:16:1", + "scope": 669, + "src": "7765:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, "typeName": { - "id": 778, - "name": "bool", + "id": 650, + "name": "uint", "nodeType": "ElementaryTypeName", - "src": "8692:4:1", + "src": "7765:4:0", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, "value": null, @@ -24729,11 +20746,11 @@ }, { "constant": false, - "id": 781, - "name": "trxAmmount", + "id": 653, + "name": "commendId", "nodeType": "VariableDeclaration", - "scope": 864, - "src": "8710:15:1", + "scope": 669, + "src": "7778:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -24741,10 +20758,10 @@ "typeString": "uint256" }, "typeName": { - "id": 780, + "id": 652, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "8710:4:1", + "src": "7778:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -24752,145 +20769,163 @@ }, "value": null, "visibility": "internal" + }, + { + "constant": false, + "id": 655, + "name": "commenter", + "nodeType": "VariableDeclaration", + "scope": 669, + "src": "7794:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 654, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7794:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" } ], - "src": "8691:35:1" + "src": "7764:48:0" }, "payable": false, "returnParameters": { - "id": 783, + "id": 659, "nodeType": "ParameterList", - "parameters": [], - "src": "8734:0:1" + "parameters": [ + { + "constant": false, + "id": 658, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 669, + "src": "7834:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 657, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7834:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7833:6:0" }, - "scope": 1070, - "src": "8674:798:1", - "stateMutability": "nonpayable", + "scope": 857, + "src": "7736:173:0", + "stateMutability": "view", "superFunction": null, "visibility": "public" }, { "body": { - "id": 934, + "id": 676, "nodeType": "Block", - "src": "9609:586:1", + "src": "8008:36:0", "statements": [ { "expression": { "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 874, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 872, - "name": "postId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 866, - "src": "9638:6:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 873, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9648:1:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "9638:11:1", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "766f746573206973206e6f7420666f7220612076616c696420706f7374", - "id": 875, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9651:31:1", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ff3dacff5ff4f61cab4f46ef6127fdb7fdc77ddfb8b67e7ad2650377bf778ed8", - "typeString": "literal_string \"votes is not for a valid post\"" - }, - "value": "votes is not for a valid post" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ff3dacff5ff4f61cab4f46ef6127fdb7fdc77ddfb8b67e7ad2650377bf778ed8", - "typeString": "literal_string \"votes is not for a valid post\"" - } - ], - "id": 871, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1088, - 1089 - ], - "referencedDeclaration": 1089, - "src": "9630:7:1", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 876, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9630:53:1", + "id": 674, + "name": "postNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "8026:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 673, + "id": 675, + "nodeType": "Return", + "src": "8019:17:0" + } + ] + }, + "documentation": null, + "id": 677, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getPostCounter", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 670, + "nodeType": "ParameterList", + "parameters": [], + "src": "7978:2:0" + }, + "payable": false, + "returnParameters": { + "id": 673, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 672, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 677, + "src": "8002:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 671, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8002:4:0", "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 877, - "nodeType": "ExpressionStatement", - "src": "9630:53:1" - }, + "value": null, + "visibility": "internal" + } + ], + "src": "8001:6:0" + }, + "scope": 857, + "src": "7955:89:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 733, + "nodeType": "Block", + "src": "8165:432:0", + "statements": [ { "expression": { "argumentTypes": null, @@ -24901,40 +20936,61 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 881, + "id": 686, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 879, - "name": "postId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 866, - "src": "9702:6:1", + "expression": { + "argumentTypes": null, + "id": 683, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 872, + "src": "8184:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 684, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8184:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", - "operator": "<", + "operator": ">", "rightExpression": { "argumentTypes": null, - "id": 880, - "name": "postNumber", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 60, - "src": "9711:10:1", + "hexValue": "30", + "id": 685, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8196:1:0", + "subdenomination": null, "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" }, - "src": "9702:19:1", + "src": "8184:13:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -24942,21 +20998,21 @@ }, { "argumentTypes": null, - "hexValue": "766f74657320697320666f722061206e6f6e206578697374656e7420706f7374", - "id": 882, + "hexValue": "6e6f2061747461636865642076616c7565", + "id": 687, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "9723:34:1", + "src": "8199:19:0", "subdenomination": null, "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5c2b6bc9661424e678d353e544becf16e7105065d06cadc50a2e92c037d1b9b", - "typeString": "literal_string \"votes is for a non existent post\"" + "typeIdentifier": "t_stringliteral_fea247e0dfa13d79b1ed7c5055f96c2d0046eebcf2ab0c7588fc5c796c66b665", + "typeString": "literal_string \"no attached value\"" }, - "value": "votes is for a non existent post" + "value": "no attached value" } ], "expression": { @@ -24966,25 +21022,25 @@ "typeString": "bool" }, { - "typeIdentifier": "t_stringliteral_c5c2b6bc9661424e678d353e544becf16e7105065d06cadc50a2e92c037d1b9b", - "typeString": "literal_string \"votes is for a non existent post\"" + "typeIdentifier": "t_stringliteral_fea247e0dfa13d79b1ed7c5055f96c2d0046eebcf2ab0c7588fc5c796c66b665", + "typeString": "literal_string \"no attached value\"" } ], - "id": 878, + "id": 682, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1088, - 1089 + 875, + 876 ], - "referencedDeclaration": 1089, - "src": "9694:7:1", + "referencedDeclaration": 876, + "src": "8176:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 883, + "id": 688, "isConstant": false, "isLValue": false, "isPure": false, @@ -24992,15 +21048,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "9694:64:1", + "src": "8176:43:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 884, + "id": 689, "nodeType": "ExpressionStatement", - "src": "9694:64:1" + "src": "8176:43:0" }, { "expression": { @@ -25012,37 +21068,37 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 888, + "id": 693, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 886, - "name": "donationValue", + "id": 691, + "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 868, - "src": "9787:13:1", + "referencedDeclaration": 679, + "src": "8238:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", - "operator": ">", + "operator": ">=", "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 887, + "id": 692, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "9803:1:1", + "src": "8248:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -25050,7 +21106,7 @@ }, "value": "0" }, - "src": "9787:17:1", + "src": "8238:11:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -25058,21 +21114,21 @@ }, { "argumentTypes": null, - "hexValue": "6e6f2061747461636865642076616c7565", - "id": 889, + "hexValue": "766f746573206973206e6f7420666f7220612076616c696420706f7374", + "id": 694, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "9806:19:1", + "src": "8251:31:0", "subdenomination": null, "typeDescriptions": { - "typeIdentifier": "t_stringliteral_fea247e0dfa13d79b1ed7c5055f96c2d0046eebcf2ab0c7588fc5c796c66b665", - "typeString": "literal_string \"no attached value\"" + "typeIdentifier": "t_stringliteral_ff3dacff5ff4f61cab4f46ef6127fdb7fdc77ddfb8b67e7ad2650377bf778ed8", + "typeString": "literal_string \"votes is not for a valid post\"" }, - "value": "no attached value" + "value": "votes is not for a valid post" } ], "expression": { @@ -25082,25 +21138,25 @@ "typeString": "bool" }, { - "typeIdentifier": "t_stringliteral_fea247e0dfa13d79b1ed7c5055f96c2d0046eebcf2ab0c7588fc5c796c66b665", - "typeString": "literal_string \"no attached value\"" + "typeIdentifier": "t_stringliteral_ff3dacff5ff4f61cab4f46ef6127fdb7fdc77ddfb8b67e7ad2650377bf778ed8", + "typeString": "literal_string \"votes is not for a valid post\"" } ], - "id": 885, + "id": 690, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1088, - 1089 + 875, + 876 ], - "referencedDeclaration": 1089, - "src": "9779:7:1", + "referencedDeclaration": 876, + "src": "8230:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 890, + "id": 695, "isConstant": false, "isLValue": false, "isPure": false, @@ -25108,15 +21164,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "9779:47:1", + "src": "8230:53:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 891, + "id": 696, "nodeType": "ExpressionStatement", - "src": "9779:47:1" + "src": "8230:53:0" }, { "expression": { @@ -25128,87 +21184,62 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 898, + "id": 700, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 893, - "name": "donationValue", + "id": 698, + "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 868, - "src": "9845:13:1", + "referencedDeclaration": 679, + "src": "8302:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", - "operator": "<=", + "operator": "<", "rightExpression": { "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 894, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 112, - "src": "9862:8:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 897, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 895, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "9871:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 896, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9871:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9862:20:1", + "id": 699, + "name": "postNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "8311:10:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "9845:37:1", + "src": "8302:19:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } + }, + { + "argumentTypes": null, + "hexValue": "766f74657320697320666f722061206e6f6e206578697374656e7420706f7374", + "id": 701, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8323:34:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5c2b6bc9661424e678d353e544becf16e7105065d06cadc50a2e92c037d1b9b", + "typeString": "literal_string \"votes is for a non existent post\"" + }, + "value": "votes is for a non existent post" } ], "expression": { @@ -25216,23 +21247,27 @@ { "typeIdentifier": "t_bool", "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c5c2b6bc9661424e678d353e544becf16e7105065d06cadc50a2e92c037d1b9b", + "typeString": "literal_string \"votes is for a non existent post\"" } ], - "id": 892, + "id": 697, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1088, - 1089 + 875, + 876 ], - "referencedDeclaration": 1088, - "src": "9837:7:1", + "referencedDeclaration": 876, + "src": "8294:7:0", "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" } }, - "id": 899, + "id": 702, "isConstant": false, "isLValue": false, "isPure": false, @@ -25240,117 +21275,28 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "9837:46:1", + "src": "8294:64:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 900, - "nodeType": "ExpressionStatement", - "src": "9837:46:1" - }, - { - "expression": { - "argumentTypes": null, - "id": 906, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 901, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 112, - "src": "9914:8:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 904, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 902, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "9923:3:1", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 903, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9923:10:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "9914:20:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "-=", - "rightHandSide": { - "argumentTypes": null, - "id": 905, - "name": "donationValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 868, - "src": "9938:13:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9914:37:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 907, + "id": 703, "nodeType": "ExpressionStatement", - "src": "9914:37:1" + "src": "8294:64:0" }, { "assignments": [ - 909 + 705 ], "declarations": [ { "constant": false, - "id": 909, + "id": 705, "name": "owner", "nodeType": "VariableDeclaration", - "scope": 935, - "src": "9994:13:1", + "scope": 734, + "src": "8379:13:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -25358,10 +21304,10 @@ "typeString": "address" }, "typeName": { - "id": 908, + "id": 704, "name": "address", "nodeType": "ElementaryTypeName", - "src": "9994:7:1", + "src": "8379:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -25371,31 +21317,31 @@ "visibility": "internal" } ], - "id": 913, + "id": 709, "initialValue": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 910, + "id": 706, "name": "postOwners", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 64, - "src": "10010:10:1", + "referencedDeclaration": 7, + "src": "8395:10:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_address_$", "typeString": "mapping(uint256 => address)" } }, - "id": 912, + "id": 708, "indexExpression": { "argumentTypes": null, - "id": 911, + "id": 707, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 866, - "src": "10021:6:1", + "referencedDeclaration": 679, + "src": "8406:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -25406,92 +21352,105 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "10010:18:1", + "src": "8395:18:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "VariableDeclarationStatement", - "src": "9994:34:1" + "src": "8379:34:0" }, - { - "expression": { - "argumentTypes": null, - "id": 918, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { + { + "expression": { + "argumentTypes": null, + "arguments": [ + { "argumentTypes": null, - "id": 914, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 112, - "src": "10039:8:1", + "expression": { + "argumentTypes": null, + "id": 713, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 872, + "src": "8439:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 714, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8439:9:0", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } - }, - "id": 916, - "indexExpression": { + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { "argumentTypes": null, - "id": 915, + "id": 710, "name": "owner", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 909, - "src": "10048:5:1", + "referencedDeclaration": 705, + "src": "8424:5:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, + "id": 712, "isConstant": false, - "isLValue": true, + "isLValue": false, "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "10039:15:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "id": 917, - "name": "donationValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 868, - "src": "10058:13:1", + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8424:14:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" } }, - "src": "10039:32:1", + "id": 715, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8424:25:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" } }, - "id": 919, + "id": 716, "nodeType": "ExpressionStatement", - "src": "10039:32:1" + "src": "8424:25:0" }, { "expression": { "argumentTypes": null, - "id": 924, + "id": 722, "isConstant": false, "isLValue": false, "isPure": false, @@ -25500,26 +21459,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 920, + "id": 717, "name": "postEarnings", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 116, - "src": "10082:12:1", + "referencedDeclaration": 55, + "src": "8492:12:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" } }, - "id": 922, + "id": 719, "indexExpression": { "argumentTypes": null, - "id": 921, + "id": 718, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 866, - "src": "10095:6:1", + "referencedDeclaration": 679, + "src": "8505:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -25530,7 +21489,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "10082:20:1", + "src": "8492:20:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -25540,26 +21499,42 @@ "operator": "+=", "rightHandSide": { "argumentTypes": null, - "id": 923, - "name": "donationValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 868, - "src": "10106:13:1", + "expression": { + "argumentTypes": null, + "id": 720, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 872, + "src": "8516:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 721, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8516:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "10082:37:1", + "src": "8492:33:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 925, + "id": 723, "nodeType": "ExpressionStatement", - "src": "10082:37:1" + "src": "8492:33:0" }, { "eventCall": { @@ -25569,18 +21544,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 927, + "id": 725, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "10148:3:1", + "referencedDeclaration": 872, + "src": "8554:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 928, + "id": 726, "isConstant": false, "isLValue": false, "isPure": false, @@ -25588,7 +21563,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "10148:10:1", + "src": "8554:10:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -25596,12 +21571,28 @@ }, { "argumentTypes": null, - "id": 929, - "name": "donationValue", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 868, - "src": "10160:13:1", + "expression": { + "argumentTypes": null, + "id": 727, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 872, + "src": "8566:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 728, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8566:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -25609,12 +21600,12 @@ }, { "argumentTypes": null, - "id": 930, + "id": 729, "name": "now", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1087, - "src": "10175:3:1", + "referencedDeclaration": 874, + "src": "8577:3:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -25622,12 +21613,12 @@ }, { "argumentTypes": null, - "id": 931, + "id": 730, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 866, - "src": "10180:6:1", + "referencedDeclaration": 679, + "src": "8582:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -25653,18 +21644,18 @@ "typeString": "uint256" } ], - "id": 926, + "id": 724, "name": "DonationMade", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 945, - "src": "10135:12:1", + "referencedDeclaration": 744, + "src": "8541:12:0", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", "typeString": "function (address,uint256,uint256,uint256)" } }, - "id": 932, + "id": 731, "isConstant": false, "isLValue": false, "isPure": false, @@ -25672,20 +21663,20 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "10135:52:1", + "src": "8541:48:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 933, + "id": 732, "nodeType": "EmitStatement", - "src": "10130:57:1" + "src": "8536:53:0" } ] }, "documentation": null, - "id": 935, + "id": 734, "implemented": true, "isConstructor": false, "isDeclaredConst": false, @@ -25693,42 +21684,16 @@ "name": "makeDonation", "nodeType": "FunctionDefinition", "parameters": { - "id": 869, + "id": 680, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 866, + "id": 679, "name": "postId", "nodeType": "VariableDeclaration", - "scope": 935, - "src": "9569:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 865, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "9569:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 868, - "name": "donationValue", - "nodeType": "VariableDeclaration", - "scope": 935, - "src": "9582:18:1", + "scope": 734, + "src": "8137:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -25736,10 +21701,10 @@ "typeString": "uint256" }, "typeName": { - "id": 867, + "id": 678, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "9582:4:1", + "src": "8137:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -25749,39 +21714,39 @@ "visibility": "internal" } ], - "src": "9568:33:1" + "src": "8136:13:0" }, - "payable": false, + "payable": true, "returnParameters": { - "id": 870, + "id": 681, "nodeType": "ParameterList", "parameters": [], - "src": "9609:0:1" + "src": "8165:0:0" }, - "scope": 1070, - "src": "9547:648:1", - "stateMutability": "nonpayable", + "scope": 857, + "src": "8115:482:0", + "stateMutability": "payable", "superFunction": null, "visibility": "public" }, { "anonymous": false, "documentation": null, - "id": 945, + "id": 744, "name": "DonationMade", "nodeType": "EventDefinition", "parameters": { - "id": 944, + "id": 743, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 937, + "id": 736, "indexed": true, "name": "donator", "nodeType": "VariableDeclaration", - "scope": 945, - "src": "10276:23:1", + "scope": 744, + "src": "8678:23:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -25789,10 +21754,10 @@ "typeString": "address" }, "typeName": { - "id": 936, + "id": 735, "name": "address", "nodeType": "ElementaryTypeName", - "src": "10276:7:1", + "src": "8678:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -25803,12 +21768,12 @@ }, { "constant": false, - "id": 939, + "id": 738, "indexed": true, "name": "donationValue", "nodeType": "VariableDeclaration", - "scope": 945, - "src": "10310:26:1", + "scope": 744, + "src": "8712:26:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -25816,10 +21781,10 @@ "typeString": "uint256" }, "typeName": { - "id": 938, + "id": 737, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "10310:4:1", + "src": "8712:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -25830,12 +21795,12 @@ }, { "constant": false, - "id": 941, + "id": 740, "indexed": false, "name": "donationTimestamp", "nodeType": "VariableDeclaration", - "scope": 945, - "src": "10347:22:1", + "scope": 744, + "src": "8749:22:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -25843,10 +21808,10 @@ "typeString": "uint256" }, "typeName": { - "id": 940, + "id": 739, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "10347:4:1", + "src": "8749:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -25857,12 +21822,12 @@ }, { "constant": false, - "id": 943, + "id": 742, "indexed": false, "name": "postid", "nodeType": "VariableDeclaration", - "scope": 945, - "src": "10380:11:1", + "scope": 744, + "src": "8782:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -25870,10 +21835,10 @@ "typeString": "uint256" }, "typeName": { - "id": 942, + "id": 741, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "10380:4:1", + "src": "8782:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -25883,41 +21848,41 @@ "visibility": "internal" } ], - "src": "10265:133:1" + "src": "8667:133:0" }, - "src": "10246:153:1" + "src": "8648:153:0" }, { "body": { - "id": 956, + "id": 755, "nodeType": "Block", - "src": "10503:46:1", + "src": "8905:46:0", "statements": [ { "expression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 952, + "id": 751, "name": "postEarnings", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 116, - "src": "10521:12:1", + "referencedDeclaration": 55, + "src": "8923:12:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_uint256_$", "typeString": "mapping(uint256 => uint256)" } }, - "id": 954, + "id": 753, "indexExpression": { "argumentTypes": null, - "id": 953, + "id": 752, "name": "postId", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 947, - "src": "10534:6:1", + "referencedDeclaration": 746, + "src": "8936:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -25928,21 +21893,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "10521:20:1", + "src": "8923:20:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 951, - "id": 955, + "functionReturnParameters": 750, + "id": 754, "nodeType": "Return", - "src": "10514:27:1" + "src": "8916:27:0" } ] }, "documentation": null, - "id": 957, + "id": 756, "implemented": true, "isConstructor": false, "isDeclaredConst": true, @@ -25950,50 +21915,16 @@ "name": "getPostDonations", "nodeType": "FunctionDefinition", "parameters": { - "id": 948, + "id": 747, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 947, + "id": 746, "name": "postId", "nodeType": "VariableDeclaration", - "scope": 957, - "src": "10463:11:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 946, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "10463:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10462:13:1" - }, - "payable": false, - "returnParameters": { - "id": 951, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 950, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 957, - "src": "10497:4:1", + "scope": 756, + "src": "8865:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -26001,134 +21932,33 @@ "typeString": "uint256" }, "typeName": { - "id": 949, + "id": 745, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "10497:4:1", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10496:6:1" - }, - "scope": 1070, - "src": "10437:112:1", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 968, - "nodeType": "Block", - "src": "10646:40:1", - "statements": [ - { - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 964, - "name": "balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 112, - "src": "10664:8:1", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 966, - "indexExpression": { - "argumentTypes": null, - "id": 965, - "name": "user", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 959, - "src": "10673:4:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10664:14:1", + "src": "8865:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "functionReturnParameters": 963, - "id": 967, - "nodeType": "Return", - "src": "10657:21:1" - } - ] - }, - "documentation": null, - "id": 969, - "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, - "modifiers": [], - "name": "getBalance", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 960, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 959, - "name": "user", - "nodeType": "VariableDeclaration", - "scope": 969, - "src": "10605:12:1", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 958, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10605:7:1", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, "value": null, "visibility": "internal" } ], - "src": "10604:14:1" + "src": "8864:13:0" }, "payable": false, "returnParameters": { - "id": 963, + "id": 750, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 962, + "id": 749, "name": "", "nodeType": "VariableDeclaration", - "scope": 969, - "src": "10640:4:1", + "scope": 756, + "src": "8899:4:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -26136,10 +21966,10 @@ "typeString": "uint256" }, "typeName": { - "id": 961, + "id": 748, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "10640:4:1", + "src": "8899:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -26149,10 +21979,10 @@ "visibility": "internal" } ], - "src": "10639:6:1" + "src": "8898:6:0" }, - "scope": 1070, - "src": "10585:101:1", + "scope": 857, + "src": "8839:112:0", "stateMutability": "view", "superFunction": null, "visibility": "public" @@ -26160,21 +21990,21 @@ { "anonymous": false, "documentation": null, - "id": 975, + "id": 762, "name": "UsernameCreated", "nodeType": "EventDefinition", "parameters": { - "id": 974, + "id": 761, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 971, + "id": 758, "indexed": true, "name": "user", "nodeType": "VariableDeclaration", - "scope": 975, - "src": "10842:20:1", + "scope": 762, + "src": "9107:20:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -26182,10 +22012,10 @@ "typeString": "address" }, "typeName": { - "id": 970, + "id": 757, "name": "address", "nodeType": "ElementaryTypeName", - "src": "10842:7:1", + "src": "9107:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -26196,12 +22026,12 @@ }, { "constant": false, - "id": 973, + "id": 760, "indexed": true, "name": "username", "nodeType": "VariableDeclaration", - "scope": 975, - "src": "10873:24:1", + "scope": 762, + "src": "9138:24:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -26209,10 +22039,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 972, + "id": 759, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "10873:7:1", + "src": "9138:7:0", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -26222,15 +22052,15 @@ "visibility": "internal" } ], - "src": "10831:73:1" + "src": "9096:73:0" }, - "src": "10809:96:1" + "src": "9074:96:0" }, { "body": { - "id": 1047, + "id": 834, "nodeType": "Block", - "src": "11109:897:1", + "src": "9374:897:0", "statements": [ { "expression": { @@ -26242,7 +22072,7 @@ "typeIdentifier": "t_bool", "typeString": "bool" }, - "id": 985, + "id": 772, "isConstant": false, "isLValue": false, "isPure": false, @@ -26251,26 +22081,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 981, + "id": 768, "name": "usernamesTaken", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 120, - "src": "11139:14:1", + "referencedDeclaration": 59, + "src": "9404:14:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", "typeString": "mapping(bytes32 => bool)" } }, - "id": 983, + "id": 770, "indexExpression": { "argumentTypes": null, - "id": 982, + "id": 769, "name": "username", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 977, - "src": "11154:8:1", + "referencedDeclaration": 764, + "src": "9419:8:0", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -26281,7 +22111,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "11139:24:1", + "src": "9404:24:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -26292,14 +22122,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "66616c7365", - "id": 984, + "id": 771, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "11167:5:1", + "src": "9432:5:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -26307,7 +22137,7 @@ }, "value": "false" }, - "src": "11139:33:1", + "src": "9404:33:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -26316,14 +22146,14 @@ { "argumentTypes": null, "hexValue": "757365726e616d65206973207265676973746572656420746f20616e206f776e657220616c7265616479", - "id": 986, + "id": 773, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "11174:44:1", + "src": "9439:44:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_fbf43060efdf793cb629c84c6e9dae246e51698989dd65981609d20142614fe1", @@ -26343,21 +22173,21 @@ "typeString": "literal_string \"username is registered to an owner already\"" } ], - "id": 980, + "id": 767, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1088, - 1089 + 875, + 876 ], - "referencedDeclaration": 1089, - "src": "11130:7:1", + "referencedDeclaration": 876, + "src": "9395:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 987, + "id": 774, "isConstant": false, "isLValue": false, "isPure": false, @@ -26365,28 +22195,28 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "11130:89:1", + "src": "9395:89:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 988, + "id": 775, "nodeType": "ExpressionStatement", - "src": "11130:89:1" + "src": "9395:89:0" }, { "assignments": [ - 990 + 777 ], "declarations": [ { "constant": false, - "id": 990, + "id": 777, "name": "currentUsername", "nodeType": "VariableDeclaration", - "scope": 1048, - "src": "11240:23:1", + "scope": 835, + "src": "9505:23:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -26394,10 +22224,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 989, + "id": 776, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "11240:7:1", + "src": "9505:7:0", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -26407,39 +22237,39 @@ "visibility": "internal" } ], - "id": 995, + "id": 782, "initialValue": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 991, + "id": 778, "name": "usernames", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 124, - "src": "11266:9:1", + "referencedDeclaration": 63, + "src": "9531:9:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_bytes32_$", "typeString": "mapping(address => bytes32)" } }, - "id": 994, + "id": 781, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 992, + "id": 779, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "11276:3:1", + "referencedDeclaration": 872, + "src": "9541:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 993, + "id": 780, "isConstant": false, "isLValue": false, "isPure": false, @@ -26447,7 +22277,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "11276:10:1", + "src": "9541:10:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -26458,14 +22288,14 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "11266:21:1", + "src": "9531:21:0", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "nodeType": "VariableDeclarationStatement", - "src": "11240:47:1" + "src": "9505:47:0" }, { "expression": { @@ -26477,19 +22307,19 @@ "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, - "id": 999, + "id": 786, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 997, + "id": 784, "name": "currentUsername", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 990, - "src": "11306:15:1", + "referencedDeclaration": 777, + "src": "9571:15:0", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -26499,18 +22329,18 @@ "operator": "!=", "rightExpression": { "argumentTypes": null, - "id": 998, + "id": 785, "name": "username", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 977, - "src": "11325:8:1", + "referencedDeclaration": 764, + "src": "9590:8:0", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "src": "11306:27:1", + "src": "9571:27:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -26519,14 +22349,14 @@ { "argumentTypes": null, "hexValue": "5468697320757365726e616d6520697320616c72656164792073657420746f207468652073656e646572", - "id": 1000, + "id": 787, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "11335:44:1", + "src": "9600:44:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_858348defba9cefd4bdc844c763b23f8e29a869d7cafac8088106bc53b8bd203", @@ -26546,21 +22376,21 @@ "typeString": "literal_string \"This username is already set to the sender\"" } ], - "id": 996, + "id": 783, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1088, - 1089 + 875, + 876 ], - "referencedDeclaration": 1089, - "src": "11298:7:1", + "referencedDeclaration": 876, + "src": "9563:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 1001, + "id": 788, "isConstant": false, "isLValue": false, "isPure": false, @@ -26568,15 +22398,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "11298:82:1", + "src": "9563:82:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1002, + "id": 789, "nodeType": "ExpressionStatement", - "src": "11298:82:1" + "src": "9563:82:0" }, { "condition": { @@ -26585,19 +22415,19 @@ "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, - "id": 1005, + "id": 792, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 1003, + "id": 790, "name": "currentUsername", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 990, - "src": "11464:15:1", + "referencedDeclaration": 777, + "src": "9729:15:0", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -26608,14 +22438,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "307830", - "id": 1004, + "id": 791, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "11483:3:1", + "src": "9748:3:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -26623,21 +22453,21 @@ }, "value": "0x0" }, - "src": "11464:22:1", + "src": "9729:22:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": { - "id": 1039, + "id": 826, "nodeType": "Block", - "src": "11596:262:1", + "src": "9861:262:0", "statements": [ { "expression": { "argumentTypes": null, - "id": 1025, + "id": 812, "isConstant": false, "isLValue": false, "isPure": false, @@ -26646,34 +22476,34 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 1020, + "id": 807, "name": "usernames", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 124, - "src": "11714:9:1", + "referencedDeclaration": 63, + "src": "9979:9:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_bytes32_$", "typeString": "mapping(address => bytes32)" } }, - "id": 1023, + "id": 810, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 1021, + "id": 808, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "11724:3:1", + "referencedDeclaration": 872, + "src": "9989:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 1022, + "id": 809, "isConstant": false, "isLValue": false, "isPure": false, @@ -26681,7 +22511,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "11724:10:1", + "src": "9989:10:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -26692,7 +22522,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "11714:21:1", + "src": "9979:21:0", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -26702,31 +22532,31 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 1024, + "id": 811, "name": "username", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 977, - "src": "11738:8:1", + "referencedDeclaration": 764, + "src": "10003:8:0", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "src": "11714:32:1", + "src": "9979:32:0", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "id": 1026, + "id": 813, "nodeType": "ExpressionStatement", - "src": "11714:32:1" + "src": "9979:32:0" }, { "expression": { "argumentTypes": null, - "id": 1031, + "id": 818, "isConstant": false, "isLValue": false, "isPure": false, @@ -26735,26 +22565,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 1027, + "id": 814, "name": "usernamesTaken", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 120, - "src": "11761:14:1", + "referencedDeclaration": 59, + "src": "10026:14:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", "typeString": "mapping(bytes32 => bool)" } }, - "id": 1029, + "id": 816, "indexExpression": { "argumentTypes": null, - "id": 1028, + "id": 815, "name": "username", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 977, - "src": "11776:8:1", + "referencedDeclaration": 764, + "src": "10041:8:0", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -26765,7 +22595,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "11761:24:1", + "src": "10026:24:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -26776,14 +22606,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "74727565", - "id": 1030, + "id": 817, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "11788:4:1", + "src": "10053:4:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -26791,20 +22621,20 @@ }, "value": "true" }, - "src": "11761:31:1", + "src": "10026:31:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 1032, + "id": 819, "nodeType": "ExpressionStatement", - "src": "11761:31:1" + "src": "10026:31:0" }, { "expression": { "argumentTypes": null, - "id": 1037, + "id": 824, "isConstant": false, "isLValue": false, "isPure": false, @@ -26813,26 +22643,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 1033, + "id": 820, "name": "usernamesTaken", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 120, - "src": "11807:14:1", + "referencedDeclaration": 59, + "src": "10072:14:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", "typeString": "mapping(bytes32 => bool)" } }, - "id": 1035, + "id": 822, "indexExpression": { "argumentTypes": null, - "id": 1034, + "id": 821, "name": "currentUsername", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 990, - "src": "11822:15:1", + "referencedDeclaration": 777, + "src": "10087:15:0", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -26843,7 +22673,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "11807:31:1", + "src": "10072:31:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -26854,14 +22684,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "66616c7365", - "id": 1036, + "id": 823, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "11841:5:1", + "src": "10106:5:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -26869,30 +22699,30 @@ }, "value": "false" }, - "src": "11807:39:1", + "src": "10072:39:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 1038, + "id": 825, "nodeType": "ExpressionStatement", - "src": "11807:39:1" + "src": "10072:39:0" } ] }, - "id": 1040, + "id": 827, "nodeType": "IfStatement", - "src": "11461:397:1", + "src": "9726:397:0", "trueBody": { - "id": 1019, + "id": 806, "nodeType": "Block", - "src": "11487:105:1", + "src": "9752:105:0", "statements": [ { "expression": { "argumentTypes": null, - "id": 1011, + "id": 798, "isConstant": false, "isLValue": false, "isPure": false, @@ -26901,34 +22731,34 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 1006, + "id": 793, "name": "usernames", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 124, - "src": "11502:9:1", + "referencedDeclaration": 63, + "src": "9767:9:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_bytes32_$", "typeString": "mapping(address => bytes32)" } }, - "id": 1009, + "id": 796, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 1007, + "id": 794, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "11512:3:1", + "referencedDeclaration": 872, + "src": "9777:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 1008, + "id": 795, "isConstant": false, "isLValue": false, "isPure": false, @@ -26936,7 +22766,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "11512:10:1", + "src": "9777:10:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -26947,7 +22777,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "11502:21:1", + "src": "9767:21:0", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -26957,31 +22787,31 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 1010, + "id": 797, "name": "username", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 977, - "src": "11526:8:1", + "referencedDeclaration": 764, + "src": "9791:8:0", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "src": "11502:32:1", + "src": "9767:32:0", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "id": 1012, + "id": 799, "nodeType": "ExpressionStatement", - "src": "11502:32:1" + "src": "9767:32:0" }, { "expression": { "argumentTypes": null, - "id": 1017, + "id": 804, "isConstant": false, "isLValue": false, "isPure": false, @@ -26990,26 +22820,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 1013, + "id": 800, "name": "usernamesTaken", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 120, - "src": "11549:14:1", + "referencedDeclaration": 59, + "src": "9814:14:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", "typeString": "mapping(bytes32 => bool)" } }, - "id": 1015, + "id": 802, "indexExpression": { "argumentTypes": null, - "id": 1014, + "id": 801, "name": "username", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 977, - "src": "11564:8:1", + "referencedDeclaration": 764, + "src": "9829:8:0", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -27020,7 +22850,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "11549:24:1", + "src": "9814:24:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -27031,14 +22861,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "74727565", - "id": 1016, + "id": 803, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "11576:4:1", + "src": "9841:4:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -27046,15 +22876,15 @@ }, "value": "true" }, - "src": "11549:31:1", + "src": "9814:31:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 1018, + "id": 805, "nodeType": "ExpressionStatement", - "src": "11549:31:1" + "src": "9814:31:0" } ] } @@ -27067,18 +22897,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 1042, + "id": 829, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "11967:3:1", + "referencedDeclaration": 872, + "src": "10232:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 1043, + "id": 830, "isConstant": false, "isLValue": false, "isPure": false, @@ -27086,7 +22916,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "11967:10:1", + "src": "10232:10:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -27094,12 +22924,12 @@ }, { "argumentTypes": null, - "id": 1044, + "id": 831, "name": "username", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 977, - "src": "11979:8:1", + "referencedDeclaration": 764, + "src": "10244:8:0", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -27117,18 +22947,18 @@ "typeString": "bytes32" } ], - "id": 1041, + "id": 828, "name": "UsernameCreated", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 975, - "src": "11951:15:1", + "referencedDeclaration": 762, + "src": "10216:15:0", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bytes32_$returns$__$", "typeString": "function (address,bytes32)" } }, - "id": 1045, + "id": 832, "isConstant": false, "isLValue": false, "isPure": false, @@ -27136,20 +22966,20 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "11951:37:1", + "src": "10216:37:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 1046, + "id": 833, "nodeType": "EmitStatement", - "src": "11946:42:1" + "src": "10211:42:0" } ] }, "documentation": null, - "id": 1048, + "id": 835, "implemented": true, "isConstructor": false, "isDeclaredConst": false, @@ -27157,16 +22987,16 @@ "name": "SetUsername", "nodeType": "FunctionDefinition", "parameters": { - "id": 978, + "id": 765, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 977, + "id": 764, "name": "username", "nodeType": "VariableDeclaration", - "scope": 1048, - "src": "11084:16:1", + "scope": 835, + "src": "9349:16:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -27174,10 +23004,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 976, + "id": 763, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "11084:7:1", + "src": "9349:7:0", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -27187,52 +23017,52 @@ "visibility": "internal" } ], - "src": "11083:18:1" + "src": "9348:18:0" }, "payable": false, "returnParameters": { - "id": 979, + "id": 766, "nodeType": "ParameterList", "parameters": [], - "src": "11109:0:1" + "src": "9374:0:0" }, - "scope": 1070, - "src": "11063:943:1", + "scope": 857, + "src": "9328:943:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { - "id": 1059, + "id": 846, "nodeType": "Block", - "src": "12134:41:1", + "src": "10399:41:0", "statements": [ { "expression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 1055, + "id": 842, "name": "usernames", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 124, - "src": "12152:9:1", + "referencedDeclaration": 63, + "src": "10417:9:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_bytes32_$", "typeString": "mapping(address => bytes32)" } }, - "id": 1057, + "id": 844, "indexExpression": { "argumentTypes": null, - "id": 1056, + "id": 843, "name": "user", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1050, - "src": "12162:4:1", + "referencedDeclaration": 837, + "src": "10427:4:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -27243,21 +23073,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "12152:15:1", + "src": "10417:15:0", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, - "functionReturnParameters": 1054, - "id": 1058, + "functionReturnParameters": 841, + "id": 845, "nodeType": "Return", - "src": "12145:22:1" + "src": "10410:22:0" } ] }, "documentation": null, - "id": 1060, + "id": 847, "implemented": true, "isConstructor": false, "isDeclaredConst": true, @@ -27265,16 +23095,16 @@ "name": "getUsername", "nodeType": "FunctionDefinition", "parameters": { - "id": 1051, + "id": 838, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1050, + "id": 837, "name": "user", "nodeType": "VariableDeclaration", - "scope": 1060, - "src": "12090:12:1", + "scope": 847, + "src": "10355:12:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -27282,10 +23112,10 @@ "typeString": "address" }, "typeName": { - "id": 1049, + "id": 836, "name": "address", "nodeType": "ElementaryTypeName", - "src": "12090:7:1", + "src": "10355:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -27295,20 +23125,20 @@ "visibility": "internal" } ], - "src": "12089:14:1" + "src": "10354:14:0" }, "payable": false, "returnParameters": { - "id": 1054, + "id": 841, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1053, + "id": 840, "name": "", "nodeType": "VariableDeclaration", - "scope": 1060, - "src": "12125:7:1", + "scope": 847, + "src": "10390:7:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -27316,10 +23146,10 @@ "typeString": "bytes32" }, "typeName": { - "id": 1052, + "id": 839, "name": "bytes32", "nodeType": "ElementaryTypeName", - "src": "12125:7:1", + "src": "10390:7:0", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" @@ -27329,37 +23159,37 @@ "visibility": "internal" } ], - "src": "12124:9:1" + "src": "10389:9:0" }, - "scope": 1070, - "src": "12069:106:1", + "scope": 857, + "src": "10334:106:0", "stateMutability": "view", "superFunction": null, "visibility": "public" }, { "body": { - "id": 1068, + "id": 855, "nodeType": "Block", - "src": "12285:36:1", + "src": "10550:36:0", "statements": [ { "expression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 1065, + "id": 852, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1085, - "src": "12303:3:1", + "referencedDeclaration": 872, + "src": "10568:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 1066, + "id": 853, "isConstant": false, "isLValue": false, "isPure": false, @@ -27367,21 +23197,21 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "12303:10:1", + "src": "10568:10:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "functionReturnParameters": 1064, - "id": 1067, + "functionReturnParameters": 851, + "id": 854, "nodeType": "Return", - "src": "12296:17:1" + "src": "10561:17:0" } ] }, "documentation": null, - "id": 1069, + "id": 856, "implemented": true, "isConstructor": false, "isDeclaredConst": true, @@ -27389,23 +23219,23 @@ "name": "getSenderAddress", "nodeType": "FunctionDefinition", "parameters": { - "id": 1061, + "id": 848, "nodeType": "ParameterList", "parameters": [], - "src": "12252:2:1" + "src": "10517:2:0" }, "payable": false, "returnParameters": { - "id": 1064, + "id": 851, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 1063, + "id": 850, "name": "", "nodeType": "VariableDeclaration", - "scope": 1069, - "src": "12276:7:1", + "scope": 856, + "src": "10541:7:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -27413,10 +23243,10 @@ "typeString": "address" }, "typeName": { - "id": 1062, + "id": 849, "name": "address", "nodeType": "ElementaryTypeName", - "src": "12276:7:1", + "src": "10541:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -27426,20 +23256,20 @@ "visibility": "internal" } ], - "src": "12275:9:1" + "src": "10540:9:0" }, - "scope": 1070, - "src": "12227:94:1", + "scope": 857, + "src": "10492:94:0", "stateMutability": "view", "superFunction": null, "visibility": "public" } ], - "scope": 1071, - "src": "434:11890:1" + "scope": 858, + "src": "434:10155:0" } ], - "src": "0:12326:1" + "src": "0:10591:0" }, "compiler": { "name": "solc", @@ -27453,5 +23283,5 @@ } }, "schemaVersion": "2.0.1", - "updatedAt": "2019-01-20T16:30:40.311Z" + "updatedAt": "2019-01-23T07:35:13.460Z" } \ No newline at end of file diff --git a/Solidity/contracts/NoFilter.sol b/Solidity/contracts/NoFilter.sol index d40dfa6..b1b42e7 100644 --- a/Solidity/contracts/NoFilter.sol +++ b/Solidity/contracts/NoFilter.sol @@ -25,7 +25,6 @@ contract NoFilter { mapping (address => mapping(uint => mapping(uint => uint))) commentVoters; //keeps track of a users voting history, helps to prevent vote spamming from a single account //Donation System - mapping (address => uint) balances; mapping (uint => uint) postEarnings; //mapping (uint => mapping(uint => uint)) commentEarnings; @@ -204,68 +203,21 @@ contract NoFilter { function getPostCounter() public view returns (uint) { return postNumber; } - - //deposit and Withdrawal System - - //Invoked when a donation is made - event Deposited ( - address indexed depositer, - uint value - ); - - //deposit trx into the smart contract - function deposit() public payable { - require(msg.value > 0, "no attached value"); - balances[msg.sender] += msg.value; - emit Deposited(msg.sender, msg.value); - } - - //Invoked when a Withdrawal is made - event Withdrawal ( - address indexed taker, - uint value - ); - - - //Withdraw funds - function withdraw(bool withdrawall, uint trxAmmount) public { - - //either withdraw all the funds for a user - if(withdrawall == true){ - uint balance = balances[msg.sender]; - require(balance > 0, "Sender does not have funds"); - balances[msg.sender] = 0; - msg.sender.transfer(balance); - emit Withdrawal(msg.sender, balance); - } - else{ //or take out a specific amount of tron - require(trxAmmount > 0, "Incorrect withdraw value"); - require(balances[msg.sender] >= trxAmmount, "attempting to withdraw too much"); - balances[msg.sender] -= trxAmmount; - msg.sender.transfer(trxAmmount); - emit Withdrawal(msg.sender, trxAmmount); - } - } - + //Donation System //make a donation to a post - function makeDonation(uint postId, uint donationValue) public { - + function makeDonation(uint postId) public payable { + require(msg.value > 0, "no attached value"); require(postId >= 0, "votes is not for a valid post"); require(postId < postNumber, "votes is for a non existent post"); - require(donationValue > 0, "no attached value"); - require(donationValue <= balances[msg.sender]); - - - balances[msg.sender] -= donationValue; + address owner = postOwners[postId]; + owner.transfer(msg.value); //post owner - address owner = postOwners[postId]; - balances[owner] += donationValue; - postEarnings[postId] += donationValue; - emit DonationMade(msg.sender, donationValue, now, postId); + postEarnings[postId] += msg.value; + emit DonationMade(msg.sender, msg.value, now, postId); } //Invoked when a donation is made @@ -281,11 +233,6 @@ contract NoFilter { return postEarnings[postId]; } - //get user balance - function getBalance(address user) public view returns (uint) { - return balances[user]; - } - // Username System //Invoked when the post has been created, so that the dApp can access the content event UsernameCreated (