From c4bab456dfd7749b02e424239ba63fe144f4c538 Mon Sep 17 00:00:00 2001 From: AbdulRafaySiddiqui Date: Fri, 14 Aug 2020 01:02:05 +0500 Subject: [PATCH] updated transaction, recipient list & mydonations --- package-lock.json | 34 + package.json | 3 +- src/components/Campaign/Campaign.js | 11 +- src/components/Campaign/Campaign.module.css | 2 +- .../CampaignDetails/CampaignDetails.js | 3 +- .../CreateFundRequest/CreateFundRequest.js | 315 +- src/components/Donation/Donation.js | 45 + src/components/DonationList/DonationList.js | 28 + src/components/FundRequest/FundRequest.js | 101 +- .../FundRequestsList/FundRequestsList.js | 11 +- src/components/RecipientList/RecipientList.js | 38 + src/components/Transaction/Transaction.js | 53 - .../TransactionList/TransactionList.js | 44 +- .../CampaignExplorer/CampaignExplorer.js | 9 +- src/containers/MyDonations/MyDonations.js | 136 +- src/contract/CAMPAIGN_FACTORY_ADDRESS.js | 2 +- src/contract/Campaign.json | 18678 +++++++++------- src/services/ethereum/ethService.js | 20 +- src/services/firebase/databaseService.js | 5 + 19 files changed, 10875 insertions(+), 8663 deletions(-) create mode 100644 src/components/Donation/Donation.js create mode 100644 src/components/DonationList/DonationList.js create mode 100644 src/components/RecipientList/RecipientList.js delete mode 100644 src/components/Transaction/Transaction.js diff --git a/package-lock.json b/package-lock.json index 24f2b8b..bb43da0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6756,6 +6756,11 @@ } } }, + "fn-name": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/fn-name/-/fn-name-3.0.0.tgz", + "integrity": "sha512-eNMNr5exLoavuAMhIUVsOKF79SWd/zG104ef6sxBTSw+cZc6BXdQXDvYcGvp0VbxVVSp1XDUNoz7mg1xMtSznA==" + }, "follow-redirects": { "version": "1.12.1", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.12.1.tgz", @@ -11522,6 +11527,11 @@ "warning": "^4.0.0" } }, + "property-expr": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/property-expr/-/property-expr-2.0.2.tgz", + "integrity": "sha512-bc/5ggaYZxNkFKj374aLbEDqVADdYaLcFo8XBkishUWbaAdjlphaBFns9TvRA2pUseVL/wMFmui9X3IdNDU37g==" + }, "protobufjs": { "version": "6.10.1", "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.10.1.tgz", @@ -13798,6 +13808,11 @@ "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==" }, + "synchronous-promise": { + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/synchronous-promise/-/synchronous-promise-2.0.13.tgz", + "integrity": "sha512-R9N6uDkVsghHePKh1TEqbnLddO2IY25OcsksyFp/qBe7XYd0PVbKEWxhcdMhpLzE1I6skj5l4aEZ3CRxcbArlA==" + }, "table": { "version": "5.4.6", "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", @@ -14145,6 +14160,11 @@ "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" }, + "toposort": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/toposort/-/toposort-2.0.2.tgz", + "integrity": "sha1-riF2gXXRVZ1IvvNUILL0li8JwzA=" + }, "tough-cookie": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", @@ -16037,6 +16057,20 @@ "camelcase": "^5.0.0", "decamelize": "^1.2.0" } + }, + "yup": { + "version": "0.29.3", + "resolved": "https://registry.npmjs.org/yup/-/yup-0.29.3.tgz", + "integrity": "sha512-RNUGiZ/sQ37CkhzKFoedkeMfJM0vNQyaz+wRZJzxdKE7VfDeVKH8bb4rr7XhRLbHJz5hSjoDNwMEIaKhuMZ8gQ==", + "requires": { + "@babel/runtime": "^7.10.5", + "fn-name": "~3.0.0", + "lodash": "^4.17.15", + "lodash-es": "^4.17.11", + "property-expr": "^2.0.2", + "synchronous-promise": "^2.0.13", + "toposort": "^2.0.2" + } } } } diff --git a/package.json b/package.json index c834d51..4f6ba7c 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,8 @@ "react-router-dom": "^5.2.0", "react-scripts": "3.4.1", "uuid": "^8.2.0", - "web3": "^1.2.9" + "web3": "^1.2.9", + "yup": "^0.29.3" }, "scripts": { "start": "react-scripts start", diff --git a/src/components/Campaign/Campaign.js b/src/components/Campaign/Campaign.js index 2eb325a..b76c09b 100644 --- a/src/components/Campaign/Campaign.js +++ b/src/components/Campaign/Campaign.js @@ -2,15 +2,22 @@ import React from 'react'; import classes from './Campaign.module.css' import { useHistory } from 'react-router-dom'; import { FaCalendarAlt } from 'react-icons/fa'; -import { IconContext } from "react-icons" +import { IconContext } from "react-icons"; +import { Badge } from 'react-bootstrap'; export const Campaign = ({ campaign }) => { const history = useHistory(); return (
history.push(`/campaign${campaign.address}`)}> + {/* Title */}

{campaign.title}

+ + {/* Status */} + {campaign.status} + + {/* Description */}

{campaign.description}

- {/*

Manager: {campaign.manager}

*/} +

Created at: {campaign.createdAt.toDateString()}

diff --git a/src/components/Campaign/Campaign.module.css b/src/components/Campaign/Campaign.module.css index 01731b4..24cf4af 100644 --- a/src/components/Campaign/Campaign.module.css +++ b/src/components/Campaign/Campaign.module.css @@ -1,7 +1,7 @@ .Card { cursor: pointer; max-width: 400px; - height: 240px; + height: 260px; margin: 15px; background-color: #fff; border-radius: 10px; diff --git a/src/components/CampaignDetails/CampaignDetails.js b/src/components/CampaignDetails/CampaignDetails.js index 62de4db..ce6a566 100644 --- a/src/components/CampaignDetails/CampaignDetails.js +++ b/src/components/CampaignDetails/CampaignDetails.js @@ -91,7 +91,8 @@ export const CampaignDetails = ({ campaign, style, loadCampaignDetails }) => { {/* Status */} - Status: {campaign.status} + Status: + {campaign.status} diff --git a/src/components/CreateFundRequest/CreateFundRequest.js b/src/components/CreateFundRequest/CreateFundRequest.js index 55ade3f..90b7ff1 100644 --- a/src/components/CreateFundRequest/CreateFundRequest.js +++ b/src/components/CreateFundRequest/CreateFundRequest.js @@ -1,187 +1,160 @@ import React, { useState } from 'react' -import { Formik, Field } from 'formik'; +import { Formik, Field, FieldArray } from 'formik'; import { Container, Form, Col, Row, InputGroup, Alert, Button } from 'react-bootstrap'; import { LoadingButton } from '../LoadingButton/LoadingButton'; import { v4 as guid } from 'uuid'; import { FaTimes } from 'react-icons/fa'; - -export const CreateFundRequest = ({ createRequest, loadCampaignDetails }) => { - const [request, setRequest] = useState({ - description: '', - amount: 0, - recipients: [] - }); - - const addRecipient = () => { - setRequest(prevData => { - return { - ...prevData, - recipients: [ - ...prevData.recipients, - { key: guid(), address: '', amount: '' } - ] - } - }); +import * as yup from 'yup'; + +export const CreateFundRequest = ({ createRequest, loadCampaignDetails, campaign }) => { + //helper method + const numOr0 = n => isNaN(+n) ? 0 : +n; + + const getTotalAmount = (recipients, value, index) => { + let sum = 0; + if (recipients) { + recipients.forEach((value, i) => { + if (i != index) + sum += parseInt(numOr0(value.amount)); + }); + } + return sum + parseInt(numOr0(value)); } - const deleteRecipient = (key) => { - setRequest(prevData => { - return { - ...prevData, - recipients: [ - ...prevData.recipients.filter(i => i.key !== key), - ] - } - }); - } + const schema = yup.object({ + description: yup.string().required('Description is required'), + amount: yup.number().required('Amount is required') + .max(campaign.amountCollected - campaign.amountDelegated - campaign.amountSpended, "You don't have enough funds in campaign."), + recipients: yup.array().of( + yup.object({ + address: yup.string().required('Address is required').matches('^0x[a-fA-F0-9]{40}$', 'Invalid address'), + amount: yup.number().required('amount cannot be empty') + }) + ) + }); return ( - - { - setSubmitting(true); - - const addresses = data.recipients.map(i => i.address); - const amounts = data.recipients.map(i => parseInt(i.amount)); - console.log('Data', data); - console.log(addresses, amounts); - await createRequest(data.description, data.amount, addresses, amounts); - - setSubmitting(false); - - loadCampaignDetails(); - }} - - validate={values => { - const errors = {}; - - // // Vaidate Title - // if (values.title.length === 0) { - // errors.title = 'Title cannot be empty.'; - // } - - // // Validate Description - // if (values.description.length === 0) { - // errors.description = 'Description cannot be empty.'; - // } - - // // Validate Amount - // if (isNaN(values.amount)) { - // errors.amount = 'Value must be a number.'; - // } else if (values.amount < 1) { - // errors.amount = 'Amount must be greater than zero.'; - // } - - - // // Validate Start Date & End Date - // if (!values.startDate) { - // errors.startDate = 'Date cannot be empty.'; - // } - // if (!values.endDate) { - // errors.endDate = 'Date cannot be empty.'; - // } - - // let start = new Date(values.startDate); - // let end = new Date(values.endDate); - - // //start date should always be lesser than the end date - // if (start.getTime() >= end.getTime()) { - // errors.startDate = 'Start date should be less than end date.'; - // errors.endDate = 'End date should be greater than end date.'; - // } - - return errors; - }} - - > - {({ handleSubmit, errors, touched, isSubmitting }) => ( -
- - {/* Campaign Description */} - - Description - - {errors.description} - - - - {/* Campaign Amount */} - - Total Amount - - - - ETH - - {errors.amount} - - - - - { - request.recipients.map((r, index) => { - return ( - - - {/* Recipient address */} - - - Recipient Address - - - - - - {/* Amount */} - - - Amount Delegated - - - - - - {/* Delete Button */} - - - - - + campaign.status !== 'Goal Reached' ?
Campaign must reach its goal before you can create a fund request.
+ : + { + setSubmitting(true); + + const addresses = data.recipients.map(i => i.address); + const amounts = data.recipients.map(i => parseInt(i.amount)); + await createRequest(data.description, data.amount, addresses, amounts); + + setSubmitting(false); + + resetForm(); + + loadCampaignDetails(); + }} + + > + {({ handleSubmit, handleChange, setFieldValue, errors, isSubmitting, values }) => ( + + + {/* Campaign Description */} + + Description + + {errors.description} + + + + {/* Campaign Amount */} + + Total Amount + + + + ETH + + {errors.amount} + + + + + { + arrayHelpers => ( + + { + values.recipients.map((r, index) => { + return ( + + + {/* Recipient address */} + + + Recipient Address + + {errors.recipients && errors.recipients[index]?.address} + + + + {/* Amount */} + + + Amount Delegated + { + handleChange(e); + setFieldValue('amount', getTotalAmount(values.recipients, e.target.value, index)); + }} + isInvalid={errors.recipients && !!errors.recipients[index]?.amount} /> + {errors.recipients && errors.recipients[index]?.amount} + + + + {/* Delete Button */} + + + + + + ) + }) + } + + + + + + + ) - }) - } + } + + + + + { + isSubmitting && + + Please wait while transaction is in progress... + + } - + + Create + - - - - { - isSubmitting && - - Please wait while transaction is in progress... - - } - - - Create - - - - - - )} -
-
+ + )} + + ); } \ No newline at end of file diff --git a/src/components/Donation/Donation.js b/src/components/Donation/Donation.js new file mode 100644 index 0000000..a630e5f --- /dev/null +++ b/src/components/Donation/Donation.js @@ -0,0 +1,45 @@ +import React, { useState } from 'react'; +import { Badge, Button } from 'react-bootstrap'; +import { FaPlus, FaMinus } from 'react-icons/fa'; +import { TransactionList } from '../TransactionList/TransactionList'; + +export const Donation = ({ donation, onlyTransaction }) => { + const [showDetails, setShowDetails] = useState(!!onlyTransaction); + return ( + + + { + !onlyTransaction && + < tr > + {/* Details */} + < td > + + {/* User */} + + {donation.username} + + + {/* Address */} + + {donation.personAddress} + + + {/* Amount */} + + {donation.amount} + + + + } + { + showDetails && + + + + + + + } + + ); +} \ No newline at end of file diff --git a/src/components/DonationList/DonationList.js b/src/components/DonationList/DonationList.js new file mode 100644 index 0000000..ef88b3e --- /dev/null +++ b/src/components/DonationList/DonationList.js @@ -0,0 +1,28 @@ +import React from "react"; +import { Donation } from "../Donation/Donation"; +import { Table } from "react-bootstrap" + +export const DonationList = ({ donations, style, onlyTransaction }) => { + return ( + + { + !onlyTransaction && + + + + + + + + + } + + {donations + .map( + d => + + )} + +
UsernameAddressAmount
+ ); +} \ No newline at end of file diff --git a/src/components/FundRequest/FundRequest.js b/src/components/FundRequest/FundRequest.js index dd4470f..9879e30 100644 --- a/src/components/FundRequest/FundRequest.js +++ b/src/components/FundRequest/FundRequest.js @@ -3,20 +3,44 @@ import { LoadingButton } from '../LoadingButton/LoadingButton'; import * as ethService from '../../services/ethereum/ethService'; import { showError } from '../../store/actions/alertAction'; import { useStore } from '../../context/GlobalState'; -import { FaPlus, FaMinus, FaChevronCircleRight } from 'react-icons/fa'; +import { FaPlus, FaMinus, FaChevronCircleRight, FaTrashAlt } from 'react-icons/fa'; import { Button, Row, Col, Badge } from 'react-bootstrap'; +import { RecipientList } from '../RecipientList/RecipientList'; -export const FundRequest = ({ data, isManager, address, loadCampaignDetails, donorsCount }) => { +export const FundRequest = ({ data, isManager, loadCampaignDetails, campaign }) => { + console.log(data); const [_, dispatch] = useStore(); const [showDetails, setshowDetails] = useState(false); const [isProcessing, setIsProcessing] = useState(false); const [isApproving, setIsApproving] = useState(false); + const [isClosing, setIsClosing] = useState(false); + + const canProcessRequest = new Date(parseInt(campaign.fundRequestProcessTime) * 1000).getTime() + data.createdAt.getTime() < new Date().getTime(); + const canProcessIn = milisecToDayHourMin(new Date(parseInt(campaign.fundRequestProcessTime) * 1000).getTime() + data.createdAt.getTime() - new Date().getTime()) + ' to process.'; + //helper method + function milisecToDayHourMin(t) { + var cd = 24 * 60 * 60 * 1000, + ch = 60 * 60 * 1000, + d = Math.floor(t / cd), + h = Math.floor((t - d * cd) / ch), + m = Math.round((t - d * cd - h * ch) / 60000), + pad = function (n) { return n < 10 ? '0' + n : n; }; + if (m === 60) { + h++; + m = 0; + } + if (h === 24) { + d++; + h = 0; + } + return `${d} Days : ${pad(h)} Hours : ${pad(m)} Minutes`; + } const processRequest = async (index) => { setIsProcessing(true); try { - await ethService.processFundRequest(address, index); - data = await ethService.getSingleFundRequest(address, data.index); + await ethService.processFundRequest(campaign.address, index); + data = await ethService.getSingleFundRequest(campaign.address, data.index); } catch (e) { dispatch(showError(e.message)); @@ -29,11 +53,11 @@ export const FundRequest = ({ data, isManager, address, loadCampaignDetails, don setIsApproving(true); try { if (approve) { - await ethService.approveFundRequest(address, index); + await ethService.approveFundRequest(campaign.address, index); } else { - await ethService.disapproveFundRequest(address, index); + await ethService.disapproveFundRequest(campaign.address, index); } - data = await ethService.getSingleFundRequest(address, data.index); + data = await ethService.getSingleFundRequest(campaign.address, data.index); } catch (e) { dispatch(showError(e.message)); @@ -41,6 +65,17 @@ export const FundRequest = ({ data, isManager, address, loadCampaignDetails, don setIsApproving(false); } + const closeRequest = async () => { + setIsClosing(true); + try { + await ethService.closeFundRequest(campaign.address, data.index); + } + catch (e) { + dispatch(showError(e.message)); + } + setIsClosing(false); + } + return ( @@ -48,23 +83,33 @@ export const FundRequest = ({ data, isManager, address, loadCampaignDetails, don {data.description} {data.amount} {data.recipientsCount} - {donorsCount - data.disapproversCount} + {campaign.donorsCount - data.disapproversCount} {data.disapproversCount} {data.createdAt.toDateString()} - {data.isCompleted ? 'Completed' : 'In progress'} + {data.isCompleted ? 'Completed' : data.isClosed ? 'Closed' : canProcessIn} { isManager ? - { - processRequest(data.index)}>{data.isCompleted ? "Completed" : "Process Request"} - } : + <> + { + processRequest(data.index)}>{data.isCompleted ? "Completed" : "Process Request"} + } + + + + + : { approveRequest(data.index, data.isDisapprover)} >{data.isDisapprover ? "Approve" : "Disapprove"} } @@ -72,24 +117,10 @@ export const FundRequest = ({ data, isManager, address, loadCampaignDetails, don { showDetails && - data.recipients?.map(r => - - - - - - - {/* Recipients Address */} - Recipient: {r.address} - - - - {/* Amount */} - Amount Delegated: {r.amount} - - - - ) + + + + } ); diff --git a/src/components/FundRequestsList/FundRequestsList.js b/src/components/FundRequestsList/FundRequestsList.js index 711b497..6d7af6f 100644 --- a/src/components/FundRequestsList/FundRequestsList.js +++ b/src/components/FundRequestsList/FundRequestsList.js @@ -3,7 +3,7 @@ import { FundRequest } from '../FundRequest/FundRequest'; import { Table } from 'react-bootstrap'; import { v4 as guid } from 'uuid'; -export const FundRequestsList = ({ requests, isManager, address, loadCampaignDetails, donorsCount }) => { +export const FundRequestsList = ({ requests, isManager, loadCampaignDetails, campaign }) => { return ( @@ -16,18 +16,17 @@ export const FundRequestsList = ({ requests, isManager, address, loadCampaignDet - { - - } + + {requests.map(r => )} + />)}
Disapprovers Created At Status
); } \ No newline at end of file diff --git a/src/components/RecipientList/RecipientList.js b/src/components/RecipientList/RecipientList.js new file mode 100644 index 0000000..22509b0 --- /dev/null +++ b/src/components/RecipientList/RecipientList.js @@ -0,0 +1,38 @@ +import React from 'react'; +import { Table } from 'react-bootstrap'; +import { FaChevronCircleRight } from 'react-icons/fa'; + +export const RecipientList = ({ recipients }) => { + return ( + + + + + + + + + + { + recipients?.map(r => + + + + + + ) + } + + +
Recipient AddressAmount Delegated
+ + + {/* Recipients Address */} + {r.address} + {/* */} + + {/* Amount */} + {r.amount} +
+ ) +} \ No newline at end of file diff --git a/src/components/Transaction/Transaction.js b/src/components/Transaction/Transaction.js deleted file mode 100644 index 6cb4466..0000000 --- a/src/components/Transaction/Transaction.js +++ /dev/null @@ -1,53 +0,0 @@ -import React, { useState } from 'react'; -import { Badge, Button, Row, Col } from 'react-bootstrap'; -import { FaPlus, FaMinus, FaChevronCircleRight } from 'react-icons/fa'; - -export const Transaction = ({ transaction }) => { - const [showDetails, setShowDetails] = useState(false); - return ( - - - - {/* Details */} - - - {/* User */} - - {transaction.username} - - - {/* Address */} - - {transaction.personAddress} - - - {/* Amount */} - - {transaction.amount} - - - - { - showDetails && - transaction.transactions?.map(tx => - - - - - - - {/* Recipients Address */} - Transaction Hash: {tx.txHash} - - - - {/* Amount */} - Amount: {tx.amount} - - - - ) - } - - ); -} \ No newline at end of file diff --git a/src/components/TransactionList/TransactionList.js b/src/components/TransactionList/TransactionList.js index 4c256c8..f1d9820 100644 --- a/src/components/TransactionList/TransactionList.js +++ b/src/components/TransactionList/TransactionList.js @@ -1,25 +1,37 @@ -import React from "react"; -import { Transaction } from "../Transaction/Transaction"; -import { Table } from "react-bootstrap" +import React from 'react'; +import { Table } from 'react-bootstrap'; +import { FaChevronCircleRight } from 'react-icons/fa'; -export const TransactionList = ({ transactions, style }) => { +export const TransactionList = ({ transactions }) => { return ( - +
- + - - - + + - {transactions - .map( - t => - - )} + { + transactions?.map(tx => + + + + + + ) + } +
UsernameAddressAmountTransaction HashAmount
+ + + {/*Transaction Hash */} + {tx.txHash} + + {/* Amount */} + {tx.amount} +
- ); -} \ No newline at end of file + ) +} \ No newline at end of file diff --git a/src/containers/CampaignExplorer/CampaignExplorer.js b/src/containers/CampaignExplorer/CampaignExplorer.js index d6e7b75..a6289ca 100644 --- a/src/containers/CampaignExplorer/CampaignExplorer.js +++ b/src/containers/CampaignExplorer/CampaignExplorer.js @@ -1,7 +1,7 @@ import React, { useState, useEffect } from 'react'; import { CampaignDetails } from '../../components/CampaignDetails/CampaignDetails'; import { FundRequestsList } from '../../components/FundRequestsList/FundRequestsList'; -import { TransactionList } from '../../components/TransactionList/TransactionList'; +import { DonationList } from '../../components/DonationList/DonationList'; import { Container, Spinner, Row, Col, Tabs, Tab, Card } from 'react-bootstrap'; import * as ethService from '../../services/ethereum/ethService'; import * as dbService from '../../services/firebase/databaseService'; @@ -124,7 +124,7 @@ export const CampaignExplorer = props => { loadingDonations ? : donations.length === 0 ?
No Donations found....!
- : + : } @@ -135,9 +135,8 @@ export const CampaignExplorer = props => { : fundRequests.length === 0 ?
No Fund Request found...!
: } @@ -146,7 +145,7 @@ export const CampaignExplorer = props => { { user.address == campaign?.manager && < Tab eventKey='createRequests' title='Create Fund Requests' style={{ marginTop: '10px' }}> - + } diff --git a/src/containers/MyDonations/MyDonations.js b/src/containers/MyDonations/MyDonations.js index 10d55d2..c47897f 100644 --- a/src/containers/MyDonations/MyDonations.js +++ b/src/containers/MyDonations/MyDonations.js @@ -1,99 +1,69 @@ -import React from 'react'; -import { TransactionList } from '../../components/TransactionList/TransactionList' +import React, { useState, useEffect } from 'react'; import { Container, Card, Row, Col } from 'react-bootstrap'; - +import * as dbService from '../../services/firebase/databaseService'; +import * as ethService from '../../services/ethereum/ethService'; +import { showError } from '../../store/actions/alertAction'; +import { useStore } from '../../context/GlobalState'; +import { TransactionList } from '../../components/TransactionList/TransactionList'; export const MyDonations = () => { + const [{ user }, dispatch] = useStore(); + const [donations, setDonations] = useState([]); + const [isLoading, setIsLoading] = useState(false); + + useEffect(() => { + loadDonations(); + }, []) + + const loadDonations = async () => { + setIsLoading(true); + + try { + let d = []; + const data = await dbService.getDonations(); + console.log('donations', data); + for (const i in data) { + if (data.hasOwnProperty(i) && data[i][user.address]) { + + const element = data[i]; + const hashes = Object.keys(element[user.address]); + const amounts = Object.values(element[user.address]); + + const tx = hashes.map((h, i) => { return { txHash: h, amount: amounts[i] } }); + + d.push({ + campaignTitle: (await ethService.getCampaign(i)).title, + transactions: tx, + donations: [{ + transactions: [{ + transactions: tx + }] + }] + }) + } + } + console.log('transactions', d); + setDonations(d); + } + catch (e) { + dispatch(showError(e.message)); + } + setIsLoading(false); + } + return (

Donations

{ - [ - { - campaign: { - id: 1, - title: "Lorem Dolor Sit Amet", - description: "Aliquam erat volutpat. In lacinia velit ut massa porta elementum. Integer ornare, augue ut malesuada viverra, leo nisl pretium metus, vel ullamcorper nunc lorem a nisi. Duis eu sapien quis mauris convallis finibus vel et dui. Proin vel lacinia risus, iaculis mollis erat. Phasellus tincidunt dui elit, sed fringilla est maximus eu. Curabitur ut tempus mauris. Suspendisse potenti.", - createdBy: "DeCare NGO", - startDate: new Date().toDateString(), - endDate: new Date().toDateString(), - status: 'Open', - goalAmount: '20 ETH', - collectedAmount: '15 ETH' - }, - transactions: [ - { - username: 'Mark Brooks', - txHash: '0xASHFECKFOEMFAOFASLKFNSDJSDLJFNJJDSFKDSSDKJFN', - createdDate: '11/05/2020', - amount: '2 ETH', - status: 'Success' - }, - { - username: 'Mark Brooks', - txHash: '0xASHFECKFOEMFAOFASLKFNSDJSDLJFNJJDSFKDSSDKJFN', - createdDate: '11/05/2020', - amount: '2 ETH', - status: 'Success' - }, - { - username: 'Mark Brooks', - txHash: '0xASHFECKFOEMFAOFASLKFNSDJSDLJFNJJDSFKDSSDKJFN', - createdDate: '11/05/2020', - amount: '2 ETH', - status: 'Success' - } - ] - }, - { - campaign: { - id: 1, - title: "Lorem Dolor Sit Amet", - description: "Aliquam erat volutpat. In lacinia velit ut massa porta elementum. Integer ornare, augue ut malesuada viverra, leo nisl pretium metus, vel ullamcorper nunc lorem a nisi. Duis eu sapien quis mauris convallis finibus vel et dui. Proin vel lacinia risus, iaculis mollis erat. Phasellus tincidunt dui elit, sed fringilla est maximus eu. Curabitur ut tempus mauris. Suspendisse potenti.", - createdBy: "DeCare NGO", - startDate: new Date().toDateString(), - endDate: new Date().toDateString(), - status: 'Open', - goalAmount: '20 ETH', - collectedAmount: '15 ETH' - }, - transactions: [{ - username: 'Mark Brooks', - txHash: '0xASHFECKFOEMFAOFASLKFNSDJSDLJFNJJDSFKDSSDKJFN', - createdDate: '11/05/2020', - amount: '2 ETH', - status: 'Success' - }] - }, - { - campaign: { - id: 1, - title: "Lorem Dolor Sit Amet", - description: "Aliquam erat volutpat. In lacinia velit ut massa porta elementum. Integer ornare, augue ut malesuada viverra, leo nisl pretium metus, vel ullamcorper nunc lorem a nisi. Duis eu sapien quis mauris convallis finibus vel et dui. Proin vel lacinia risus, iaculis mollis erat. Phasellus tincidunt dui elit, sed fringilla est maximus eu. Curabitur ut tempus mauris. Suspendisse potenti.", - createdBy: "DeCare NGO", - startDate: new Date().toDateString(), - endDate: new Date().toDateString(), - status: 'Open', - goalAmount: '20 ETH', - collectedAmount: '15 ETH' - }, - transactions: [{ - username: 'Mark Brooks', - txHash: '0xASHFECKFOEMFAOFASLKFNSDJSDLJFNJJDSFKDSSDKJFN', - createdDate: '11/05/2020', - amount: '2 ETH', - status: 'Success' - }] - } - ].map(d => + donations.map(d => - Campaign Name: {d.campaign.title} + Campaign Name: {d.campaignTitle} - + diff --git a/src/contract/CAMPAIGN_FACTORY_ADDRESS.js b/src/contract/CAMPAIGN_FACTORY_ADDRESS.js index 670af5d..afe2f60 100644 --- a/src/contract/CAMPAIGN_FACTORY_ADDRESS.js +++ b/src/contract/CAMPAIGN_FACTORY_ADDRESS.js @@ -1,2 +1,2 @@ -export const LOCAL_CAMAPAIGN_FACTORY_ADDRESS = '0x64eAEEf1599402DAb4c8BaFa7F4486af24505BC4'; +export const LOCAL_CAMAPAIGN_FACTORY_ADDRESS = '0xeea088e19ea827aeF24cCf41109498d631da6dAd'; export const ROPSTEN_CAMAPAIGN_FACTORY_ADDRESS = ''; \ No newline at end of file diff --git a/src/contract/Campaign.json b/src/contract/Campaign.json index 09f40a4..91c91b6 100644 --- a/src/contract/Campaign.json +++ b/src/contract/Campaign.json @@ -319,6 +319,21 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "closeFundRequest", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ @@ -419,6 +434,11 @@ "internalType": "uint256[]", "name": "", "type": "uint256[]" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" } ], "payable": false, @@ -525,21 +545,21 @@ "type": "function" } ], - "metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_manager\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_title\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_description\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_initialAmountGoal\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_createdAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_closedAt\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"constant\":true,\"inputs\":[],\"name\":\"amountCollected\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"amountDelegated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"amountInitialGoal\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"amountSpended\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"approveFundRequest\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"closedAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"string\",\"name\":\"_description\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"_recipientsAddress\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_recipientsAmount\",\"type\":\"uint256[]\"}],\"name\":\"createFundRequest\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"createdAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"deactivate\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"description\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"disapproveFundRequest\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"donate\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"dononrsCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"donors\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"donorsList\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"personAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"fundRequestProcessTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getFundRequest\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getSummary\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isActive\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"manager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"processFundRequest\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"processTime\",\"type\":\"uint256\"}],\"name\":\"setFundRequestProcessTime\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"title\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"withdrawDonation\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/F/Software Development/React Projects/de-care/ethereum/contracts/Campaign.sol\":\"Campaign\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/F/Software Development/React Projects/de-care/ethereum/contracts/Campaign.sol\":{\"keccak256\":\"0x3ff1606611c2ecc608ec48ae2a111ca666ce0d4599239c39189d295024545866\",\"urls\":[\"bzz-raw://cea4d1bb2f5fd9902563c9b0f266fb957f5932b554332ccbf9579f8d59add731\",\"dweb:/ipfs/QmZTf81s6bFhKCLVZ5BSK7f4FLWuFb2K5H2GhrBoz99MX9\"]}},\"version\":1}", - "bytecode": "0x60806040523480156200001157600080fd5b506040516200326a3803806200326a833981810160405260c08110156200003757600080fd5b8101908080519060200190929190805160405193929190846401000000008211156200006257600080fd5b838201915060208201858111156200007957600080fd5b82518660018202830111640100000000821117156200009757600080fd5b8083526020830192505050908051906020019080838360005b83811015620000cd578082015181840152602081019050620000b0565b50505050905090810190601f168015620000fb5780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200011f57600080fd5b838201915060208201858111156200013657600080fd5b82518660018202830111640100000000821117156200015457600080fd5b8083526020830192505050908051906020019080838360005b838110156200018a5780820151818401526020810190506200016d565b50505050905090810190601f168015620001b85780820380516001836020036101000a031916815260200191505b506040526020018051906020019092919080519060200190929190805190602001909291905050508181116200023a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f8152602001806200323b602f913960400191505060405180910390fd5b6000831162000295576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001806200320d602e913960400191505060405180910390fd5b856000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508460019080519060200190620002ed92919062000403565b5083600290805190602001906200030692919062000403565b508260038190555081600c8190555080600d819055506203f480600b819055506001600e60006101000a81548160ff021916908315150217905550600060088190555060076040518060400160405280600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152509080600181540180825580915050906001820390600052602060002090600202016000909192909190915060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010155505050505050505050620004b2565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200044657805160ff191683800117855562000477565b8280016001018555821562000477579182015b828111156200047657825182559160200191906001019062000459565b5b5090506200048691906200048a565b5090565b620004af91905b80821115620004ab57600081600090555060010162000491565b5090565b90565b612d4b80620004c26000396000f3fe60806040526004361061014b5760003560e01c806360713609116100b6578063a96271361161006f578063a9627136146109d4578063ca0cdea814610a56578063cf09e0d014610abb578063d2765c9414610ae6578063e81e1ccc14610b21578063ed88c68e14610b4c5761014b565b8063607136091461085d5780636a3d9a4a146108885780637284e416146108b3578063777016fb1461094357806396f8b38d1461096e5780639ef27b00146109a95761014b565b80634051ddac116101085780634051ddac14610445578063481c6a75146105be5780634a79d50c146106155780634dfa8434146106a557806351b42b001461081b5780635c8d7152146108325761014b565b80631b0f5fc21461015057806321464bfe1461018b57806322f3e2d4146101c657806326e97344146101f5578063332f7acf14610220578063372bfd9c1461024b575b600080fd5b34801561015c57600080fd5b506101896004803603602081101561017357600080fd5b8101908080359060200190929190505050610b56565b005b34801561019757600080fd5b506101c4600480360360208110156101ae57600080fd5b8101908080359060200190929190505050610e24565b005b3480156101d257600080fd5b506101db611145565b604051808215151515815260200191505060405180910390f35b34801561020157600080fd5b5061020a611158565b6040518082815260200191505060405180910390f35b34801561022c57600080fd5b5061023561115e565b6040518082815260200191505060405180910390f35b34801561025757600080fd5b506104436004803603608081101561026e57600080fd5b810190808035906020019064010000000081111561028b57600080fd5b82018360208201111561029d57600080fd5b803590602001918460018302840111640100000000831117156102bf57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290803590602001909291908035906020019064010000000081111561032c57600080fd5b82018360208201111561033e57600080fd5b8035906020019184602083028401116401000000008311171561036057600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803590602001906401000000008111156103c057600080fd5b8201836020820111156103d257600080fd5b803590602001918460208302840111640100000000831117156103f457600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050611164565b005b34801561045157600080fd5b5061045a611786565b604051808e73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001806020018d81526020018c81526020018b81526020018a81526020018981526020018881526020018781526020018681526020018581526020018415151515815260200183810383528f818151815260200191508051906020019080838360005b838110156105105780820151818401526020810190506104f5565b50505050905090810190601f16801561053d5780820380516001836020036101000a031916815260200191505b5083810382528e818151815260200191508051906020019080838360005b8381101561057657808201518184015260208101905061055b565b50505050905090810190601f1680156105a35780820380516001836020036101000a031916815260200191505b509f5050505050505050505050505050505060405180910390f35b3480156105ca57600080fd5b506105d361194f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561062157600080fd5b5061062a611974565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561066a57808201518184015260208101905061064f565b50505050905090810190601f1680156106975780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156106b157600080fd5b506106de600480360360208110156106c857600080fd5b8101908080359060200190929190505050611a12565b60405180806020018a81526020018981526020018881526020018781526020018615151515815260200185151515158152602001806020018060200184810384528d818151815260200191508051906020019080838360005b83811015610752578082015181840152602081019050610737565b50505050905090810190601f16801561077f5780820380516001836020036101000a031916815260200191505b50848103835286818151815260200191508051906020019060200280838360005b838110156107bb5780820151818401526020810190506107a0565b50505050905001848103825285818151815260200191508051906020019060200280838360005b838110156107fd5780820151818401526020810190506107e2565b505050509050019c5050505050505050505050505060405180910390f35b34801561082757600080fd5b50610830611d35565b005b34801561083e57600080fd5b50610847611e53565b6040518082815260200191505060405180910390f35b34801561086957600080fd5b50610872611e59565b6040518082815260200191505060405180910390f35b34801561089457600080fd5b5061089d611e5f565b6040518082815260200191505060405180910390f35b3480156108bf57600080fd5b506108c8611e65565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156109085780820151818401526020810190506108ed565b50505050905090810190601f1680156109355780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561094f57600080fd5b50610958611f03565b6040518082815260200191505060405180910390f35b34801561097a57600080fd5b506109a76004803603602081101561099157600080fd5b8101908080359060200190929190505050611f09565b005b3480156109b557600080fd5b506109be612041565b6040518082815260200191505060405180910390f35b3480156109e057600080fd5b50610a0d600480360360208110156109f757600080fd5b8101908080359060200190929190505050612047565b604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390f35b348015610a6257600080fd5b50610aa560048036036020811015610a7957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612098565b6040518082815260200191505060405180910390f35b348015610ac757600080fd5b50610ad06120b0565b6040518082815260200191505060405180910390f35b348015610af257600080fd5b50610b1f60048036036020811015610b0957600080fd5b81019080803590602001909291905050506120b6565b005b348015610b2d57600080fd5b50610b36612456565b6040518082815260200191505060405180910390f35b610b54612731565b005b60011515600e60009054906101000a900460ff16151514610bdf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f436f6e747261637420697320636c6f736564000000000000000000000000000081525060200191505060405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c84576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612b906023913960400191505060405180910390fd5b6000600a8281548110610c9357fe5b9060005260206000209060080201905042600b54826006015401108015610cc257506007805490508160050154105b8015610cdd57508060070160009054906101000a900460ff16155b610d32576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526070815260200180612ca76070913960800191505060405180910390fd5b60018160070160006101000a81548160ff0219169083151502179055508060010154600560008282540392505081905550806001015460066000828254019250508190555060008090505b8160030154811015610e1f57600082600201600083815260200190815260200160002090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc82600101549081150290604051600060405180830381858888f19350505050158015610e10573d6000803e3d6000fd5b50508080600101915050610d7d565b505050565b60011515600e60009054906101000a900460ff16151514610ead576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f436f6e747261637420697320636c6f736564000000000000000000000000000081525060200191505060405180910390fd5b6000600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205411610f45576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180612bb36022913960400191505060405180910390fd5b600a805490508110610fbf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f46756e64205265717565737420646f6e27742065786973742e0000000000000081525060200191505060405180910390fd5b60001515600a8281548110610fd057fe5b906000526020600020906008020160070160009054906101000a900460ff16151514611047576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612b116023913960400191505060405180910390fd5b6000600a828154811061105657fe5b906000526020600020906008020160040190508060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156111415760008160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600a828154811061111e57fe5b906000526020600020906008020160050160008154809291906001900391905055505b5050565b600e60009054906101000a900460ff1681565b60085481565b60045481565b42600d54118015611179575060035460045410155b6111ce576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612a8c6025913960400191505060405180910390fd5b60011515600e60009054906101000a900460ff16151514611257576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f436f6e747261637420697320636c6f736564000000000000000000000000000081525060200191505060405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146112fc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612b906023913960400191505060405180910390fd5b42600d54118015611311575060035460045410155b611366576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612ab16023913960400191505060405180910390fd5b600083116113dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f416d6f756e742063616e6e6f74206265207a65726f2e0000000000000000000081525060200191505060405180910390fd5b600082511180156113ee575060008151115b611443576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180612b34602a913960400191505060405180910390fd5b805182511461149d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d815260200180612ad4603d913960400191505060405180910390fd5b8260055460065460045403031015611500576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526032815260200180612b5e6032913960400191505060405180910390fd5b600080905060005b82518110156115365782818151811061151d57fe5b6020026020010151820191508080600101915050611508565b5083811461158f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526055815260200180612c0e6055913960600191505060405180910390fd5b600a6040518060c0016040528087815260200186815260200160008152602001600081526020014281526020016000151581525090806001815401808255809150509060018203906000526020600020906008020160009091929091909150600082015181600001908051906020019061160a9291906129e6565b506020820151816001015560408201518160030155606082015181600501556080820151816006015560a08201518160070160006101000a81548160ff0219169083151502179055505050506000600a6001600a80549050038154811061166d57fe5b90600052602060002090600802019050600081600201905060008090505b855181101561176c5760405180604001604052808783815181106116ab57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1681526020018683815181106116da57fe5b602002602001015181525082600083815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550602082015181600101559050508260030160008154809291906001019190505550808060010191505061168b565b508560056000828254019250508190555050505050505050565b60006060806000806000806000806000806000806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660016002600354600454600554600654600b54600c54600d54600854600a80549050600e60009054906101000a900460ff168b8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156118835780601f1061185857610100808354040283529160200191611883565b820191906000526020600020905b81548152906001019060200180831161186657829003601f168201915b50505050509b508a8054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561191f5780601f106118f45761010080835404028352916020019161191f565b820191906000526020600020905b81548152906001019060200180831161190257829003601f168201915b50505050509a509c509c509c509c509c509c509c509c509c509c509c509c509c50909192939495969798999a9b9c565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611a0a5780601f106119df57610100808354040283529160200191611a0a565b820191906000526020600020905b8154815290600101906020018083116119ed57829003601f168201915b505050505081565b6060600080600080600080606080896001600a805490500111611a9d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f496e646578206973206f7574206f662072616e67652e0000000000000000000081525060200191505060405180910390fd5b6000600a8b81548110611aac57fe5b9060005260206000209060080201905060608160030154604051908082528060200260200182016040528015611af15781602001602082028038833980820191505090505b50905060608260030154604051908082528060200260200182016040528015611b295781602001602082028038833980820191505090505b50905060008090505b8360030154811015611bfb5783600201600082815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16838281518110611b8357fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505083600201600082815260200190815260200160002060010154828281518110611be257fe5b6020026020010181815250508080600101915050611b32565b508260000183600101548460030154856005015486600601548760070160009054906101000a900460ff168860040160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff168888888054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611d0c5780601f10611ce157610100808354040283529160200191611d0c565b820191906000526020600020905b815481529060010190602001808311611cef57829003601f168201915b505050505098509b509b509b509b509b509b509b509b509b505050509193959799909294969850565b3373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611dda576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612b906023913960400191505060405180910390fd5b60065460045414611e36576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526044815260200180612c636044913960600191505060405180910390fd5b6000600e60006101000a81548160ff021916908315150217905550565b60065481565b60055481565b60035481565b60028054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611efb5780601f10611ed057610100808354040283529160200191611efb565b820191906000526020600020905b815481529060010190602001808311611ede57829003601f168201915b505050505081565b600b5481565b60011515600e60009054906101000a900460ff16151514611f92576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f436f6e747261637420697320636c6f736564000000000000000000000000000081525060200191505060405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612037576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612b906023913960400191505060405180910390fd5b80600b8190555050565b600d5481565b6007818154811061205457fe5b90600052602060002090600202016000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154905082565b60096020528060005260406000206000915090505481565b600c5481565b42600d541180156120cb575060035460045410155b612120576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612a8c6025913960400191505060405180910390fd5b60011515600e60009054906101000a900460ff161515146121a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f436f6e747261637420697320636c6f736564000000000000000000000000000081525060200191505060405180910390fd5b6000600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205411612241576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180612bb36022913960400191505060405180910390fd5b600a8054905081106122bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f46756e64205265717565737420646f6e27742065786973742e0000000000000081525060200191505060405180910390fd5b60001515600a82815481106122cc57fe5b906000526020600020906008020160070160009054906101000a900460ff16151514612343576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612b116023913960400191505060405180910390fd5b600a818154811061235057fe5b906000526020600020906008020160040160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16612453576001600a82815481106123bf57fe5b906000526020600020906008020160040160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600a818154811061243157fe5b9060005260206000209060080201600501600081548092919060010191905055505b50565b600060011515600e60009054906101000a900460ff161515146124e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f436f6e747261637420697320636c6f736564000000000000000000000000000081525060200191505060405180910390fd5b60035460045410806124f4575042600d54115b612566576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f446f6e6174696f6e2063616e6e6f742062652077697468647261776e0000000081525060200191505060405180910390fd5b6000600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060008111612603576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526039815260200180612bd56039913960400191505060405180910390fd5b60006007828154811061261257fe5b9060005260206000209060020201600101549050600081111561272c576000600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506007828154811061268157fe5b9060005260206000209060020201600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556001820160009055505080600460008282540392505081905550600860008154809291906001900391905055503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505015801561272a573d6000803e3d6000fd5b505b505090565b60011515600e60009054906101000a900460ff161515146127ba576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f436f6e747261637420697320636c6f736564000000000000000000000000000081525060200191505060405180910390fd5b6000341415612831576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f416d6f756e74206d7573742062652067726561746572207468616e207a65726f81525060200191505060405180910390fd5b6000600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000811415612989576001905080600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600760405180604001604052803373ffffffffffffffffffffffffffffffffffffffff168152602001348152509080600181540180825580915050906001820390600052602060002090600202016000909192909190915060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550602082015181600101555050506008600081548092919060010191905055506129d3565b60006007828154811061299857fe5b9060005260206000209060020201600101549050348101600783815481106129bc57fe5b906000526020600020906002020160010181905550505b3460046000828254019250508190555050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612a2757805160ff1916838001178555612a55565b82800160010185558215612a55579182015b82811115612a54578251825591602001919060010190612a39565b5b509050612a629190612a66565b5090565b612a8891905b80821115612a84576000816000905550600101612a6c565b5090565b9056fe43616d706169676e206861736e277420726561636865642069747320676f616c207965742e43616d706169676e20636f756c646e277420726561636865642069747320676f616c2e54686572652073686f756c6420626520657175616c206e6f2e206f6620726563697069656e74732061646472657373657320616e6420616d6f756e7473526571756573742068617320616c7265616479206265656e20636f6d706c657465642e52657175657374206d75737420636f6e7461696e2061746c65617374206f6e6520726563697069656e7443616d706169676e20646f6e2774206861766520656e6f7567682066756e647320666f7220796f757220726571756573742e4f6e6c79204d616e616765722063616e2063616c6c20746869732066756e6374696f6e4f6e6c7920446f6e6f722063616e2063616c6c20746869732066756e6374696f6e73596f75206861766520746f206265206120646f6e6f7220696e206f7264657220746f20776974686472617720796f757220646f6e6174696f6e546f74616c20616d6f756e742064656c65676174656420746f20726563697069656e7473206d75737420626520657175616c20746f2074686520746f74616c20616d6f756e7420696e20746865207265717565737443616d706169676e2063616e6e6f7420626520636c6f7365642c2062656361757365206974207374696c6c2068617320736f6d6520756e7370656e6465642066756e647346756e6420526571756573742063616e6e6f742062652070726f6365737365642c20656974686572207468652072657175697265642074696d65206973206e6f74207265616368656420796574206f72206d6f737420646f6e6f72732068617320646973617070726f7665642069742ea265627a7a72315820e7464e403abe2d6ed7052a28a4e59aa8354d5bb1c16a12a56c3b5e1a157ccf1b64736f6c63430005100032496e697469616c20616d6f756e7420676f616c20206d7573742062652067726561746572207468616e207a65726f43616d706169676e2073746172742074696d65206d757374206265206c657373207468616e20656e642074696d652e", - "deployedBytecode": "0x60806040526004361061014b5760003560e01c806360713609116100b6578063a96271361161006f578063a9627136146109d4578063ca0cdea814610a56578063cf09e0d014610abb578063d2765c9414610ae6578063e81e1ccc14610b21578063ed88c68e14610b4c5761014b565b8063607136091461085d5780636a3d9a4a146108885780637284e416146108b3578063777016fb1461094357806396f8b38d1461096e5780639ef27b00146109a95761014b565b80634051ddac116101085780634051ddac14610445578063481c6a75146105be5780634a79d50c146106155780634dfa8434146106a557806351b42b001461081b5780635c8d7152146108325761014b565b80631b0f5fc21461015057806321464bfe1461018b57806322f3e2d4146101c657806326e97344146101f5578063332f7acf14610220578063372bfd9c1461024b575b600080fd5b34801561015c57600080fd5b506101896004803603602081101561017357600080fd5b8101908080359060200190929190505050610b56565b005b34801561019757600080fd5b506101c4600480360360208110156101ae57600080fd5b8101908080359060200190929190505050610e24565b005b3480156101d257600080fd5b506101db611145565b604051808215151515815260200191505060405180910390f35b34801561020157600080fd5b5061020a611158565b6040518082815260200191505060405180910390f35b34801561022c57600080fd5b5061023561115e565b6040518082815260200191505060405180910390f35b34801561025757600080fd5b506104436004803603608081101561026e57600080fd5b810190808035906020019064010000000081111561028b57600080fd5b82018360208201111561029d57600080fd5b803590602001918460018302840111640100000000831117156102bf57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290803590602001909291908035906020019064010000000081111561032c57600080fd5b82018360208201111561033e57600080fd5b8035906020019184602083028401116401000000008311171561036057600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803590602001906401000000008111156103c057600080fd5b8201836020820111156103d257600080fd5b803590602001918460208302840111640100000000831117156103f457600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050611164565b005b34801561045157600080fd5b5061045a611786565b604051808e73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001806020018d81526020018c81526020018b81526020018a81526020018981526020018881526020018781526020018681526020018581526020018415151515815260200183810383528f818151815260200191508051906020019080838360005b838110156105105780820151818401526020810190506104f5565b50505050905090810190601f16801561053d5780820380516001836020036101000a031916815260200191505b5083810382528e818151815260200191508051906020019080838360005b8381101561057657808201518184015260208101905061055b565b50505050905090810190601f1680156105a35780820380516001836020036101000a031916815260200191505b509f5050505050505050505050505050505060405180910390f35b3480156105ca57600080fd5b506105d361194f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561062157600080fd5b5061062a611974565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561066a57808201518184015260208101905061064f565b50505050905090810190601f1680156106975780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156106b157600080fd5b506106de600480360360208110156106c857600080fd5b8101908080359060200190929190505050611a12565b60405180806020018a81526020018981526020018881526020018781526020018615151515815260200185151515158152602001806020018060200184810384528d818151815260200191508051906020019080838360005b83811015610752578082015181840152602081019050610737565b50505050905090810190601f16801561077f5780820380516001836020036101000a031916815260200191505b50848103835286818151815260200191508051906020019060200280838360005b838110156107bb5780820151818401526020810190506107a0565b50505050905001848103825285818151815260200191508051906020019060200280838360005b838110156107fd5780820151818401526020810190506107e2565b505050509050019c5050505050505050505050505060405180910390f35b34801561082757600080fd5b50610830611d35565b005b34801561083e57600080fd5b50610847611e53565b6040518082815260200191505060405180910390f35b34801561086957600080fd5b50610872611e59565b6040518082815260200191505060405180910390f35b34801561089457600080fd5b5061089d611e5f565b6040518082815260200191505060405180910390f35b3480156108bf57600080fd5b506108c8611e65565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156109085780820151818401526020810190506108ed565b50505050905090810190601f1680156109355780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561094f57600080fd5b50610958611f03565b6040518082815260200191505060405180910390f35b34801561097a57600080fd5b506109a76004803603602081101561099157600080fd5b8101908080359060200190929190505050611f09565b005b3480156109b557600080fd5b506109be612041565b6040518082815260200191505060405180910390f35b3480156109e057600080fd5b50610a0d600480360360208110156109f757600080fd5b8101908080359060200190929190505050612047565b604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390f35b348015610a6257600080fd5b50610aa560048036036020811015610a7957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612098565b6040518082815260200191505060405180910390f35b348015610ac757600080fd5b50610ad06120b0565b6040518082815260200191505060405180910390f35b348015610af257600080fd5b50610b1f60048036036020811015610b0957600080fd5b81019080803590602001909291905050506120b6565b005b348015610b2d57600080fd5b50610b36612456565b6040518082815260200191505060405180910390f35b610b54612731565b005b60011515600e60009054906101000a900460ff16151514610bdf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f436f6e747261637420697320636c6f736564000000000000000000000000000081525060200191505060405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c84576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612b906023913960400191505060405180910390fd5b6000600a8281548110610c9357fe5b9060005260206000209060080201905042600b54826006015401108015610cc257506007805490508160050154105b8015610cdd57508060070160009054906101000a900460ff16155b610d32576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526070815260200180612ca76070913960800191505060405180910390fd5b60018160070160006101000a81548160ff0219169083151502179055508060010154600560008282540392505081905550806001015460066000828254019250508190555060008090505b8160030154811015610e1f57600082600201600083815260200190815260200160002090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc82600101549081150290604051600060405180830381858888f19350505050158015610e10573d6000803e3d6000fd5b50508080600101915050610d7d565b505050565b60011515600e60009054906101000a900460ff16151514610ead576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f436f6e747261637420697320636c6f736564000000000000000000000000000081525060200191505060405180910390fd5b6000600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205411610f45576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180612bb36022913960400191505060405180910390fd5b600a805490508110610fbf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f46756e64205265717565737420646f6e27742065786973742e0000000000000081525060200191505060405180910390fd5b60001515600a8281548110610fd057fe5b906000526020600020906008020160070160009054906101000a900460ff16151514611047576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612b116023913960400191505060405180910390fd5b6000600a828154811061105657fe5b906000526020600020906008020160040190508060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156111415760008160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600a828154811061111e57fe5b906000526020600020906008020160050160008154809291906001900391905055505b5050565b600e60009054906101000a900460ff1681565b60085481565b60045481565b42600d54118015611179575060035460045410155b6111ce576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612a8c6025913960400191505060405180910390fd5b60011515600e60009054906101000a900460ff16151514611257576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f436f6e747261637420697320636c6f736564000000000000000000000000000081525060200191505060405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146112fc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612b906023913960400191505060405180910390fd5b42600d54118015611311575060035460045410155b611366576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612ab16023913960400191505060405180910390fd5b600083116113dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f416d6f756e742063616e6e6f74206265207a65726f2e0000000000000000000081525060200191505060405180910390fd5b600082511180156113ee575060008151115b611443576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180612b34602a913960400191505060405180910390fd5b805182511461149d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d815260200180612ad4603d913960400191505060405180910390fd5b8260055460065460045403031015611500576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526032815260200180612b5e6032913960400191505060405180910390fd5b600080905060005b82518110156115365782818151811061151d57fe5b6020026020010151820191508080600101915050611508565b5083811461158f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526055815260200180612c0e6055913960600191505060405180910390fd5b600a6040518060c0016040528087815260200186815260200160008152602001600081526020014281526020016000151581525090806001815401808255809150509060018203906000526020600020906008020160009091929091909150600082015181600001908051906020019061160a9291906129e6565b506020820151816001015560408201518160030155606082015181600501556080820151816006015560a08201518160070160006101000a81548160ff0219169083151502179055505050506000600a6001600a80549050038154811061166d57fe5b90600052602060002090600802019050600081600201905060008090505b855181101561176c5760405180604001604052808783815181106116ab57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1681526020018683815181106116da57fe5b602002602001015181525082600083815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550602082015181600101559050508260030160008154809291906001019190505550808060010191505061168b565b508560056000828254019250508190555050505050505050565b60006060806000806000806000806000806000806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660016002600354600454600554600654600b54600c54600d54600854600a80549050600e60009054906101000a900460ff168b8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156118835780601f1061185857610100808354040283529160200191611883565b820191906000526020600020905b81548152906001019060200180831161186657829003601f168201915b50505050509b508a8054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561191f5780601f106118f45761010080835404028352916020019161191f565b820191906000526020600020905b81548152906001019060200180831161190257829003601f168201915b50505050509a509c509c509c509c509c509c509c509c509c509c509c509c509c50909192939495969798999a9b9c565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611a0a5780601f106119df57610100808354040283529160200191611a0a565b820191906000526020600020905b8154815290600101906020018083116119ed57829003601f168201915b505050505081565b6060600080600080600080606080896001600a805490500111611a9d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f496e646578206973206f7574206f662072616e67652e0000000000000000000081525060200191505060405180910390fd5b6000600a8b81548110611aac57fe5b9060005260206000209060080201905060608160030154604051908082528060200260200182016040528015611af15781602001602082028038833980820191505090505b50905060608260030154604051908082528060200260200182016040528015611b295781602001602082028038833980820191505090505b50905060008090505b8360030154811015611bfb5783600201600082815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16838281518110611b8357fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505083600201600082815260200190815260200160002060010154828281518110611be257fe5b6020026020010181815250508080600101915050611b32565b508260000183600101548460030154856005015486600601548760070160009054906101000a900460ff168860040160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff168888888054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611d0c5780601f10611ce157610100808354040283529160200191611d0c565b820191906000526020600020905b815481529060010190602001808311611cef57829003601f168201915b505050505098509b509b509b509b509b509b509b509b509b505050509193959799909294969850565b3373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611dda576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612b906023913960400191505060405180910390fd5b60065460045414611e36576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526044815260200180612c636044913960600191505060405180910390fd5b6000600e60006101000a81548160ff021916908315150217905550565b60065481565b60055481565b60035481565b60028054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611efb5780601f10611ed057610100808354040283529160200191611efb565b820191906000526020600020905b815481529060010190602001808311611ede57829003601f168201915b505050505081565b600b5481565b60011515600e60009054906101000a900460ff16151514611f92576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f436f6e747261637420697320636c6f736564000000000000000000000000000081525060200191505060405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612037576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612b906023913960400191505060405180910390fd5b80600b8190555050565b600d5481565b6007818154811061205457fe5b90600052602060002090600202016000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154905082565b60096020528060005260406000206000915090505481565b600c5481565b42600d541180156120cb575060035460045410155b612120576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612a8c6025913960400191505060405180910390fd5b60011515600e60009054906101000a900460ff161515146121a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f436f6e747261637420697320636c6f736564000000000000000000000000000081525060200191505060405180910390fd5b6000600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205411612241576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180612bb36022913960400191505060405180910390fd5b600a8054905081106122bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f46756e64205265717565737420646f6e27742065786973742e0000000000000081525060200191505060405180910390fd5b60001515600a82815481106122cc57fe5b906000526020600020906008020160070160009054906101000a900460ff16151514612343576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612b116023913960400191505060405180910390fd5b600a818154811061235057fe5b906000526020600020906008020160040160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16612453576001600a82815481106123bf57fe5b906000526020600020906008020160040160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600a818154811061243157fe5b9060005260206000209060080201600501600081548092919060010191905055505b50565b600060011515600e60009054906101000a900460ff161515146124e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f436f6e747261637420697320636c6f736564000000000000000000000000000081525060200191505060405180910390fd5b60035460045410806124f4575042600d54115b612566576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f446f6e6174696f6e2063616e6e6f742062652077697468647261776e0000000081525060200191505060405180910390fd5b6000600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060008111612603576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526039815260200180612bd56039913960400191505060405180910390fd5b60006007828154811061261257fe5b9060005260206000209060020201600101549050600081111561272c576000600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506007828154811061268157fe5b9060005260206000209060020201600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556001820160009055505080600460008282540392505081905550600860008154809291906001900391905055503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505015801561272a573d6000803e3d6000fd5b505b505090565b60011515600e60009054906101000a900460ff161515146127ba576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f436f6e747261637420697320636c6f736564000000000000000000000000000081525060200191505060405180910390fd5b6000341415612831576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f416d6f756e74206d7573742062652067726561746572207468616e207a65726f81525060200191505060405180910390fd5b6000600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000811415612989576001905080600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600760405180604001604052803373ffffffffffffffffffffffffffffffffffffffff168152602001348152509080600181540180825580915050906001820390600052602060002090600202016000909192909190915060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550602082015181600101555050506008600081548092919060010191905055506129d3565b60006007828154811061299857fe5b9060005260206000209060020201600101549050348101600783815481106129bc57fe5b906000526020600020906002020160010181905550505b3460046000828254019250508190555050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612a2757805160ff1916838001178555612a55565b82800160010185558215612a55579182015b82811115612a54578251825591602001919060010190612a39565b5b509050612a629190612a66565b5090565b612a8891905b80821115612a84576000816000905550600101612a6c565b5090565b9056fe43616d706169676e206861736e277420726561636865642069747320676f616c207965742e43616d706169676e20636f756c646e277420726561636865642069747320676f616c2e54686572652073686f756c6420626520657175616c206e6f2e206f6620726563697069656e74732061646472657373657320616e6420616d6f756e7473526571756573742068617320616c7265616479206265656e20636f6d706c657465642e52657175657374206d75737420636f6e7461696e2061746c65617374206f6e6520726563697069656e7443616d706169676e20646f6e2774206861766520656e6f7567682066756e647320666f7220796f757220726571756573742e4f6e6c79204d616e616765722063616e2063616c6c20746869732066756e6374696f6e4f6e6c7920446f6e6f722063616e2063616c6c20746869732066756e6374696f6e73596f75206861766520746f206265206120646f6e6f7220696e206f7264657220746f20776974686472617720796f757220646f6e6174696f6e546f74616c20616d6f756e742064656c65676174656420746f20726563697069656e7473206d75737420626520657175616c20746f2074686520746f74616c20616d6f756e7420696e20746865207265717565737443616d706169676e2063616e6e6f7420626520636c6f7365642c2062656361757365206974207374696c6c2068617320736f6d6520756e7370656e6465642066756e647346756e6420526571756573742063616e6e6f742062652070726f6365737365642c20656974686572207468652072657175697265642074696d65206973206e6f74207265616368656420796574206f72206d6f737420646f6e6f72732068617320646973617070726f7665642069742ea265627a7a72315820e7464e403abe2d6ed7052a28a4e59aa8354d5bb1c16a12a56c3b5e1a157ccf1b64736f6c63430005100032", - "sourceMap": "475:13301:0:-;;;4869:750;8:9:-1;5:2;;;30:1;27;20:12;5:2;4869:750:0;;;;;;;;;;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;4869:750:0;;;;;;;;;;;;;;;;;;;;;;19:11:-1;14:3;11:20;8:2;;;44:1;41;34:12;8:2;71:11;66:3;62:21;55:28;;123:4;118:3;114:14;159:9;141:16;138:31;135:2;;;182:1;179;172:12;135:2;219:3;213:10;330:9;325:1;311:12;307:20;289:16;285:43;282:58;261:11;247:12;244:29;233:115;230:2;;;361:1;358;351:12;230:2;384:12;379:3;372:25;420:4;415:3;411:14;404:21;;0:432;;4869:750:0;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;4869:750:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19:11:-1;14:3;11:20;8:2;;;44:1;41;34:12;8:2;71:11;66:3;62:21;55:28;;123:4;118:3;114:14;159:9;141:16;138:31;135:2;;;182:1;179;172:12;135:2;219:3;213:10;330:9;325:1;311:12;307:20;289:16;285:43;282:58;261:11;247:12;244:29;233:115;230:2;;;361:1;358;351:12;230:2;384:12;379:3;372:25;420:4;415:3;411:14;404:21;;0:432;;4869:750:0;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;4869:750:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5044:10;5032:9;:22;5024:82;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5151:1;5125:18;:28;5117:88;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5236:8;5226:7;;:18;;;;;;;;;;;;;;;;;;5263:6;5255:5;:14;;;;;;;;;;;;:::i;:::-;;5294:12;5280:11;:26;;;;;;;;;;;;:::i;:::-;;5337:18;5317:17;:38;;;;5378:10;5366:9;:22;;;;5410:9;5399:8;:20;;;;5455:6;5430:22;:31;;;;5504:4;5493:8;;:15;;;;;;;;;;;;;;;;;;5534:1;5519:12;:16;;;;5546:10;5562:48;;;;;;;;5593:3;5562:48;;;;;;5607:1;5562:48;;;5546:65;;39:1:-1;33:3;27:10;23:18;57:10;52:3;45:23;79:10;72:17;;0:93;5546:65:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4869:750;;;;;;475:13301;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;", - "deployedSourceMap": "475:13301:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10907:961;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10907:961:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;10907:961:0;;;;;;;;;;;;;;;;;:::i;:::-;;10243:652;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10243:652:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;10243:652:0;;;;;;;;;;;;;;;;;:::i;:::-;;4207:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4207:20:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;3432:24;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3432:24:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;2723:27;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2723:27:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;8005:1748;;8:9:-1;5:2;;;30:1;27;20:12;5:2;8005:1748:0;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;8005:1748:0;;;;;;;;;;21:11:-1;8;5:28;2:2;;;46:1;43;36:12;2:2;8005:1748:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;8005:1748:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;8005:1748:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;93:3;85:6;81:16;74:27;137:4;133:9;126:4;121:3;117:14;113:30;106:37;;169:3;161:6;157:16;147:26;;8005:1748:0;;;;;;;;;;;;;;;;;;;;;;;;;;21:11:-1;8;5:28;2:2;;;46:1;43;36:12;2:2;8005:1748:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;8005:1748:0;;;;;;101:9:-1;95:2;81:12;77:21;67:8;63:36;60:51;39:11;25:12;22:29;11:108;8:2;;;132:1;129;122:12;8:2;8005:1748:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;93:3;85:6;81:16;74:27;137:4;133:9;126:4;121:3;117:14;113:30;106:37;;169:3;161:6;157:16;147:26;;8005:1748:0;;;;;;;;;;;;;;;;;21:11:-1;8;5:28;2:2;;;46:1;43;36:12;2:2;8005:1748:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;8005:1748:0;;;;;;101:9:-1;95:2;81:12;77:21;67:8;63:36;60:51;39:11;25:12;22:29;11:108;8:2;;;132:1;129;122:12;8:2;8005:1748:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;93:3;85:6;81:16;74:27;137:4;133:9;126:4;121:3;117:14;113:30;106:37;;169:3;161:6;157:16;147:26;;8005:1748:0;;;;;;;;;;;;;;;:::i;:::-;;12848:555;;8:9:-1;5:2;;;30:1;27;20:12;5:2;12848:555:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;12848:555:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;12848:555:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2379:22;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2379:22:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;2436:19;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2436:19:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;2436:19:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11880:960;;8:9:-1;5:2;;;30:1;27;20:12;5:2;11880:960:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;11880:960:0;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;11880:960:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;11880:960:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;11880:960:0;;;;;;;;;;;;;;;;;;;;;;;;;;;13568:199;;8:9:-1;5:2;;;30:1;27;20:12;5:2;13568:199:0;;;:::i;:::-;;2897:25;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2897:25:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;2808:27;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2808:27:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;2633:29;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2633:29:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;2509:25;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2509:25:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;2509:25:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3884:34;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3884:34:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;13415:138;;8:9:-1;5:2;;;30:1;27;20:12;5:2;13415:138:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;13415:138:0;;;;;;;;;;;;;;;;;:::i;:::-;;4138:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4138:20:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3217:26;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3217:26:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3217:26:0;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3574:36;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3574:36:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3574:36:0;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3987:21;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3987:21:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;9765:466;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9765:466:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;9765:466:0;;;;;;;;;;;;;;;;;:::i;:::-;;6978:1015;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6978:1015:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;5811:923;;;:::i;:::-;;10907:961;4585:4;4573:16;;:8;;;;;;;;;;;:16;;;4564:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4378:10;4367:21;;:7;;;;;;;;;;;:21;;;4359:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10985:27;11015:12;11028:5;11015:19;;;;;;;;;;;;;;;;;;10985:49;;11112:3;11087:22;;11067:7;:17;;;:42;:48;:111;;;;;11161:10;:17;;;;11133:7;:25;;;:45;11067:111;:148;;;;;11196:7;:19;;;;;;;;;;;;11195:20;11067:148;11045:301;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11395:4;11373:7;:19;;;:26;;;;;;;;;;;;;;;;;;11433:7;:14;;;11414:15;;:33;;;;;;;;;;;11479:7;:14;;;11462:13;;:31;;;;;;;;;;;11512:6;11521:1;11512:10;;11508:343;11528:7;:23;;;11524:1;:27;11508:343;;;11576:24;11603:7;:18;;:21;11622:1;11603:21;;;;;;;;;;;11576:48;;11783:9;:23;;;;;;;;;;;;11767:50;;:68;11818:9;:16;;;11767:68;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;11767:68:0;11508:343;11553:3;;;;;;;11508:343;;;;4429:1;10907:961;:::o;10243:652::-;4585:4;4573:16;;:8;;;;;;;;;;;:16;;;4564:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4491:1;4470:6;:18;4477:10;4470:18;;;;;;;;;;;;;;;;:22;4461:70;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10335:12;:19;;;;10327:5;:27;10319:65;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10438:5;10403:40;;:12;10416:5;10403:19;;;;;;;;;;;;;;;;;;:31;;;;;;;;;;;;:40;;;10395:87;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10503:43;10549:12;10562:5;10549:19;;;;;;;;;;;;;;;;;;:32;;10503:78;;10669:12;:24;10682:10;10669:24;;;;;;;;;;;;;;;;;;;;;;;;;10666:222;;;10770:5;10743:12;:24;10756:10;10743:24;;;;;;;;;;;;;;;;:32;;;;;;;;;;;;;;;;;;10837:12;10850:5;10837:19;;;;;;;;;;;;;;;;;;:37;;;:39;;;;;;;;;;;;;;10666:222;4533:1;10243:652;:::o;4207:20::-;;;;;;;;;;;;;:::o;3432:24::-;;;;:::o;2723:27::-;;;;:::o;8005:1748::-;4672:3;4661:8;;:14;:55;;;;;4699:17;;4679:15;;:37;;4661:55;4652:107;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4585:4;4573:16;;:8;;;;;;;;;;;:16;;;4564:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4378:10;4367:21;;:7;;;;;;;;;;;:21;;;4359:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8216:3;8205:8;;:14;:55;;;;;8243:17;;8223:15;;:37;;8205:55;8197:102;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8328:1;8318:7;:11;8310:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8402:1;8374:18;:25;:29;:61;;;;;8434:1;8407:17;:24;:28;8374:61;8366:116;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8530:17;:24;8501:18;:25;:53;8493:126;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8691:7;8672:15;;8656:13;;8638:15;;:31;:49;:60;;8630:123;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8774:16;8793:1;8774:20;;8809:6;8805:111;8821:17;:24;8817:1;:28;8805:111;;;8881:17;8899:1;8881:20;;;;;;;;;;;;;;8866:35;;;;8847:3;;;;;;;8805:111;;;;8959:7;8944:11;:22;8936:120;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9077:12;9109:135;;;;;;;;9135:12;9109:135;;;;9157:7;9109:135;;;;9183:1;9109:135;;;;9221:1;9109:135;;;;9197:3;9109:135;;;;9237:5;9109:135;;;;;9077:178;;39:1:-1;33:3;27:10;23:18;57:10;52:3;45:23;79:10;72:17;;0:93;9077:178:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9299:27;9329:12;9364:1;9342:12;:19;;;;:23;9329:37;;;;;;;;;;;;;;;;;;9299:67;;9387:40;9430:7;:18;;9387:61;;9493:6;9502:1;9493:10;;9489:210;9509:18;:25;9505:1;:29;9489:210;;;9571:76;;;;;;;;9594:18;9613:1;9594:21;;;;;;;;;;;;;;9571:76;;;;;;9625:17;9643:1;9625:20;;;;;;;;;;;;;;9571:76;;;9555:10;:13;9566:1;9555:13;;;;;;;;;;;:92;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9662:7;:23;;;:25;;;;;;;;;;;;;9536:3;;;;;;;9489:210;;;;9738:7;9719:15;;:26;;;;;;;;;;;4429:1;;;8005:1748;;;;:::o;12848:555::-;12899:7;12908:13;12923;12938:4;12944;12950;12956;12962;12968;12974;12980;12985;12991;13039:7;;;;;;;;;;;13061:5;13081:11;13107:17;;13139:15;;13169;;13199:13;;13227:22;;13264:9;;13288:8;;13311:12;;13338;:19;;;;13372:8;;;;;;;;;;;13017:378;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12848:555;;;;;;;;;;;;;:::o;2379:22::-;;;;;;;;;;;;;:::o;2436:19::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;11880:960::-;11936:13;11950:4;11956;11962;11968;11974;11980;11986:15;12003:12;12061:5;12057:1;12035:12;:19;;;;:23;:31;12027:65;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12143:23;12169:12;12182:5;12169:19;;;;;;;;;;;;;;;;;;12143:45;;12199:26;12242:3;:19;;;12228:34;;;;;;;;;;;;;;;;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;148:4;140:6;136:17;126:27;;0:157;12228:34:0;;;;12199:63;;12273:21;12308:3;:19;;;12297:31;;;;;;;;;;;;;;;;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;148:4;140:6;136:17;126:27;;0:157;12297:31:0;;;;12273:55;;12353:6;12362:1;12353:10;;12349:170;12369:3;:19;;;12365:1;:23;12349:170;;;12424:3;:14;;:17;12439:1;12424:17;;;;;;;;;;;:31;;;;;;;;;;;;12409:9;12419:1;12409:12;;;;;;;;;;;;;:46;;;;;;;;;;;12483:3;:14;;:17;12498:1;12483:17;;;;;;;;;;;:24;;;12470:7;12478:1;12470:10;;;;;;;;;;;;;:37;;;;;12390:3;;;;;;;12349:170;;;;12560:3;:15;;12590:3;:10;;;12615:3;:19;;;12649:3;:21;;;12685:3;:13;;;12713:3;:15;;;;;;;;;;;;12743:3;:16;;:28;12760:10;12743:28;;;;;;;;;;;;;;;;;;;;;;;;;12786:9;12810:7;12539:293;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11880:960;;;;;;;;;;;:::o;13568:199::-;4378:10;4367:21;;:7;;;;;;;;;;;:21;;;4359:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13647:13;;13628:15;;:32;13620:112;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13754:5;13743:8;;:16;;;;;;;;;;;;;;;;;;13568:199::o;2897:25::-;;;;:::o;2808:27::-;;;;:::o;2633:29::-;;;;:::o;2509:25::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;3884:34::-;;;;:::o;13415:138::-;4585:4;4573:16;;:8;;;;;;;;;;;:16;;;4564:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4378:10;4367:21;;:7;;;;;;;;;;;:21;;;4359:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13534:11;13509:22;:36;;;;13415:138;:::o;4138:20::-;;;;:::o;3217:26::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;3574:36::-;;;;;;;;;;;;;;;;;:::o;3987:21::-;;;;:::o;9765:466::-;4672:3;4661:8;;:14;:55;;;;;4699:17;;4679:15;;:37;;4661:55;4652:107;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4585:4;4573:16;;:8;;;;;;;;;;;:16;;;4564:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4491:1;4470:6;:18;4477:10;4470:18;;;;;;;;;;;;;;;;:22;4461:70;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9875:12;:19;;;;9867:5;:27;9859:65;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9978:5;9943:40;;:12;9956:5;9943:19;;;;;;;;;;;;;;;;;;:31;;;;;;;;;;;;:40;;;9935:87;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10047:12;10060:5;10047:19;;;;;;;;;;;;;;;;;;:32;;:44;10080:10;10047:44;;;;;;;;;;;;;;;;;;;;;;;;;10043:181;;10154:4;10107:12;10120:5;10107:19;;;;;;;;;;;;;;;;;;:32;;:44;10140:10;10107:44;;;;;;;;;;;;;;;;:51;;;;;;;;;;;;;;;;;;10173:12;10186:5;10173:19;;;;;;;;;;;;;;;;;;:37;;;:39;;;;;;;;;;;;;10043:181;9765:466;:::o;6978:1015::-;7030:4;4585;4573:16;;:8;;;;;;;;;;;:16;;;4564:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7223:17;;7205:15;;:35;:53;;;;7255:3;7244:8;;:14;7205:53;7197:93;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7311:10;7324:6;:18;7331:10;7324:18;;;;;;;;;;;;;;;;7311:31;;7420:1;7412:5;:9;7404:79;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7504:11;7518:10;7529:5;7518:17;;;;;;;;;;;;;;;;;;:24;;;7504:38;;7565:1;7556:6;:10;7553:433;;;7656:1;7635:6;:18;7642:10;7635:18;;;;;;;;;;;;;;;:22;;;;7731:10;7742:5;7731:17;;;;;;;;;;;;;;;;;;;7724:24;;;;;;;;;;;;;;;;;;;;;;;7839:6;7820:15;;:25;;;;;;;;;;;7874:12;;:14;;;;;;;;;;;;;;7947:10;:19;;:27;7967:6;7947:27;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;7947:27:0;7553:433;4615:1;;6978:1015;:::o;5811:923::-;4585:4;4573:16;;:8;;;;;;;;;;;:16;;;4564:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5890:1;5872:9;:20;;5864:64;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5949:10;5962:6;:18;5969:10;5962:18;;;;;;;;;;;;;;;;5949:31;;6074:1;6065:5;:10;6062:573;;;6099:1;6091:9;;6187:5;6166:6;:18;6173:10;6166:18;;;;;;;;;;;;;;;:26;;;;6234:10;6268:54;;;;;;;;6291:10;6268:54;;;;;;6311:9;6268:54;;;6234:107;;39:1:-1;33:3;27:10;23:18;57:10;52:3;45:23;79:10;72:17;;0:93;6234:107:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6356:12;;:14;;;;;;;;;;;;;6062:573;;;6517:15;6535:10;6546:5;6535:17;;;;;;;;;;;;;;;;;;:24;;;6517:42;;6614:9;6601:10;:22;6574:10;6585:5;6574:17;;;;;;;;;;;;;;;;;;:24;;:49;;;;6062:573;;6717:9;6698:15;;:28;;;;;;;;;;;4615:1;5811:923::o;475:13301::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o", - "source": "pragma solidity ^0.5.16;\r\n\r\n//https://ethereum.stackexchange.com/questions/13167/are-there-well-solved-and-simple-storage-patterns-for-solidity\r\n\r\n//A campaign is a single project used to collect funds from donors and spend them for any number of tasks related to a project,\r\n//through fund request which is totally controlled by donors voting, if donors approve a request, it will be completed \r\n//and funds can be withdrawn otherwise funds are locked inside the contract.\r\ncontract Campaign{\r\n \r\n //Perosn model to hold a person's address & the delegated amount\r\n struct Person{\r\n address personAddress;\r\n uint amount;\r\n }\r\n \r\n //Fund request, required to take out funds from this Campaign through requests for different tasks,\r\n //it takes three days for a request to complete, and requires alteast 51% donors approval to proceed,\r\n //otherwise won't complete, after completion of the request, donation can be transfered to the recipients,\r\n //whom were registered when the request was created.\r\n //The request, by default is considered to be approved by the donors, but if donors want to disapprove a request,\r\n //they have three days to explicitly disapprove it. After that, request would be considered approved by any donor,\r\n //who didn't disapproved it.\r\n struct FundRequest{\r\n \r\n //Breif description about the task\r\n string description;\r\n \r\n //The amount required for the task\r\n uint amount;\r\n \r\n //List of recipients, who will recieve the donation\r\n mapping(uint=>Person) recipients;\r\n \r\n //recipients count\r\n uint recipientsCount;\r\n \r\n //list of people who disapproves this request(by default request is considered to be approved by all donors,\r\n //that's why we just need the disapprovers lists & count)\r\n mapping(address=>bool) disapprovers;\r\n \r\n //disapprovers count\r\n uint disapproversCount;\r\n \r\n //represents a timestamp at which this request was created\r\n uint createdAt;\r\n \r\n //Indicates if the request is completed\r\n bool isCompleted;\r\n }\r\n \r\n //=============================Public Properties=======================================//\r\n \r\n //Manager: Owner of the contract, can request funds for different tasks\r\n address public manager;\r\n \r\n //Campaign title\r\n string public title;\r\n \r\n //Breif description of the Campaign\r\n string public description;\r\n \r\n //Minimum amount of donation this contract must recieve to process the donations\r\n uint public amountInitialGoal;\r\n \r\n //the total amount of donations collected\r\n uint public amountCollected;\r\n \r\n //the amount delegated to fund requests\r\n uint public amountDelegated;\r\n \r\n //the total amount spended by this Campaign\r\n uint public amountSpended;\r\n \r\n //NOTE: donorsList starts at index 1 NOT at zero because we are tracking donors addresses for faster exists checks,\r\n //in another mapping(see below \"donors\") of address and index of that address in this array pointing to its amount.\r\n //\r\n //Donations made by donors\r\n Person[] public donorsList;\r\n \r\n //actual count of donors(NOTE: donorslist lenght won't represent the actual count because donors can be removed from middle of the array and will have empty dononrs then)\r\n uint public dononrsCount;\r\n \r\n //Donors address with and integer array pointing to donations array where donation amount is stored\r\n mapping(address=>uint) public donors;\r\n \r\n //Fund request by manager for certain task, donors can disapprove this, if 51% donors disapprove the request it will be considered cancled\r\n FundRequest[] fundRequests;\r\n \r\n //time required for a request to process if 51% of the donors approve it\r\n uint public fundRequestProcessTime; \r\n \r\n //the timestamp at which the Campaign was created\r\n uint public createdAt;\r\n \r\n //the timestamp the Campaign will be closed (after Campaign is closed donations will be locked in the contract)\r\n uint public closedAt;\r\n \r\n //True till campaign is closed\r\n bool public isActive;\r\n \r\n //=============================Modifiers=======================================//\r\n \r\n modifier onlyManager(){ require(manager == msg.sender,'Only Manager can call this function'); _; }\r\n modifier onlyDonor(){ require( donors[msg.sender] > 0 ,'Only Donor can call this functions'); _; }\r\n modifier ifActive(){ require( isActive == true , 'Contract is closed'); _; }\r\n modifier hasReachedGoal(){ require( closedAt > now && amountCollected >= amountInitialGoal , \"Campaign hasn't reached its goal yet.\"); _; }\r\n \r\n //=============================Constructor=======================================//\r\n\r\n constructor(address _manager, string memory _title, string memory _description, uint _initialAmountGoal, uint _createdAt, uint _closedAt) public{\r\n require(_closedAt > _createdAt, 'Campaign start time must be less than end time.');\r\n require(_initialAmountGoal > uint(0) , 'Initial amount goal must be greater than zero');\r\n \r\n manager = _manager;\r\n title = _title;\r\n description = _description;\r\n amountInitialGoal = _initialAmountGoal;\r\n createdAt = _createdAt;\r\n closedAt = _closedAt;\r\n fundRequestProcessTime = 259200;//equal to three days\r\n isActive = true;\r\n dononrsCount = 0;\r\n donorsList.push(Person({personAddress: address(0x0), amount: 0}));\r\n }\r\n\r\n //=============================Public Methods=======================================//\r\n \r\n //To donate funds for this Campaign, users can donate as many times as they want\r\n function donate() ifActive public payable {\r\n require(msg.value != uint(0),'Amount must be greater than zero');\r\n \r\n uint index = donors[msg.sender];\r\n\r\n //if donor hasn't donated any amount yet this would be true\r\n if(index == 0){\r\n index = 1;\r\n \r\n //add donor to mapping \r\n donors[msg.sender] = index;\r\n\r\n //add donor\r\n donorsList.push(\r\n Person({personAddress: msg.sender, amount: msg.value})\r\n );\r\n dononrsCount++;\r\n }\r\n //if donor has donated before just add the new donation amount to the previous one\r\n else{\r\n \r\n uint prevAmount = donorsList[index].amount;\r\n donorsList[index].amount = prevAmount + msg.value;\r\n }\r\n \r\n //increase amount collected count\r\n amountCollected += msg.value;\r\n }\r\n \r\n //To withdraw the donations for certain time if user wants before Campaign is closed and Campaign donation goal is not achieved,\r\n //after thqt users will be able to donate but they won't be able to withdraw their donations\r\n function withdrawDonation() ifActive public returns(uint) {\r\n //donation can only be withdrawn in two cases\r\n //1. if donation goal couldn't be reached\r\n //2. if donation hasn't closed yet\r\n require(amountCollected < amountInitialGoal || closedAt > now,'Donation cannot be withdrawn');\r\n \r\n uint index = donors[msg.sender];\r\n \r\n //if donor doesn't exist return\r\n require(index > 0, \"You have to be a donor in order to withdraw your donation\");\r\n \r\n uint amount = donorsList[index].amount;\r\n if(amount > 0)\r\n {\r\n // delete donor from mapping;\r\n donors[msg.sender] = 0;\r\n \r\n //delete donor from list\r\n delete donorsList[index];\r\n \r\n //detect the amount collected\r\n amountCollected -= amount;\r\n \r\n dononrsCount--;\r\n \r\n //transfer funds\r\n msg.sender.transfer(amount);\r\n }\r\n }\r\n \r\n function createFundRequest(string memory _description, uint _amount, address[] memory _recipientsAddress, uint[] memory _recipientsAmount) hasReachedGoal ifActive onlyManager public{\r\n require(closedAt > now && amountCollected >= amountInitialGoal,\"Campaign couldn't reached its goal.\");\r\n require(_amount > 0,'Amount cannot be zero.');\r\n require(_recipientsAddress.length > 0 && _recipientsAmount.length > 0, 'Request must contain atleast one recipient');\r\n require(_recipientsAddress.length == _recipientsAmount.length,'There should be equal no. of recipients addresses and amounts');\r\n require(amountCollected - amountSpended - amountDelegated >= _amount, \"Campaign don't have enough funds for your request.\");\r\n \r\n uint totalAmount = 0;\r\n for(uint i; i < _recipientsAmount.length; i++){\r\n totalAmount += _recipientsAmount[i]; \r\n }\r\n \r\n require(totalAmount == _amount, \"Total amount delegated to recipients must be equal to the total amount in the request\");\r\n \r\n fundRequests.push(\r\n FundRequest({description: _description, amount: _amount, recipientsCount: 0, createdAt: now, disapproversCount: 0, isCompleted: false})\r\n );\r\n //get the added request\r\n FundRequest storage request = fundRequests[fundRequests.length - 1];\r\n \r\n mapping(uint=>Person) storage recipients = request.recipients;\r\n //add the recipients\r\n for(uint i = 0; i < _recipientsAddress.length; i++){\r\n recipients[i] = Person({personAddress: _recipientsAddress[i], amount: _recipientsAmount[i]});\r\n request.recipientsCount++;\r\n }\r\n \r\n amountDelegated += _amount;\r\n }\r\n \r\n function disapproveFundRequest(uint index) hasReachedGoal ifActive onlyDonor public{\r\n require(index < fundRequests.length, \"Fund Request don't exist.\");\r\n require(fundRequests[index].isCompleted == false,'Request has already been completed.');\r\n \r\n if(!fundRequests[index].disapprovers[msg.sender]){\r\n fundRequests[index].disapprovers[msg.sender] = true;\r\n fundRequests[index].disapproversCount++;\r\n }\r\n }\r\n \r\n function approveFundRequest(uint index) ifActive onlyDonor public{\r\n require(index < fundRequests.length, \"Fund Request don't exist.\");\r\n require(fundRequests[index].isCompleted == false,'Request has already been completed.');\r\n \r\n mapping(address=>bool) storage disapprovers = fundRequests[index].disapprovers;\r\n \r\n //only approve if donor disapproved the request before\r\n if(disapprovers[msg.sender]){\r\n //make aprover again\r\n disapprovers[msg.sender] = false;\r\n //decrease the disapprovers count\r\n fundRequests[index].disapproversCount--;\r\n }\r\n }\r\n \r\n function processFundRequest(uint index) ifActive onlyManager public{\r\n FundRequest storage request = fundRequests[index];\r\n require(\r\n request.createdAt + fundRequestProcessTime < now && \r\n request.disapproversCount < donorsList.length &&\r\n !request.isCompleted \r\n , \"Fund Request cannot be processed, either the required time is not reached yet or most donors has disapproved it.\");\r\n \r\n request.isCompleted = true;\r\n amountDelegated -= request.amount;\r\n amountSpended += request.amount;\r\n for(uint i = 0; i < request.recipientsCount; i++){\r\n Person storage recipient = request.recipients[i];\r\n //convert address to address payable (NOTE: this conversion differs around different versions of solidity)\r\n address(uint160(recipient.personAddress)).transfer(recipient.amount);\r\n }\r\n \r\n }\r\n \r\n function getFundRequest(uint index) public view returns(string memory,uint, uint, uint, uint, bool, bool, address[]memory, uint[]memory){\r\n require(fundRequests.length + 1 > index,\"Index is out of range.\");\r\n \r\n //get the recipients\r\n FundRequest storage req = fundRequests[index];\r\n address[] memory addresses = new address[](req.recipientsCount);\r\n uint[] memory amounts = new uint[](req.recipientsCount);\r\n \r\n for(uint i = 0; i < req.recipientsCount; i++){\r\n addresses[i] = req.recipients[i].personAddress;\r\n amounts[i] = req.recipients[i].amount;\r\n }\r\n \r\n return(\r\n req.description,\r\n req.amount,\r\n req.recipientsCount,\r\n req.disapproversCount,\r\n req.createdAt,\r\n req.isCompleted,\r\n req.disapprovers[msg.sender],\r\n addresses,\r\n amounts\r\n );\r\n }\r\n\r\n function getSummary()public view returns(\r\n address, string memory, string memory, uint, uint, uint, uint, uint, uint, uint, uint,uint, bool\r\n ){\r\n return (\r\n manager,\r\n title,\r\n description,\r\n amountInitialGoal,\r\n amountCollected,\r\n amountDelegated,\r\n amountSpended,\r\n fundRequestProcessTime,\r\n createdAt,\r\n closedAt,\r\n dononrsCount,\r\n fundRequests.length,\r\n isActive\r\n );\r\n }\r\n \r\n function setFundRequestProcessTime(uint processTime) ifActive onlyManager public {\r\n fundRequestProcessTime = processTime;\r\n }\r\n \r\n \r\n function deactivate() onlyManager public {\r\n require(amountCollected == amountSpended,\"Campaign cannot be closed, because it still has some unspended funds\");\r\n isActive = false;\r\n }\r\n \r\n}", + "metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_manager\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_title\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_description\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_initialAmountGoal\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_createdAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_closedAt\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"constant\":true,\"inputs\":[],\"name\":\"amountCollected\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"amountDelegated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"amountInitialGoal\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"amountSpended\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"approveFundRequest\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"closeFundRequest\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"closedAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"string\",\"name\":\"_description\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"_recipientsAddress\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_recipientsAmount\",\"type\":\"uint256[]\"}],\"name\":\"createFundRequest\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"createdAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"deactivate\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"description\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"disapproveFundRequest\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"donate\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"dononrsCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"donors\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"donorsList\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"personAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"fundRequestProcessTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getFundRequest\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getSummary\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isActive\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"manager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"processFundRequest\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"processTime\",\"type\":\"uint256\"}],\"name\":\"setFundRequestProcessTime\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"title\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"withdrawDonation\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/F/Software Development/React Projects/de-care/ethereum/contracts/Campaign.sol\":\"Campaign\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/F/Software Development/React Projects/de-care/ethereum/contracts/Campaign.sol\":{\"keccak256\":\"0x5bb305dbe63972512fdef9533062da316a93381b9372d3b62271c1014bbd2890\",\"urls\":[\"bzz-raw://52e56cdbdd70d954ef7f4a002af6860fe98f2332764bd8d3063b3eb07e2320bb\",\"dweb:/ipfs/QmcMRptj8ZDyEXPtGhoov9bcC2Pt2tg512hyWnACa7qgNz\"]}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b50604051620036d0380380620036d0833981810160405260c08110156200003757600080fd5b8101908080519060200190929190805160405193929190846401000000008211156200006257600080fd5b838201915060208201858111156200007957600080fd5b82518660018202830111640100000000821117156200009757600080fd5b8083526020830192505050908051906020019080838360005b83811015620000cd578082015181840152602081019050620000b0565b50505050905090810190601f168015620000fb5780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200011f57600080fd5b838201915060208201858111156200013657600080fd5b82518660018202830111640100000000821117156200015457600080fd5b8083526020830192505050908051906020019080838360005b838110156200018a5780820151818401526020810190506200016d565b50505050905090810190601f168015620001b85780820380516001836020036101000a031916815260200191505b506040526020018051906020019092919080519060200190929190805190602001909291905050508181116200023a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180620036a1602f913960400191505060405180910390fd5b6000831162000295576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e81526020018062003673602e913960400191505060405180910390fd5b856000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508460019080519060200190620002ed92919062000403565b5083600290805190602001906200030692919062000403565b508260038190555081600c8190555080600d819055506203f480600b819055506001600e60006101000a81548160ff021916908315150217905550600060088190555060076040518060400160405280600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152509080600181540180825580915050906001820390600052602060002090600202016000909192909190915060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010155505050505050505050620004b2565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200044657805160ff191683800117855562000477565b8280016001018555821562000477579182015b828111156200047657825182559160200191906001019062000459565b5b5090506200048691906200048a565b5090565b620004af91905b80821115620004ab57600081600090555060010162000491565b5090565b90565b6131b180620004c26000396000f3fe6080604052600436106101665760003560e01c806360713609116100d1578063a96271361161008a578063cf09e0d011610064578063cf09e0d014610b1c578063d2765c9414610b47578063e81e1ccc14610b82578063ed88c68e14610bad57610166565b8063a9627136146109fa578063aaccd72614610a7c578063ca0cdea814610ab757610166565b806360713609146108835780636a3d9a4a146108ae5780637284e416146108d9578063777016fb1461096957806396f8b38d146109945780639ef27b00146109cf57610166565b80634051ddac116101235780634051ddac14610460578063481c6a75146105d95780634a79d50c146106305780634dfa8434146106c057806351b42b00146108415780635c8d71521461085857610166565b80631b0f5fc21461016b57806321464bfe146101a657806322f3e2d4146101e157806326e9734414610210578063332f7acf1461023b578063372bfd9c14610266575b600080fd5b34801561017757600080fd5b506101a46004803603602081101561018e57600080fd5b8101908080359060200190929190505050610bb7565b005b3480156101b257600080fd5b506101df600480360360208110156101c957600080fd5b8101908080359060200190929190505050610f0d565b005b3480156101ed57600080fd5b506101f66112b6565b604051808215151515815260200191505060405180910390f35b34801561021c57600080fd5b506102256112c9565b6040518082815260200191505060405180910390f35b34801561024757600080fd5b506102506112cf565b6040518082815260200191505060405180910390f35b34801561027257600080fd5b5061045e6004803603608081101561028957600080fd5b81019080803590602001906401000000008111156102a657600080fd5b8201836020820111156102b857600080fd5b803590602001918460018302840111640100000000831117156102da57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290803590602001909291908035906020019064010000000081111561034757600080fd5b82018360208201111561035957600080fd5b8035906020019184602083028401116401000000008311171561037b57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803590602001906401000000008111156103db57600080fd5b8201836020820111156103ed57600080fd5b8035906020019184602083028401116401000000008311171561040f57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505091929192905050506112d5565b005b34801561046c57600080fd5b506104756118b6565b604051808e73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001806020018d81526020018c81526020018b81526020018a81526020018981526020018881526020018781526020018681526020018581526020018415151515815260200183810383528f818151815260200191508051906020019080838360005b8381101561052b578082015181840152602081019050610510565b50505050905090810190601f1680156105585780820380516001836020036101000a031916815260200191505b5083810382528e818151815260200191508051906020019080838360005b83811015610591578082015181840152602081019050610576565b50505050905090810190601f1680156105be5780820380516001836020036101000a031916815260200191505b509f5050505050505050505050505050505060405180910390f35b3480156105e557600080fd5b506105ee611a82565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561063c57600080fd5b50610645611aa7565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561068557808201518184015260208101905061066a565b50505050905090810190601f1680156106b25780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156106cc57600080fd5b506106f9600480360360208110156106e357600080fd5b8101908080359060200190929190505050611b45565b60405180806020018b81526020018a8152602001898152602001888152602001871515151581526020018615151515815260200180602001806020018515151515815260200184810384528e818151815260200191508051906020019080838360005b8381101561077757808201518184015260208101905061075c565b50505050905090810190601f1680156107a45780820380516001836020036101000a031916815260200191505b50848103835287818151815260200191508051906020019060200280838360005b838110156107e05780820151818401526020810190506107c5565b50505050905001848103825286818151815260200191508051906020019060200280838360005b83811015610822578082015181840152602081019050610807565b505050509050019d505050505050505050505050505060405180910390f35b34801561084d57600080fd5b50610856611e7e565b005b34801561086457600080fd5b5061086d611f9c565b6040518082815260200191505060405180910390f35b34801561088f57600080fd5b50610898611fa2565b6040518082815260200191505060405180910390f35b3480156108ba57600080fd5b506108c3611fa8565b6040518082815260200191505060405180910390f35b3480156108e557600080fd5b506108ee611fae565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561092e578082015181840152602081019050610913565b50505050905090810190601f16801561095b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561097557600080fd5b5061097e61204c565b6040518082815260200191505060405180910390f35b3480156109a057600080fd5b506109cd600480360360208110156109b757600080fd5b8101908080359060200190929190505050612052565b005b3480156109db57600080fd5b506109e461218a565b6040518082815260200191505060405180910390f35b348015610a0657600080fd5b50610a3360048036036020811015610a1d57600080fd5b8101908080359060200190929190505050612190565b604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390f35b348015610a8857600080fd5b50610ab560048036036020811015610a9f57600080fd5b81019080803590602001909291905050506121e1565b005b348015610ac357600080fd5b50610b0660048036036020811015610ada57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061246c565b6040518082815260200191505060405180910390f35b348015610b2857600080fd5b50610b31612484565b6040518082815260200191505060405180910390f35b348015610b5357600080fd5b50610b8060048036036020811015610b6a57600080fd5b810190808035906020019092919050505061248a565b005b348015610b8e57600080fd5b50610b976128b2565b6040518082815260200191505060405180910390f35b610bb5612b8d565b005b60011515600e60009054906101000a900460ff16151514610c40576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f436f6e747261637420697320636c6f736564000000000000000000000000000081525060200191505060405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ce5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612fd16023913960400191505060405180910390fd5b60001515600a8281548110610cf657fe5b906000526020600020906008020160070160019054906101000a900460ff16151514610d6d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602581526020018061304f6025913960400191505060405180910390fd5b6000600a8281548110610d7c57fe5b9060005260206000209060080201905042600b54826006015401108015610dab57506007805490508160050154105b8015610dc657508060070160009054906101000a900460ff16155b610e1b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252607081526020018061310d6070913960800191505060405180910390fd5b60018160070160006101000a81548160ff0219169083151502179055508060010154600560008282540392505081905550806001015460066000828254019250508190555060008090505b8160030154811015610f0857600082600201600083815260200190815260200160002090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc82600101549081150290604051600060405180830381858888f19350505050158015610ef9573d6000803e3d6000fd5b50508080600101915050610e66565b505050565b60011515600e60009054906101000a900460ff16151514610f96576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f436f6e747261637420697320636c6f736564000000000000000000000000000081525060200191505060405180910390fd5b6000600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541161102e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180612ff46022913960400191505060405180910390fd5b600a8054905081106110a8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f46756e64205265717565737420646f6e27742065786973742e0000000000000081525060200191505060405180910390fd5b60001515600a82815481106110b957fe5b906000526020600020906008020160070160009054906101000a900460ff16151514611130576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612f526023913960400191505060405180910390fd5b60001515600a828154811061114157fe5b906000526020600020906008020160070160019054906101000a900460ff161515146111b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602581526020018061304f6025913960400191505060405180910390fd5b6000600a82815481106111c757fe5b906000526020600020906008020160040190508060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156112b25760008160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600a828154811061128f57fe5b906000526020600020906008020160050160008154809291906001900391905055505b5050565b600e60009054906101000a900460ff1681565b60085481565b60045481565b42600d541080156112ea575060035460045410155b61133f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612ef06025913960400191505060405180910390fd5b60011515600e60009054906101000a900460ff161515146113c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f436f6e747261637420697320636c6f736564000000000000000000000000000081525060200191505060405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461146d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612fd16023913960400191505060405180910390fd5b600083116114e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f416d6f756e742063616e6e6f74206265207a65726f2e0000000000000000000081525060200191505060405180910390fd5b600082511180156114f5575060008151115b61154a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180612f75602a913960400191505060405180910390fd5b80518251146115a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d815260200180612f15603d913960400191505060405180910390fd5b8260055460065460045403031015611607576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526032815260200180612f9f6032913960400191505060405180910390fd5b600080905060005b825181101561163d5782818151811061162457fe5b602002602001015182019150808060010191505061160f565b50838114611696576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260558152602001806130746055913960600191505060405180910390fd5b600a6040518060e0016040528087815260200186815260200160008152602001600081526020014281526020016000151581526020016000151581525090806001815401808255809150509060018203906000526020600020906008020160009091929091909150600082015181600001908051906020019061171a929190612e4a565b506020820151816001015560408201518160030155606082015181600501556080820151816006015560a08201518160070160006101000a81548160ff02191690831515021790555060c08201518160070160016101000a81548160ff0219169083151502179055505050506000600a6001600a80549050038154811061179d57fe5b90600052602060002090600802019050600081600201905060008090505b855181101561189c5760405180604001604052808783815181106117db57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff16815260200186838151811061180a57fe5b602002602001015181525082600083815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010155905050826003016000815480929190600101919050555080806001019150506117bb565b508560056000828254019250508190555050505050505050565b60006060806000806000806000806000806000806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660016002600354600454600554600654600b54600c54600d54600780549050600a80549050600e60009054906101000a900460ff168b8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156119b65780601f1061198b576101008083540402835291602001916119b6565b820191906000526020600020905b81548152906001019060200180831161199957829003601f168201915b50505050509b508a8054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611a525780601f10611a2757610100808354040283529160200191611a52565b820191906000526020600020905b815481529060010190602001808311611a3557829003601f168201915b50505050509a509c509c509c509c509c509c509c509c509c509c509c509c509c50909192939495969798999a9b9c565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611b3d5780601f10611b1257610100808354040283529160200191611b3d565b820191906000526020600020905b815481529060010190602001808311611b2057829003601f168201915b505050505081565b606060008060008060008060608060008a6001600a805490500111611bd2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f496e646578206973206f7574206f662072616e67652e0000000000000000000081525060200191505060405180910390fd5b6000600a8c81548110611be157fe5b9060005260206000209060080201905060608160030154604051908082528060200260200182016040528015611c265781602001602082028038833980820191505090505b50905060608260030154604051908082528060200260200182016040528015611c5e5781602001602082028038833980820191505090505b50905060008090505b8360030154811015611d305783600201600082815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16838281518110611cb857fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505083600201600082815260200190815260200160002060010154828281518110611d1757fe5b6020026020010181815250508080600101915050611c67565b508260000183600101548460030154856005015486600601548760070160009054906101000a900460ff168860040160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1688888b60070160019054906101000a900460ff16898054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611e535780601f10611e2857610100808354040283529160200191611e53565b820191906000526020600020905b815481529060010190602001808311611e3657829003601f168201915b505050505099509c509c509c509c509c509c509c509c509c509c505050509193959799509193959799565b3373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611f23576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612fd16023913960400191505060405180910390fd5b60065460045414611f7f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260448152602001806130c96044913960600191505060405180910390fd5b6000600e60006101000a81548160ff021916908315150217905550565b60065481565b60055481565b60035481565b60028054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156120445780601f1061201957610100808354040283529160200191612044565b820191906000526020600020905b81548152906001019060200180831161202757829003601f168201915b505050505081565b600b5481565b60011515600e60009054906101000a900460ff161515146120db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f436f6e747261637420697320636c6f736564000000000000000000000000000081525060200191505060405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612180576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612fd16023913960400191505060405180910390fd5b80600b8190555050565b600d5481565b6007818154811061219d57fe5b90600052602060002090600202016000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154905082565b60011515600e60009054906101000a900460ff1615151461226a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f436f6e747261637420697320636c6f736564000000000000000000000000000081525060200191505060405180910390fd5b6000600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205411612302576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180612ff46022913960400191505060405180910390fd5b600a80549050811061237c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f46756e64205265717565737420646f6e27742065786973742e0000000000000081525060200191505060405180910390fd5b60001515600a828154811061238d57fe5b906000526020600020906008020160070160009054906101000a900460ff16151514612404576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612f526023913960400191505060405180910390fd5b600a818154811061241157fe5b9060005260206000209060080201600101546005600082825403925050819055506001600a828154811061244157fe5b906000526020600020906008020160070160016101000a81548160ff02191690831515021790555050565b60096020528060005260406000206000915090505481565b600c5481565b42600d5410801561249f575060035460045410155b6124f4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612ef06025913960400191505060405180910390fd5b60011515600e60009054906101000a900460ff1615151461257d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f436f6e747261637420697320636c6f736564000000000000000000000000000081525060200191505060405180910390fd5b6000600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205411612615576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180612ff46022913960400191505060405180910390fd5b600a80549050811061268f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f46756e64205265717565737420646f6e27742065786973742e0000000000000081525060200191505060405180910390fd5b60001515600a82815481106126a057fe5b906000526020600020906008020160070160009054906101000a900460ff16151514612717576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612f526023913960400191505060405180910390fd5b60001515600a828154811061272857fe5b906000526020600020906008020160070160019054906101000a900460ff1615151461279f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602581526020018061304f6025913960400191505060405180910390fd5b600a81815481106127ac57fe5b906000526020600020906008020160040160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166128af576001600a828154811061281b57fe5b906000526020600020906008020160040160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600a818154811061288d57fe5b9060005260206000209060080201600501600081548092919060010191905055505b50565b600060011515600e60009054906101000a900460ff1615151461293d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f436f6e747261637420697320636c6f736564000000000000000000000000000081525060200191505060405180910390fd5b6003546004541080612950575042600d54115b6129c2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f446f6e6174696f6e2063616e6e6f742062652077697468647261776e0000000081525060200191505060405180910390fd5b6000600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060008111612a5f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260398152602001806130166039913960400191505060405180910390fd5b600060078281548110612a6e57fe5b90600052602060002090600202016001015490506000811115612b88576000600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555060078281548110612add57fe5b9060005260206000209060020201600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556001820160009055505080600460008282540392505081905550600860008154809291906001900391905055503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015612b86573d6000803e3d6000fd5b505b505090565b60011515600e60009054906101000a900460ff16151514612c16576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f436f6e747261637420697320636c6f736564000000000000000000000000000081525060200191505060405180910390fd5b6000341415612c8d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f416d6f756e74206d7573742062652067726561746572207468616e207a65726f81525060200191505060405180910390fd5b6000600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000811415612ded5760019050600760405180604001604052803373ffffffffffffffffffffffffffffffffffffffff168152602001348152509080600181540180825580915050906001820390600052602060002090600202016000909192909190915060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010155505050600160078054905003600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600860008154809291906001019190505550612e37565b600060078281548110612dfc57fe5b906000526020600020906002020160010154905034810160078381548110612e2057fe5b906000526020600020906002020160010181905550505b3460046000828254019250508190555050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612e8b57805160ff1916838001178555612eb9565b82800160010185558215612eb9579182015b82811115612eb8578251825591602001919060010190612e9d565b5b509050612ec69190612eca565b5090565b612eec91905b80821115612ee8576000816000905550600101612ed0565b5090565b9056fe43616d706169676e206861736e277420726561636865642069747320676f616c207965742e54686572652073686f756c6420626520657175616c206e6f2e206f6620726563697069656e74732061646472657373657320616e6420616d6f756e7473526571756573742068617320616c7265616479206265656e20636f6d706c657465642e52657175657374206d75737420636f6e7461696e2061746c65617374206f6e6520726563697069656e7443616d706169676e20646f6e2774206861766520656e6f7567682066756e647320666f7220796f757220726571756573742e4f6e6c79204d616e616765722063616e2063616c6c20746869732066756e6374696f6e4f6e6c7920446f6e6f722063616e2063616c6c20746869732066756e6374696f6e73596f75206861766520746f206265206120646f6e6f7220696e206f7264657220746f20776974686472617720796f757220646f6e6174696f6e5468697320526571756573742068617320616c7265616479206265656e20636c6f7365642e546f74616c20616d6f756e742064656c65676174656420746f20726563697069656e7473206d75737420626520657175616c20746f2074686520746f74616c20616d6f756e7420696e20746865207265717565737443616d706169676e2063616e6e6f7420626520636c6f7365642c2062656361757365206974207374696c6c2068617320736f6d6520756e7370656e6465642066756e647346756e6420526571756573742063616e6e6f742062652070726f6365737365642c20656974686572207468652072657175697265642074696d65206973206e6f74207265616368656420796574206f72206d6f737420646f6e6f72732068617320646973617070726f7665642069742ea265627a7a72315820c2384032ffab961610d62a677cece370170e85e386c540571b99703f4afbd65664736f6c63430005100032496e697469616c20616d6f756e7420676f616c20206d7573742062652067726561746572207468616e207a65726f43616d706169676e2073746172742074696d65206d757374206265206c657373207468616e20656e642074696d652e", + "deployedBytecode": "0x6080604052600436106101665760003560e01c806360713609116100d1578063a96271361161008a578063cf09e0d011610064578063cf09e0d014610b1c578063d2765c9414610b47578063e81e1ccc14610b82578063ed88c68e14610bad57610166565b8063a9627136146109fa578063aaccd72614610a7c578063ca0cdea814610ab757610166565b806360713609146108835780636a3d9a4a146108ae5780637284e416146108d9578063777016fb1461096957806396f8b38d146109945780639ef27b00146109cf57610166565b80634051ddac116101235780634051ddac14610460578063481c6a75146105d95780634a79d50c146106305780634dfa8434146106c057806351b42b00146108415780635c8d71521461085857610166565b80631b0f5fc21461016b57806321464bfe146101a657806322f3e2d4146101e157806326e9734414610210578063332f7acf1461023b578063372bfd9c14610266575b600080fd5b34801561017757600080fd5b506101a46004803603602081101561018e57600080fd5b8101908080359060200190929190505050610bb7565b005b3480156101b257600080fd5b506101df600480360360208110156101c957600080fd5b8101908080359060200190929190505050610f0d565b005b3480156101ed57600080fd5b506101f66112b6565b604051808215151515815260200191505060405180910390f35b34801561021c57600080fd5b506102256112c9565b6040518082815260200191505060405180910390f35b34801561024757600080fd5b506102506112cf565b6040518082815260200191505060405180910390f35b34801561027257600080fd5b5061045e6004803603608081101561028957600080fd5b81019080803590602001906401000000008111156102a657600080fd5b8201836020820111156102b857600080fd5b803590602001918460018302840111640100000000831117156102da57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290803590602001909291908035906020019064010000000081111561034757600080fd5b82018360208201111561035957600080fd5b8035906020019184602083028401116401000000008311171561037b57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803590602001906401000000008111156103db57600080fd5b8201836020820111156103ed57600080fd5b8035906020019184602083028401116401000000008311171561040f57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505091929192905050506112d5565b005b34801561046c57600080fd5b506104756118b6565b604051808e73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001806020018d81526020018c81526020018b81526020018a81526020018981526020018881526020018781526020018681526020018581526020018415151515815260200183810383528f818151815260200191508051906020019080838360005b8381101561052b578082015181840152602081019050610510565b50505050905090810190601f1680156105585780820380516001836020036101000a031916815260200191505b5083810382528e818151815260200191508051906020019080838360005b83811015610591578082015181840152602081019050610576565b50505050905090810190601f1680156105be5780820380516001836020036101000a031916815260200191505b509f5050505050505050505050505050505060405180910390f35b3480156105e557600080fd5b506105ee611a82565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561063c57600080fd5b50610645611aa7565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561068557808201518184015260208101905061066a565b50505050905090810190601f1680156106b25780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156106cc57600080fd5b506106f9600480360360208110156106e357600080fd5b8101908080359060200190929190505050611b45565b60405180806020018b81526020018a8152602001898152602001888152602001871515151581526020018615151515815260200180602001806020018515151515815260200184810384528e818151815260200191508051906020019080838360005b8381101561077757808201518184015260208101905061075c565b50505050905090810190601f1680156107a45780820380516001836020036101000a031916815260200191505b50848103835287818151815260200191508051906020019060200280838360005b838110156107e05780820151818401526020810190506107c5565b50505050905001848103825286818151815260200191508051906020019060200280838360005b83811015610822578082015181840152602081019050610807565b505050509050019d505050505050505050505050505060405180910390f35b34801561084d57600080fd5b50610856611e7e565b005b34801561086457600080fd5b5061086d611f9c565b6040518082815260200191505060405180910390f35b34801561088f57600080fd5b50610898611fa2565b6040518082815260200191505060405180910390f35b3480156108ba57600080fd5b506108c3611fa8565b6040518082815260200191505060405180910390f35b3480156108e557600080fd5b506108ee611fae565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561092e578082015181840152602081019050610913565b50505050905090810190601f16801561095b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561097557600080fd5b5061097e61204c565b6040518082815260200191505060405180910390f35b3480156109a057600080fd5b506109cd600480360360208110156109b757600080fd5b8101908080359060200190929190505050612052565b005b3480156109db57600080fd5b506109e461218a565b6040518082815260200191505060405180910390f35b348015610a0657600080fd5b50610a3360048036036020811015610a1d57600080fd5b8101908080359060200190929190505050612190565b604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390f35b348015610a8857600080fd5b50610ab560048036036020811015610a9f57600080fd5b81019080803590602001909291905050506121e1565b005b348015610ac357600080fd5b50610b0660048036036020811015610ada57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061246c565b6040518082815260200191505060405180910390f35b348015610b2857600080fd5b50610b31612484565b6040518082815260200191505060405180910390f35b348015610b5357600080fd5b50610b8060048036036020811015610b6a57600080fd5b810190808035906020019092919050505061248a565b005b348015610b8e57600080fd5b50610b976128b2565b6040518082815260200191505060405180910390f35b610bb5612b8d565b005b60011515600e60009054906101000a900460ff16151514610c40576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f436f6e747261637420697320636c6f736564000000000000000000000000000081525060200191505060405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ce5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612fd16023913960400191505060405180910390fd5b60001515600a8281548110610cf657fe5b906000526020600020906008020160070160019054906101000a900460ff16151514610d6d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602581526020018061304f6025913960400191505060405180910390fd5b6000600a8281548110610d7c57fe5b9060005260206000209060080201905042600b54826006015401108015610dab57506007805490508160050154105b8015610dc657508060070160009054906101000a900460ff16155b610e1b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252607081526020018061310d6070913960800191505060405180910390fd5b60018160070160006101000a81548160ff0219169083151502179055508060010154600560008282540392505081905550806001015460066000828254019250508190555060008090505b8160030154811015610f0857600082600201600083815260200190815260200160002090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc82600101549081150290604051600060405180830381858888f19350505050158015610ef9573d6000803e3d6000fd5b50508080600101915050610e66565b505050565b60011515600e60009054906101000a900460ff16151514610f96576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f436f6e747261637420697320636c6f736564000000000000000000000000000081525060200191505060405180910390fd5b6000600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541161102e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180612ff46022913960400191505060405180910390fd5b600a8054905081106110a8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f46756e64205265717565737420646f6e27742065786973742e0000000000000081525060200191505060405180910390fd5b60001515600a82815481106110b957fe5b906000526020600020906008020160070160009054906101000a900460ff16151514611130576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612f526023913960400191505060405180910390fd5b60001515600a828154811061114157fe5b906000526020600020906008020160070160019054906101000a900460ff161515146111b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602581526020018061304f6025913960400191505060405180910390fd5b6000600a82815481106111c757fe5b906000526020600020906008020160040190508060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156112b25760008160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600a828154811061128f57fe5b906000526020600020906008020160050160008154809291906001900391905055505b5050565b600e60009054906101000a900460ff1681565b60085481565b60045481565b42600d541080156112ea575060035460045410155b61133f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612ef06025913960400191505060405180910390fd5b60011515600e60009054906101000a900460ff161515146113c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f436f6e747261637420697320636c6f736564000000000000000000000000000081525060200191505060405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461146d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612fd16023913960400191505060405180910390fd5b600083116114e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f416d6f756e742063616e6e6f74206265207a65726f2e0000000000000000000081525060200191505060405180910390fd5b600082511180156114f5575060008151115b61154a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180612f75602a913960400191505060405180910390fd5b80518251146115a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d815260200180612f15603d913960400191505060405180910390fd5b8260055460065460045403031015611607576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526032815260200180612f9f6032913960400191505060405180910390fd5b600080905060005b825181101561163d5782818151811061162457fe5b602002602001015182019150808060010191505061160f565b50838114611696576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260558152602001806130746055913960600191505060405180910390fd5b600a6040518060e0016040528087815260200186815260200160008152602001600081526020014281526020016000151581526020016000151581525090806001815401808255809150509060018203906000526020600020906008020160009091929091909150600082015181600001908051906020019061171a929190612e4a565b506020820151816001015560408201518160030155606082015181600501556080820151816006015560a08201518160070160006101000a81548160ff02191690831515021790555060c08201518160070160016101000a81548160ff0219169083151502179055505050506000600a6001600a80549050038154811061179d57fe5b90600052602060002090600802019050600081600201905060008090505b855181101561189c5760405180604001604052808783815181106117db57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff16815260200186838151811061180a57fe5b602002602001015181525082600083815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010155905050826003016000815480929190600101919050555080806001019150506117bb565b508560056000828254019250508190555050505050505050565b60006060806000806000806000806000806000806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660016002600354600454600554600654600b54600c54600d54600780549050600a80549050600e60009054906101000a900460ff168b8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156119b65780601f1061198b576101008083540402835291602001916119b6565b820191906000526020600020905b81548152906001019060200180831161199957829003601f168201915b50505050509b508a8054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611a525780601f10611a2757610100808354040283529160200191611a52565b820191906000526020600020905b815481529060010190602001808311611a3557829003601f168201915b50505050509a509c509c509c509c509c509c509c509c509c509c509c509c509c50909192939495969798999a9b9c565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611b3d5780601f10611b1257610100808354040283529160200191611b3d565b820191906000526020600020905b815481529060010190602001808311611b2057829003601f168201915b505050505081565b606060008060008060008060608060008a6001600a805490500111611bd2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f496e646578206973206f7574206f662072616e67652e0000000000000000000081525060200191505060405180910390fd5b6000600a8c81548110611be157fe5b9060005260206000209060080201905060608160030154604051908082528060200260200182016040528015611c265781602001602082028038833980820191505090505b50905060608260030154604051908082528060200260200182016040528015611c5e5781602001602082028038833980820191505090505b50905060008090505b8360030154811015611d305783600201600082815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16838281518110611cb857fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505083600201600082815260200190815260200160002060010154828281518110611d1757fe5b6020026020010181815250508080600101915050611c67565b508260000183600101548460030154856005015486600601548760070160009054906101000a900460ff168860040160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1688888b60070160019054906101000a900460ff16898054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611e535780601f10611e2857610100808354040283529160200191611e53565b820191906000526020600020905b815481529060010190602001808311611e3657829003601f168201915b505050505099509c509c509c509c509c509c509c509c509c509c505050509193959799509193959799565b3373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611f23576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612fd16023913960400191505060405180910390fd5b60065460045414611f7f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260448152602001806130c96044913960600191505060405180910390fd5b6000600e60006101000a81548160ff021916908315150217905550565b60065481565b60055481565b60035481565b60028054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156120445780601f1061201957610100808354040283529160200191612044565b820191906000526020600020905b81548152906001019060200180831161202757829003601f168201915b505050505081565b600b5481565b60011515600e60009054906101000a900460ff161515146120db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f436f6e747261637420697320636c6f736564000000000000000000000000000081525060200191505060405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612180576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612fd16023913960400191505060405180910390fd5b80600b8190555050565b600d5481565b6007818154811061219d57fe5b90600052602060002090600202016000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154905082565b60011515600e60009054906101000a900460ff1615151461226a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f436f6e747261637420697320636c6f736564000000000000000000000000000081525060200191505060405180910390fd5b6000600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205411612302576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180612ff46022913960400191505060405180910390fd5b600a80549050811061237c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f46756e64205265717565737420646f6e27742065786973742e0000000000000081525060200191505060405180910390fd5b60001515600a828154811061238d57fe5b906000526020600020906008020160070160009054906101000a900460ff16151514612404576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612f526023913960400191505060405180910390fd5b600a818154811061241157fe5b9060005260206000209060080201600101546005600082825403925050819055506001600a828154811061244157fe5b906000526020600020906008020160070160016101000a81548160ff02191690831515021790555050565b60096020528060005260406000206000915090505481565b600c5481565b42600d5410801561249f575060035460045410155b6124f4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612ef06025913960400191505060405180910390fd5b60011515600e60009054906101000a900460ff1615151461257d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f436f6e747261637420697320636c6f736564000000000000000000000000000081525060200191505060405180910390fd5b6000600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205411612615576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180612ff46022913960400191505060405180910390fd5b600a80549050811061268f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f46756e64205265717565737420646f6e27742065786973742e0000000000000081525060200191505060405180910390fd5b60001515600a82815481106126a057fe5b906000526020600020906008020160070160009054906101000a900460ff16151514612717576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612f526023913960400191505060405180910390fd5b60001515600a828154811061272857fe5b906000526020600020906008020160070160019054906101000a900460ff1615151461279f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602581526020018061304f6025913960400191505060405180910390fd5b600a81815481106127ac57fe5b906000526020600020906008020160040160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166128af576001600a828154811061281b57fe5b906000526020600020906008020160040160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600a818154811061288d57fe5b9060005260206000209060080201600501600081548092919060010191905055505b50565b600060011515600e60009054906101000a900460ff1615151461293d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f436f6e747261637420697320636c6f736564000000000000000000000000000081525060200191505060405180910390fd5b6003546004541080612950575042600d54115b6129c2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f446f6e6174696f6e2063616e6e6f742062652077697468647261776e0000000081525060200191505060405180910390fd5b6000600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060008111612a5f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260398152602001806130166039913960400191505060405180910390fd5b600060078281548110612a6e57fe5b90600052602060002090600202016001015490506000811115612b88576000600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555060078281548110612add57fe5b9060005260206000209060020201600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556001820160009055505080600460008282540392505081905550600860008154809291906001900391905055503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015612b86573d6000803e3d6000fd5b505b505090565b60011515600e60009054906101000a900460ff16151514612c16576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f436f6e747261637420697320636c6f736564000000000000000000000000000081525060200191505060405180910390fd5b6000341415612c8d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f416d6f756e74206d7573742062652067726561746572207468616e207a65726f81525060200191505060405180910390fd5b6000600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000811415612ded5760019050600760405180604001604052803373ffffffffffffffffffffffffffffffffffffffff168152602001348152509080600181540180825580915050906001820390600052602060002090600202016000909192909190915060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010155505050600160078054905003600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600860008154809291906001019190505550612e37565b600060078281548110612dfc57fe5b906000526020600020906002020160010154905034810160078381548110612e2057fe5b906000526020600020906002020160010181905550505b3460046000828254019250508190555050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612e8b57805160ff1916838001178555612eb9565b82800160010185558215612eb9579182015b82811115612eb8578251825591602001919060010190612e9d565b5b509050612ec69190612eca565b5090565b612eec91905b80821115612ee8576000816000905550600101612ed0565b5090565b9056fe43616d706169676e206861736e277420726561636865642069747320676f616c207965742e54686572652073686f756c6420626520657175616c206e6f2e206f6620726563697069656e74732061646472657373657320616e6420616d6f756e7473526571756573742068617320616c7265616479206265656e20636f6d706c657465642e52657175657374206d75737420636f6e7461696e2061746c65617374206f6e6520726563697069656e7443616d706169676e20646f6e2774206861766520656e6f7567682066756e647320666f7220796f757220726571756573742e4f6e6c79204d616e616765722063616e2063616c6c20746869732066756e6374696f6e4f6e6c7920446f6e6f722063616e2063616c6c20746869732066756e6374696f6e73596f75206861766520746f206265206120646f6e6f7220696e206f7264657220746f20776974686472617720796f757220646f6e6174696f6e5468697320526571756573742068617320616c7265616479206265656e20636c6f7365642e546f74616c20616d6f756e742064656c65676174656420746f20726563697069656e7473206d75737420626520657175616c20746f2074686520746f74616c20616d6f756e7420696e20746865207265717565737443616d706169676e2063616e6e6f7420626520636c6f7365642c2062656361757365206974207374696c6c2068617320736f6d6520756e7370656e6465642066756e647346756e6420526571756573742063616e6e6f742062652070726f6365737365642c20656974686572207468652072657175697265642074696d65206973206e6f74207265616368656420796574206f72206d6f737420646f6e6f72732068617320646973617070726f7665642069742ea265627a7a72315820c2384032ffab961610d62a677cece370170e85e386c540571b99703f4afbd65664736f6c63430005100032", + "sourceMap": "475:13980:0:-;;;4903:750;8:9:-1;5:2;;;30:1;27;20:12;5:2;4903:750:0;;;;;;;;;;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;4903:750:0;;;;;;;;;;;;;;;;;;;;;;19:11:-1;14:3;11:20;8:2;;;44:1;41;34:12;8:2;71:11;66:3;62:21;55:28;;123:4;118:3;114:14;159:9;141:16;138:31;135:2;;;182:1;179;172:12;135:2;219:3;213:10;330:9;325:1;311:12;307:20;289:16;285:43;282:58;261:11;247:12;244:29;233:115;230:2;;;361:1;358;351:12;230:2;384:12;379:3;372:25;420:4;415:3;411:14;404:21;;0:432;;4903:750:0;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;4903:750:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19:11:-1;14:3;11:20;8:2;;;44:1;41;34:12;8:2;71:11;66:3;62:21;55:28;;123:4;118:3;114:14;159:9;141:16;138:31;135:2;;;182:1;179;172:12;135:2;219:3;213:10;330:9;325:1;311:12;307:20;289:16;285:43;282:58;261:11;247:12;244:29;233:115;230:2;;;361:1;358;351:12;230:2;384:12;379:3;372:25;420:4;415:3;411:14;404:21;;0:432;;4903:750:0;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;4903:750:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5078:10;5066:9;:22;5058:82;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5185:1;5159:18;:28;5151:88;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5270:8;5260:7;;:18;;;;;;;;;;;;;;;;;;5297:6;5289:5;:14;;;;;;;;;;;;:::i;:::-;;5328:12;5314:11;:26;;;;;;;;;;;;:::i;:::-;;5371:18;5351:17;:38;;;;5412:10;5400:9;:22;;;;5444:9;5433:8;:20;;;;5489:6;5464:22;:31;;;;5538:4;5527:8;;:15;;;;;;;;;;;;;;;;;;5568:1;5553:12;:16;;;;5580:10;5596:48;;;;;;;;5627:3;5596:48;;;;;;5641:1;5596:48;;;5580:65;;39:1:-1;33:3;27:10;23:18;57:10;52:3;45:23;79:10;72:17;;0:93;5580:65:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4903:750;;;;;;475:13980;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;", + "deployedSourceMap": "475:13980:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11442:1068;;8:9:-1;5:2;;;30:1;27;20:12;5:2;11442:1068:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;11442:1068:0;;;;;;;;;;;;;;;;;:::i;:::-;;10681:749;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10681:749:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;10681:749:0;;;;;;;;;;;;;;;;;:::i;:::-;;4241:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4241:20:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;3466:24;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3466:24:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;2757:27;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2757:27:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;8073:1652;;8:9:-1;5:2;;;30:1;27;20:12;5:2;8073:1652:0;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;8073:1652:0;;;;;;;;;;21:11:-1;8;5:28;2:2;;;46:1;43;36:12;2:2;8073:1652:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;8073:1652:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;8073:1652:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;93:3;85:6;81:16;74:27;137:4;133:9;126:4;121:3;117:14;113:30;106:37;;169:3;161:6;157:16;147:26;;8073:1652:0;;;;;;;;;;;;;;;;;;;;;;;;;;21:11:-1;8;5:28;2:2;;;46:1;43;36:12;2:2;8073:1652:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;8073:1652:0;;;;;;101:9:-1;95:2;81:12;77:21;67:8;63:36;60:51;39:11;25:12;22:29;11:108;8:2;;;132:1;129;122:12;8:2;8073:1652:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;93:3;85:6;81:16;74:27;137:4;133:9;126:4;121:3;117:14;113:30;106:37;;169:3;161:6;157:16;147:26;;8073:1652:0;;;;;;;;;;;;;;;;;21:11:-1;8;5:28;2:2;;;46:1;43;36:12;2:2;8073:1652:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;8073:1652:0;;;;;;101:9:-1;95:2;81:12;77:21;67:8;63:36;60:51;39:11;25:12;22:29;11:108;8:2;;;132:1;129;122:12;8:2;8073:1652:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;93:3;85:6;81:16;74:27;137:4;133:9;126:4;121:3;117:14;113:30;106:37;;169:3;161:6;157:16;147:26;;8073:1652:0;;;;;;;;;;;;;;;:::i;:::-;;13522:560;;8:9:-1;5:2;;;30:1;27;20:12;5:2;13522:560:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;13522:560:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;13522:560:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2413:22;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2413:22:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;2470:19;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2470:19:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;2470:19:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12522:992;;8:9:-1;5:2;;;30:1;27;20:12;5:2;12522:992:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;12522:992:0;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;12522:992:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;12522:992:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;12522:992:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;14247:199;;8:9:-1;5:2;;;30:1;27;20:12;5:2;14247:199:0;;;:::i;:::-;;2931:25;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2931:25:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;2842:27;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2842:27:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;2667:29;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2667:29:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;2543:25;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2543:25:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;2543:25:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3918:34;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3918:34:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;14094:138;;8:9:-1;5:2;;;30:1;27;20:12;5:2;14094:138:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;14094:138:0;;;;;;;;;;;;;;;;;:::i;:::-;;4172:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4172:20:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3251:26;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3251:26:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3251:26:0;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9737:357;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9737:357:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;9737:357:0;;;;;;;;;;;;;;;;;:::i;:::-;;3608:36;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3608:36:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3608:36:0;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;4021:21;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4021:21:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;10106:563;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10106:563:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;10106:563:0;;;;;;;;;;;;;;;;;:::i;:::-;;7046:1015;;8:9:-1;5:2;;;30:1;27;20:12;5:2;7046:1015:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;5845:957;;;:::i;:::-;;11442:1068;4619:4;4607:16;;:8;;;;;;;;;;;:16;;;4598:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4412:10;4401:21;;:7;;;;;;;;;;;:21;;;4393:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11560:5;11528:37;;:12;11541:5;11528:19;;;;;;;;;;;;;;;;;;:28;;;;;;;;;;;;:37;;;11520:86;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11627:27;11657:12;11670:5;11657:19;;;;;;;;;;;;;;;;;;11627:49;;11754:3;11729:22;;11709:7;:17;;;:42;:48;:111;;;;;11803:10;:17;;;;11775:7;:25;;;:45;11709:111;:148;;;;;11838:7;:19;;;;;;;;;;;;11837:20;11709:148;11687:301;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12037:4;12015:7;:19;;;:26;;;;;;;;;;;;;;;;;;12075:7;:14;;;12056:15;;:33;;;;;;;;;;;12121:7;:14;;;12104:13;;:31;;;;;;;;;;;12154:6;12163:1;12154:10;;12150:343;12170:7;:23;;;12166:1;:27;12150:343;;;12218:24;12245:7;:18;;:21;12264:1;12245:21;;;;;;;;;;;12218:48;;12425:9;:23;;;;;;;;;;;;12409:50;;:68;12460:9;:16;;;12409:68;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;12409:68:0;12150:343;12195:3;;;;;;;12150:343;;;;4463:1;11442:1068;:::o;10681:749::-;4619:4;4607:16;;:8;;;;;;;;;;;:16;;;4598:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4525:1;4504:6;:18;4511:10;4504:18;;;;;;;;;;;;;;;;:22;4495:70;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10773:12;:19;;;;10765:5;:27;10757:65;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10876:5;10841:40;;:12;10854:5;10841:19;;;;;;;;;;;;;;;;;;:31;;;;;;;;;;;;:40;;;10833:87;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10971:5;10939:37;;:12;10952:5;10939:19;;;;;;;;;;;;;;;;;;:28;;;;;;;;;;;;:37;;;10931:86;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11038:43;11084:12;11097:5;11084:19;;;;;;;;;;;;;;;;;;:32;;11038:78;;11204:12;:24;11217:10;11204:24;;;;;;;;;;;;;;;;;;;;;;;;;11201:222;;;11305:5;11278:12;:24;11291:10;11278:24;;;;;;;;;;;;;;;;:32;;;;;;;;;;;;;;;;;;11372:12;11385:5;11372:19;;;;;;;;;;;;;;;;;;:37;;;:39;;;;;;;;;;;;;;11201:222;4567:1;10681:749;:::o;4241:20::-;;;;;;;;;;;;;:::o;3466:24::-;;;;:::o;2757:27::-;;;;:::o;8073:1652::-;4706:3;4695:8;;:14;:55;;;;;4733:17;;4713:15;;:37;;4695:55;4686:107;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4619:4;4607:16;;:8;;;;;;;;;;;:16;;;4598:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4412:10;4401:21;;:7;;;;;;;;;;;:21;;;4393:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8283:1;8273:7;:11;8265:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8357:1;8329:18;:25;:29;:61;;;;;8389:1;8362:17;:24;:28;8329:61;8321:116;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8485:17;:24;8456:18;:25;:53;8448:126;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8646:7;8627:15;;8611:13;;8593:15;;:31;:49;:60;;8585:123;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8729:16;8748:1;8729:20;;8764:6;8760:111;8776:17;:24;8772:1;:28;8760:111;;;8836:17;8854:1;8836:20;;;;;;;;;;;;;;8821:35;;;;8802:3;;;;;;;8760:111;;;;8914:7;8899:11;:22;8891:120;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9032:12;9064:152;;;;;;;;9090:12;9064:152;;;;9112:7;9064:152;;;;9138:1;9064:152;;;;9176:1;9064:152;;;;9152:3;9064:152;;;;9192:5;9064:152;;;;;;9209:5;9064:152;;;;;9032:195;;39:1:-1;33:3;27:10;23:18;57:10;52:3;45:23;79:10;72:17;;0:93;9032:195:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9271:27;9301:12;9336:1;9314:12;:19;;;;:23;9301:37;;;;;;;;;;;;;;;;;;9271:67;;9359:40;9402:7;:18;;9359:61;;9465:6;9474:1;9465:10;;9461:210;9481:18;:25;9477:1;:29;9461:210;;;9543:76;;;;;;;;9566:18;9585:1;9566:21;;;;;;;;;;;;;;9543:76;;;;;;9597:17;9615:1;9597:20;;;;;;;;;;;;;;9543:76;;;9527:10;:13;9538:1;9527:13;;;;;;;;;;;:92;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9634:7;:23;;;:25;;;;;;;;;;;;;9508:3;;;;;;;9461:210;;;;9710:7;9691:15;;:26;;;;;;;;;;;4463:1;;;8073:1652;;;;:::o;13522:560::-;13573:7;13582:13;13597;13612:4;13618;13624;13630;13636;13642;13648;13654;13659;13665;13713:7;;;;;;;;;;;13735:5;13755:11;13781:17;;13813:15;;13843;;13873:13;;13901:22;;13938:9;;13962:8;;13985:10;:17;;;;14017:12;:19;;;;14051:8;;;;;;;;;;;13691:383;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13522:560;;;;;;;;;;;;;:::o;2413:22::-;;;;;;;;;;;;;:::o;2470:19::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;12522:992::-;12578:13;12592:4;12598;12604;12610;12616;12622;12628:15;12645:12;12658:4;12708:5;12704:1;12682:12;:19;;;;:23;:31;12674:65;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12790:23;12816:12;12829:5;12816:19;;;;;;;;;;;;;;;;;;12790:45;;12846:26;12889:3;:19;;;12875:34;;;;;;;;;;;;;;;;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;148:4;140:6;136:17;126:27;;0:157;12875:34:0;;;;12846:63;;12920:21;12955:3;:19;;;12944:31;;;;;;;;;;;;;;;;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;148:4;140:6;136:17;126:27;;0:157;12944:31:0;;;;12920:55;;13000:6;13009:1;13000:10;;12996:170;13016:3;:19;;;13012:1;:23;12996:170;;;13071:3;:14;;:17;13086:1;13071:17;;;;;;;;;;;:31;;;;;;;;;;;;13056:9;13066:1;13056:12;;;;;;;;;;;;;:46;;;;;;;;;;;13130:3;:14;;:17;13145:1;13130:17;;;;;;;;;;;:24;;;13117:7;13125:1;13117:10;;;;;;;;;;;;;:37;;;;;13037:3;;;;;;;12996:170;;;;13207:3;:15;;13237:3;:10;;;13262:3;:19;;;13296:3;:21;;;13332:3;:13;;;13360:3;:15;;;;;;;;;;;;13390:3;:16;;:28;13407:10;13390:28;;;;;;;;;;;;;;;;;;;;;;;;;13433:9;13457:7;13479:3;:12;;;;;;;;;;;;13186:320;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12522:992;;;;;;;;;;;:::o;14247:199::-;4412:10;4401:21;;:7;;;;;;;;;;;:21;;;4393:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14326:13;;14307:15;;:32;14299:112;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14433:5;14422:8;;:16;;;;;;;;;;;;;;;;;;14247:199::o;2931:25::-;;;;:::o;2842:27::-;;;;:::o;2667:29::-;;;;:::o;2543:25::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;3918:34::-;;;;:::o;14094:138::-;4619:4;4607:16;;:8;;;;;;;;;;;:16;;;4598:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4412:10;4401:21;;:7;;;;;;;;;;;:21;;;4393:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14213:11;14188:22;:36;;;;14094:138;:::o;4172:20::-;;;;:::o;3251:26::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;9737:357::-;4619:4;4607:16;;:8;;;;;;;;;;;:16;;;4598:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4525:1;4504:6;:18;4511:10;4504:18;;;;;;;;;;;;;;;;:22;4495:70;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9827:12;:19;;;;9819:5;:27;9811:65;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9930:5;9895:40;;:12;9908:5;9895:19;;;;;;;;;;;;;;;;;;:31;;;;;;;;;;;;:40;;;9887:87;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10014:12;10027:5;10014:19;;;;;;;;;;;;;;;;;;:26;;;9995:15;;:45;;;;;;;;;;;10082:4;10051:12;10064:5;10051:19;;;;;;;;;;;;;;;;;;:28;;;:35;;;;;;;;;;;;;;;;;;9737:357;:::o;3608:36::-;;;;;;;;;;;;;;;;;:::o;4021:21::-;;;;:::o;10106:563::-;4706:3;4695:8;;:14;:55;;;;;4733:17;;4713:15;;:37;;4695:55;4686:107;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4619:4;4607:16;;:8;;;;;;;;;;;:16;;;4598:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4525:1;4504:6;:18;4511:10;4504:18;;;;;;;;;;;;;;;;:22;4495:70;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10216:12;:19;;;;10208:5;:27;10200:65;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10319:5;10284:40;;:12;10297:5;10284:19;;;;;;;;;;;;;;;;;;:31;;;;;;;;;;;;:40;;;10276:87;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10414:5;10382:37;;:12;10395:5;10382:19;;;;;;;;;;;;;;;;;;:28;;;;;;;;;;;;:37;;;10374:86;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10485:12;10498:5;10485:19;;;;;;;;;;;;;;;;;;:32;;:44;10518:10;10485:44;;;;;;;;;;;;;;;;;;;;;;;;;10481:181;;10592:4;10545:12;10558:5;10545:19;;;;;;;;;;;;;;;;;;:32;;:44;10578:10;10545:44;;;;;;;;;;;;;;;;:51;;;;;;;;;;;;;;;;;;10611:12;10624:5;10611:19;;;;;;;;;;;;;;;;;;:37;;;:39;;;;;;;;;;;;;10481:181;10106:563;:::o;7046:1015::-;7098:4;4619;4607:16;;:8;;;;;;;;;;;:16;;;4598:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7291:17;;7273:15;;:35;:53;;;;7323:3;7312:8;;:14;7273:53;7265:93;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7379:10;7392:6;:18;7399:10;7392:18;;;;;;;;;;;;;;;;7379:31;;7488:1;7480:5;:9;7472:79;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7572:11;7586:10;7597:5;7586:17;;;;;;;;;;;;;;;;;;:24;;;7572:38;;7633:1;7624:6;:10;7621:433;;;7724:1;7703:6;:18;7710:10;7703:18;;;;;;;;;;;;;;;:22;;;;7799:10;7810:5;7799:17;;;;;;;;;;;;;;;;;;;7792:24;;;;;;;;;;;;;;;;;;;;;;;7907:6;7888:15;;:25;;;;;;;;;;;7942:12;;:14;;;;;;;;;;;;;;8015:10;:19;;:27;8035:6;8015:27;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;8015:27:0;7621:433;4649:1;;7046:1015;:::o;5845:957::-;4619:4;4607:16;;:8;;;;;;;;;;;:16;;;4598:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5924:1;5906:9;:20;;5898:64;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5983:10;5996:6;:18;6003:10;5996:18;;;;;;;;;;;;;;;;5983:31;;6108:1;6099:5;:10;6096:607;;;6133:1;6125:9;;6190:10;6224:54;;;;;;;;6247:10;6224:54;;;;;;6267:9;6224:54;;;6190:107;;39:1:-1;33:3;27:10;23:18;57:10;52:3;45:23;79:10;72:17;;0:93;6190:107:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6408:1;6388:10;:17;;;;:21;6367:6;:18;6374:10;6367:18;;;;;;;;;;;;;;;:42;;;;6424:12;;:14;;;;;;;;;;;;;6096:607;;;6585:15;6603:10;6614:5;6603:17;;;;;;;;;;;;;;;;;;:24;;;6585:42;;6682:9;6669:10;:22;6642:10;6653:5;6642:17;;;;;;;;;;;;;;;;;;:24;;:49;;;;6096:607;;6785:9;6766:15;;:28;;;;;;;;;;;4649:1;5845:957::o;475:13980::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o", + "source": "pragma solidity ^0.5.16;\r\n\r\n//https://ethereum.stackexchange.com/questions/13167/are-there-well-solved-and-simple-storage-patterns-for-solidity\r\n\r\n//A campaign is a single project used to collect funds from donors and spend them for any number of tasks related to a project,\r\n//through fund request which is totally controlled by donors voting, if donors approve a request, it will be completed \r\n//and funds can be withdrawn otherwise funds are locked inside the contract.\r\ncontract Campaign{\r\n \r\n //Perosn model to hold a person's address & the delegated amount\r\n struct Person{\r\n address personAddress;\r\n uint amount;\r\n }\r\n \r\n //Fund request, required to take out funds from this Campaign through requests for different tasks,\r\n //it takes three days for a request to complete, and requires alteast 51% donors approval to proceed,\r\n //otherwise won't complete, after completion of the request, donation can be transfered to the recipients,\r\n //whom were registered when the request was created.\r\n //The request, by default is considered to be approved by the donors, but if donors want to disapprove a request,\r\n //they have three days to explicitly disapprove it. After that, request would be considered approved by any donor,\r\n //who didn't disapproved it.\r\n struct FundRequest{\r\n \r\n //Breif description about the task\r\n string description;\r\n \r\n //The amount required for the task\r\n uint amount;\r\n \r\n //List of recipients, who will recieve the donation\r\n mapping(uint=>Person) recipients;\r\n \r\n //recipients count\r\n uint recipientsCount;\r\n \r\n //list of people who disapproves this request(by default request is considered to be approved by all donors,\r\n //that's why we just need the disapprovers lists & count)\r\n mapping(address=>bool) disapprovers;\r\n \r\n //disapprovers count\r\n uint disapproversCount;\r\n \r\n //represents a timestamp at which this request was created\r\n uint createdAt;\r\n \r\n //Indicates if the request is completed\r\n bool isCompleted;\r\n \r\n bool isClosed;\r\n }\r\n \r\n //=============================Public Properties=======================================//\r\n \r\n //Manager: Owner of the contract, can request funds for different tasks\r\n address public manager;\r\n \r\n //Campaign title\r\n string public title;\r\n \r\n //Breif description of the Campaign\r\n string public description;\r\n \r\n //Minimum amount of donation this contract must recieve to process the donations\r\n uint public amountInitialGoal;\r\n \r\n //the total amount of donations collected\r\n uint public amountCollected;\r\n \r\n //the amount delegated to fund requests\r\n uint public amountDelegated;\r\n \r\n //the total amount spended by this Campaign\r\n uint public amountSpended;\r\n \r\n //NOTE: donorsList starts at index 1 NOT at zero because we are tracking donors addresses for faster exists checks,\r\n //in another mapping(see below \"donors\") of address and index of that address in this array pointing to its amount.\r\n //\r\n //Donations made by donors\r\n Person[] public donorsList;\r\n \r\n //actual count of donors(NOTE: donorslist lenght won't represent the actual count because donors can be removed from middle of the array and will have empty dononrs then)\r\n uint public dononrsCount;\r\n \r\n //Donors address with and integer array pointing to donations array where donation amount is stored\r\n mapping(address=>uint) public donors;\r\n \r\n //Fund request by manager for certain task, donors can disapprove this, if 51% donors disapprove the request it will be considered cancled\r\n FundRequest[] fundRequests;\r\n \r\n //time required for a request to process if 51% of the donors approve it\r\n uint public fundRequestProcessTime; \r\n \r\n //the timestamp at which the Campaign was created\r\n uint public createdAt;\r\n \r\n //the timestamp the Campaign will be closed (after Campaign is closed donations will be locked in the contract)\r\n uint public closedAt;\r\n \r\n //True till campaign is closed\r\n bool public isActive;\r\n \r\n //=============================Modifiers=======================================//\r\n \r\n modifier onlyManager(){ require(manager == msg.sender,'Only Manager can call this function'); _; }\r\n modifier onlyDonor(){ require( donors[msg.sender] > 0 ,'Only Donor can call this functions'); _; }\r\n modifier ifActive(){ require( isActive == true , 'Contract is closed'); _; }\r\n modifier hasReachedGoal(){ require( closedAt < now && amountCollected >= amountInitialGoal , \"Campaign hasn't reached its goal yet.\"); _; }\r\n \r\n //=============================Constructor=======================================//\r\n\r\n constructor(address _manager, string memory _title, string memory _description, uint _initialAmountGoal, uint _createdAt, uint _closedAt) public{\r\n require(_closedAt > _createdAt, 'Campaign start time must be less than end time.');\r\n require(_initialAmountGoal > uint(0) , 'Initial amount goal must be greater than zero');\r\n \r\n manager = _manager;\r\n title = _title;\r\n description = _description;\r\n amountInitialGoal = _initialAmountGoal;\r\n createdAt = _createdAt;\r\n closedAt = _closedAt;\r\n fundRequestProcessTime = 259200;//equal to three days\r\n isActive = true;\r\n dononrsCount = 0;\r\n donorsList.push(Person({personAddress: address(0x0), amount: 0}));\r\n }\r\n\r\n //=============================Public Methods=======================================//\r\n \r\n //To donate funds for this Campaign, users can donate as many times as they want\r\n function donate() ifActive public payable {\r\n require(msg.value != uint(0),'Amount must be greater than zero');\r\n \r\n uint index = donors[msg.sender];\r\n\r\n //if donor hasn't donated any amount yet this would be true\r\n if(index == 0){\r\n index = 1;\r\n \r\n\r\n //add donor\r\n donorsList.push(\r\n Person({personAddress: msg.sender, amount: msg.value})\r\n );\r\n \r\n //add donor to mapping \r\n donors[msg.sender] = donorsList.length - 1;\r\n dononrsCount++;\r\n }\r\n //if donor has donated before just add the new donation amount to the previous one\r\n else{\r\n \r\n uint prevAmount = donorsList[index].amount;\r\n donorsList[index].amount = prevAmount + msg.value;\r\n }\r\n \r\n //increase amount collected count\r\n amountCollected += msg.value;\r\n }\r\n \r\n //To withdraw the donations for certain time if user wants before Campaign is closed and Campaign donation goal is not achieved,\r\n //after thqt users will be able to donate but they won't be able to withdraw their donations\r\n function withdrawDonation() ifActive public returns(uint) {\r\n //donation can only be withdrawn in two cases\r\n //1. if donation goal couldn't be reached\r\n //2. if donation hasn't closed yet\r\n require(amountCollected < amountInitialGoal || closedAt > now,'Donation cannot be withdrawn');\r\n \r\n uint index = donors[msg.sender];\r\n \r\n //if donor doesn't exist return\r\n require(index > 0, \"You have to be a donor in order to withdraw your donation\");\r\n \r\n uint amount = donorsList[index].amount;\r\n if(amount > 0)\r\n {\r\n // delete donor from mapping;\r\n donors[msg.sender] = 0;\r\n \r\n //delete donor from list\r\n delete donorsList[index];\r\n \r\n //detect the amount collected\r\n amountCollected -= amount;\r\n \r\n dononrsCount--;\r\n \r\n //transfer funds\r\n msg.sender.transfer(amount);\r\n }\r\n }\r\n \r\n function createFundRequest(string memory _description, uint _amount, address[] memory _recipientsAddress, uint[] memory _recipientsAmount) hasReachedGoal ifActive onlyManager public{\r\n require(_amount > 0,'Amount cannot be zero.');\r\n require(_recipientsAddress.length > 0 && _recipientsAmount.length > 0, 'Request must contain atleast one recipient');\r\n require(_recipientsAddress.length == _recipientsAmount.length,'There should be equal no. of recipients addresses and amounts');\r\n require(amountCollected - amountSpended - amountDelegated >= _amount, \"Campaign don't have enough funds for your request.\");\r\n \r\n uint totalAmount = 0;\r\n for(uint i; i < _recipientsAmount.length; i++){\r\n totalAmount += _recipientsAmount[i]; \r\n }\r\n \r\n require(totalAmount == _amount, \"Total amount delegated to recipients must be equal to the total amount in the request\");\r\n \r\n fundRequests.push(\r\n FundRequest({description: _description, amount: _amount, recipientsCount: 0, createdAt: now, disapproversCount: 0, isCompleted: false, isClosed: false})\r\n );\r\n //get the added request\r\n FundRequest storage request = fundRequests[fundRequests.length - 1];\r\n \r\n mapping(uint=>Person) storage recipients = request.recipients;\r\n //add the recipients\r\n for(uint i = 0; i < _recipientsAddress.length; i++){\r\n recipients[i] = Person({personAddress: _recipientsAddress[i], amount: _recipientsAmount[i]});\r\n request.recipientsCount++;\r\n }\r\n \r\n amountDelegated += _amount;\r\n }\r\n \r\n function closeFundRequest(uint index) ifActive onlyDonor public{\r\n require(index < fundRequests.length, \"Fund Request don't exist.\");\r\n require(fundRequests[index].isCompleted == false,'Request has already been completed.');\r\n \r\n amountDelegated -= fundRequests[index].amount;\r\n fundRequests[index].isClosed = true;\r\n }\r\n \r\n function disapproveFundRequest(uint index) hasReachedGoal ifActive onlyDonor public{\r\n require(index < fundRequests.length, \"Fund Request don't exist.\");\r\n require(fundRequests[index].isCompleted == false,'Request has already been completed.');\r\n require(fundRequests[index].isClosed == false,'This Request has already been closed.');\r\n \r\n if(!fundRequests[index].disapprovers[msg.sender]){\r\n fundRequests[index].disapprovers[msg.sender] = true;\r\n fundRequests[index].disapproversCount++;\r\n }\r\n }\r\n \r\n function approveFundRequest(uint index) ifActive onlyDonor public{\r\n require(index < fundRequests.length, \"Fund Request don't exist.\");\r\n require(fundRequests[index].isCompleted == false,'Request has already been completed.');\r\n require(fundRequests[index].isClosed == false,'This Request has already been closed.');\r\n \r\n mapping(address=>bool) storage disapprovers = fundRequests[index].disapprovers;\r\n \r\n //only approve if donor disapproved the request before\r\n if(disapprovers[msg.sender]){\r\n //make aprover again\r\n disapprovers[msg.sender] = false;\r\n //decrease the disapprovers count\r\n fundRequests[index].disapproversCount--;\r\n }\r\n }\r\n \r\n function processFundRequest(uint index) ifActive onlyManager public{\r\n require(fundRequests[index].isClosed == false,'This Request has already been closed.');\r\n \r\n FundRequest storage request = fundRequests[index];\r\n require(\r\n request.createdAt + fundRequestProcessTime < now && \r\n request.disapproversCount < donorsList.length &&\r\n !request.isCompleted \r\n , \"Fund Request cannot be processed, either the required time is not reached yet or most donors has disapproved it.\");\r\n \r\n request.isCompleted = true;\r\n amountDelegated -= request.amount;\r\n amountSpended += request.amount;\r\n for(uint i = 0; i < request.recipientsCount; i++){\r\n Person storage recipient = request.recipients[i];\r\n //convert address to address payable (NOTE: this conversion differs around different versions of solidity)\r\n address(uint160(recipient.personAddress)).transfer(recipient.amount);\r\n }\r\n \r\n }\r\n \r\n function getFundRequest(uint index) public view returns(string memory,uint, uint, uint, uint, bool, bool, address[]memory, uint[]memory,bool){\r\n require(fundRequests.length + 1 > index,\"Index is out of range.\");\r\n \r\n //get the recipients\r\n FundRequest storage req = fundRequests[index];\r\n address[] memory addresses = new address[](req.recipientsCount);\r\n uint[] memory amounts = new uint[](req.recipientsCount);\r\n \r\n for(uint i = 0; i < req.recipientsCount; i++){\r\n addresses[i] = req.recipients[i].personAddress;\r\n amounts[i] = req.recipients[i].amount;\r\n }\r\n \r\n return(\r\n req.description,\r\n req.amount,\r\n req.recipientsCount,\r\n req.disapproversCount,\r\n req.createdAt,\r\n req.isCompleted,\r\n req.disapprovers[msg.sender],\r\n addresses,\r\n amounts,\r\n req.isClosed\r\n );\r\n }\r\n\r\n function getSummary()public view returns(\r\n address, string memory, string memory, uint, uint, uint, uint, uint, uint, uint, uint,uint, bool\r\n ){\r\n return (\r\n manager,\r\n title,\r\n description,\r\n amountInitialGoal,\r\n amountCollected,\r\n amountDelegated,\r\n amountSpended,\r\n fundRequestProcessTime,\r\n createdAt,\r\n closedAt,\r\n donorsList.length,\r\n fundRequests.length,\r\n isActive\r\n );\r\n }\r\n \r\n function setFundRequestProcessTime(uint processTime) ifActive onlyManager public {\r\n fundRequestProcessTime = processTime;\r\n }\r\n \r\n \r\n function deactivate() onlyManager public {\r\n require(amountCollected == amountSpended,\"Campaign cannot be closed, because it still has some unspended funds\");\r\n isActive = false;\r\n }\r\n \r\n}", "sourcePath": "F:\\Software Development\\React Projects\\de-care\\ethereum\\contracts\\Campaign.sol", "ast": { "absolutePath": "/F/Software Development/React Projects/de-care/ethereum/contracts/Campaign.sol", "exportedSymbols": { "Campaign": [ - 895 + 967 ] }, - "id": 896, + "id": 968, "nodeType": "SourceUnit", "nodes": [ { @@ -559,9 +579,9 @@ "contractKind": "contract", "documentation": null, "fullyImplemented": true, - "id": 895, + "id": 967, "linearizedBaseContracts": [ - 895 + 967 ], "name": "Campaign", "nodeType": "ContractDefinition", @@ -626,20 +646,20 @@ ], "name": "Person", "nodeType": "StructDefinition", - "scope": 895, + "scope": 967, "src": "575:75:0", "visibility": "public" }, { "canonicalName": "Campaign.FundRequest", - "id": 27, + "id": 29, "members": [ { "constant": false, "id": 8, "name": "description", "nodeType": "VariableDeclaration", - "scope": 27, + "scope": 29, "src": "1401:18:0", "stateVariable": false, "storageLocation": "default", @@ -665,7 +685,7 @@ "id": 10, "name": "amount", "nodeType": "VariableDeclaration", - "scope": 27, + "scope": 29, "src": "1484:11:0", "stateVariable": false, "storageLocation": "default", @@ -691,7 +711,7 @@ "id": 14, "name": "recipients", "nodeType": "VariableDeclaration", - "scope": 27, + "scope": 29, "src": "1577:32:0", "stateVariable": false, "storageLocation": "default", @@ -738,7 +758,7 @@ "id": 16, "name": "recipientsCount", "nodeType": "VariableDeclaration", - "scope": 27, + "scope": 29, "src": "1658:20:0", "stateVariable": false, "storageLocation": "default", @@ -764,7 +784,7 @@ "id": 20, "name": "disapprovers", "nodeType": "VariableDeclaration", - "scope": 27, + "scope": 29, "src": "1884:35:0", "stateVariable": false, "storageLocation": "default", @@ -809,7 +829,7 @@ "id": 22, "name": "disapproversCount", "nodeType": "VariableDeclaration", - "scope": 27, + "scope": 29, "src": "1970:22:0", "stateVariable": false, "storageLocation": "default", @@ -835,7 +855,7 @@ "id": 24, "name": "createdAt", "nodeType": "VariableDeclaration", - "scope": 27, + "scope": 29, "src": "2081:14:0", "stateVariable": false, "storageLocation": "default", @@ -861,7 +881,7 @@ "id": 26, "name": "isCompleted", "nodeType": "VariableDeclaration", - "scope": 27, + "scope": 29, "src": "2165:16:0", "stateVariable": false, "storageLocation": "default", @@ -881,21 +901,47 @@ }, "value": null, "visibility": "internal" + }, + { + "constant": false, + "id": 28, + "name": "isClosed", + "nodeType": "VariableDeclaration", + "scope": 29, + "src": "2202:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 27, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2202:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" } ], "name": "FundRequest", "nodeType": "StructDefinition", - "scope": 895, - "src": "1318:871:0", + "scope": 967, + "src": "1318:905:0", "visibility": "public" }, { "constant": false, - "id": 29, + "id": 31, "name": "manager", "nodeType": "VariableDeclaration", - "scope": 895, - "src": "2379:22:0", + "scope": 967, + "src": "2413:22:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -903,10 +949,10 @@ "typeString": "address" }, "typeName": { - "id": 28, + "id": 30, "name": "address", "nodeType": "ElementaryTypeName", - "src": "2379:7:0", + "src": "2413:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -918,11 +964,11 @@ }, { "constant": false, - "id": 31, + "id": 33, "name": "title", "nodeType": "VariableDeclaration", - "scope": 895, - "src": "2436:19:0", + "scope": 967, + "src": "2470:19:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -930,10 +976,10 @@ "typeString": "string" }, "typeName": { - "id": 30, + "id": 32, "name": "string", "nodeType": "ElementaryTypeName", - "src": "2436:6:0", + "src": "2470:6:0", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" @@ -944,11 +990,11 @@ }, { "constant": false, - "id": 33, + "id": 35, "name": "description", "nodeType": "VariableDeclaration", - "scope": 895, - "src": "2509:25:0", + "scope": 967, + "src": "2543:25:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -956,10 +1002,10 @@ "typeString": "string" }, "typeName": { - "id": 32, + "id": 34, "name": "string", "nodeType": "ElementaryTypeName", - "src": "2509:6:0", + "src": "2543:6:0", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" @@ -970,11 +1016,11 @@ }, { "constant": false, - "id": 35, + "id": 37, "name": "amountInitialGoal", "nodeType": "VariableDeclaration", - "scope": 895, - "src": "2633:29:0", + "scope": 967, + "src": "2667:29:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -982,10 +1028,10 @@ "typeString": "uint256" }, "typeName": { - "id": 34, + "id": 36, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "2633:4:0", + "src": "2667:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -996,11 +1042,11 @@ }, { "constant": false, - "id": 37, + "id": 39, "name": "amountCollected", "nodeType": "VariableDeclaration", - "scope": 895, - "src": "2723:27:0", + "scope": 967, + "src": "2757:27:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -1008,10 +1054,10 @@ "typeString": "uint256" }, "typeName": { - "id": 36, + "id": 38, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "2723:4:0", + "src": "2757:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1022,11 +1068,11 @@ }, { "constant": false, - "id": 39, + "id": 41, "name": "amountDelegated", "nodeType": "VariableDeclaration", - "scope": 895, - "src": "2808:27:0", + "scope": 967, + "src": "2842:27:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -1034,10 +1080,10 @@ "typeString": "uint256" }, "typeName": { - "id": 38, + "id": 40, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "2808:4:0", + "src": "2842:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1048,11 +1094,11 @@ }, { "constant": false, - "id": 41, + "id": 43, "name": "amountSpended", "nodeType": "VariableDeclaration", - "scope": 895, - "src": "2897:25:0", + "scope": 967, + "src": "2931:25:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -1060,10 +1106,10 @@ "typeString": "uint256" }, "typeName": { - "id": 40, + "id": 42, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "2897:4:0", + "src": "2931:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1074,11 +1120,11 @@ }, { "constant": false, - "id": 44, + "id": 46, "name": "donorsList", "nodeType": "VariableDeclaration", - "scope": 895, - "src": "3217:26:0", + "scope": 967, + "src": "3251:26:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -1088,20 +1134,20 @@ "typeName": { "baseType": { "contractScope": null, - "id": 42, + "id": 44, "name": "Person", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 6, - "src": "3217:6:0", + "src": "3251:6:0", "typeDescriptions": { "typeIdentifier": "t_struct$_Person_$6_storage_ptr", "typeString": "struct Campaign.Person" } }, - "id": 43, + "id": 45, "length": null, "nodeType": "ArrayTypeName", - "src": "3217:8:0", + "src": "3251:8:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_Person_$6_storage_$dyn_storage_ptr", "typeString": "struct Campaign.Person[]" @@ -1112,11 +1158,11 @@ }, { "constant": false, - "id": 46, + "id": 48, "name": "dononrsCount", "nodeType": "VariableDeclaration", - "scope": 895, - "src": "3432:24:0", + "scope": 967, + "src": "3466:24:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -1124,10 +1170,10 @@ "typeString": "uint256" }, "typeName": { - "id": 45, + "id": 47, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "3432:4:0", + "src": "3466:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1138,11 +1184,11 @@ }, { "constant": false, - "id": 50, + "id": 52, "name": "donors", "nodeType": "VariableDeclaration", - "scope": 895, - "src": "3574:36:0", + "scope": 967, + "src": "3608:36:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -1150,28 +1196,28 @@ "typeString": "mapping(address => uint256)" }, "typeName": { - "id": 49, + "id": 51, "keyType": { - "id": 47, + "id": 49, "name": "address", "nodeType": "ElementaryTypeName", - "src": "3582:7:0", + "src": "3616:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", - "src": "3574:22:0", + "src": "3608:22:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "valueType": { - "id": 48, + "id": 50, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "3591:4:0", + "src": "3625:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1183,36 +1229,36 @@ }, { "constant": false, - "id": 53, + "id": 55, "name": "fundRequests", "nodeType": "VariableDeclaration", - "scope": 895, - "src": "3767:26:0", + "scope": 967, + "src": "3801:26:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_FundRequest_$27_storage_$dyn_storage", + "typeIdentifier": "t_array$_t_struct$_FundRequest_$29_storage_$dyn_storage", "typeString": "struct Campaign.FundRequest[]" }, "typeName": { "baseType": { "contractScope": null, - "id": 51, + "id": 53, "name": "FundRequest", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 27, - "src": "3767:11:0", + "referencedDeclaration": 29, + "src": "3801:11:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", "typeString": "struct Campaign.FundRequest" } }, - "id": 52, + "id": 54, "length": null, "nodeType": "ArrayTypeName", - "src": "3767:13:0", + "src": "3801:13:0", "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_FundRequest_$27_storage_$dyn_storage_ptr", + "typeIdentifier": "t_array$_t_struct$_FundRequest_$29_storage_$dyn_storage_ptr", "typeString": "struct Campaign.FundRequest[]" } }, @@ -1221,11 +1267,11 @@ }, { "constant": false, - "id": 55, + "id": 57, "name": "fundRequestProcessTime", "nodeType": "VariableDeclaration", - "scope": 895, - "src": "3884:34:0", + "scope": 967, + "src": "3918:34:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -1233,10 +1279,10 @@ "typeString": "uint256" }, "typeName": { - "id": 54, + "id": 56, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "3884:4:0", + "src": "3918:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1247,11 +1293,11 @@ }, { "constant": false, - "id": 57, + "id": 59, "name": "createdAt", "nodeType": "VariableDeclaration", - "scope": 895, - "src": "3987:21:0", + "scope": 967, + "src": "4021:21:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -1259,10 +1305,10 @@ "typeString": "uint256" }, "typeName": { - "id": 56, + "id": 58, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "3987:4:0", + "src": "4021:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1273,11 +1319,11 @@ }, { "constant": false, - "id": 59, + "id": 61, "name": "closedAt", "nodeType": "VariableDeclaration", - "scope": 895, - "src": "4138:20:0", + "scope": 967, + "src": "4172:20:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -1285,10 +1331,10 @@ "typeString": "uint256" }, "typeName": { - "id": 58, + "id": 60, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "4138:4:0", + "src": "4172:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1299,11 +1345,11 @@ }, { "constant": false, - "id": 61, + "id": 63, "name": "isActive", "nodeType": "VariableDeclaration", - "scope": 895, - "src": "4207:20:0", + "scope": 967, + "src": "4241:20:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -1311,10 +1357,10 @@ "typeString": "bool" }, "typeName": { - "id": 60, + "id": 62, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "4207:4:0", + "src": "4241:4:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1325,9 +1371,9 @@ }, { "body": { - "id": 72, + "id": 74, "nodeType": "Block", - "src": "4357:76:0", + "src": "4391:76:0", "statements": [ { "expression": { @@ -1339,19 +1385,19 @@ "typeIdentifier": "t_address", "typeString": "address" }, - "id": 67, + "id": 69, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 64, + "id": 66, "name": "manager", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 29, - "src": "4367:7:0", + "referencedDeclaration": 31, + "src": "4401:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1363,18 +1409,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 65, + "id": 67, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1021, - "src": "4378:3:0", + "referencedDeclaration": 1093, + "src": "4412:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 66, + "id": 68, "isConstant": false, "isLValue": false, "isPure": false, @@ -1382,13 +1428,13 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "4378:10:0", + "src": "4412:10:0", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, - "src": "4367:21:0", + "src": "4401:21:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1397,14 +1443,14 @@ { "argumentTypes": null, "hexValue": "4f6e6c79204d616e616765722063616e2063616c6c20746869732066756e6374696f6e", - "id": 68, + "id": 70, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "4389:37:0", + "src": "4423:37:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_88c6482beb7f03a9c1146d68034c8b90c5acbbb1945a67a855479b36a2ca1800", @@ -1424,21 +1470,21 @@ "typeString": "literal_string \"Only Manager can call this function\"" } ], - "id": 63, + "id": 65, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1024, - 1025 + 1096, + 1097 ], - "referencedDeclaration": 1025, - "src": "4359:7:0", + "referencedDeclaration": 1097, + "src": "4393:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 69, + "id": 71, "isConstant": false, "isLValue": false, "isPure": false, @@ -1446,41 +1492,41 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "4359:68:0", + "src": "4393:68:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 70, + "id": 72, "nodeType": "ExpressionStatement", - "src": "4359:68:0" + "src": "4393:68:0" }, { - "id": 71, + "id": 73, "nodeType": "PlaceholderStatement", - "src": "4429:1:0" + "src": "4463:1:0" } ] }, "documentation": null, - "id": 73, + "id": 75, "name": "onlyManager", "nodeType": "ModifierDefinition", "parameters": { - "id": 62, + "id": 64, "nodeType": "ParameterList", "parameters": [], - "src": "4355:2:0" + "src": "4389:2:0" }, - "src": "4335:98:0", + "src": "4369:98:0", "visibility": "internal" }, { "body": { - "id": 86, + "id": 88, "nodeType": "Block", - "src": "4459:78:0", + "src": "4493:78:0", "statements": [ { "expression": { @@ -1492,7 +1538,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 81, + "id": 83, "isConstant": false, "isLValue": false, "isPure": false, @@ -1501,34 +1547,34 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 76, + "id": 78, "name": "donors", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50, - "src": "4470:6:0", + "referencedDeclaration": 52, + "src": "4504:6:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, - "id": 79, + "id": 81, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 77, + "id": 79, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1021, - "src": "4477:3:0", + "referencedDeclaration": 1093, + "src": "4511:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 78, + "id": 80, "isConstant": false, "isLValue": false, "isPure": false, @@ -1536,7 +1582,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "4477:10:0", + "src": "4511:10:0", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -1547,7 +1593,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "4470:18:0", + "src": "4504:18:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1558,14 +1604,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 80, + "id": 82, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "4491:1:0", + "src": "4525:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -1573,7 +1619,7 @@ }, "value": "0" }, - "src": "4470:22:0", + "src": "4504:22:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1582,14 +1628,14 @@ { "argumentTypes": null, "hexValue": "4f6e6c7920446f6e6f722063616e2063616c6c20746869732066756e6374696f6e73", - "id": 82, + "id": 84, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "4494:36:0", + "src": "4528:36:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_8b0204c96bc5d5b261b0dff81ab6ec6f0d1589b471763e56fc84ef26e9050b83", @@ -1609,21 +1655,21 @@ "typeString": "literal_string \"Only Donor can call this functions\"" } ], - "id": 75, + "id": 77, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1024, - 1025 + 1096, + 1097 ], - "referencedDeclaration": 1025, - "src": "4461:7:0", + "referencedDeclaration": 1097, + "src": "4495:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 83, + "id": 85, "isConstant": false, "isLValue": false, "isPure": false, @@ -1631,41 +1677,41 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "4461:70:0", + "src": "4495:70:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 84, + "id": 86, "nodeType": "ExpressionStatement", - "src": "4461:70:0" + "src": "4495:70:0" }, { - "id": 85, + "id": 87, "nodeType": "PlaceholderStatement", - "src": "4533:1:0" + "src": "4567:1:0" } ] }, "documentation": null, - "id": 87, + "id": 89, "name": "onlyDonor", "nodeType": "ModifierDefinition", "parameters": { - "id": 74, + "id": 76, "nodeType": "ParameterList", "parameters": [], - "src": "4457:2:0" + "src": "4491:2:0" }, - "src": "4439:98:0", + "src": "4473:98:0", "visibility": "internal" }, { "body": { - "id": 97, + "id": 99, "nodeType": "Block", - "src": "4562:57:0", + "src": "4596:57:0", "statements": [ { "expression": { @@ -1677,19 +1723,19 @@ "typeIdentifier": "t_bool", "typeString": "bool" }, - "id": 92, + "id": 94, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 90, + "id": 92, "name": "isActive", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 61, - "src": "4573:8:0", + "referencedDeclaration": 63, + "src": "4607:8:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1700,14 +1746,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "74727565", - "id": 91, + "id": 93, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "4585:4:0", + "src": "4619:4:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -1715,7 +1761,7 @@ }, "value": "true" }, - "src": "4573:16:0", + "src": "4607:16:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1724,14 +1770,14 @@ { "argumentTypes": null, "hexValue": "436f6e747261637420697320636c6f736564", - "id": 93, + "id": 95, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "4592:20:0", + "src": "4626:20:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_e4b6dedfaff38b4296bb0284d8a728341843b30c49982f1f3b0987de8c0e8193", @@ -1751,21 +1797,21 @@ "typeString": "literal_string \"Contract is closed\"" } ], - "id": 89, + "id": 91, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1024, - 1025 + 1096, + 1097 ], - "referencedDeclaration": 1025, - "src": "4564:7:0", + "referencedDeclaration": 1097, + "src": "4598:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 94, + "id": 96, "isConstant": false, "isLValue": false, "isPure": false, @@ -1773,41 +1819,41 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "4564:49:0", + "src": "4598:49:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 95, + "id": 97, "nodeType": "ExpressionStatement", - "src": "4564:49:0" + "src": "4598:49:0" }, { - "id": 96, + "id": 98, "nodeType": "PlaceholderStatement", - "src": "4615:1:0" + "src": "4649:1:0" } ] }, "documentation": null, - "id": 98, + "id": 100, "name": "ifActive", "nodeType": "ModifierDefinition", "parameters": { - "id": 88, + "id": 90, "nodeType": "ParameterList", "parameters": [], - "src": "4560:2:0" + "src": "4594:2:0" }, - "src": "4543:76:0", + "src": "4577:76:0", "visibility": "internal" }, { "body": { - "id": 112, + "id": 114, "nodeType": "Block", - "src": "4650:115:0", + "src": "4684:115:0", "statements": [ { "expression": { @@ -1819,7 +1865,7 @@ "typeIdentifier": "t_bool", "typeString": "bool" }, - "id": 107, + "id": 109, "isConstant": false, "isLValue": false, "isPure": false, @@ -1830,40 +1876,40 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 103, + "id": 105, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 101, + "id": 103, "name": "closedAt", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 59, - "src": "4661:8:0", + "referencedDeclaration": 61, + "src": "4695:8:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", - "operator": ">", + "operator": "<", "rightExpression": { "argumentTypes": null, - "id": 102, + "id": 104, "name": "now", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1023, - "src": "4672:3:0", + "referencedDeclaration": 1095, + "src": "4706:3:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "4661:14:0", + "src": "4695:14:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1877,19 +1923,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 106, + "id": 108, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 104, + "id": 106, "name": "amountCollected", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 37, - "src": "4679:15:0", + "referencedDeclaration": 39, + "src": "4713:15:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1899,24 +1945,24 @@ "operator": ">=", "rightExpression": { "argumentTypes": null, - "id": 105, + "id": 107, "name": "amountInitialGoal", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 35, - "src": "4699:17:0", + "referencedDeclaration": 37, + "src": "4733:17:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "4679:37:0", + "src": "4713:37:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "src": "4661:55:0", + "src": "4695:55:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1925,14 +1971,14 @@ { "argumentTypes": null, "hexValue": "43616d706169676e206861736e277420726561636865642069747320676f616c207965742e", - "id": 108, + "id": 110, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "4719:39:0", + "src": "4753:39:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_08cdbc3087c6a9ea8dff10a915c17dc40830697abe7ba7888bd88be3759b0752", @@ -1952,21 +1998,21 @@ "typeString": "literal_string \"Campaign hasn't reached its goal yet.\"" } ], - "id": 100, + "id": 102, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1024, - 1025 + 1096, + 1097 ], - "referencedDeclaration": 1025, - "src": "4652:7:0", + "referencedDeclaration": 1097, + "src": "4686:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 109, + "id": 111, "isConstant": false, "isLValue": false, "isPure": false, @@ -1974,41 +2020,41 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "4652:107:0", + "src": "4686:107:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 110, + "id": 112, "nodeType": "ExpressionStatement", - "src": "4652:107:0" + "src": "4686:107:0" }, { - "id": 111, + "id": 113, "nodeType": "PlaceholderStatement", - "src": "4761:1:0" + "src": "4795:1:0" } ] }, "documentation": null, - "id": 113, + "id": 115, "name": "hasReachedGoal", "nodeType": "ModifierDefinition", "parameters": { - "id": 99, + "id": 101, "nodeType": "ParameterList", "parameters": [], - "src": "4648:2:0" + "src": "4682:2:0" }, - "src": "4625:140:0", + "src": "4659:140:0", "visibility": "internal" }, { "body": { - "id": 191, + "id": 193, "nodeType": "Block", - "src": "5013:606:0", + "src": "5047:606:0", "statements": [ { "expression": { @@ -2020,19 +2066,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 131, + "id": 133, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 129, + "id": 131, "name": "_closedAt", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 125, - "src": "5032:9:0", + "referencedDeclaration": 127, + "src": "5066:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2042,18 +2088,18 @@ "operator": ">", "rightExpression": { "argumentTypes": null, - "id": 130, + "id": 132, "name": "_createdAt", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 123, - "src": "5044:10:0", + "referencedDeclaration": 125, + "src": "5078:10:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "5032:22:0", + "src": "5066:22:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -2062,14 +2108,14 @@ { "argumentTypes": null, "hexValue": "43616d706169676e2073746172742074696d65206d757374206265206c657373207468616e20656e642074696d652e", - "id": 132, + "id": 134, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "5056:49:0", + "src": "5090:49:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_fa88cefc99b81f3bd34ab06dfbebe371b19ab6192a49a78724e45bb05356996b", @@ -2089,21 +2135,21 @@ "typeString": "literal_string \"Campaign start time must be less than end time.\"" } ], - "id": 128, + "id": 130, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1024, - 1025 + 1096, + 1097 ], - "referencedDeclaration": 1025, - "src": "5024:7:0", + "referencedDeclaration": 1097, + "src": "5058:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 133, + "id": 135, "isConstant": false, "isLValue": false, "isPure": false, @@ -2111,15 +2157,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "5024:82:0", + "src": "5058:82:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 134, + "id": 136, "nodeType": "ExpressionStatement", - "src": "5024:82:0" + "src": "5058:82:0" }, { "expression": { @@ -2131,19 +2177,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 140, + "id": 142, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 136, + "id": 138, "name": "_initialAmountGoal", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 121, - "src": "5125:18:0", + "referencedDeclaration": 123, + "src": "5159:18:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2157,14 +2203,14 @@ { "argumentTypes": null, "hexValue": "30", - "id": 138, + "id": 140, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "5151:1:0", + "src": "5185:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -2180,20 +2226,20 @@ "typeString": "int_const 0" } ], - "id": 137, + "id": 139, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "5146:4:0", + "src": "5180:4:0", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": "uint" }, - "id": 139, + "id": 141, "isConstant": false, "isLValue": false, "isPure": true, @@ -2201,13 +2247,13 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "5146:7:0", + "src": "5180:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "5125:28:0", + "src": "5159:28:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -2216,14 +2262,14 @@ { "argumentTypes": null, "hexValue": "496e697469616c20616d6f756e7420676f616c20206d7573742062652067726561746572207468616e207a65726f", - "id": 141, + "id": 143, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "5156:48:0", + "src": "5190:48:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_0e04f6b4e32c0dc972145ac7874c694042b28da8abbc18198ea89e6e4d4954be", @@ -2243,21 +2289,21 @@ "typeString": "literal_string \"Initial amount goal must be greater than zero\"" } ], - "id": 135, + "id": 137, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1024, - 1025 + 1096, + 1097 ], - "referencedDeclaration": 1025, - "src": "5117:7:0", + "referencedDeclaration": 1097, + "src": "5151:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 142, + "id": 144, "isConstant": false, "isLValue": false, "isPure": false, @@ -2265,32 +2311,32 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "5117:88:0", + "src": "5151:88:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 143, + "id": 145, "nodeType": "ExpressionStatement", - "src": "5117:88:0" + "src": "5151:88:0" }, { "expression": { "argumentTypes": null, - "id": 146, + "id": 148, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 144, + "id": 146, "name": "manager", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 29, - "src": "5226:7:0", + "referencedDeclaration": 31, + "src": "5260:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2300,43 +2346,43 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 145, + "id": 147, "name": "_manager", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 115, - "src": "5236:8:0", + "referencedDeclaration": 117, + "src": "5270:8:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "5226:18:0", + "src": "5260:18:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 147, + "id": 149, "nodeType": "ExpressionStatement", - "src": "5226:18:0" + "src": "5260:18:0" }, { "expression": { "argumentTypes": null, - "id": 150, + "id": 152, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 148, + "id": 150, "name": "title", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 31, - "src": "5255:5:0", + "referencedDeclaration": 33, + "src": "5289:5:0", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" @@ -2346,43 +2392,43 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 149, + "id": 151, "name": "_title", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 117, - "src": "5263:6:0", + "referencedDeclaration": 119, + "src": "5297:6:0", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, - "src": "5255:14:0", + "src": "5289:14:0", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" } }, - "id": 151, + "id": 153, "nodeType": "ExpressionStatement", - "src": "5255:14:0" + "src": "5289:14:0" }, { "expression": { "argumentTypes": null, - "id": 154, + "id": 156, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 152, + "id": 154, "name": "description", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 33, - "src": "5280:11:0", + "referencedDeclaration": 35, + "src": "5314:11:0", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" @@ -2392,43 +2438,43 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 153, + "id": 155, "name": "_description", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 119, - "src": "5294:12:0", + "referencedDeclaration": 121, + "src": "5328:12:0", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, - "src": "5280:26:0", + "src": "5314:26:0", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" } }, - "id": 155, + "id": 157, "nodeType": "ExpressionStatement", - "src": "5280:26:0" + "src": "5314:26:0" }, { "expression": { "argumentTypes": null, - "id": 158, + "id": 160, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 156, + "id": 158, "name": "amountInitialGoal", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 35, - "src": "5317:17:0", + "referencedDeclaration": 37, + "src": "5351:17:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2438,43 +2484,43 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 157, + "id": 159, "name": "_initialAmountGoal", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 121, - "src": "5337:18:0", + "referencedDeclaration": 123, + "src": "5371:18:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "5317:38:0", + "src": "5351:38:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 159, + "id": 161, "nodeType": "ExpressionStatement", - "src": "5317:38:0" + "src": "5351:38:0" }, { "expression": { "argumentTypes": null, - "id": 162, + "id": 164, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 160, + "id": 162, "name": "createdAt", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 57, - "src": "5366:9:0", + "referencedDeclaration": 59, + "src": "5400:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2484,43 +2530,43 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 161, + "id": 163, "name": "_createdAt", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 123, - "src": "5378:10:0", + "referencedDeclaration": 125, + "src": "5412:10:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "5366:22:0", + "src": "5400:22:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 163, + "id": 165, "nodeType": "ExpressionStatement", - "src": "5366:22:0" + "src": "5400:22:0" }, { "expression": { "argumentTypes": null, - "id": 166, + "id": 168, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 164, + "id": 166, "name": "closedAt", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 59, - "src": "5399:8:0", + "referencedDeclaration": 61, + "src": "5433:8:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2530,43 +2576,43 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 165, + "id": 167, "name": "_closedAt", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 125, - "src": "5410:9:0", + "referencedDeclaration": 127, + "src": "5444:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "5399:20:0", + "src": "5433:20:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 167, + "id": 169, "nodeType": "ExpressionStatement", - "src": "5399:20:0" + "src": "5433:20:0" }, { "expression": { "argumentTypes": null, - "id": 170, + "id": 172, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 168, + "id": 170, "name": "fundRequestProcessTime", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 55, - "src": "5430:22:0", + "referencedDeclaration": 57, + "src": "5464:22:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2577,14 +2623,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "323539323030", - "id": 169, + "id": 171, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "5455:6:0", + "src": "5489:6:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_259200_by_1", @@ -2592,32 +2638,32 @@ }, "value": "259200" }, - "src": "5430:31:0", + "src": "5464:31:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 171, + "id": 173, "nodeType": "ExpressionStatement", - "src": "5430:31:0" + "src": "5464:31:0" }, { "expression": { "argumentTypes": null, - "id": 174, + "id": 176, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 172, + "id": 174, "name": "isActive", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 61, - "src": "5493:8:0", + "referencedDeclaration": 63, + "src": "5527:8:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -2628,14 +2674,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "74727565", - "id": 173, + "id": 175, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "5504:4:0", + "src": "5538:4:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -2643,32 +2689,32 @@ }, "value": "true" }, - "src": "5493:15:0", + "src": "5527:15:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 175, + "id": 177, "nodeType": "ExpressionStatement", - "src": "5493:15:0" + "src": "5527:15:0" }, { "expression": { "argumentTypes": null, - "id": 178, + "id": 180, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 176, + "id": 178, "name": "dononrsCount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 46, - "src": "5519:12:0", + "referencedDeclaration": 48, + "src": "5553:12:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2679,14 +2725,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "30", - "id": 177, + "id": 179, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "5534:1:0", + "src": "5568:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -2694,15 +2740,15 @@ }, "value": "0" }, - "src": "5519:16:0", + "src": "5553:16:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 179, + "id": 181, "nodeType": "ExpressionStatement", - "src": "5519:16:0" + "src": "5553:16:0" }, { "expression": { @@ -2717,14 +2763,14 @@ { "argumentTypes": null, "hexValue": "307830", - "id": 185, + "id": 187, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "5593:3:0", + "src": "5627:3:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -2740,20 +2786,20 @@ "typeString": "int_const 0" } ], - "id": 184, + "id": 186, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "5585:7:0", + "src": "5619:7:0", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": "address" }, - "id": 186, + "id": 188, "isConstant": false, "isLValue": false, "isPure": true, @@ -2761,7 +2807,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "5585:12:0", + "src": "5619:12:0", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -2770,14 +2816,14 @@ { "argumentTypes": null, "hexValue": "30", - "id": 187, + "id": 189, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "5607:1:0", + "src": "5641:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -2797,18 +2843,18 @@ "typeString": "int_const 0" } ], - "id": 183, + "id": 185, "name": "Person", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6, - "src": "5562:6:0", + "src": "5596:6:0", "typeDescriptions": { "typeIdentifier": "t_type$_t_struct$_Person_$6_storage_ptr_$", "typeString": "type(struct Campaign.Person storage pointer)" } }, - "id": 188, + "id": 190, "isConstant": false, "isLValue": false, "isPure": true, @@ -2819,7 +2865,7 @@ "amount" ], "nodeType": "FunctionCall", - "src": "5562:48:0", + "src": "5596:48:0", "typeDescriptions": { "typeIdentifier": "t_struct$_Person_$6_memory", "typeString": "struct Campaign.Person memory" @@ -2835,18 +2881,18 @@ ], "expression": { "argumentTypes": null, - "id": 180, + "id": 182, "name": "donorsList", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 44, - "src": "5546:10:0", + "referencedDeclaration": 46, + "src": "5580:10:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_Person_$6_storage_$dyn_storage", "typeString": "struct Campaign.Person storage ref[] storage ref" } }, - "id": 182, + "id": 184, "isConstant": false, "isLValue": false, "isPure": false, @@ -2854,13 +2900,13 @@ "memberName": "push", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "5546:15:0", + "src": "5580:15:0", "typeDescriptions": { "typeIdentifier": "t_function_arraypush_nonpayable$_t_struct$_Person_$6_storage_$returns$_t_uint256_$", "typeString": "function (struct Campaign.Person storage ref) returns (uint256)" } }, - "id": 189, + "id": 191, "isConstant": false, "isLValue": false, "isPure": false, @@ -2868,36 +2914,36 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "5546:65:0", + "src": "5580:65:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 190, + "id": 192, "nodeType": "ExpressionStatement", - "src": "5546:65:0" + "src": "5580:65:0" } ] }, "documentation": null, - "id": 192, + "id": 194, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { - "id": 126, + "id": 128, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 115, + "id": 117, "name": "_manager", "nodeType": "VariableDeclaration", - "scope": 192, - "src": "4881:16:0", + "scope": 194, + "src": "4915:16:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2905,10 +2951,10 @@ "typeString": "address" }, "typeName": { - "id": 114, + "id": 116, "name": "address", "nodeType": "ElementaryTypeName", - "src": "4881:7:0", + "src": "4915:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -2920,11 +2966,11 @@ }, { "constant": false, - "id": 117, + "id": 119, "name": "_title", "nodeType": "VariableDeclaration", - "scope": 192, - "src": "4899:20:0", + "scope": 194, + "src": "4933:20:0", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { @@ -2932,10 +2978,10 @@ "typeString": "string" }, "typeName": { - "id": 116, + "id": 118, "name": "string", "nodeType": "ElementaryTypeName", - "src": "4899:6:0", + "src": "4933:6:0", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" @@ -2946,11 +2992,11 @@ }, { "constant": false, - "id": 119, + "id": 121, "name": "_description", "nodeType": "VariableDeclaration", - "scope": 192, - "src": "4921:26:0", + "scope": 194, + "src": "4955:26:0", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { @@ -2958,10 +3004,10 @@ "typeString": "string" }, "typeName": { - "id": 118, + "id": 120, "name": "string", "nodeType": "ElementaryTypeName", - "src": "4921:6:0", + "src": "4955:6:0", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" @@ -2972,11 +3018,11 @@ }, { "constant": false, - "id": 121, + "id": 123, "name": "_initialAmountGoal", "nodeType": "VariableDeclaration", - "scope": 192, - "src": "4949:23:0", + "scope": 194, + "src": "4983:23:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2984,10 +3030,10 @@ "typeString": "uint256" }, "typeName": { - "id": 120, + "id": 122, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "4949:4:0", + "src": "4983:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2998,11 +3044,11 @@ }, { "constant": false, - "id": 123, + "id": 125, "name": "_createdAt", "nodeType": "VariableDeclaration", - "scope": 192, - "src": "4974:15:0", + "scope": 194, + "src": "5008:15:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3010,10 +3056,10 @@ "typeString": "uint256" }, "typeName": { - "id": 122, + "id": 124, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "4974:4:0", + "src": "5008:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3024,11 +3070,11 @@ }, { "constant": false, - "id": 125, + "id": 127, "name": "_closedAt", "nodeType": "VariableDeclaration", - "scope": 192, - "src": "4991:14:0", + "scope": 194, + "src": "5025:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3036,10 +3082,10 @@ "typeString": "uint256" }, "typeName": { - "id": 124, + "id": 126, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "4991:4:0", + "src": "5025:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3049,25 +3095,25 @@ "visibility": "internal" } ], - "src": "4880:126:0" + "src": "4914:126:0" }, "returnParameters": { - "id": 127, + "id": 129, "nodeType": "ParameterList", "parameters": [], - "src": "5013:0:0" + "src": "5047:0:0" }, - "scope": 895, - "src": "4869:750:0", + "scope": 967, + "src": "4903:750:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { - "id": 267, + "id": 272, "nodeType": "Block", - "src": "5853:881:0", + "src": "5887:915:0", "statements": [ { "expression": { @@ -3079,7 +3125,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 203, + "id": 205, "isConstant": false, "isLValue": false, "isPure": false, @@ -3088,18 +3134,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 198, + "id": 200, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1021, - "src": "5872:3:0", + "referencedDeclaration": 1093, + "src": "5906:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 199, + "id": 201, "isConstant": false, "isLValue": false, "isPure": false, @@ -3107,7 +3153,7 @@ "memberName": "value", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "5872:9:0", + "src": "5906:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3121,14 +3167,14 @@ { "argumentTypes": null, "hexValue": "30", - "id": 201, + "id": 203, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "5890:1:0", + "src": "5924:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -3144,20 +3190,20 @@ "typeString": "int_const 0" } ], - "id": 200, + "id": 202, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "5885:4:0", + "src": "5919:4:0", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": "uint" }, - "id": 202, + "id": 204, "isConstant": false, "isLValue": false, "isPure": true, @@ -3165,13 +3211,13 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "5885:7:0", + "src": "5919:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "5872:20:0", + "src": "5906:20:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -3180,14 +3226,14 @@ { "argumentTypes": null, "hexValue": "416d6f756e74206d7573742062652067726561746572207468616e207a65726f", - "id": 204, + "id": 206, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "5893:34:0", + "src": "5927:34:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_335ff2e4b249975444723ab3dc1716db90a7dff95cbce35a34ad25055762f887", @@ -3207,21 +3253,21 @@ "typeString": "literal_string \"Amount must be greater than zero\"" } ], - "id": 197, + "id": 199, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1024, - 1025 + 1096, + 1097 ], - "referencedDeclaration": 1025, - "src": "5864:7:0", + "referencedDeclaration": 1097, + "src": "5898:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 205, + "id": 207, "isConstant": false, "isLValue": false, "isPure": false, @@ -3229,28 +3275,28 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "5864:64:0", + "src": "5898:64:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 206, + "id": 208, "nodeType": "ExpressionStatement", - "src": "5864:64:0" + "src": "5898:64:0" }, { "assignments": [ - 208 + 210 ], "declarations": [ { "constant": false, - "id": 208, + "id": 210, "name": "index", "nodeType": "VariableDeclaration", - "scope": 267, - "src": "5949:10:0", + "scope": 272, + "src": "5983:10:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3258,10 +3304,10 @@ "typeString": "uint256" }, "typeName": { - "id": 207, + "id": 209, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "5949:4:0", + "src": "5983:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3271,39 +3317,39 @@ "visibility": "internal" } ], - "id": 213, + "id": 215, "initialValue": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 209, + "id": 211, "name": "donors", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50, - "src": "5962:6:0", + "referencedDeclaration": 52, + "src": "5996:6:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, - "id": 212, + "id": 214, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 210, + "id": 212, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1021, - "src": "5969:3:0", + "referencedDeclaration": 1093, + "src": "6003:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 211, + "id": 213, "isConstant": false, "isLValue": false, "isPure": false, @@ -3311,7 +3357,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "5969:10:0", + "src": "6003:10:0", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -3322,14 +3368,14 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "5962:18:0", + "src": "5996:18:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", - "src": "5949:31:0" + "src": "5983:31:0" }, { "condition": { @@ -3338,19 +3384,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 216, + "id": 218, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 214, + "id": 216, "name": "index", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 208, - "src": "6065:5:0", + "referencedDeclaration": 210, + "src": "6099:5:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3361,14 +3407,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 215, + "id": 217, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "6074:1:0", + "src": "6108:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -3376,29 +3422,29 @@ }, "value": "0" }, - "src": "6065:10:0", + "src": "6099:10:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": { - "id": 260, + "id": 265, "nodeType": "Block", - "src": "6488:147:0", + "src": "6556:147:0", "statements": [ { "assignments": [ - 244 + 249 ], "declarations": [ { "constant": false, - "id": 244, + "id": 249, "name": "prevAmount", "nodeType": "VariableDeclaration", - "scope": 260, - "src": "6517:15:0", + "scope": 265, + "src": "6585:15:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3406,10 +3452,10 @@ "typeString": "uint256" }, "typeName": { - "id": 243, + "id": 248, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "6517:4:0", + "src": "6585:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3419,33 +3465,33 @@ "visibility": "internal" } ], - "id": 249, + "id": 254, "initialValue": { "argumentTypes": null, "expression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 245, + "id": 250, "name": "donorsList", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 44, - "src": "6535:10:0", + "referencedDeclaration": 46, + "src": "6603:10:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_Person_$6_storage_$dyn_storage", "typeString": "struct Campaign.Person storage ref[] storage ref" } }, - "id": 247, + "id": 252, "indexExpression": { "argumentTypes": null, - "id": 246, + "id": 251, "name": "index", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 208, - "src": "6546:5:0", + "referencedDeclaration": 210, + "src": "6614:5:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3456,13 +3502,13 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "6535:17:0", + "src": "6603:17:0", "typeDescriptions": { "typeIdentifier": "t_struct$_Person_$6_storage", "typeString": "struct Campaign.Person storage ref" } }, - "id": 248, + "id": 253, "isConstant": false, "isLValue": true, "isPure": false, @@ -3470,19 +3516,19 @@ "memberName": "amount", "nodeType": "MemberAccess", "referencedDeclaration": 5, - "src": "6535:24:0", + "src": "6603:24:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", - "src": "6517:42:0" + "src": "6585:42:0" }, { "expression": { "argumentTypes": null, - "id": 258, + "id": 263, "isConstant": false, "isLValue": false, "isPure": false, @@ -3493,26 +3539,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 250, + "id": 255, "name": "donorsList", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 44, - "src": "6574:10:0", + "referencedDeclaration": 46, + "src": "6642:10:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_Person_$6_storage_$dyn_storage", "typeString": "struct Campaign.Person storage ref[] storage ref" } }, - "id": 252, + "id": 257, "indexExpression": { "argumentTypes": null, - "id": 251, + "id": 256, "name": "index", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 208, - "src": "6585:5:0", + "referencedDeclaration": 210, + "src": "6653:5:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3523,13 +3569,13 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "6574:17:0", + "src": "6642:17:0", "typeDescriptions": { "typeIdentifier": "t_struct$_Person_$6_storage", "typeString": "struct Campaign.Person storage ref" } }, - "id": 253, + "id": 258, "isConstant": false, "isLValue": true, "isPure": false, @@ -3537,7 +3583,7 @@ "memberName": "amount", "nodeType": "MemberAccess", "referencedDeclaration": 5, - "src": "6574:24:0", + "src": "6642:24:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3551,19 +3597,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 257, + "id": 262, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 254, + "id": 259, "name": "prevAmount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 244, - "src": "6601:10:0", + "referencedDeclaration": 249, + "src": "6669:10:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3575,18 +3621,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 255, + "id": 260, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1021, - "src": "6614:3:0", + "referencedDeclaration": 1093, + "src": "6682:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 256, + "id": 261, "isConstant": false, "isLValue": false, "isPure": false, @@ -3594,54 +3640,54 @@ "memberName": "value", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "6614:9:0", + "src": "6682:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "6601:22:0", + "src": "6669:22:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "6574:49:0", + "src": "6642:49:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 259, + "id": 264, "nodeType": "ExpressionStatement", - "src": "6574:49:0" + "src": "6642:49:0" } ] }, - "id": 261, + "id": 266, "nodeType": "IfStatement", - "src": "6062:573:0", + "src": "6096:607:0", "trueBody": { - "id": 242, + "id": 247, "nodeType": "Block", - "src": "6076:306:0", + "src": "6110:340:0", "statements": [ { "expression": { "argumentTypes": null, - "id": 219, + "id": 221, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 217, + "id": 219, "name": "index", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 208, - "src": "6091:5:0", + "referencedDeclaration": 210, + "src": "6125:5:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3652,14 +3698,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "31", - "id": 218, + "id": 220, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "6099:1:0", + "src": "6133:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", @@ -3667,104 +3713,15 @@ }, "value": "1" }, - "src": "6091:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 220, - "nodeType": "ExpressionStatement", - "src": "6091:9:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 226, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 221, - "name": "donors", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 50, - "src": "6166:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 224, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 222, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1021, - "src": "6173:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 223, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6173:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "6166:18:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 225, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 208, - "src": "6187:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6166:26:0", + "src": "6125:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 227, + "id": 222, "nodeType": "ExpressionStatement", - "src": "6166:26:0" + "src": "6125:9:0" }, { "expression": { @@ -3777,18 +3734,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 232, + "id": 227, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1021, - "src": "6291:3:0", + "referencedDeclaration": 1093, + "src": "6247:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 233, + "id": 228, "isConstant": false, "isLValue": false, "isPure": false, @@ -3796,7 +3753,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "6291:10:0", + "src": "6247:10:0", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -3806,18 +3763,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 234, + "id": 229, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1021, - "src": "6311:3:0", + "referencedDeclaration": 1093, + "src": "6267:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 235, + "id": 230, "isConstant": false, "isLValue": false, "isPure": false, @@ -3825,7 +3782,7 @@ "memberName": "value", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "6311:9:0", + "src": "6267:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3843,18 +3800,18 @@ "typeString": "uint256" } ], - "id": 231, + "id": 226, "name": "Person", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6, - "src": "6268:6:0", + "src": "6224:6:0", "typeDescriptions": { "typeIdentifier": "t_type$_t_struct$_Person_$6_storage_ptr_$", "typeString": "type(struct Campaign.Person storage pointer)" } }, - "id": 236, + "id": 231, "isConstant": false, "isLValue": false, "isPure": false, @@ -3865,7 +3822,7 @@ "amount" ], "nodeType": "FunctionCall", - "src": "6268:54:0", + "src": "6224:54:0", "typeDescriptions": { "typeIdentifier": "t_struct$_Person_$6_memory", "typeString": "struct Campaign.Person memory" @@ -3881,18 +3838,18 @@ ], "expression": { "argumentTypes": null, - "id": 228, + "id": 223, "name": "donorsList", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 44, - "src": "6234:10:0", + "referencedDeclaration": 46, + "src": "6190:10:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_Person_$6_storage_$dyn_storage", "typeString": "struct Campaign.Person storage ref[] storage ref" } }, - "id": 230, + "id": 225, "isConstant": false, "isLValue": false, "isPure": false, @@ -3900,13 +3857,13 @@ "memberName": "push", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "6234:15:0", + "src": "6190:15:0", "typeDescriptions": { "typeIdentifier": "t_function_arraypush_nonpayable$_t_struct$_Person_$6_storage_$returns$_t_uint256_$", "typeString": "function (struct Campaign.Person storage ref) returns (uint256)" } }, - "id": 237, + "id": 232, "isConstant": false, "isLValue": false, "isPure": false, @@ -3914,49 +3871,191 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "6234:107:0", + "src": "6190:107:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 238, + "id": 233, "nodeType": "ExpressionStatement", - "src": "6234:107:0" + "src": "6190:107:0" }, { "expression": { "argumentTypes": null, - "id": 240, + "id": 242, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "6356:14:0", - "subExpression": { + "leftHandSide": { "argumentTypes": null, - "id": 239, - "name": "dononrsCount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46, - "src": "6356:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", + "baseExpression": { + "argumentTypes": null, + "id": 234, + "name": "donors", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 52, + "src": "6367:6:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 237, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 235, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1093, + "src": "6374:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 236, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6374:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6367:18:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 241, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 238, + "name": "donorsList", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46, + "src": "6388:10:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_Person_$6_storage_$dyn_storage", + "typeString": "struct Campaign.Person storage ref[] storage ref" + } + }, + "id": 239, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6388:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 240, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6408:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "6388:21:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6367:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 243, + "nodeType": "ExpressionStatement", + "src": "6367:42:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 245, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "6424:14:0", + "subExpression": { + "argumentTypes": null, + "id": 244, + "name": "dononrsCount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 48, + "src": "6424:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 241, + "id": 246, "nodeType": "ExpressionStatement", - "src": "6356:14:0" + "src": "6424:14:0" } ] } @@ -3964,19 +4063,19 @@ { "expression": { "argumentTypes": null, - "id": 265, + "id": 270, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 262, + "id": 267, "name": "amountCollected", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 37, - "src": "6698:15:0", + "referencedDeclaration": 39, + "src": "6766:15:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3988,18 +4087,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 263, + "id": 268, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1021, - "src": "6717:3:0", + "referencedDeclaration": 1093, + "src": "6785:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 264, + "id": 269, "isConstant": false, "isLValue": false, "isPure": false, @@ -4007,74 +4106,74 @@ "memberName": "value", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "6717:9:0", + "src": "6785:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "6698:28:0", + "src": "6766:28:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 266, + "id": 271, "nodeType": "ExpressionStatement", - "src": "6698:28:0" + "src": "6766:28:0" } ] }, "documentation": null, - "id": 268, + "id": 273, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, - "id": 195, + "id": 197, "modifierName": { "argumentTypes": null, - "id": 194, + "id": 196, "name": "ifActive", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 98, - "src": "5829:8:0", + "referencedDeclaration": 100, + "src": "5863:8:0", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "5829:8:0" + "src": "5863:8:0" } ], "name": "donate", "nodeType": "FunctionDefinition", "parameters": { - "id": 193, + "id": 195, "nodeType": "ParameterList", "parameters": [], - "src": "5826:2:0" + "src": "5860:2:0" }, "returnParameters": { - "id": 196, + "id": 198, "nodeType": "ParameterList", "parameters": [], - "src": "5853:0:0" + "src": "5887:0:0" }, - "scope": 895, - "src": "5811:923:0", + "scope": 967, + "src": "5845:957:0", "stateMutability": "payable", "superFunction": null, "visibility": "public" }, { "body": { - "id": 339, + "id": 344, "nodeType": "Block", - "src": "7036:957:0", + "src": "7104:957:0", "statements": [ { "expression": { @@ -4086,7 +4185,7 @@ "typeIdentifier": "t_bool", "typeString": "bool" }, - "id": 282, + "id": 287, "isConstant": false, "isLValue": false, "isPure": false, @@ -4097,19 +4196,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 278, + "id": 283, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 276, + "id": 281, "name": "amountCollected", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 37, - "src": "7205:15:0", + "referencedDeclaration": 39, + "src": "7273:15:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4119,18 +4218,18 @@ "operator": "<", "rightExpression": { "argumentTypes": null, - "id": 277, + "id": 282, "name": "amountInitialGoal", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 35, - "src": "7223:17:0", + "referencedDeclaration": 37, + "src": "7291:17:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "7205:35:0", + "src": "7273:35:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -4144,19 +4243,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 281, + "id": 286, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 279, + "id": 284, "name": "closedAt", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 59, - "src": "7244:8:0", + "referencedDeclaration": 61, + "src": "7312:8:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4166,24 +4265,24 @@ "operator": ">", "rightExpression": { "argumentTypes": null, - "id": 280, + "id": 285, "name": "now", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1023, - "src": "7255:3:0", + "referencedDeclaration": 1095, + "src": "7323:3:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "7244:14:0", + "src": "7312:14:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "src": "7205:53:0", + "src": "7273:53:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -4192,14 +4291,14 @@ { "argumentTypes": null, "hexValue": "446f6e6174696f6e2063616e6e6f742062652077697468647261776e", - "id": 283, + "id": 288, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "7259:30:0", + "src": "7327:30:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_5d3eb699108bf57c7070dfbbbc36d80653380d1192a83188eb2d2f164512a465", @@ -4219,21 +4318,21 @@ "typeString": "literal_string \"Donation cannot be withdrawn\"" } ], - "id": 275, + "id": 280, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1024, - 1025 + 1096, + 1097 ], - "referencedDeclaration": 1025, - "src": "7197:7:0", + "referencedDeclaration": 1097, + "src": "7265:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 284, + "id": 289, "isConstant": false, "isLValue": false, "isPure": false, @@ -4241,28 +4340,28 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "7197:93:0", + "src": "7265:93:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 285, + "id": 290, "nodeType": "ExpressionStatement", - "src": "7197:93:0" + "src": "7265:93:0" }, { "assignments": [ - 287 + 292 ], "declarations": [ { "constant": false, - "id": 287, + "id": 292, "name": "index", "nodeType": "VariableDeclaration", - "scope": 339, - "src": "7311:10:0", + "scope": 344, + "src": "7379:10:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4270,10 +4369,10 @@ "typeString": "uint256" }, "typeName": { - "id": 286, + "id": 291, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "7311:4:0", + "src": "7379:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4283,39 +4382,39 @@ "visibility": "internal" } ], - "id": 292, + "id": 297, "initialValue": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 288, + "id": 293, "name": "donors", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50, - "src": "7324:6:0", + "referencedDeclaration": 52, + "src": "7392:6:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, - "id": 291, + "id": 296, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 289, + "id": 294, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1021, - "src": "7331:3:0", + "referencedDeclaration": 1093, + "src": "7399:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 290, + "id": 295, "isConstant": false, "isLValue": false, "isPure": false, @@ -4323,7 +4422,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "7331:10:0", + "src": "7399:10:0", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -4334,14 +4433,14 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "7324:18:0", + "src": "7392:18:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", - "src": "7311:31:0" + "src": "7379:31:0" }, { "expression": { @@ -4353,19 +4452,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 296, + "id": 301, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 294, + "id": 299, "name": "index", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 287, - "src": "7412:5:0", + "referencedDeclaration": 292, + "src": "7480:5:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4376,14 +4475,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 295, + "id": 300, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "7420:1:0", + "src": "7488:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -4391,7 +4490,7 @@ }, "value": "0" }, - "src": "7412:9:0", + "src": "7480:9:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -4400,14 +4499,14 @@ { "argumentTypes": null, "hexValue": "596f75206861766520746f206265206120646f6e6f7220696e206f7264657220746f20776974686472617720796f757220646f6e6174696f6e", - "id": 297, + "id": 302, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "7423:59:0", + "src": "7491:59:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_8fdf0334534394e478d5f3b4fde19be8b74db8411e622dc13802f2ef2ed0c5f1", @@ -4427,21 +4526,21 @@ "typeString": "literal_string \"You have to be a donor in order to withdraw your donation\"" } ], - "id": 293, + "id": 298, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1024, - 1025 + 1096, + 1097 ], - "referencedDeclaration": 1025, - "src": "7404:7:0", + "referencedDeclaration": 1097, + "src": "7472:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 298, + "id": 303, "isConstant": false, "isLValue": false, "isPure": false, @@ -4449,28 +4548,28 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "7404:79:0", + "src": "7472:79:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 299, + "id": 304, "nodeType": "ExpressionStatement", - "src": "7404:79:0" + "src": "7472:79:0" }, { "assignments": [ - 301 + 306 ], "declarations": [ { "constant": false, - "id": 301, + "id": 306, "name": "amount", "nodeType": "VariableDeclaration", - "scope": 339, - "src": "7504:11:0", + "scope": 344, + "src": "7572:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4478,10 +4577,10 @@ "typeString": "uint256" }, "typeName": { - "id": 300, + "id": 305, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "7504:4:0", + "src": "7572:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4491,33 +4590,33 @@ "visibility": "internal" } ], - "id": 306, + "id": 311, "initialValue": { "argumentTypes": null, "expression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 302, + "id": 307, "name": "donorsList", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 44, - "src": "7518:10:0", + "referencedDeclaration": 46, + "src": "7586:10:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_Person_$6_storage_$dyn_storage", "typeString": "struct Campaign.Person storage ref[] storage ref" } }, - "id": 304, + "id": 309, "indexExpression": { "argumentTypes": null, - "id": 303, + "id": 308, "name": "index", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 287, - "src": "7529:5:0", + "referencedDeclaration": 292, + "src": "7597:5:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4528,13 +4627,13 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "7518:17:0", + "src": "7586:17:0", "typeDescriptions": { "typeIdentifier": "t_struct$_Person_$6_storage", "typeString": "struct Campaign.Person storage ref" } }, - "id": 305, + "id": 310, "isConstant": false, "isLValue": true, "isPure": false, @@ -4542,14 +4641,14 @@ "memberName": "amount", "nodeType": "MemberAccess", "referencedDeclaration": 5, - "src": "7518:24:0", + "src": "7586:24:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", - "src": "7504:38:0" + "src": "7572:38:0" }, { "condition": { @@ -4558,19 +4657,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 309, + "id": 314, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 307, + "id": 312, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 301, - "src": "7556:6:0", + "referencedDeclaration": 306, + "src": "7624:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4581,14 +4680,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 308, + "id": 313, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "7565:1:0", + "src": "7633:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -4596,25 +4695,25 @@ }, "value": "0" }, - "src": "7556:10:0", + "src": "7624:10:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, - "id": 338, + "id": 343, "nodeType": "IfStatement", - "src": "7553:433:0", + "src": "7621:433:0", "trueBody": { - "id": 337, + "id": 342, "nodeType": "Block", - "src": "7577:409:0", + "src": "7645:409:0", "statements": [ { "expression": { "argumentTypes": null, - "id": 315, + "id": 320, "isConstant": false, "isLValue": false, "isPure": false, @@ -4623,34 +4722,34 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 310, + "id": 315, "name": "donors", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50, - "src": "7635:6:0", + "referencedDeclaration": 52, + "src": "7703:6:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, - "id": 313, + "id": 318, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 311, + "id": 316, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1021, - "src": "7642:3:0", + "referencedDeclaration": 1093, + "src": "7710:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 312, + "id": 317, "isConstant": false, "isLValue": false, "isPure": false, @@ -4658,7 +4757,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "7642:10:0", + "src": "7710:10:0", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -4669,7 +4768,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "7635:18:0", + "src": "7703:18:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4680,14 +4779,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "30", - "id": 314, + "id": 319, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "7656:1:0", + "src": "7724:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -4695,20 +4794,20 @@ }, "value": "0" }, - "src": "7635:22:0", + "src": "7703:22:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 316, + "id": 321, "nodeType": "ExpressionStatement", - "src": "7635:22:0" + "src": "7703:22:0" }, { "expression": { "argumentTypes": null, - "id": 320, + "id": 325, "isConstant": false, "isLValue": false, "isPure": false, @@ -4716,31 +4815,31 @@ "nodeType": "UnaryOperation", "operator": "delete", "prefix": true, - "src": "7724:24:0", + "src": "7792:24:0", "subExpression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 317, + "id": 322, "name": "donorsList", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 44, - "src": "7731:10:0", + "referencedDeclaration": 46, + "src": "7799:10:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_Person_$6_storage_$dyn_storage", "typeString": "struct Campaign.Person storage ref[] storage ref" } }, - "id": 319, + "id": 324, "indexExpression": { "argumentTypes": null, - "id": 318, + "id": 323, "name": "index", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 287, - "src": "7742:5:0", + "referencedDeclaration": 292, + "src": "7810:5:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4751,7 +4850,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "7731:17:0", + "src": "7799:17:0", "typeDescriptions": { "typeIdentifier": "t_struct$_Person_$6_storage", "typeString": "struct Campaign.Person storage ref" @@ -4762,26 +4861,26 @@ "typeString": "tuple()" } }, - "id": 321, + "id": 326, "nodeType": "ExpressionStatement", - "src": "7724:24:0" + "src": "7792:24:0" }, { "expression": { "argumentTypes": null, - "id": 324, + "id": 329, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 322, + "id": 327, "name": "amountCollected", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 37, - "src": "7820:15:0", + "referencedDeclaration": 39, + "src": "7888:15:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4791,31 +4890,31 @@ "operator": "-=", "rightHandSide": { "argumentTypes": null, - "id": 323, + "id": 328, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 301, - "src": "7839:6:0", + "referencedDeclaration": 306, + "src": "7907:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "7820:25:0", + "src": "7888:25:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 325, + "id": 330, "nodeType": "ExpressionStatement", - "src": "7820:25:0" + "src": "7888:25:0" }, { "expression": { "argumentTypes": null, - "id": 327, + "id": 332, "isConstant": false, "isLValue": false, "isPure": false, @@ -4823,15 +4922,15 @@ "nodeType": "UnaryOperation", "operator": "--", "prefix": false, - "src": "7874:14:0", + "src": "7942:14:0", "subExpression": { "argumentTypes": null, - "id": 326, + "id": 331, "name": "dononrsCount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 46, - "src": "7874:12:0", + "referencedDeclaration": 48, + "src": "7942:12:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4842,9 +4941,9 @@ "typeString": "uint256" } }, - "id": 328, + "id": 333, "nodeType": "ExpressionStatement", - "src": "7874:14:0" + "src": "7942:14:0" }, { "expression": { @@ -4852,12 +4951,12 @@ "arguments": [ { "argumentTypes": null, - "id": 334, + "id": 339, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 301, - "src": "7967:6:0", + "referencedDeclaration": 306, + "src": "8035:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4875,18 +4974,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 329, + "id": 334, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1021, - "src": "7947:3:0", + "referencedDeclaration": 1093, + "src": "8015:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 332, + "id": 337, "isConstant": false, "isLValue": false, "isPure": false, @@ -4894,13 +4993,13 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "7947:10:0", + "src": "8015:10:0", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, - "id": 333, + "id": 338, "isConstant": false, "isLValue": false, "isPure": false, @@ -4908,13 +5007,13 @@ "memberName": "transfer", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "7947:19:0", + "src": "8015:19:0", "typeDescriptions": { "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256)" } }, - "id": 335, + "id": 340, "isConstant": false, "isLValue": false, "isPure": false, @@ -4922,15 +5021,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "7947:27:0", + "src": "8015:27:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 336, + "id": 341, "nodeType": "ExpressionStatement", - "src": "7947:27:0" + "src": "8015:27:0" } ] } @@ -4938,49 +5037,49 @@ ] }, "documentation": null, - "id": 340, + "id": 345, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, - "id": 271, + "id": 276, "modifierName": { "argumentTypes": null, - "id": 270, + "id": 275, "name": "ifActive", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 98, - "src": "7006:8:0", + "referencedDeclaration": 100, + "src": "7074:8:0", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "7006:8:0" + "src": "7074:8:0" } ], "name": "withdrawDonation", "nodeType": "FunctionDefinition", "parameters": { - "id": 269, + "id": 274, "nodeType": "ParameterList", "parameters": [], - "src": "7003:2:0" + "src": "7071:2:0" }, "returnParameters": { - "id": 274, + "id": 279, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 273, + "id": 278, "name": "", "nodeType": "VariableDeclaration", - "scope": 340, - "src": "7030:4:0", + "scope": 345, + "src": "7098:4:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4988,10 +5087,10 @@ "typeString": "uint256" }, "typeName": { - "id": 272, + "id": 277, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "7030:4:0", + "src": "7098:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5001,19 +5100,19 @@ "visibility": "internal" } ], - "src": "7029:6:0" + "src": "7097:6:0" }, - "scope": 895, - "src": "6978:1015:0", + "scope": 967, + "src": "7046:1015:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { - "id": 503, + "id": 498, "nodeType": "Block", - "src": "8186:1567:0", + "src": "8254:1471:0", "statements": [ { "expression": { @@ -5022,107 +5121,48 @@ { "argumentTypes": null, "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, - "id": 366, + "id": 367, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "commonType": { + "id": 365, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "8273:7:0", + "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" - }, - "id": 362, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 360, - "name": "closedAt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 59, - "src": "8205:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "id": 361, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1023, - "src": "8216:3:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8205:14:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" } }, "nodeType": "BinaryOperation", - "operator": "&&", + "operator": ">", "rightExpression": { "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 365, + "hexValue": "30", + "id": 366, "isConstant": false, "isLValue": false, - "isPure": false, + "isPure": true, + "kind": "number", "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 363, - "name": "amountCollected", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 37, - "src": "8223:15:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 364, - "name": "amountInitialGoal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 35, - "src": "8243:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8223:37:0", + "nodeType": "Literal", + "src": "8283:1:0", + "subdenomination": null, "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" }, - "src": "8205:55:0", + "src": "8273:11:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -5130,21 +5170,21 @@ }, { "argumentTypes": null, - "hexValue": "43616d706169676e20636f756c646e277420726561636865642069747320676f616c2e", - "id": 367, + "hexValue": "416d6f756e742063616e6e6f74206265207a65726f2e", + "id": 368, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "8261:37:0", + "src": "8285:24:0", "subdenomination": null, "typeDescriptions": { - "typeIdentifier": "t_stringliteral_0d128dbbd22c97efbc2cb1ca9bae57bcb1dc8a94e098b51f1cac2faa3e277eb7", - "typeString": "literal_string \"Campaign couldn't reached its goal.\"" + "typeIdentifier": "t_stringliteral_c22020d8cf79dcf6b51ac2d091be02d255eadeca71c3704c7e5bb2f17b9822f2", + "typeString": "literal_string \"Amount cannot be zero.\"" }, - "value": "Campaign couldn't reached its goal." + "value": "Amount cannot be zero." } ], "expression": { @@ -5154,25 +5194,25 @@ "typeString": "bool" }, { - "typeIdentifier": "t_stringliteral_0d128dbbd22c97efbc2cb1ca9bae57bcb1dc8a94e098b51f1cac2faa3e277eb7", - "typeString": "literal_string \"Campaign couldn't reached its goal.\"" + "typeIdentifier": "t_stringliteral_c22020d8cf79dcf6b51ac2d091be02d255eadeca71c3704c7e5bb2f17b9822f2", + "typeString": "literal_string \"Amount cannot be zero.\"" } ], - "id": 359, + "id": 364, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1024, - 1025 + 1096, + 1097 ], - "referencedDeclaration": 1025, - "src": "8197:7:0", + "referencedDeclaration": 1097, + "src": "8265:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 368, + "id": 369, "isConstant": false, "isLValue": false, "isPure": false, @@ -5180,15 +5220,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "8197:102:0", + "src": "8265:45:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 369, + "id": 370, "nodeType": "ExpressionStatement", - "src": "8197:102:0" + "src": "8265:45:0" }, { "expression": { @@ -5197,137 +5237,21 @@ { "argumentTypes": null, "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bool", + "typeString": "bool" }, - "id": 373, + "id": 380, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 371, - "name": "_amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 344, - "src": "8318:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 372, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8328:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "8318:11:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416d6f756e742063616e6e6f74206265207a65726f2e", - "id": 374, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8330:24:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c22020d8cf79dcf6b51ac2d091be02d255eadeca71c3704c7e5bb2f17b9822f2", - "typeString": "literal_string \"Amount cannot be zero.\"" - }, - "value": "Amount cannot be zero." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_c22020d8cf79dcf6b51ac2d091be02d255eadeca71c3704c7e5bb2f17b9822f2", - "typeString": "literal_string \"Amount cannot be zero.\"" - } - ], - "id": 370, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1024, - 1025 - ], - "referencedDeclaration": 1025, - "src": "8310:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 375, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8310:45:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 376, - "nodeType": "ExpressionStatement", - "src": "8310:45:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 386, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { + "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 381, + "id": 375, "isConstant": false, "isLValue": false, "isPure": false, @@ -5336,18 +5260,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 378, + "id": 372, "name": "_recipientsAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 347, - "src": "8374:18:0", + "referencedDeclaration": 352, + "src": "8329:18:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", "typeString": "address[] memory" } }, - "id": 379, + "id": 373, "isConstant": false, "isLValue": false, "isPure": false, @@ -5355,7 +5279,7 @@ "memberName": "length", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "8374:25:0", + "src": "8329:25:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5366,14 +5290,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 380, + "id": 374, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "8402:1:0", + "src": "8357:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -5381,7 +5305,7 @@ }, "value": "0" }, - "src": "8374:29:0", + "src": "8329:29:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -5395,7 +5319,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 385, + "id": 379, "isConstant": false, "isLValue": false, "isPure": false, @@ -5404,18 +5328,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 382, + "id": 376, "name": "_recipientsAmount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 350, - "src": "8407:17:0", + "referencedDeclaration": 355, + "src": "8362:17:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", "typeString": "uint256[] memory" } }, - "id": 383, + "id": 377, "isConstant": false, "isLValue": false, "isPure": false, @@ -5423,7 +5347,7 @@ "memberName": "length", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "8407:24:0", + "src": "8362:24:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5434,14 +5358,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 384, + "id": 378, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "8434:1:0", + "src": "8389:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -5449,13 +5373,13 @@ }, "value": "0" }, - "src": "8407:28:0", + "src": "8362:28:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "src": "8374:61:0", + "src": "8329:61:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -5464,14 +5388,14 @@ { "argumentTypes": null, "hexValue": "52657175657374206d75737420636f6e7461696e2061746c65617374206f6e6520726563697069656e74", - "id": 387, + "id": 381, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "8437:44:0", + "src": "8392:44:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_6652da290a9849434684292b41a637a3234ce798c50d5b882fe2cb9e6225cb69", @@ -5491,21 +5415,21 @@ "typeString": "literal_string \"Request must contain atleast one recipient\"" } ], - "id": 377, + "id": 371, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1024, - 1025 + 1096, + 1097 ], - "referencedDeclaration": 1025, - "src": "8366:7:0", + "referencedDeclaration": 1097, + "src": "8321:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 388, + "id": 382, "isConstant": false, "isLValue": false, "isPure": false, @@ -5513,15 +5437,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "8366:116:0", + "src": "8321:116:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 389, + "id": 383, "nodeType": "ExpressionStatement", - "src": "8366:116:0" + "src": "8321:116:0" }, { "expression": { @@ -5533,7 +5457,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 395, + "id": 389, "isConstant": false, "isLValue": false, "isPure": false, @@ -5542,18 +5466,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 391, + "id": 385, "name": "_recipientsAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 347, - "src": "8501:18:0", + "referencedDeclaration": 352, + "src": "8456:18:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", "typeString": "address[] memory" } }, - "id": 392, + "id": 386, "isConstant": false, "isLValue": false, "isPure": false, @@ -5561,7 +5485,7 @@ "memberName": "length", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "8501:25:0", + "src": "8456:25:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5573,18 +5497,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 393, + "id": 387, "name": "_recipientsAmount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 350, - "src": "8530:17:0", + "referencedDeclaration": 355, + "src": "8485:17:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", "typeString": "uint256[] memory" } }, - "id": 394, + "id": 388, "isConstant": false, "isLValue": false, "isPure": false, @@ -5592,13 +5516,13 @@ "memberName": "length", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "8530:24:0", + "src": "8485:24:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "8501:53:0", + "src": "8456:53:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -5607,14 +5531,14 @@ { "argumentTypes": null, "hexValue": "54686572652073686f756c6420626520657175616c206e6f2e206f6620726563697069656e74732061646472657373657320616e6420616d6f756e7473", - "id": 396, + "id": 390, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "8555:63:0", + "src": "8510:63:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_28041745d75545b5f7193f07c84b1c846027ff880bfab81ec0c382d8848bfc40", @@ -5634,21 +5558,21 @@ "typeString": "literal_string \"There should be equal no. of recipients addresses and amounts\"" } ], - "id": 390, + "id": 384, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1024, - 1025 + 1096, + 1097 ], - "referencedDeclaration": 1025, - "src": "8493:7:0", + "referencedDeclaration": 1097, + "src": "8448:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 397, + "id": 391, "isConstant": false, "isLValue": false, "isPure": false, @@ -5656,15 +5580,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "8493:126:0", + "src": "8448:126:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 398, + "id": 392, "nodeType": "ExpressionStatement", - "src": "8493:126:0" + "src": "8448:126:0" }, { "expression": { @@ -5676,7 +5600,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 406, + "id": 400, "isConstant": false, "isLValue": false, "isPure": false, @@ -5687,7 +5611,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 404, + "id": 398, "isConstant": false, "isLValue": false, "isPure": false, @@ -5698,19 +5622,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 402, + "id": 396, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 400, + "id": 394, "name": "amountCollected", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 37, - "src": "8638:15:0", + "referencedDeclaration": 39, + "src": "8593:15:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5720,18 +5644,18 @@ "operator": "-", "rightExpression": { "argumentTypes": null, - "id": 401, + "id": 395, "name": "amountSpended", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 41, - "src": "8656:13:0", + "referencedDeclaration": 43, + "src": "8611:13:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "8638:31:0", + "src": "8593:31:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5741,18 +5665,18 @@ "operator": "-", "rightExpression": { "argumentTypes": null, - "id": 403, + "id": 397, "name": "amountDelegated", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 39, - "src": "8672:15:0", + "referencedDeclaration": 41, + "src": "8627:15:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "8638:49:0", + "src": "8593:49:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5762,18 +5686,18 @@ "operator": ">=", "rightExpression": { "argumentTypes": null, - "id": 405, + "id": 399, "name": "_amount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 344, - "src": "8691:7:0", + "referencedDeclaration": 349, + "src": "8646:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "8638:60:0", + "src": "8593:60:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -5782,14 +5706,14 @@ { "argumentTypes": null, "hexValue": "43616d706169676e20646f6e2774206861766520656e6f7567682066756e647320666f7220796f757220726571756573742e", - "id": 407, + "id": 401, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "8700:52:0", + "src": "8655:52:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_84922fc6fba604d7203feb7d61843901ce53c82e7f5c1dcaecfb2ac6ab835b7b", @@ -5809,21 +5733,21 @@ "typeString": "literal_string \"Campaign don't have enough funds for your request.\"" } ], - "id": 399, + "id": 393, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1024, - 1025 + 1096, + 1097 ], - "referencedDeclaration": 1025, - "src": "8630:7:0", + "referencedDeclaration": 1097, + "src": "8585:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 408, + "id": 402, "isConstant": false, "isLValue": false, "isPure": false, @@ -5831,28 +5755,28 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "8630:123:0", + "src": "8585:123:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 409, + "id": 403, "nodeType": "ExpressionStatement", - "src": "8630:123:0" + "src": "8585:123:0" }, { "assignments": [ - 411 + 405 ], "declarations": [ { "constant": false, - "id": 411, + "id": 405, "name": "totalAmount", "nodeType": "VariableDeclaration", - "scope": 503, - "src": "8774:16:0", + "scope": 498, + "src": "8729:16:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5860,10 +5784,10 @@ "typeString": "uint256" }, "typeName": { - "id": 410, + "id": 404, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "8774:4:0", + "src": "8729:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5873,18 +5797,18 @@ "visibility": "internal" } ], - "id": 413, + "id": 407, "initialValue": { "argumentTypes": null, "hexValue": "30", - "id": 412, + "id": 406, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "8793:1:0", + "src": "8748:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -5893,30 +5817,30 @@ "value": "0" }, "nodeType": "VariableDeclarationStatement", - "src": "8774:20:0" + "src": "8729:20:0" }, { "body": { - "id": 430, + "id": 424, "nodeType": "Block", - "src": "8851:65:0", + "src": "8806:65:0", "statements": [ { "expression": { "argumentTypes": null, - "id": 428, + "id": 422, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 424, + "id": 418, "name": "totalAmount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 411, - "src": "8866:11:0", + "referencedDeclaration": 405, + "src": "8821:11:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5928,26 +5852,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 425, + "id": 419, "name": "_recipientsAmount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 350, - "src": "8881:17:0", + "referencedDeclaration": 355, + "src": "8836:17:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", "typeString": "uint256[] memory" } }, - "id": 427, + "id": 421, "indexExpression": { "argumentTypes": null, - "id": 426, + "id": 420, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 415, - "src": "8899:1:0", + "referencedDeclaration": 409, + "src": "8854:1:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5958,21 +5882,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "8881:20:0", + "src": "8836:20:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "8866:35:0", + "src": "8821:35:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 429, + "id": 423, "nodeType": "ExpressionStatement", - "src": "8866:35:0" + "src": "8821:35:0" } ] }, @@ -5982,19 +5906,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 420, + "id": 414, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 417, + "id": 411, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 415, - "src": "8817:1:0", + "referencedDeclaration": 409, + "src": "8772:1:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6006,18 +5930,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 418, + "id": 412, "name": "_recipientsAmount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 350, - "src": "8821:17:0", + "referencedDeclaration": 355, + "src": "8776:17:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", "typeString": "uint256[] memory" } }, - "id": 419, + "id": 413, "isConstant": false, "isLValue": false, "isPure": false, @@ -6025,31 +5949,31 @@ "memberName": "length", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "8821:24:0", + "src": "8776:24:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "8817:28:0", + "src": "8772:28:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 431, + "id": 425, "initializationExpression": { "assignments": [ - 415 + 409 ], "declarations": [ { "constant": false, - "id": 415, + "id": 409, "name": "i", "nodeType": "VariableDeclaration", - "scope": 431, - "src": "8809:6:0", + "scope": 425, + "src": "8764:6:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -6057,10 +5981,10 @@ "typeString": "uint256" }, "typeName": { - "id": 414, + "id": 408, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "8809:4:0", + "src": "8764:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6070,15 +5994,15 @@ "visibility": "internal" } ], - "id": 416, + "id": 410, "initialValue": null, "nodeType": "VariableDeclarationStatement", - "src": "8809:6:0" + "src": "8764:6:0" }, "loopExpression": { "expression": { "argumentTypes": null, - "id": 422, + "id": 416, "isConstant": false, "isLValue": false, "isPure": false, @@ -6086,15 +6010,15 @@ "nodeType": "UnaryOperation", "operator": "++", "prefix": false, - "src": "8847:3:0", + "src": "8802:3:0", "subExpression": { "argumentTypes": null, - "id": 421, + "id": 415, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 415, - "src": "8847:1:0", + "referencedDeclaration": 409, + "src": "8802:1:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6105,12 +6029,12 @@ "typeString": "uint256" } }, - "id": 423, + "id": 417, "nodeType": "ExpressionStatement", - "src": "8847:3:0" + "src": "8802:3:0" }, "nodeType": "ForStatement", - "src": "8805:111:0" + "src": "8760:111:0" }, { "expression": { @@ -6122,19 +6046,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 435, + "id": 429, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 433, + "id": 427, "name": "totalAmount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 411, - "src": "8944:11:0", + "referencedDeclaration": 405, + "src": "8899:11:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6144,18 +6068,18 @@ "operator": "==", "rightExpression": { "argumentTypes": null, - "id": 434, + "id": 428, "name": "_amount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 344, - "src": "8959:7:0", + "referencedDeclaration": 349, + "src": "8914:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "8944:22:0", + "src": "8899:22:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -6164,14 +6088,14 @@ { "argumentTypes": null, "hexValue": "546f74616c20616d6f756e742064656c65676174656420746f20726563697069656e7473206d75737420626520657175616c20746f2074686520746f74616c20616d6f756e7420696e207468652072657175657374", - "id": 436, + "id": 430, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "8968:87:0", + "src": "8923:87:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_b6b5f3db3bb418e7053cc73398a5d41d63ec230c17008d6a7eea6c44d06a91ca", @@ -6191,21 +6115,21 @@ "typeString": "literal_string \"Total amount delegated to recipients must be equal to the total amount in the request\"" } ], - "id": 432, + "id": 426, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1024, - 1025 + 1096, + 1097 ], - "referencedDeclaration": 1025, - "src": "8936:7:0", + "referencedDeclaration": 1097, + "src": "8891:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 437, + "id": 431, "isConstant": false, "isLValue": false, "isPure": false, @@ -6213,15 +6137,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "8936:120:0", + "src": "8891:120:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 438, + "id": 432, "nodeType": "ExpressionStatement", - "src": "8936:120:0" + "src": "8891:120:0" }, { "expression": { @@ -6232,12 +6156,12 @@ "arguments": [ { "argumentTypes": null, - "id": 443, + "id": 437, "name": "_description", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 342, - "src": "9135:12:0", + "referencedDeclaration": 347, + "src": "9090:12:0", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" @@ -6245,12 +6169,12 @@ }, { "argumentTypes": null, - "id": 444, + "id": 438, "name": "_amount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 344, - "src": "9157:7:0", + "referencedDeclaration": 349, + "src": "9112:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6259,14 +6183,14 @@ { "argumentTypes": null, "hexValue": "30", - "id": 445, + "id": 439, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "9183:1:0", + "src": "9138:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -6276,12 +6200,12 @@ }, { "argumentTypes": null, - "id": 446, + "id": 440, "name": "now", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1023, - "src": "9197:3:0", + "referencedDeclaration": 1095, + "src": "9152:3:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6290,14 +6214,14 @@ { "argumentTypes": null, "hexValue": "30", - "id": 447, + "id": 441, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "9221:1:0", + "src": "9176:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -6308,14 +6232,32 @@ { "argumentTypes": null, "hexValue": "66616c7365", - "id": 448, + "id": 442, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9192:5:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 443, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "9237:5:0", + "src": "9209:5:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -6346,23 +6288,27 @@ "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, { "typeIdentifier": "t_bool", "typeString": "bool" } ], - "id": 442, + "id": 436, "name": "FundRequest", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 27, - "src": "9109:11:0", + "referencedDeclaration": 29, + "src": "9064:11:0", "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_FundRequest_$27_storage_ptr_$", + "typeIdentifier": "t_type$_t_struct$_FundRequest_$29_storage_ptr_$", "typeString": "type(struct Campaign.FundRequest storage pointer)" } }, - "id": 449, + "id": 444, "isConstant": false, "isLValue": false, "isPure": false, @@ -6374,12 +6320,13 @@ "recipientsCount", "createdAt", "disapproversCount", - "isCompleted" + "isCompleted", + "isClosed" ], "nodeType": "FunctionCall", - "src": "9109:135:0", + "src": "9064:152:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_memory", + "typeIdentifier": "t_struct$_FundRequest_$29_memory", "typeString": "struct Campaign.FundRequest memory" } } @@ -6387,24 +6334,24 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_struct$_FundRequest_$27_memory", + "typeIdentifier": "t_struct$_FundRequest_$29_memory", "typeString": "struct Campaign.FundRequest memory" } ], "expression": { "argumentTypes": null, - "id": 439, + "id": 433, "name": "fundRequests", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "9077:12:0", + "referencedDeclaration": 55, + "src": "9032:12:0", "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_FundRequest_$27_storage_$dyn_storage", + "typeIdentifier": "t_array$_t_struct$_FundRequest_$29_storage_$dyn_storage", "typeString": "struct Campaign.FundRequest storage ref[] storage ref" } }, - "id": 441, + "id": 435, "isConstant": false, "isLValue": false, "isPure": false, @@ -6412,13 +6359,13 @@ "memberName": "push", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "9077:17:0", + "src": "9032:17:0", "typeDescriptions": { - "typeIdentifier": "t_function_arraypush_nonpayable$_t_struct$_FundRequest_$27_storage_$returns$_t_uint256_$", + "typeIdentifier": "t_function_arraypush_nonpayable$_t_struct$_FundRequest_$29_storage_$returns$_t_uint256_$", "typeString": "function (struct Campaign.FundRequest storage ref) returns (uint256)" } }, - "id": 450, + "id": 445, "isConstant": false, "isLValue": false, "isPure": false, @@ -6426,43 +6373,43 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "9077:178:0", + "src": "9032:195:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 451, + "id": 446, "nodeType": "ExpressionStatement", - "src": "9077:178:0" + "src": "9032:195:0" }, { "assignments": [ - 453 + 448 ], "declarations": [ { "constant": false, - "id": 453, + "id": 448, "name": "request", "nodeType": "VariableDeclaration", - "scope": 503, - "src": "9299:27:0", + "scope": 498, + "src": "9271:27:0", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", "typeString": "struct Campaign.FundRequest" }, "typeName": { "contractScope": null, - "id": 452, + "id": 447, "name": "FundRequest", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 27, - "src": "9299:11:0", + "referencedDeclaration": 29, + "src": "9271:11:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", "typeString": "struct Campaign.FundRequest" } }, @@ -6470,30 +6417,30 @@ "visibility": "internal" } ], - "id": 460, + "id": 455, "initialValue": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 454, + "id": 449, "name": "fundRequests", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "9329:12:0", + "referencedDeclaration": 55, + "src": "9301:12:0", "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_FundRequest_$27_storage_$dyn_storage", + "typeIdentifier": "t_array$_t_struct$_FundRequest_$29_storage_$dyn_storage", "typeString": "struct Campaign.FundRequest storage ref[] storage ref" } }, - "id": 459, + "id": 454, "indexExpression": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 458, + "id": 453, "isConstant": false, "isLValue": false, "isPure": false, @@ -6502,18 +6449,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 455, + "id": 450, "name": "fundRequests", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "9342:12:0", + "referencedDeclaration": 55, + "src": "9314:12:0", "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_FundRequest_$27_storage_$dyn_storage", + "typeIdentifier": "t_array$_t_struct$_FundRequest_$29_storage_$dyn_storage", "typeString": "struct Campaign.FundRequest storage ref[] storage ref" } }, - "id": 456, + "id": 451, "isConstant": false, "isLValue": true, "isPure": false, @@ -6521,7 +6468,7 @@ "memberName": "length", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "9342:19:0", + "src": "9314:19:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6532,14 +6479,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "31", - "id": 457, + "id": 452, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "9364:1:0", + "src": "9336:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", @@ -6547,7 +6494,7 @@ }, "value": "1" }, - "src": "9342:23:0", + "src": "9314:23:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6558,27 +6505,27 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "9329:37:0", + "src": "9301:37:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage", + "typeIdentifier": "t_struct$_FundRequest_$29_storage", "typeString": "struct Campaign.FundRequest storage ref" } }, "nodeType": "VariableDeclarationStatement", - "src": "9299:67:0" + "src": "9271:67:0" }, { "assignments": [ - 464 + 459 ], "declarations": [ { "constant": false, - "id": 464, + "id": 459, "name": "recipients", "nodeType": "VariableDeclaration", - "scope": 503, - "src": "9387:40:0", + "scope": 498, + "src": "9359:40:0", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { @@ -6586,30 +6533,30 @@ "typeString": "mapping(uint256 => struct Campaign.Person)" }, "typeName": { - "id": 463, + "id": 458, "keyType": { - "id": 461, + "id": 456, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "9395:4:0", + "src": "9367:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Mapping", - "src": "9387:21:0", + "src": "9359:21:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Person_$6_storage_$", "typeString": "mapping(uint256 => struct Campaign.Person)" }, "valueType": { "contractScope": null, - "id": 462, + "id": 457, "name": "Person", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 6, - "src": "9401:6:0", + "src": "9373:6:0", "typeDescriptions": { "typeIdentifier": "t_struct$_Person_$6_storage_ptr", "typeString": "struct Campaign.Person" @@ -6620,23 +6567,23 @@ "visibility": "internal" } ], - "id": 467, + "id": 462, "initialValue": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 465, + "id": 460, "name": "request", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 453, - "src": "9430:7:0", + "referencedDeclaration": 448, + "src": "9402:7:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", "typeString": "struct Campaign.FundRequest storage pointer" } }, - "id": 466, + "id": 461, "isConstant": false, "isLValue": true, "isPure": false, @@ -6644,25 +6591,25 @@ "memberName": "recipients", "nodeType": "MemberAccess", "referencedDeclaration": 14, - "src": "9430:18:0", + "src": "9402:18:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Person_$6_storage_$", "typeString": "mapping(uint256 => struct Campaign.Person storage ref)" } }, "nodeType": "VariableDeclarationStatement", - "src": "9387:61:0" + "src": "9359:61:0" }, { "body": { - "id": 497, + "id": 492, "nodeType": "Block", - "src": "9540:159:0", + "src": "9512:159:0", "statements": [ { "expression": { "argumentTypes": null, - "id": 490, + "id": 485, "isConstant": false, "isLValue": false, "isPure": false, @@ -6671,26 +6618,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 479, + "id": 474, "name": "recipients", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 464, - "src": "9555:10:0", + "referencedDeclaration": 459, + "src": "9527:10:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Person_$6_storage_$", "typeString": "mapping(uint256 => struct Campaign.Person storage ref)" } }, - "id": 481, + "id": 476, "indexExpression": { "argumentTypes": null, - "id": 480, + "id": 475, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 469, - "src": "9566:1:0", + "referencedDeclaration": 464, + "src": "9538:1:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6701,7 +6648,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "9555:13:0", + "src": "9527:13:0", "typeDescriptions": { "typeIdentifier": "t_struct$_Person_$6_storage", "typeString": "struct Campaign.Person storage ref" @@ -6716,26 +6663,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 483, + "id": 478, "name": "_recipientsAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 347, - "src": "9594:18:0", + "referencedDeclaration": 352, + "src": "9566:18:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", "typeString": "address[] memory" } }, - "id": 485, + "id": 480, "indexExpression": { "argumentTypes": null, - "id": 484, + "id": 479, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 469, - "src": "9613:1:0", + "referencedDeclaration": 464, + "src": "9585:1:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6746,7 +6693,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "9594:21:0", + "src": "9566:21:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -6756,26 +6703,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 486, + "id": 481, "name": "_recipientsAmount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 350, - "src": "9625:17:0", + "referencedDeclaration": 355, + "src": "9597:17:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", "typeString": "uint256[] memory" } }, - "id": 488, + "id": 483, "indexExpression": { "argumentTypes": null, - "id": 487, + "id": 482, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 469, - "src": "9643:1:0", + "referencedDeclaration": 464, + "src": "9615:1:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6786,7 +6733,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "9625:20:0", + "src": "9597:20:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6804,18 +6751,18 @@ "typeString": "uint256" } ], - "id": 482, + "id": 477, "name": "Person", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6, - "src": "9571:6:0", + "src": "9543:6:0", "typeDescriptions": { "typeIdentifier": "t_type$_t_struct$_Person_$6_storage_ptr_$", "typeString": "type(struct Campaign.Person storage pointer)" } }, - "id": 489, + "id": 484, "isConstant": false, "isLValue": false, "isPure": false, @@ -6826,26 +6773,26 @@ "amount" ], "nodeType": "FunctionCall", - "src": "9571:76:0", + "src": "9543:76:0", "typeDescriptions": { "typeIdentifier": "t_struct$_Person_$6_memory", "typeString": "struct Campaign.Person memory" } }, - "src": "9555:92:0", + "src": "9527:92:0", "typeDescriptions": { "typeIdentifier": "t_struct$_Person_$6_storage", "typeString": "struct Campaign.Person storage ref" } }, - "id": 491, + "id": 486, "nodeType": "ExpressionStatement", - "src": "9555:92:0" + "src": "9527:92:0" }, { "expression": { "argumentTypes": null, - "id": 495, + "id": 490, "isConstant": false, "isLValue": false, "isPure": false, @@ -6853,23 +6800,23 @@ "nodeType": "UnaryOperation", "operator": "++", "prefix": false, - "src": "9662:25:0", + "src": "9634:25:0", "subExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 492, + "id": 487, "name": "request", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 453, - "src": "9662:7:0", + "referencedDeclaration": 448, + "src": "9634:7:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", "typeString": "struct Campaign.FundRequest storage pointer" } }, - "id": 494, + "id": 489, "isConstant": false, "isLValue": true, "isPure": false, @@ -6877,7 +6824,7 @@ "memberName": "recipientsCount", "nodeType": "MemberAccess", "referencedDeclaration": 16, - "src": "9662:23:0", + "src": "9634:23:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6888,9 +6835,9 @@ "typeString": "uint256" } }, - "id": 496, + "id": 491, "nodeType": "ExpressionStatement", - "src": "9662:25:0" + "src": "9634:25:0" } ] }, @@ -6900,19 +6847,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 475, + "id": 470, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 472, + "id": 467, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 469, - "src": "9505:1:0", + "referencedDeclaration": 464, + "src": "9477:1:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6924,18 +6871,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 473, + "id": 468, "name": "_recipientsAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 347, - "src": "9509:18:0", + "referencedDeclaration": 352, + "src": "9481:18:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", "typeString": "address[] memory" } }, - "id": 474, + "id": 469, "isConstant": false, "isLValue": false, "isPure": false, @@ -6943,31 +6890,31 @@ "memberName": "length", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "9509:25:0", + "src": "9481:25:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "9505:29:0", + "src": "9477:29:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 498, + "id": 493, "initializationExpression": { "assignments": [ - 469 + 464 ], "declarations": [ { "constant": false, - "id": 469, + "id": 464, "name": "i", "nodeType": "VariableDeclaration", - "scope": 498, - "src": "9493:6:0", + "scope": 493, + "src": "9465:6:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -6975,10 +6922,10 @@ "typeString": "uint256" }, "typeName": { - "id": 468, + "id": 463, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "9493:4:0", + "src": "9465:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6988,18 +6935,18 @@ "visibility": "internal" } ], - "id": 471, + "id": 466, "initialValue": { "argumentTypes": null, "hexValue": "30", - "id": 470, + "id": 465, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "9502:1:0", + "src": "9474:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -7008,12 +6955,12 @@ "value": "0" }, "nodeType": "VariableDeclarationStatement", - "src": "9493:10:0" + "src": "9465:10:0" }, "loopExpression": { "expression": { "argumentTypes": null, - "id": 477, + "id": 472, "isConstant": false, "isLValue": false, "isPure": false, @@ -7021,15 +6968,15 @@ "nodeType": "UnaryOperation", "operator": "++", "prefix": false, - "src": "9536:3:0", + "src": "9508:3:0", "subExpression": { "argumentTypes": null, - "id": 476, + "id": 471, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 469, - "src": "9536:1:0", + "referencedDeclaration": 464, + "src": "9508:1:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -7040,29 +6987,29 @@ "typeString": "uint256" } }, - "id": 478, + "id": 473, "nodeType": "ExpressionStatement", - "src": "9536:3:0" + "src": "9508:3:0" }, "nodeType": "ForStatement", - "src": "9489:210:0" + "src": "9461:210:0" }, { "expression": { "argumentTypes": null, - "id": 501, + "id": 496, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 499, + "id": 494, "name": "amountDelegated", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 39, - "src": "9719:15:0", + "referencedDeclaration": 41, + "src": "9691:15:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -7072,105 +7019,105 @@ "operator": "+=", "rightHandSide": { "argumentTypes": null, - "id": 500, + "id": 495, "name": "_amount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 344, - "src": "9738:7:0", + "referencedDeclaration": 349, + "src": "9710:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "9719:26:0", + "src": "9691:26:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 502, + "id": 497, "nodeType": "ExpressionStatement", - "src": "9719:26:0" + "src": "9691:26:0" } ] }, "documentation": null, - "id": 504, + "id": 499, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, - "id": 353, + "id": 358, "modifierName": { "argumentTypes": null, - "id": 352, + "id": 357, "name": "hasReachedGoal", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 113, - "src": "8144:14:0", + "referencedDeclaration": 115, + "src": "8212:14:0", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "8144:14:0" + "src": "8212:14:0" }, { "arguments": null, - "id": 355, + "id": 360, "modifierName": { "argumentTypes": null, - "id": 354, + "id": 359, "name": "ifActive", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 98, - "src": "8159:8:0", + "referencedDeclaration": 100, + "src": "8227:8:0", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "8159:8:0" + "src": "8227:8:0" }, { "arguments": null, - "id": 357, + "id": 362, "modifierName": { "argumentTypes": null, - "id": 356, + "id": 361, "name": "onlyManager", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 73, - "src": "8168:11:0", + "referencedDeclaration": 75, + "src": "8236:11:0", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "8168:11:0" + "src": "8236:11:0" } ], "name": "createFundRequest", "nodeType": "FunctionDefinition", "parameters": { - "id": 351, + "id": 356, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 342, + "id": 347, "name": "_description", "nodeType": "VariableDeclaration", - "scope": 504, - "src": "8032:26:0", + "scope": 499, + "src": "8100:26:0", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { @@ -7178,10 +7125,10 @@ "typeString": "string" }, "typeName": { - "id": 341, + "id": 346, "name": "string", "nodeType": "ElementaryTypeName", - "src": "8032:6:0", + "src": "8100:6:0", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" @@ -7192,11 +7139,11 @@ }, { "constant": false, - "id": 344, + "id": 349, "name": "_amount", "nodeType": "VariableDeclaration", - "scope": 504, - "src": "8060:12:0", + "scope": 499, + "src": "8128:12:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -7204,10 +7151,10 @@ "typeString": "uint256" }, "typeName": { - "id": 343, + "id": 348, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "8060:4:0", + "src": "8128:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -7218,11 +7165,11 @@ }, { "constant": false, - "id": 347, + "id": 352, "name": "_recipientsAddress", "nodeType": "VariableDeclaration", - "scope": 504, - "src": "8074:35:0", + "scope": 499, + "src": "8142:35:0", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { @@ -7231,20 +7178,20 @@ }, "typeName": { "baseType": { - "id": 345, + "id": 350, "name": "address", "nodeType": "ElementaryTypeName", - "src": "8074:7:0", + "src": "8142:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 346, + "id": 351, "length": null, "nodeType": "ArrayTypeName", - "src": "8074:9:0", + "src": "8142:9:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", "typeString": "address[]" @@ -7255,11 +7202,11 @@ }, { "constant": false, - "id": 350, + "id": 355, "name": "_recipientsAmount", "nodeType": "VariableDeclaration", - "scope": 504, - "src": "8111:31:0", + "scope": 499, + "src": "8179:31:0", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { @@ -7268,19 +7215,19 @@ }, "typeName": { "baseType": { - "id": 348, + "id": 353, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "8111:4:0", + "src": "8179:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 349, + "id": 354, "length": null, "nodeType": "ArrayTypeName", - "src": "8111:6:0", + "src": "8179:6:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", "typeString": "uint256[]" @@ -7290,25 +7237,25 @@ "visibility": "internal" } ], - "src": "8031:112:0" + "src": "8099:112:0" }, "returnParameters": { - "id": 358, + "id": 363, "nodeType": "ParameterList", "parameters": [], - "src": "8186:0:0" + "src": "8254:0:0" }, - "scope": 895, - "src": "8005:1748:0", + "scope": 967, + "src": "8073:1652:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { - "id": 559, + "id": 540, "nodeType": "Block", - "src": "9848:383:0", + "src": "9800:294:0", "statements": [ { "expression": { @@ -7320,19 +7267,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 519, + "id": 512, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 516, + "id": 509, "name": "index", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 506, - "src": "9867:5:0", + "referencedDeclaration": 501, + "src": "9819:5:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -7344,18 +7291,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 517, + "id": 510, "name": "fundRequests", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "9875:12:0", + "referencedDeclaration": 55, + "src": "9827:12:0", "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_FundRequest_$27_storage_$dyn_storage", + "typeIdentifier": "t_array$_t_struct$_FundRequest_$29_storage_$dyn_storage", "typeString": "struct Campaign.FundRequest storage ref[] storage ref" } }, - "id": 518, + "id": 511, "isConstant": false, "isLValue": true, "isPure": false, @@ -7363,13 +7310,13 @@ "memberName": "length", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "9875:19:0", + "src": "9827:19:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "9867:27:0", + "src": "9819:27:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -7378,14 +7325,14 @@ { "argumentTypes": null, "hexValue": "46756e64205265717565737420646f6e27742065786973742e", - "id": 520, + "id": 513, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "9896:27:0", + "src": "9848:27:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_efb7b2b16a8b754307051c10ad659def86664f18fea8cc56be97fff2ef45c86a", @@ -7405,21 +7352,21 @@ "typeString": "literal_string \"Fund Request don't exist.\"" } ], - "id": 515, + "id": 508, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1024, - 1025 + 1096, + 1097 ], - "referencedDeclaration": 1025, - "src": "9859:7:0", + "referencedDeclaration": 1097, + "src": "9811:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 521, + "id": 514, "isConstant": false, "isLValue": false, "isPure": false, @@ -7427,15 +7374,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "9859:65:0", + "src": "9811:65:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 522, + "id": 515, "nodeType": "ExpressionStatement", - "src": "9859:65:0" + "src": "9811:65:0" }, { "expression": { @@ -7447,7 +7394,7 @@ "typeIdentifier": "t_bool", "typeString": "bool" }, - "id": 529, + "id": 522, "isConstant": false, "isLValue": false, "isPure": false, @@ -7458,26 +7405,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 524, + "id": 517, "name": "fundRequests", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "9943:12:0", + "referencedDeclaration": 55, + "src": "9895:12:0", "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_FundRequest_$27_storage_$dyn_storage", + "typeIdentifier": "t_array$_t_struct$_FundRequest_$29_storage_$dyn_storage", "typeString": "struct Campaign.FundRequest storage ref[] storage ref" } }, - "id": 526, + "id": 519, "indexExpression": { "argumentTypes": null, - "id": 525, + "id": 518, "name": "index", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 506, - "src": "9956:5:0", + "referencedDeclaration": 501, + "src": "9908:5:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -7488,13 +7435,13 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "9943:19:0", + "src": "9895:19:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage", + "typeIdentifier": "t_struct$_FundRequest_$29_storage", "typeString": "struct Campaign.FundRequest storage ref" } }, - "id": 527, + "id": 520, "isConstant": false, "isLValue": true, "isPure": false, @@ -7502,7 +7449,7 @@ "memberName": "isCompleted", "nodeType": "MemberAccess", "referencedDeclaration": 26, - "src": "9943:31:0", + "src": "9895:31:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -7513,14 +7460,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "66616c7365", - "id": 528, + "id": 521, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "9978:5:0", + "src": "9930:5:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -7528,7 +7475,7 @@ }, "value": "false" }, - "src": "9943:40:0", + "src": "9895:40:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -7537,14 +7484,14 @@ { "argumentTypes": null, "hexValue": "526571756573742068617320616c7265616479206265656e20636f6d706c657465642e", - "id": 530, + "id": 523, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "9984:37:0", + "src": "9936:37:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_586f681efaa11e250d87aaf5bb7860c40cb346fb7c498ab02ff630fda9c28c16", @@ -7564,21 +7511,21 @@ "typeString": "literal_string \"Request has already been completed.\"" } ], - "id": 523, + "id": 516, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1024, - 1025 + 1096, + 1097 ], - "referencedDeclaration": 1025, - "src": "9935:7:0", + "referencedDeclaration": 1097, + "src": "9887:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 531, + "id": 524, "isConstant": false, "isLValue": false, "isPure": false, @@ -7586,436 +7533,258 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "9935:87:0", + "src": "9887:87:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 532, + "id": 525, "nodeType": "ExpressionStatement", - "src": "9935:87:0" + "src": "9887:87:0" }, { - "condition": { + "expression": { "argumentTypes": null, - "id": 540, + "id": 531, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "10046:45:0", - "subExpression": { + "leftHandSide": { "argumentTypes": null, - "baseExpression": { + "id": 526, + "name": "amountDelegated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 41, + "src": "9995:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "expression": { "argumentTypes": null, - "expression": { + "baseExpression": { "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 533, - "name": "fundRequests", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "10047:12:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_FundRequest_$27_storage_$dyn_storage", - "typeString": "struct Campaign.FundRequest storage ref[] storage ref" - } - }, - "id": 535, - "indexExpression": { - "argumentTypes": null, - "id": 534, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 506, - "src": "10060:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10047:19:0", + "id": 527, + "name": "fundRequests", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "10014:12:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage", - "typeString": "struct Campaign.FundRequest storage ref" + "typeIdentifier": "t_array$_t_struct$_FundRequest_$29_storage_$dyn_storage", + "typeString": "struct Campaign.FundRequest storage ref[] storage ref" } }, - "id": 536, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "disapprovers", - "nodeType": "MemberAccess", - "referencedDeclaration": 20, - "src": "10047:32:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", - "typeString": "mapping(address => bool)" - } - }, - "id": 539, - "indexExpression": { - "argumentTypes": null, - "expression": { + "id": 529, + "indexExpression": { "argumentTypes": null, - "id": 537, - "name": "msg", + "id": 528, + "name": "index", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1021, - "src": "10080:3:0", + "referencedDeclaration": 501, + "src": "10027:5:0", "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 538, "isConstant": false, - "isLValue": false, + "isLValue": true, "isPure": false, "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10080:10:0", + "nodeType": "IndexAccess", + "src": "10014:19:0", "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" + "typeIdentifier": "t_struct$_FundRequest_$29_storage", + "typeString": "struct Campaign.FundRequest storage ref" } }, + "id": 530, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10047:44:0", + "memberName": "amount", + "nodeType": "MemberAccess", + "referencedDeclaration": 10, + "src": "10014:26:0", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } }, + "src": "9995:45:0", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "falseBody": null, - "id": 558, - "nodeType": "IfStatement", - "src": "10043:181:0", - "trueBody": { - "id": 557, - "nodeType": "Block", - "src": "10092:132:0", - "statements": [ - { - "expression": { + "id": 532, + "nodeType": "ExpressionStatement", + "src": "9995:45:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 538, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { "argumentTypes": null, - "id": 549, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 541, - "name": "fundRequests", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "10107:12:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_FundRequest_$27_storage_$dyn_storage", - "typeString": "struct Campaign.FundRequest storage ref[] storage ref" - } - }, - "id": 543, - "indexExpression": { - "argumentTypes": null, - "id": 542, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 506, - "src": "10120:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10107:19:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage", - "typeString": "struct Campaign.FundRequest storage ref" - } - }, - "id": 544, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "disapprovers", - "nodeType": "MemberAccess", - "referencedDeclaration": 20, - "src": "10107:32:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", - "typeString": "mapping(address => bool)" - } - }, - "id": 547, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 545, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1021, - "src": "10140:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 546, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10140:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "10107:44:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 548, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10154:4:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "10107:51:0", + "id": 533, + "name": "fundRequests", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "10051:12:0", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_array$_t_struct$_FundRequest_$29_storage_$dyn_storage", + "typeString": "struct Campaign.FundRequest storage ref[] storage ref" } }, - "id": 550, - "nodeType": "ExpressionStatement", - "src": "10107:51:0" - }, - { - "expression": { + "id": 535, + "indexExpression": { "argumentTypes": null, - "id": 555, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "10173:39:0", - "subExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 551, - "name": "fundRequests", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "10173:12:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_FundRequest_$27_storage_$dyn_storage", - "typeString": "struct Campaign.FundRequest storage ref[] storage ref" - } - }, - "id": 553, - "indexExpression": { - "argumentTypes": null, - "id": 552, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 506, - "src": "10186:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10173:19:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage", - "typeString": "struct Campaign.FundRequest storage ref" - } - }, - "id": 554, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "disapproversCount", - "nodeType": "MemberAccess", - "referencedDeclaration": 22, - "src": "10173:37:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, + "id": 534, + "name": "index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 501, + "src": "10064:5:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 556, - "nodeType": "ExpressionStatement", - "src": "10173:39:0" + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10051:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_FundRequest_$29_storage", + "typeString": "struct Campaign.FundRequest storage ref" + } + }, + "id": 536, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "isClosed", + "nodeType": "MemberAccess", + "referencedDeclaration": 28, + "src": "10051:28:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" } - ] - } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 537, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10082:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "10051:35:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 539, + "nodeType": "ExpressionStatement", + "src": "10051:35:0" } ] }, "documentation": null, - "id": 560, + "id": 541, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, - "id": 509, + "id": 504, "modifierName": { "argumentTypes": null, - "id": 508, - "name": "hasReachedGoal", + "id": 503, + "name": "ifActive", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 113, - "src": "9808:14:0", + "referencedDeclaration": 100, + "src": "9775:8:0", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "9808:14:0" + "src": "9775:8:0" }, { "arguments": null, - "id": 511, + "id": 506, "modifierName": { "argumentTypes": null, - "id": 510, - "name": "ifActive", + "id": 505, + "name": "onlyDonor", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 98, - "src": "9823:8:0", + "referencedDeclaration": 89, + "src": "9784:9:0", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "9823:8:0" - }, - { - "arguments": null, - "id": 513, - "modifierName": { - "argumentTypes": null, - "id": 512, - "name": "onlyDonor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 87, - "src": "9832:9:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "9832:9:0" + "src": "9784:9:0" } ], - "name": "disapproveFundRequest", + "name": "closeFundRequest", "nodeType": "FunctionDefinition", "parameters": { - "id": 507, + "id": 502, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 506, + "id": 501, "name": "index", "nodeType": "VariableDeclaration", - "scope": 560, - "src": "9796:10:0", + "scope": 541, + "src": "9763:10:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -8023,10 +7792,10 @@ "typeString": "uint256" }, "typeName": { - "id": 505, + "id": 500, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "9796:4:0", + "src": "9763:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8036,25 +7805,25 @@ "visibility": "internal" } ], - "src": "9795:12:0" + "src": "9762:12:0" }, "returnParameters": { - "id": 514, + "id": 507, "nodeType": "ParameterList", "parameters": [], - "src": "9848:0:0" + "src": "9800:0:0" }, - "scope": 895, - "src": "9765:466:0", + "scope": 967, + "src": "9737:357:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { - "id": 615, + "id": 606, "nodeType": "Block", - "src": "10308:587:0", + "src": "10189:480:0", "statements": [ { "expression": { @@ -8066,19 +7835,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 573, + "id": 556, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 570, + "id": 553, "name": "index", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 562, - "src": "10327:5:0", + "referencedDeclaration": 543, + "src": "10208:5:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8090,18 +7859,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 571, + "id": 554, "name": "fundRequests", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "10335:12:0", + "referencedDeclaration": 55, + "src": "10216:12:0", "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_FundRequest_$27_storage_$dyn_storage", + "typeIdentifier": "t_array$_t_struct$_FundRequest_$29_storage_$dyn_storage", "typeString": "struct Campaign.FundRequest storage ref[] storage ref" } }, - "id": 572, + "id": 555, "isConstant": false, "isLValue": true, "isPure": false, @@ -8109,13 +7878,13 @@ "memberName": "length", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "10335:19:0", + "src": "10216:19:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "10327:27:0", + "src": "10208:27:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -8124,14 +7893,14 @@ { "argumentTypes": null, "hexValue": "46756e64205265717565737420646f6e27742065786973742e", - "id": 574, + "id": 557, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "10356:27:0", + "src": "10237:27:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_efb7b2b16a8b754307051c10ad659def86664f18fea8cc56be97fff2ef45c86a", @@ -8151,21 +7920,21 @@ "typeString": "literal_string \"Fund Request don't exist.\"" } ], - "id": 569, + "id": 552, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1024, - 1025 + 1096, + 1097 ], - "referencedDeclaration": 1025, - "src": "10319:7:0", + "referencedDeclaration": 1097, + "src": "10200:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 575, + "id": 558, "isConstant": false, "isLValue": false, "isPure": false, @@ -8173,15 +7942,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "10319:65:0", + "src": "10200:65:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 576, + "id": 559, "nodeType": "ExpressionStatement", - "src": "10319:65:0" + "src": "10200:65:0" }, { "expression": { @@ -8193,7 +7962,7 @@ "typeIdentifier": "t_bool", "typeString": "bool" }, - "id": 583, + "id": 566, "isConstant": false, "isLValue": false, "isPure": false, @@ -8204,26 +7973,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 578, + "id": 561, "name": "fundRequests", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "10403:12:0", + "referencedDeclaration": 55, + "src": "10284:12:0", "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_FundRequest_$27_storage_$dyn_storage", + "typeIdentifier": "t_array$_t_struct$_FundRequest_$29_storage_$dyn_storage", "typeString": "struct Campaign.FundRequest storage ref[] storage ref" } }, - "id": 580, + "id": 563, "indexExpression": { "argumentTypes": null, - "id": 579, + "id": 562, "name": "index", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 562, - "src": "10416:5:0", + "referencedDeclaration": 543, + "src": "10297:5:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -8234,13 +8003,13 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "10403:19:0", + "src": "10284:19:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage", + "typeIdentifier": "t_struct$_FundRequest_$29_storage", "typeString": "struct Campaign.FundRequest storage ref" } }, - "id": 581, + "id": 564, "isConstant": false, "isLValue": true, "isPure": false, @@ -8248,7 +8017,7 @@ "memberName": "isCompleted", "nodeType": "MemberAccess", "referencedDeclaration": 26, - "src": "10403:31:0", + "src": "10284:31:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -8259,14 +8028,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "66616c7365", - "id": 582, + "id": 565, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "10438:5:0", + "src": "10319:5:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -8274,7 +8043,7 @@ }, "value": "false" }, - "src": "10403:40:0", + "src": "10284:40:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -8283,14 +8052,14 @@ { "argumentTypes": null, "hexValue": "526571756573742068617320616c7265616479206265656e20636f6d706c657465642e", - "id": 584, + "id": 567, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "10444:37:0", + "src": "10325:37:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_586f681efaa11e250d87aaf5bb7860c40cb346fb7c498ab02ff630fda9c28c16", @@ -8310,21 +8079,21 @@ "typeString": "literal_string \"Request has already been completed.\"" } ], - "id": 577, + "id": 560, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1024, - 1025 + 1096, + 1097 ], - "referencedDeclaration": 1025, - "src": "10395:7:0", + "referencedDeclaration": 1097, + "src": "10276:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 585, + "id": 568, "isConstant": false, "isLValue": false, "isPure": false, @@ -8332,818 +8101,717 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "10395:87:0", + "src": "10276:87:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 586, + "id": 569, "nodeType": "ExpressionStatement", - "src": "10395:87:0" - }, - { - "assignments": [ - 590 - ], - "declarations": [ - { - "constant": false, - "id": 590, - "name": "disapprovers", - "nodeType": "VariableDeclaration", - "scope": 615, - "src": "10503:43:0", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", - "typeString": "mapping(address => bool)" - }, - "typeName": { - "id": 589, - "keyType": { - "id": 587, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "10511:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Mapping", - "src": "10503:22:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", - "typeString": "mapping(address => bool)" - }, - "valueType": { - "id": 588, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "10520:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 595, - "initialValue": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 591, - "name": "fundRequests", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "10549:12:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_FundRequest_$27_storage_$dyn_storage", - "typeString": "struct Campaign.FundRequest storage ref[] storage ref" - } - }, - "id": 593, - "indexExpression": { - "argumentTypes": null, - "id": 592, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 562, - "src": "10562:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10549:19:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage", - "typeString": "struct Campaign.FundRequest storage ref" - } - }, - "id": 594, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "disapprovers", - "nodeType": "MemberAccess", - "referencedDeclaration": 20, - "src": "10549:32:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", - "typeString": "mapping(address => bool)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10503:78:0" + "src": "10276:87:0" }, { - "condition": { + "expression": { "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 596, - "name": "disapprovers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 590, - "src": "10669:12:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", - "typeString": "mapping(address => bool)" - } - }, - "id": 599, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 597, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1021, - "src": "10682:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 598, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10682:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10669:24:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 614, - "nodeType": "IfStatement", - "src": "10666:222:0", - "trueBody": { - "id": 613, - "nodeType": "Block", - "src": "10694:194:0", - "statements": [ + "arguments": [ { - "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 576, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { "argumentTypes": null, - "id": 605, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { + "expression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 600, - "name": "disapprovers", + "id": 571, + "name": "fundRequests", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 590, - "src": "10743:12:0", + "referencedDeclaration": 55, + "src": "10382:12:0", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", - "typeString": "mapping(address => bool)" + "typeIdentifier": "t_array$_t_struct$_FundRequest_$29_storage_$dyn_storage", + "typeString": "struct Campaign.FundRequest storage ref[] storage ref" } }, - "id": 603, + "id": 573, "indexExpression": { "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 601, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1021, - "src": "10756:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 602, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10756:10:0", + "id": 572, + "name": "index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 543, + "src": "10395:5:0", "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, "isConstant": false, "isLValue": true, "isPure": false, - "lValueRequested": true, + "lValueRequested": false, "nodeType": "IndexAccess", - "src": "10743:24:0", + "src": "10382:19:0", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_struct$_FundRequest_$29_storage", + "typeString": "struct Campaign.FundRequest storage ref" } }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 604, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10770:5:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "10743:32:0", + "id": 574, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isClosed", + "nodeType": "MemberAccess", + "referencedDeclaration": 28, + "src": "10382:28:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 606, - "nodeType": "ExpressionStatement", - "src": "10743:32:0" - }, - { - "expression": { + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { "argumentTypes": null, - "id": 611, + "hexValue": "66616c7365", + "id": 575, "isConstant": false, "isLValue": false, - "isPure": false, + "isPure": true, + "kind": "bool", "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "--", - "prefix": false, - "src": "10837:39:0", - "subExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 607, - "name": "fundRequests", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "10837:12:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_FundRequest_$27_storage_$dyn_storage", - "typeString": "struct Campaign.FundRequest storage ref[] storage ref" - } - }, - "id": 609, - "indexExpression": { - "argumentTypes": null, - "id": 608, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 562, - "src": "10850:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10837:19:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage", - "typeString": "struct Campaign.FundRequest storage ref" - } - }, - "id": 610, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "disapproversCount", - "nodeType": "MemberAccess", - "referencedDeclaration": 22, - "src": "10837:37:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, + "nodeType": "Literal", + "src": "10414:5:0", + "subdenomination": null, "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" }, - "id": 612, - "nodeType": "ExpressionStatement", - "src": "10837:39:0" - } - ] - } - } - ] - }, - "documentation": null, - "id": 616, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 565, - "modifierName": { - "argumentTypes": null, - "id": 564, - "name": "ifActive", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 98, - "src": "10283:8:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10283:8:0" - }, - { - "arguments": null, - "id": 567, - "modifierName": { - "argumentTypes": null, - "id": 566, - "name": "onlyDonor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 87, - "src": "10292:9:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10292:9:0" - } - ], - "name": "approveFundRequest", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 563, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 562, - "name": "index", - "nodeType": "VariableDeclaration", - "scope": 616, - "src": "10271:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 561, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "10271:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10270:12:0" - }, - "returnParameters": { - "id": 568, - "nodeType": "ParameterList", - "parameters": [], - "src": "10308:0:0" - }, - "scope": 895, - "src": "10243:652:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 698, - "nodeType": "Block", - "src": "10974:894:0", - "statements": [ - { - "assignments": [ - 626 - ], - "declarations": [ - { - "constant": false, - "id": 626, - "name": "request", - "nodeType": "VariableDeclaration", - "scope": 698, - "src": "10985:27:0", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", - "typeString": "struct Campaign.FundRequest" - }, - "typeName": { - "contractScope": null, - "id": 625, - "name": "FundRequest", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 27, - "src": "10985:11:0", + "src": "10382:37:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", - "typeString": "struct Campaign.FundRequest" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "value": null, - "visibility": "internal" - } - ], - "id": 630, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 627, - "name": "fundRequests", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "11015:12:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_FundRequest_$27_storage_$dyn_storage", - "typeString": "struct Campaign.FundRequest storage ref[] storage ref" + { + "argumentTypes": null, + "hexValue": "5468697320526571756573742068617320616c7265616479206265656e20636c6f7365642e", + "id": 577, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10420:39:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_936705d5c893758fa1f921672bb98f3cfdba0d03afedba508a9453ce8b9d60c1", + "typeString": "literal_string \"This Request has already been closed.\"" + }, + "value": "This Request has already been closed." } - }, - "id": 629, - "indexExpression": { - "argumentTypes": null, - "id": 628, - "name": "index", + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_936705d5c893758fa1f921672bb98f3cfdba0d03afedba508a9453ce8b9d60c1", + "typeString": "literal_string \"This Request has already been closed.\"" + } + ], + "id": 570, + "name": "require", "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 618, - "src": "11028:5:0", + "overloadedDeclarations": [ + 1096, + 1097 + ], + "referencedDeclaration": 1097, + "src": "10374: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" } }, + "id": 578, "isConstant": false, - "isLValue": true, + "isLValue": false, "isPure": false, + "kind": "functionCall", "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11015:19:0", + "names": [], + "nodeType": "FunctionCall", + "src": "10374:86:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage", - "typeString": "struct Campaign.FundRequest storage ref" + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" } }, - "nodeType": "VariableDeclarationStatement", - "src": "10985:49:0" + "id": 579, + "nodeType": "ExpressionStatement", + "src": "10374:86:0" }, { - "expression": { + "condition": { "argumentTypes": null, - "arguments": [ - { + "id": 587, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "10484:45:0", + "subExpression": { + "argumentTypes": null, + "baseExpression": { "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 647, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { + "expression": { "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "baseExpression": { + "argumentTypes": null, + "id": 580, + "name": "fundRequests", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "10485:12:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_FundRequest_$29_storage_$dyn_storage", + "typeString": "struct Campaign.FundRequest storage ref[] storage ref" + } }, - "id": 643, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { + "id": 582, + "indexExpression": { "argumentTypes": null, - "commonType": { + "id": 581, + "name": "index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 543, + "src": "10498:5:0", + "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" - }, - "id": 637, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 635, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10485:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_FundRequest_$29_storage", + "typeString": "struct Campaign.FundRequest storage ref" + } + }, + "id": 583, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "disapprovers", + "nodeType": "MemberAccess", + "referencedDeclaration": 20, + "src": "10485:32:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 586, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 584, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1093, + "src": "10518:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10518:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10485:44:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 605, + "nodeType": "IfStatement", + "src": "10481:181:0", + "trueBody": { + "id": 604, + "nodeType": "Block", + "src": "10530:132:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 596, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { "argumentTypes": null, - "expression": { + "baseExpression": { "argumentTypes": null, - "id": 632, - "name": "request", + "id": 588, + "name": "fundRequests", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 626, - "src": "11067:7:0", + "referencedDeclaration": 55, + "src": "10545:12:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", - "typeString": "struct Campaign.FundRequest storage pointer" + "typeIdentifier": "t_array$_t_struct$_FundRequest_$29_storage_$dyn_storage", + "typeString": "struct Campaign.FundRequest storage ref[] storage ref" + } + }, + "id": 590, + "indexExpression": { + "argumentTypes": null, + "id": 589, + "name": "index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 543, + "src": "10558:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 633, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberName": "createdAt", - "nodeType": "MemberAccess", - "referencedDeclaration": 24, - "src": "11067:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "id": 634, - "name": "fundRequestProcessTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 55, - "src": "11087:22:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11067:42:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "id": 636, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1023, - "src": "11112:3:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11067:48:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 642, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 638, - "name": "request", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 626, - "src": "11133:7:0", + "nodeType": "IndexAccess", + "src": "10545:19:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", - "typeString": "struct Campaign.FundRequest storage pointer" + "typeIdentifier": "t_struct$_FundRequest_$29_storage", + "typeString": "struct Campaign.FundRequest storage ref" } }, - "id": 639, + "id": 591, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberName": "disapproversCount", + "memberName": "disapprovers", "nodeType": "MemberAccess", - "referencedDeclaration": 22, - "src": "11133:25:0", + "referencedDeclaration": 20, + "src": "10545:32:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" } }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { + "id": 594, + "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 640, - "name": "donorsList", + "id": 592, + "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 44, - "src": "11161:10:0", + "referencedDeclaration": 1093, + "src": "10578:3:0", "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Person_$6_storage_$dyn_storage", - "typeString": "struct Campaign.Person storage ref[] storage ref" + "typeIdentifier": "t_magic_message", + "typeString": "msg" } }, - "id": 641, + "id": 593, "isConstant": false, - "isLValue": true, + "isLValue": false, "isPure": false, "lValueRequested": false, - "memberName": "length", + "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "11161:17:0", + "src": "10578:10:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" } }, - "src": "11133:45:0", + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "10545:44:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "src": "11067:111:0", + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 595, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10592:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "10545:51:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { + "id": 597, + "nodeType": "ExpressionStatement", + "src": "10545:51:0" + }, + { + "expression": { "argumentTypes": null, - "id": 646, + "id": 602, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "11195:20:0", + "operator": "++", + "prefix": false, + "src": "10611:39:0", "subExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 644, - "name": "request", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 626, - "src": "11196:7:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", - "typeString": "struct Campaign.FundRequest storage pointer" - } - }, - "id": 645, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "isCompleted", - "nodeType": "MemberAccess", - "referencedDeclaration": 26, - "src": "11196:19:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "11067:148:0", - "typeDescriptions": { + "baseExpression": { + "argumentTypes": null, + "id": 598, + "name": "fundRequests", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "10611:12:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_FundRequest_$29_storage_$dyn_storage", + "typeString": "struct Campaign.FundRequest storage ref[] storage ref" + } + }, + "id": 600, + "indexExpression": { + "argumentTypes": null, + "id": 599, + "name": "index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 543, + "src": "10624:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10611:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_FundRequest_$29_storage", + "typeString": "struct Campaign.FundRequest storage ref" + } + }, + "id": 601, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "disapproversCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 22, + "src": "10611:37:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 603, + "nodeType": "ExpressionStatement", + "src": "10611:39:0" + } + ] + } + } + ] + }, + "documentation": null, + "id": 607, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 546, + "modifierName": { + "argumentTypes": null, + "id": 545, + "name": "hasReachedGoal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 115, + "src": "10149:14:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "10149:14:0" + }, + { + "arguments": null, + "id": 548, + "modifierName": { + "argumentTypes": null, + "id": 547, + "name": "ifActive", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 100, + "src": "10164:8:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "10164:8:0" + }, + { + "arguments": null, + "id": 550, + "modifierName": { + "argumentTypes": null, + "id": 549, + "name": "onlyDonor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 89, + "src": "10173:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "10173:9:0" + } + ], + "name": "disapproveFundRequest", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 544, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 543, + "name": "index", + "nodeType": "VariableDeclaration", + "scope": 607, + "src": "10137:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 542, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "10137:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10136:12:0" + }, + "returnParameters": { + "id": 551, + "nodeType": "ParameterList", + "parameters": [], + "src": "10189:0:0" + }, + "scope": 967, + "src": "10106:563:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 672, + "nodeType": "Block", + "src": "10746:684:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 620, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 617, + "name": "index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 609, + "src": "10765:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 618, + "name": "fundRequests", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "10773:12:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_FundRequest_$29_storage_$dyn_storage", + "typeString": "struct Campaign.FundRequest storage ref[] storage ref" + } + }, + "id": 619, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10773:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10765:27:0", + "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, - "hexValue": "46756e6420526571756573742063616e6e6f742062652070726f6365737365642c20656974686572207468652072657175697265642074696d65206973206e6f74207265616368656420796574206f72206d6f737420646f6e6f72732068617320646973617070726f7665642069742e", - "id": 648, + "hexValue": "46756e64205265717565737420646f6e27742065786973742e", + "id": 621, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "11231:114:0", + "src": "10794:27:0", "subdenomination": null, "typeDescriptions": { - "typeIdentifier": "t_stringliteral_d81dcd825f5bd9e87cb48f5c72bfb07db3cf3801a35b989e9b32b1e4e154d6c3", - "typeString": "literal_string \"Fund Request cannot be processed, either the required time is not reached yet or most donors has disapproved it.\"" + "typeIdentifier": "t_stringliteral_efb7b2b16a8b754307051c10ad659def86664f18fea8cc56be97fff2ef45c86a", + "typeString": "literal_string \"Fund Request don't exist.\"" }, - "value": "Fund Request cannot be processed, either the required time is not reached yet or most donors has disapproved it." + "value": "Fund Request don't exist." } ], "expression": { @@ -9153,25 +8821,25 @@ "typeString": "bool" }, { - "typeIdentifier": "t_stringliteral_d81dcd825f5bd9e87cb48f5c72bfb07db3cf3801a35b989e9b32b1e4e154d6c3", - "typeString": "literal_string \"Fund Request cannot be processed, either the required time is not reached yet or most donors has disapproved it.\"" + "typeIdentifier": "t_stringliteral_efb7b2b16a8b754307051c10ad659def86664f18fea8cc56be97fff2ef45c86a", + "typeString": "literal_string \"Fund Request don't exist.\"" } ], - "id": 631, + "id": 616, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1024, - 1025 + 1096, + 1097 ], - "referencedDeclaration": 1025, - "src": "11045:7:0", + "referencedDeclaration": 1097, + "src": "10757:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 649, + "id": 622, "isConstant": false, "isLValue": false, "isPure": false, @@ -9179,858 +8847,898 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "11045:301:0", + "src": "10757:65:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 650, + "id": 623, "nodeType": "ExpressionStatement", - "src": "11045:301:0" + "src": "10757:65:0" }, { "expression": { "argumentTypes": null, - "id": 655, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { + "arguments": [ + { "argumentTypes": null, - "id": 651, - "name": "request", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 626, - "src": "11373:7:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", - "typeString": "struct Campaign.FundRequest storage pointer" - } - }, - "id": 653, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "isCompleted", - "nodeType": "MemberAccess", - "referencedDeclaration": 26, - "src": "11373:19:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 654, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11395:4:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "11373:26:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 656, - "nodeType": "ExpressionStatement", - "src": "11373:26:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 660, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 657, - "name": "amountDelegated", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 39, - "src": "11414:15:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "-=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 658, - "name": "request", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 626, - "src": "11433:7:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", - "typeString": "struct Campaign.FundRequest storage pointer" - } - }, - "id": 659, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "amount", - "nodeType": "MemberAccess", - "referencedDeclaration": 10, - "src": "11433:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11414:33:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 661, - "nodeType": "ExpressionStatement", - "src": "11414:33:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 665, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 662, - "name": "amountSpended", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 41, - "src": "11462:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 663, - "name": "request", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 626, - "src": "11479:7:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", - "typeString": "struct Campaign.FundRequest storage pointer" - } - }, - "id": 664, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "amount", - "nodeType": "MemberAccess", - "referencedDeclaration": 10, - "src": "11479:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11462:31:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 666, - "nodeType": "ExpressionStatement", - "src": "11462:31:0" - }, - { - "body": { - "id": 696, - "nodeType": "Block", - "src": "11557:294:0", - "statements": [ - { - "assignments": [ - 679 - ], - "declarations": [ - { - "constant": false, - "id": 679, - "name": "recipient", - "nodeType": "VariableDeclaration", - "scope": 696, - "src": "11576:24:0", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Person_$6_storage_ptr", - "typeString": "struct Campaign.Person" - }, - "typeName": { - "contractScope": null, - "id": 678, - "name": "Person", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6, - "src": "11576:6:0", + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 630, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 625, + "name": "fundRequests", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "10841:12:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_Person_$6_storage_ptr", - "typeString": "struct Campaign.Person" + "typeIdentifier": "t_array$_t_struct$_FundRequest_$29_storage_$dyn_storage", + "typeString": "struct Campaign.FundRequest storage ref[] storage ref" } }, - "value": null, - "visibility": "internal" - } - ], - "id": 684, - "initialValue": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { + "id": 627, + "indexExpression": { "argumentTypes": null, - "id": 680, - "name": "request", + "id": 626, + "name": "index", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 626, - "src": "11603:7:0", + "referencedDeclaration": 609, + "src": "10854:5:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", - "typeString": "struct Campaign.FundRequest storage pointer" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 681, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberName": "recipients", - "nodeType": "MemberAccess", - "referencedDeclaration": 14, - "src": "11603:18:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Person_$6_storage_$", - "typeString": "mapping(uint256 => struct Campaign.Person storage ref)" - } - }, - "id": 683, - "indexExpression": { - "argumentTypes": null, - "id": 682, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 668, - "src": "11622:1:0", + "nodeType": "IndexAccess", + "src": "10841:19:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_struct$_FundRequest_$29_storage", + "typeString": "struct Campaign.FundRequest storage ref" } }, + "id": 628, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11603:21:0", + "memberName": "isCompleted", + "nodeType": "MemberAccess", + "referencedDeclaration": 26, + "src": "10841:31:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_Person_$6_storage", - "typeString": "struct Campaign.Person storage ref" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "nodeType": "VariableDeclarationStatement", - "src": "11576:48:0" + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 629, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10876:5:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "10841:40:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } }, { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 692, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 679, - "src": "11818:9:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Person_$6_storage_ptr", - "typeString": "struct Campaign.Person storage pointer" - } - }, - "id": 693, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "amount", - "nodeType": "MemberAccess", - "referencedDeclaration": 5, - "src": "11818:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 687, - "name": "recipient", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 679, - "src": "11783:9:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Person_$6_storage_ptr", - "typeString": "struct Campaign.Person storage pointer" - } - }, - "id": 688, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "personAddress", - "nodeType": "MemberAccess", - "referencedDeclaration": 3, - "src": "11783:23:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 686, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "11775:7:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint160_$", - "typeString": "type(uint160)" - }, - "typeName": "uint160" - }, - "id": 689, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11775:32:0", - "typeDescriptions": { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - ], - "id": 685, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "11767:7:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 690, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11767:41:0", + "argumentTypes": null, + "hexValue": "526571756573742068617320616c7265616479206265656e20636f6d706c657465642e", + "id": 631, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10882:37:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_586f681efaa11e250d87aaf5bb7860c40cb346fb7c498ab02ff630fda9c28c16", + "typeString": "literal_string \"Request has already been completed.\"" + }, + "value": "Request has already been completed." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_586f681efaa11e250d87aaf5bb7860c40cb346fb7c498ab02ff630fda9c28c16", + "typeString": "literal_string \"Request has already been completed.\"" + } + ], + "id": 624, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1096, + 1097 + ], + "referencedDeclaration": 1097, + "src": "10833:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 632, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10833:87:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 633, + "nodeType": "ExpressionStatement", + "src": "10833:87:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 640, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 635, + "name": "fundRequests", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "10939:12:0", "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" + "typeIdentifier": "t_array$_t_struct$_FundRequest_$29_storage_$dyn_storage", + "typeString": "struct Campaign.FundRequest storage ref[] storage ref" + } + }, + "id": 637, + "indexExpression": { + "argumentTypes": null, + "id": 636, + "name": "index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 609, + "src": "10952:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 691, "isConstant": false, - "isLValue": false, + "isLValue": true, "isPure": false, "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11767:50:0", + "nodeType": "IndexAccess", + "src": "10939:19:0", "typeDescriptions": { - "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" + "typeIdentifier": "t_struct$_FundRequest_$29_storage", + "typeString": "struct Campaign.FundRequest storage ref" } }, - "id": 694, + "id": 638, "isConstant": false, - "isLValue": false, + "isLValue": true, "isPure": false, - "kind": "functionCall", "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11767:68:0", + "memberName": "isClosed", + "nodeType": "MemberAccess", + "referencedDeclaration": 28, + "src": "10939:28:0", "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "id": 695, - "nodeType": "ExpressionStatement", - "src": "11767:68:0" + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 639, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10971:5:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "10939:37:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "5468697320526571756573742068617320616c7265616479206265656e20636c6f7365642e", + "id": 641, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10977:39:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_936705d5c893758fa1f921672bb98f3cfdba0d03afedba508a9453ce8b9d60c1", + "typeString": "literal_string \"This Request has already been closed.\"" + }, + "value": "This Request has already been closed." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_936705d5c893758fa1f921672bb98f3cfdba0d03afedba508a9453ce8b9d60c1", + "typeString": "literal_string \"This Request has already been closed.\"" + } + ], + "id": 634, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1096, + 1097 + ], + "referencedDeclaration": 1097, + "src": "10931:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" }, - "id": 674, + "id": 642, "isConstant": false, "isLValue": false, "isPure": false, + "kind": "functionCall", "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 671, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 668, - "src": "11524:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { + "names": [], + "nodeType": "FunctionCall", + "src": "10931:86:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 643, + "nodeType": "ExpressionStatement", + "src": "10931:86:0" + }, + { + "assignments": [ + 647 + ], + "declarations": [ + { + "constant": false, + "id": 647, + "name": "disapprovers", + "nodeType": "VariableDeclaration", + "scope": 672, + "src": "11038:43:0", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "typeName": { + "id": 646, + "keyType": { + "id": 644, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11046:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "11038:22:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + }, + "valueType": { + "id": 645, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "11055:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 652, + "initialValue": { + "argumentTypes": null, + "expression": { "argumentTypes": null, - "expression": { + "baseExpression": { "argumentTypes": null, - "id": 672, - "name": "request", + "id": 648, + "name": "fundRequests", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 626, - "src": "11528:7:0", + "referencedDeclaration": 55, + "src": "11084:12:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", - "typeString": "struct Campaign.FundRequest storage pointer" + "typeIdentifier": "t_array$_t_struct$_FundRequest_$29_storage_$dyn_storage", + "typeString": "struct Campaign.FundRequest storage ref[] storage ref" + } + }, + "id": 650, + "indexExpression": { + "argumentTypes": null, + "id": 649, + "name": "index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 609, + "src": "11097:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 673, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberName": "recipientsCount", - "nodeType": "MemberAccess", - "referencedDeclaration": 16, - "src": "11528:23:0", + "nodeType": "IndexAccess", + "src": "11084:19:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_struct$_FundRequest_$29_storage", + "typeString": "struct Campaign.FundRequest storage ref" } }, - "src": "11524:27:0", + "id": 651, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "disapprovers", + "nodeType": "MemberAccess", + "referencedDeclaration": 20, + "src": "11084:32:0", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" } }, - "id": 697, - "initializationExpression": { - "assignments": [ - 668 - ], - "declarations": [ - { - "constant": false, - "id": 668, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 697, - "src": "11512:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 667, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "11512:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 670, - "initialValue": { + "nodeType": "VariableDeclarationStatement", + "src": "11038:78:0" + }, + { + "condition": { + "argumentTypes": null, + "baseExpression": { "argumentTypes": null, - "hexValue": "30", - "id": 669, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11521:1:0", - "subdenomination": null, + "id": 653, + "name": "disapprovers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 647, + "src": "11204:12:0", "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } }, - "nodeType": "VariableDeclarationStatement", - "src": "11512:10:0" - }, - "loopExpression": { - "expression": { + "id": 656, + "indexExpression": { "argumentTypes": null, - "id": 676, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "11553:3:0", - "subExpression": { + "expression": { "argumentTypes": null, - "id": 675, - "name": "i", + "id": 654, + "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 668, - "src": "11553:1:0", + "referencedDeclaration": 1093, + "src": "11217:3:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_magic_message", + "typeString": "msg" } }, + "id": 655, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "11217:10:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" } }, - "id": 677, - "nodeType": "ExpressionStatement", - "src": "11553:3:0" - }, - "nodeType": "ForStatement", - "src": "11508:343:0" - } - ] - }, - "documentation": null, - "id": 699, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 621, - "modifierName": { - "argumentTypes": null, - "id": 620, - "name": "ifActive", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 98, - "src": "10947:8:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10947:8:0" - }, - { - "arguments": null, - "id": 623, - "modifierName": { - "argumentTypes": null, - "id": 622, - "name": "onlyManager", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 73, - "src": "10956:11:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10956:11:0" - } - ], - "name": "processFundRequest", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 619, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 618, - "name": "index", - "nodeType": "VariableDeclaration", - "scope": 699, - "src": "10935:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 617, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "10935:4:0", + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11204:24:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "value": null, - "visibility": "internal" - } - ], - "src": "10934:12:0" - }, - "returnParameters": { - "id": 624, - "nodeType": "ParameterList", - "parameters": [], - "src": "10974:0:0" - }, - "scope": 895, - "src": "10907:961:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 816, - "nodeType": "Block", - "src": "12016:824:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ + "falseBody": null, + "id": 671, + "nodeType": "IfStatement", + "src": "11201:222:0", + "trueBody": { + "id": 670, + "nodeType": "Block", + "src": "11229:194:0", + "statements": [ { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 730, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { + "expression": { "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 728, + "id": 662, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "leftExpression": { + "leftHandSide": { "argumentTypes": null, - "expression": { + "baseExpression": { "argumentTypes": null, - "id": 725, - "name": "fundRequests", + "id": 657, + "name": "disapprovers", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "12035:12:0", + "referencedDeclaration": 647, + "src": "11278:12:0", "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_FundRequest_$27_storage_$dyn_storage", - "typeString": "struct Campaign.FundRequest storage ref[] storage ref" + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 660, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 658, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1093, + "src": "11291:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 659, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "11291:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" } }, - "id": 726, "isConstant": false, "isLValue": true, "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12035:19:0", + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "11278:24:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { "argumentTypes": null, - "hexValue": "31", - "id": 727, + "hexValue": "66616c7365", + "id": 661, "isConstant": false, "isLValue": false, "isPure": true, - "kind": "number", + "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "12057:1:0", + "src": "11305:5:0", "subdenomination": null, "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" + "typeIdentifier": "t_bool", + "typeString": "bool" }, - "value": "1" + "value": "false" }, - "src": "12035:23:0", + "src": "11278:32:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { + "id": 663, + "nodeType": "ExpressionStatement", + "src": "11278:32:0" + }, + { + "expression": { "argumentTypes": null, - "id": 729, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 701, - "src": "12061:5:0", + "id": 668, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "--", + "prefix": false, + "src": "11372:39:0", + "subExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 664, + "name": "fundRequests", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "11372:12:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_FundRequest_$29_storage_$dyn_storage", + "typeString": "struct Campaign.FundRequest storage ref[] storage ref" + } + }, + "id": 666, + "indexExpression": { + "argumentTypes": null, + "id": 665, + "name": "index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 609, + "src": "11385:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11372:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_FundRequest_$29_storage", + "typeString": "struct Campaign.FundRequest storage ref" + } + }, + "id": 667, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "disapproversCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 22, + "src": "11372:37:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "12035:31:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, + "id": 669, + "nodeType": "ExpressionStatement", + "src": "11372:39:0" + } + ] + } + } + ] + }, + "documentation": null, + "id": 673, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 612, + "modifierName": { + "argumentTypes": null, + "id": 611, + "name": "ifActive", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 100, + "src": "10721:8:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "10721:8:0" + }, + { + "arguments": null, + "id": 614, + "modifierName": { + "argumentTypes": null, + "id": 613, + "name": "onlyDonor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 89, + "src": "10730:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "10730:9:0" + } + ], + "name": "approveFundRequest", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 610, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 609, + "name": "index", + "nodeType": "VariableDeclaration", + "scope": 673, + "src": "10709:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 608, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "10709:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10708:12:0" + }, + "returnParameters": { + "id": 615, + "nodeType": "ParameterList", + "parameters": [], + "src": "10746:0:0" + }, + "scope": 967, + "src": "10681:749:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 765, + "nodeType": "Block", + "src": "11509:1001:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ { "argumentTypes": null, - "hexValue": "496e646578206973206f7574206f662072616e67652e", - "id": 731, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 688, "isConstant": false, "isLValue": false, - "isPure": true, - "kind": "string", + "isPure": false, "lValueRequested": false, - "nodeType": "Literal", - "src": "12067:24:0", - "subdenomination": null, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 683, + "name": "fundRequests", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "11528:12:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_FundRequest_$29_storage_$dyn_storage", + "typeString": "struct Campaign.FundRequest storage ref[] storage ref" + } + }, + "id": 685, + "indexExpression": { + "argumentTypes": null, + "id": 684, + "name": "index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 675, + "src": "11541:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11528:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_FundRequest_$29_storage", + "typeString": "struct Campaign.FundRequest storage ref" + } + }, + "id": 686, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isClosed", + "nodeType": "MemberAccess", + "referencedDeclaration": 28, + "src": "11528:28:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 687, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11560:5:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "11528:37:0", "typeDescriptions": { - "typeIdentifier": "t_stringliteral_d62057eb16a8d3c41dcbeafe24392eb41394b614c96b859090d8ab67c6b16e97", - "typeString": "literal_string \"Index is out of range.\"" + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "5468697320526571756573742068617320616c7265616479206265656e20636c6f7365642e", + "id": 689, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11566:39:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_936705d5c893758fa1f921672bb98f3cfdba0d03afedba508a9453ce8b9d60c1", + "typeString": "literal_string \"This Request has already been closed.\"" }, - "value": "Index is out of range." + "value": "This Request has already been closed." } ], "expression": { @@ -10040,25 +9748,25 @@ "typeString": "bool" }, { - "typeIdentifier": "t_stringliteral_d62057eb16a8d3c41dcbeafe24392eb41394b614c96b859090d8ab67c6b16e97", - "typeString": "literal_string \"Index is out of range.\"" + "typeIdentifier": "t_stringliteral_936705d5c893758fa1f921672bb98f3cfdba0d03afedba508a9453ce8b9d60c1", + "typeString": "literal_string \"This Request has already been closed.\"" } ], - "id": 724, + "id": 682, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1024, - 1025 + 1096, + 1097 ], - "referencedDeclaration": 1025, - "src": "12027:7:0", + "referencedDeclaration": 1097, + "src": "11520:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 732, + "id": 690, "isConstant": false, "isLValue": false, "isPure": false, @@ -10066,43 +9774,43 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "12027:65:0", + "src": "11520:86:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 733, + "id": 691, "nodeType": "ExpressionStatement", - "src": "12027:65:0" + "src": "11520:86:0" }, { "assignments": [ - 735 + 693 ], "declarations": [ { "constant": false, - "id": 735, - "name": "req", + "id": 693, + "name": "request", "nodeType": "VariableDeclaration", - "scope": 816, - "src": "12143:23:0", + "scope": 765, + "src": "11627:27:0", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", "typeString": "struct Campaign.FundRequest" }, "typeName": { "contractScope": null, - "id": 734, + "id": 692, "name": "FundRequest", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 27, - "src": "12143:11:0", + "referencedDeclaration": 29, + "src": "11627:11:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", "typeString": "struct Campaign.FundRequest" } }, @@ -10110,31 +9818,31 @@ "visibility": "internal" } ], - "id": 739, + "id": 697, "initialValue": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 736, + "id": 694, "name": "fundRequests", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "12169:12:0", + "referencedDeclaration": 55, + "src": "11657:12:0", "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_FundRequest_$27_storage_$dyn_storage", + "typeIdentifier": "t_array$_t_struct$_FundRequest_$29_storage_$dyn_storage", "typeString": "struct Campaign.FundRequest storage ref[] storage ref" } }, - "id": 738, + "id": 696, "indexExpression": { "argumentTypes": null, - "id": 737, + "id": 695, "name": "index", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 701, - "src": "12182:5:0", + "referencedDeclaration": 675, + "src": "11670:5:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -10145,1157 +9853,1017 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "12169:19:0", + "src": "11657:19:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage", + "typeIdentifier": "t_struct$_FundRequest_$29_storage", "typeString": "struct Campaign.FundRequest storage ref" } }, "nodeType": "VariableDeclarationStatement", - "src": "12143:45:0" + "src": "11627:49:0" }, { - "assignments": [ - 743 - ], - "declarations": [ - { - "constant": false, - "id": 743, - "name": "addresses", - "nodeType": "VariableDeclaration", - "scope": 816, - "src": "12199:26:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 741, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12199:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 742, - "length": null, - "nodeType": "ArrayTypeName", - "src": "12199:9:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 750, - "initialValue": { + "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 747, - "name": "req", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 735, - "src": "12242:3:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", - "typeString": "struct Campaign.FundRequest storage pointer" - } + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" }, - "id": 748, + "id": 714, "isConstant": false, - "isLValue": true, + "isLValue": false, "isPure": false, "lValueRequested": false, - "memberName": "recipientsCount", - "nodeType": "MemberAccess", - "referencedDeclaration": 16, - "src": "12242:19:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 746, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "12228:13:0", - "typeDescriptions": { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_$", - "typeString": "function (uint256) pure returns (address[] memory)" - }, - "typeName": { - "baseType": { - "id": 744, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "12232:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 745, - "length": null, - "nodeType": "ArrayTypeName", - "src": "12232:9:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - } - }, - "id": 749, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12228:34:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12199:63:0" - }, - { - "assignments": [ - 754 - ], - "declarations": [ - { - "constant": false, - "id": 754, - "name": "amounts", - "nodeType": "VariableDeclaration", - "scope": 816, - "src": "12273:21:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 752, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "12273:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 753, - "length": null, - "nodeType": "ArrayTypeName", - "src": "12273:6:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 761, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { + "leftExpression": { "argumentTypes": null, - "id": 758, - "name": "req", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 735, - "src": "12308:3:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", - "typeString": "struct Campaign.FundRequest storage pointer" - } - }, - "id": 759, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "recipientsCount", - "nodeType": "MemberAccess", - "referencedDeclaration": 16, - "src": "12308:19:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 757, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "12297:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_$", - "typeString": "function (uint256) pure returns (uint256[] memory)" - }, - "typeName": { - "baseType": { - "id": 755, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "12301:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 756, - "length": null, - "nodeType": "ArrayTypeName", - "src": "12301:6:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - } - }, - "id": 760, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "12297:31:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory", - "typeString": "uint256[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "12273:55:0" - }, - { - "body": { - "id": 793, - "nodeType": "Block", - "src": "12394:125:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 781, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 710, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "leftHandSide": { + "leftExpression": { "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 773, - "name": "addresses", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 743, - "src": "12409:9:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 775, - "indexExpression": { - "argumentTypes": null, - "id": 774, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 763, - "src": "12419:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, + "id": 704, "isConstant": false, - "isLValue": true, + "isLValue": false, "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "12409:12:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { + "lValueRequested": false, + "leftExpression": { "argumentTypes": null, - "baseExpression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 702, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 776, - "name": "req", + "id": 699, + "name": "request", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 735, - "src": "12424:3:0", + "referencedDeclaration": 693, + "src": "11709:7:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", "typeString": "struct Campaign.FundRequest storage pointer" } }, - "id": 777, + "id": 700, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberName": "recipients", + "memberName": "createdAt", "nodeType": "MemberAccess", - "referencedDeclaration": 14, - "src": "12424:14:0", + "referencedDeclaration": 24, + "src": "11709:17:0", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Person_$6_storage_$", - "typeString": "mapping(uint256 => struct Campaign.Person storage ref)" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 779, - "indexExpression": { + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { "argumentTypes": null, - "id": 778, - "name": "i", + "id": 701, + "name": "fundRequestProcessTime", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 763, - "src": "12439:1:0", + "referencedDeclaration": 57, + "src": "11729:22:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "12424:17:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Person_$6_storage", - "typeString": "struct Campaign.Person storage ref" - } - }, - "id": 780, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "personAddress", - "nodeType": "MemberAccess", - "referencedDeclaration": 3, - "src": "12424:31:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "12409:46:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 782, - "nodeType": "ExpressionStatement", - "src": "12409:46:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 791, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 783, - "name": "amounts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 754, - "src": "12470:7:0", + "src": "11709:42:0", "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 785, - "indexExpression": { + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { "argumentTypes": null, - "id": 784, - "name": "i", + "id": 703, + "name": "now", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 763, - "src": "12478:1:0", + "referencedDeclaration": 1095, + "src": "11754:3:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "12470:10:0", + "src": "11709:48:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { "argumentTypes": null, - "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 709, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { "argumentTypes": null, - "baseExpression": { + "expression": { "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 786, - "name": "req", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 735, - "src": "12483:3:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", - "typeString": "struct Campaign.FundRequest storage pointer" - } - }, - "id": 787, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "recipients", - "nodeType": "MemberAccess", - "referencedDeclaration": 14, - "src": "12483:14:0", + "id": 705, + "name": "request", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 693, + "src": "11775:7:0", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Person_$6_storage_$", - "typeString": "mapping(uint256 => struct Campaign.Person storage ref)" + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", + "typeString": "struct Campaign.FundRequest storage pointer" } }, - "id": 789, - "indexExpression": { + "id": 706, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "disapproversCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 22, + "src": "11775:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { "argumentTypes": null, - "id": 788, - "name": "i", + "id": 707, + "name": "donorsList", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 763, - "src": "12498:1:0", + "referencedDeclaration": 46, + "src": "11803:10:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_array$_t_struct$_Person_$6_storage_$dyn_storage", + "typeString": "struct Campaign.Person storage ref[] storage ref" } }, + "id": 708, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "12483:17:0", + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "11803:17:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_Person_$6_storage", - "typeString": "struct Campaign.Person storage ref" + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11775:45:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "11709:111:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "id": 713, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "11837:20:0", + "subExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 711, + "name": "request", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 693, + "src": "11838:7:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", + "typeString": "struct Campaign.FundRequest storage pointer" } }, - "id": 790, + "id": 712, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberName": "amount", + "memberName": "isCompleted", "nodeType": "MemberAccess", - "referencedDeclaration": 5, - "src": "12483:24:0", + "referencedDeclaration": 26, + "src": "11838:19:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "src": "12470:37:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "id": 792, - "nodeType": "ExpressionStatement", - "src": "12470:37:0" + "src": "11709:148:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "46756e6420526571756573742063616e6e6f742062652070726f6365737365642c20656974686572207468652072657175697265642074696d65206973206e6f74207265616368656420796574206f72206d6f737420646f6e6f72732068617320646973617070726f7665642069742e", + "id": 715, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11873:114:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d81dcd825f5bd9e87cb48f5c72bfb07db3cf3801a35b989e9b32b1e4e154d6c3", + "typeString": "literal_string \"Fund Request cannot be processed, either the required time is not reached yet or most donors has disapproved it.\"" + }, + "value": "Fund Request cannot be processed, either the required time is not reached yet or most donors has disapproved it." } - ] + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d81dcd825f5bd9e87cb48f5c72bfb07db3cf3801a35b989e9b32b1e4e154d6c3", + "typeString": "literal_string \"Fund Request cannot be processed, either the required time is not reached yet or most donors has disapproved it.\"" + } + ], + "id": 698, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1096, + 1097 + ], + "referencedDeclaration": 1097, + "src": "11687:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 716, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11687:301:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } }, - "condition": { + "id": 717, + "nodeType": "ExpressionStatement", + "src": "11687:301:0" + }, + { + "expression": { "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 769, + "id": 722, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 766, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 763, - "src": "12365:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { + "leftHandSide": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 767, - "name": "req", + "id": 718, + "name": "request", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 735, - "src": "12369:3:0", + "referencedDeclaration": 693, + "src": "12015:7:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", "typeString": "struct Campaign.FundRequest storage pointer" } }, - "id": 768, + "id": 720, "isConstant": false, "isLValue": true, "isPure": false, - "lValueRequested": false, - "memberName": "recipientsCount", + "lValueRequested": true, + "memberName": "isCompleted", "nodeType": "MemberAccess", - "referencedDeclaration": 16, - "src": "12369:19:0", + "referencedDeclaration": 26, + "src": "12015:19:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "src": "12365:23:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 794, - "initializationExpression": { - "assignments": [ - 763 - ], - "declarations": [ - { - "constant": false, - "id": 763, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 794, - "src": "12353:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 762, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "12353:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 765, - "initialValue": { + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { "argumentTypes": null, - "hexValue": "30", - "id": 764, + "hexValue": "74727565", + "id": 721, "isConstant": false, "isLValue": false, "isPure": true, - "kind": "number", + "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "12362:1:0", + "src": "12037:4:0", "subdenomination": null, "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" + "typeIdentifier": "t_bool", + "typeString": "bool" }, - "value": "0" + "value": "true" }, - "nodeType": "VariableDeclarationStatement", - "src": "12353:10:0" + "src": "12015:26:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } }, - "loopExpression": { - "expression": { + "id": 723, + "nodeType": "ExpressionStatement", + "src": "12015:26:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 727, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { "argumentTypes": null, - "id": 771, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "12390:3:0", - "subExpression": { + "id": 724, + "name": "amountDelegated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 41, + "src": "12056:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "-=", + "rightHandSide": { + "argumentTypes": null, + "expression": { "argumentTypes": null, - "id": 770, - "name": "i", + "id": 725, + "name": "request", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 763, - "src": "12390:1:0", + "referencedDeclaration": 693, + "src": "12075:7:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", + "typeString": "struct Campaign.FundRequest storage pointer" } }, + "id": 726, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "amount", + "nodeType": "MemberAccess", + "referencedDeclaration": 10, + "src": "12075:14:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 772, - "nodeType": "ExpressionStatement", - "src": "12390:3:0" + "src": "12056:33:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } }, - "nodeType": "ForStatement", - "src": "12349:170:0" + "id": 728, + "nodeType": "ExpressionStatement", + "src": "12056:33:0" }, { "expression": { "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 795, - "name": "req", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 735, - "src": "12560:3:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", - "typeString": "struct Campaign.FundRequest storage pointer" - } - }, - "id": 796, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "description", - "nodeType": "MemberAccess", - "referencedDeclaration": 8, - "src": "12560:15:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 797, - "name": "req", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 735, - "src": "12590:3:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", - "typeString": "struct Campaign.FundRequest storage pointer" - } - }, - "id": 798, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "amount", - "nodeType": "MemberAccess", - "referencedDeclaration": 10, - "src": "12590:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 799, - "name": "req", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 735, - "src": "12615:3:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", - "typeString": "struct Campaign.FundRequest storage pointer" - } - }, - "id": 800, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "recipientsCount", - "nodeType": "MemberAccess", - "referencedDeclaration": 16, - "src": "12615:19:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 801, - "name": "req", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 735, - "src": "12649:3:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", - "typeString": "struct Campaign.FundRequest storage pointer" - } - }, - "id": 802, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "disapproversCount", - "nodeType": "MemberAccess", - "referencedDeclaration": 22, - "src": "12649:21:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { + "id": 732, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 729, + "name": "amountSpended", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 43, + "src": "12104:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "expression": { "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 803, - "name": "req", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 735, - "src": "12685:3:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", - "typeString": "struct Campaign.FundRequest storage pointer" - } - }, - "id": 804, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "createdAt", - "nodeType": "MemberAccess", - "referencedDeclaration": 24, - "src": "12685:13:0", + "id": 730, + "name": "request", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 693, + "src": "12121:7:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", + "typeString": "struct Campaign.FundRequest storage pointer" } }, + "id": 731, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "amount", + "nodeType": "MemberAccess", + "referencedDeclaration": 10, + "src": "12121:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12104:31:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 733, + "nodeType": "ExpressionStatement", + "src": "12104:31:0" + }, + { + "body": { + "id": 763, + "nodeType": "Block", + "src": "12199:294:0", + "statements": [ { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 805, - "name": "req", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 735, - "src": "12713:3:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", - "typeString": "struct Campaign.FundRequest storage pointer" + "assignments": [ + 746 + ], + "declarations": [ + { + "constant": false, + "id": 746, + "name": "recipient", + "nodeType": "VariableDeclaration", + "scope": 763, + "src": "12218:24:0", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Person_$6_storage_ptr", + "typeString": "struct Campaign.Person" + }, + "typeName": { + "contractScope": null, + "id": 745, + "name": "Person", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6, + "src": "12218:6:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Person_$6_storage_ptr", + "typeString": "struct Campaign.Person" + } + }, + "value": null, + "visibility": "internal" } - }, - "id": 806, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "isCompleted", - "nodeType": "MemberAccess", - "referencedDeclaration": 26, - "src": "12713:15:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "baseExpression": { + ], + "id": 751, + "initialValue": { "argumentTypes": null, - "expression": { + "baseExpression": { "argumentTypes": null, - "id": 807, - "name": "req", + "expression": { + "argumentTypes": null, + "id": 747, + "name": "request", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 693, + "src": "12245:7:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", + "typeString": "struct Campaign.FundRequest storage pointer" + } + }, + "id": 748, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "recipients", + "nodeType": "MemberAccess", + "referencedDeclaration": 14, + "src": "12245:18:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Person_$6_storage_$", + "typeString": "mapping(uint256 => struct Campaign.Person storage ref)" + } + }, + "id": 750, + "indexExpression": { + "argumentTypes": null, + "id": 749, + "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 735, - "src": "12743:3:0", + "src": "12264:1:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", - "typeString": "struct Campaign.FundRequest storage pointer" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 808, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberName": "disapprovers", - "nodeType": "MemberAccess", - "referencedDeclaration": 20, - "src": "12743:16:0", + "nodeType": "IndexAccess", + "src": "12245:21:0", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", - "typeString": "mapping(address => bool)" + "typeIdentifier": "t_struct$_Person_$6_storage", + "typeString": "struct Campaign.Person storage ref" } }, - "id": 811, - "indexExpression": { + "nodeType": "VariableDeclarationStatement", + "src": "12218:48:0" + }, + { + "expression": { "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 809, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1021, - "src": "12760:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 810, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 759, + "name": "recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 746, + "src": "12460:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Person_$6_storage_ptr", + "typeString": "struct Campaign.Person storage pointer" + } + }, + "id": 760, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "amount", + "nodeType": "MemberAccess", + "referencedDeclaration": 5, + "src": "12460:16:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 754, + "name": "recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 746, + "src": "12425:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Person_$6_storage_ptr", + "typeString": "struct Campaign.Person storage pointer" + } + }, + "id": 755, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "personAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 3, + "src": "12425:23:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 753, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "12417:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint160_$", + "typeString": "type(uint160)" + }, + "typeName": "uint160" + }, + "id": 756, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12417:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint160", + "typeString": "uint160" + } + ], + "id": 752, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "12409:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 757, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12409:41:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 758, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "12409:50:0", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 761, "isConstant": false, "isLValue": false, "isPure": false, + "kind": "functionCall", "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "12760:10:0", + "names": [], + "nodeType": "FunctionCall", + "src": "12409:68:0", "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" } }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "12743:28:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { + "id": 762, + "nodeType": "ExpressionStatement", + "src": "12409:68:0" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 741, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 738, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 735, + "src": "12166:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { "argumentTypes": null, - "id": 812, - "name": "addresses", + "id": 739, + "name": "request", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 743, - "src": "12786:9:0", + "referencedDeclaration": 693, + "src": "12170:7:0", "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", + "typeString": "struct Campaign.FundRequest storage pointer" } }, - { - "argumentTypes": null, - "id": 813, - "name": "amounts", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 754, - "src": "12810:7:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } + "id": 740, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "recipientsCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 16, + "src": "12170:23:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } - ], - "id": 814, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "12545:287:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_string_storage_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_bool_$_t_bool_$_t_array$_t_address_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$", - "typeString": "tuple(string storage ref,uint256,uint256,uint256,uint256,bool,bool,address[] memory,uint256[] memory)" - } - }, - "functionReturnParameters": 723, - "id": 815, - "nodeType": "Return", - "src": "12539:293:0" - } - ] - }, - "documentation": null, - "id": 817, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getFundRequest", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 702, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 701, - "name": "index", - "nodeType": "VariableDeclaration", - "scope": 817, - "src": "11904:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 700, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "11904:4:0", + }, + "src": "12166:27:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "value": null, - "visibility": "internal" - } - ], - "src": "11903:12:0" - }, - "returnParameters": { - "id": 723, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 704, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 817, - "src": "11936:13:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 703, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "11936:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 706, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 817, - "src": "11950:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "id": 764, + "initializationExpression": { + "assignments": [ + 735 + ], + "declarations": [ + { + "constant": false, + "id": 735, + "name": "i", + "nodeType": "VariableDeclaration", + "scope": 764, + "src": "12154:6:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 734, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "12154:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 737, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 736, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12163:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "12154:10:0" }, - "typeName": { - "id": 705, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "11950:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 743, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "12195:3:0", + "subExpression": { + "argumentTypes": null, + "id": 742, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 735, + "src": "12195:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 744, + "nodeType": "ExpressionStatement", + "src": "12195:3:0" }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 708, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 817, - "src": "11956:4:0", - "stateVariable": false, - "storageLocation": "default", + "nodeType": "ForStatement", + "src": "12150:343:0" + } + ] + }, + "documentation": null, + "id": 766, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 678, + "modifierName": { + "argumentTypes": null, + "id": 677, + "name": "ifActive", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 100, + "src": "11482:8:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 707, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "11956:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } }, - { - "constant": false, - "id": 710, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 817, - "src": "11962:4:0", - "stateVariable": false, - "storageLocation": "default", + "nodeType": "ModifierInvocation", + "src": "11482:8:0" + }, + { + "arguments": null, + "id": 680, + "modifierName": { + "argumentTypes": null, + "id": 679, + "name": "onlyManager", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 75, + "src": "11491:11:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 709, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "11962:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } }, + "nodeType": "ModifierInvocation", + "src": "11491:11:0" + } + ], + "name": "processFundRequest", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 676, + "nodeType": "ParameterList", + "parameters": [ { "constant": false, - "id": 712, - "name": "", + "id": 675, + "name": "index", "nodeType": "VariableDeclaration", - "scope": 817, - "src": "11968:4:0", + "scope": 766, + "src": "11470:10:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -11303,10 +10871,10 @@ "typeString": "uint256" }, "typeName": { - "id": 711, + "id": 674, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "11968:4:0", + "src": "11470:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -11314,381 +10882,1876 @@ }, "value": null, "visibility": "internal" - }, - { - "constant": false, - "id": 714, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 817, - "src": "11974:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 713, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "11974:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 716, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 817, - "src": "11980:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 715, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "11980:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - }, + } + ], + "src": "11469:12:0" + }, + "returnParameters": { + "id": 681, + "nodeType": "ParameterList", + "parameters": [], + "src": "11509:0:0" + }, + "scope": 967, + "src": "11442:1068:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 887, + "nodeType": "Block", + "src": "12663:851:0", + "statements": [ { - "constant": false, - "id": 719, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 817, - "src": "11986:15:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 717, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "11986:7:0", - "stateMutability": "nonpayable", + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 799, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 797, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 794, + "name": "fundRequests", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "12682:12:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_FundRequest_$29_storage_$dyn_storage", + "typeString": "struct Campaign.FundRequest storage ref[] storage ref" + } + }, + "id": 795, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "12682:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 796, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12704:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "12682:23:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 798, + "name": "index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 768, + "src": "12708:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12682:31:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "496e646578206973206f7574206f662072616e67652e", + "id": 800, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12714:24:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d62057eb16a8d3c41dcbeafe24392eb41394b614c96b859090d8ab67c6b16e97", + "typeString": "literal_string \"Index is out of range.\"" + }, + "value": "Index is out of range." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d62057eb16a8d3c41dcbeafe24392eb41394b614c96b859090d8ab67c6b16e97", + "typeString": "literal_string \"Index is out of range.\"" + } + ], + "id": 793, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1096, + 1097 + ], + "referencedDeclaration": 1097, + "src": "12674:7:0", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" } }, - "id": 718, - "length": null, - "nodeType": "ArrayTypeName", - "src": "11986:9:0", + "id": 801, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12674:65:0", "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" } }, - "value": null, - "visibility": "internal" + "id": 802, + "nodeType": "ExpressionStatement", + "src": "12674:65:0" }, { - "constant": false, - "id": 722, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 817, - "src": "12003:12:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 720, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "12003:4:0", + "assignments": [ + 804 + ], + "declarations": [ + { + "constant": false, + "id": 804, + "name": "req", + "nodeType": "VariableDeclaration", + "scope": 887, + "src": "12790:23:0", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", + "typeString": "struct Campaign.FundRequest" + }, + "typeName": { + "contractScope": null, + "id": 803, + "name": "FundRequest", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 29, + "src": "12790:11:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", + "typeString": "struct Campaign.FundRequest" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 808, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 805, + "name": "fundRequests", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "12816:12:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_FundRequest_$29_storage_$dyn_storage", + "typeString": "struct Campaign.FundRequest storage ref[] storage ref" + } + }, + "id": 807, + "indexExpression": { + "argumentTypes": null, + "id": 806, + "name": "index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 768, + "src": "12829:5:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 721, - "length": null, - "nodeType": "ArrayTypeName", - "src": "12003:6:0", + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12816:19:0", "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" + "typeIdentifier": "t_struct$_FundRequest_$29_storage", + "typeString": "struct Campaign.FundRequest storage ref" } }, - "value": null, - "visibility": "internal" - } - ], - "src": "11935:81:0" - }, - "scope": 895, - "src": "11880:960:0", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 862, - "nodeType": "Block", - "src": "13006:397:0", - "statements": [ + "nodeType": "VariableDeclarationStatement", + "src": "12790:45:0" + }, { - "expression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 846, - "name": "manager", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 29, - "src": "13039:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 847, - "name": "title", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 31, - "src": "13061:5:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - { - "argumentTypes": null, - "id": 848, - "name": "description", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 33, - "src": "13081:11:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - { - "argumentTypes": null, - "id": 849, - "name": "amountInitialGoal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 35, - "src": "13107:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 850, - "name": "amountCollected", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 37, - "src": "13139:15:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 851, - "name": "amountDelegated", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 39, - "src": "13169:15:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } + "assignments": [ + 812 + ], + "declarations": [ + { + "constant": false, + "id": 812, + "name": "addresses", + "nodeType": "VariableDeclaration", + "scope": 887, + "src": "12846:26:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" }, - { - "argumentTypes": null, - "id": 852, - "name": "amountSpended", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 41, - "src": "13199:13:0", + "typeName": { + "baseType": { + "id": 810, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12846:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 811, + "length": null, + "nodeType": "ArrayTypeName", + "src": "12846:9:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" } }, + "value": null, + "visibility": "internal" + } + ], + "id": 819, + "initialValue": { + "argumentTypes": null, + "arguments": [ { "argumentTypes": null, - "id": 853, - "name": "fundRequestProcessTime", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 55, - "src": "13227:22:0", + "expression": { + "argumentTypes": null, + "id": 816, + "name": "req", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 804, + "src": "12889:3:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", + "typeString": "struct Campaign.FundRequest storage pointer" + } + }, + "id": 817, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "recipientsCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 16, + "src": "12889:19:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } - }, - { - "argumentTypes": null, - "id": 854, - "name": "createdAt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 57, - "src": "13264:9:0", - "typeDescriptions": { + } + ], + "expression": { + "argumentTypes": [ + { "typeIdentifier": "t_uint256", "typeString": "uint256" } + ], + "id": 815, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "12875:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_$", + "typeString": "function (uint256) pure returns (address[] memory)" }, - { - "argumentTypes": null, - "id": 855, - "name": "closedAt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 59, - "src": "13288:8:0", + "typeName": { + "baseType": { + "id": 813, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12879:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 814, + "length": null, + "nodeType": "ArrayTypeName", + "src": "12879:9:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" } + } + }, + "id": 818, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12875:34:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory", + "typeString": "address[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12846:63:0" + }, + { + "assignments": [ + 823 + ], + "declarations": [ + { + "constant": false, + "id": 823, + "name": "amounts", + "nodeType": "VariableDeclaration", + "scope": 887, + "src": "12920:21:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" }, - { - "argumentTypes": null, - "id": 856, - "name": "dononrsCount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46, - "src": "13311:12:0", + "typeName": { + "baseType": { + "id": 821, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "12920:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 822, + "length": null, + "nodeType": "ArrayTypeName", + "src": "12920:6:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" } }, + "value": null, + "visibility": "internal" + } + ], + "id": 830, + "initialValue": { + "argumentTypes": null, + "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 857, - "name": "fundRequests", + "id": 827, + "name": "req", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "13338:12:0", + "referencedDeclaration": 804, + "src": "12955:3:0", "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_FundRequest_$27_storage_$dyn_storage", - "typeString": "struct Campaign.FundRequest storage ref[] storage ref" + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", + "typeString": "struct Campaign.FundRequest storage pointer" } }, - "id": 858, + "id": 828, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberName": "length", + "memberName": "recipientsCount", "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "13338:19:0", + "referencedDeclaration": 16, + "src": "12955:19:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 826, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "12944:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_$", + "typeString": "function (uint256) pure returns (uint256[] memory)" }, - { - "argumentTypes": null, - "id": 859, - "name": "isActive", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 61, - "src": "13372:8:0", + "typeName": { + "baseType": { + "id": 824, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "12948:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 825, + "length": null, + "nodeType": "ArrayTypeName", + "src": "12948:6:0", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" } } - ], - "id": 860, + }, + "id": 829, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12944:31:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory", + "typeString": "uint256[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12920:55:0" + }, + { + "body": { + "id": 862, + "nodeType": "Block", + "src": "13041:125:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 850, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 842, + "name": "addresses", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 812, + "src": "13056:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 844, + "indexExpression": { + "argumentTypes": null, + "id": 843, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 832, + "src": "13066:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "13056:12:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 845, + "name": "req", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 804, + "src": "13071:3:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", + "typeString": "struct Campaign.FundRequest storage pointer" + } + }, + "id": 846, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "recipients", + "nodeType": "MemberAccess", + "referencedDeclaration": 14, + "src": "13071:14:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Person_$6_storage_$", + "typeString": "mapping(uint256 => struct Campaign.Person storage ref)" + } + }, + "id": 848, + "indexExpression": { + "argumentTypes": null, + "id": 847, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 832, + "src": "13086:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "13071:17:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Person_$6_storage", + "typeString": "struct Campaign.Person storage ref" + } + }, + "id": 849, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "personAddress", + "nodeType": "MemberAccess", + "referencedDeclaration": 3, + "src": "13071:31:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "13056:46:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 851, + "nodeType": "ExpressionStatement", + "src": "13056:46:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 860, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 852, + "name": "amounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 823, + "src": "13117:7:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 854, + "indexExpression": { + "argumentTypes": null, + "id": 853, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 832, + "src": "13125:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "13117:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 855, + "name": "req", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 804, + "src": "13130:3:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", + "typeString": "struct Campaign.FundRequest storage pointer" + } + }, + "id": 856, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "recipients", + "nodeType": "MemberAccess", + "referencedDeclaration": 14, + "src": "13130:14:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Person_$6_storage_$", + "typeString": "mapping(uint256 => struct Campaign.Person storage ref)" + } + }, + "id": 858, + "indexExpression": { + "argumentTypes": null, + "id": 857, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 832, + "src": "13145:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "13130:17:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Person_$6_storage", + "typeString": "struct Campaign.Person storage ref" + } + }, + "id": 859, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "amount", + "nodeType": "MemberAccess", + "referencedDeclaration": 5, + "src": "13130:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13117:37:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 861, + "nodeType": "ExpressionStatement", + "src": "13117:37:0" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 838, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 835, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 832, + "src": "13012:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 836, + "name": "req", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 804, + "src": "13016:3:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", + "typeString": "struct Campaign.FundRequest storage pointer" + } + }, + "id": 837, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "recipientsCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 16, + "src": "13016:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13012:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 863, + "initializationExpression": { + "assignments": [ + 832 + ], + "declarations": [ + { + "constant": false, + "id": 832, + "name": "i", + "nodeType": "VariableDeclaration", + "scope": 863, + "src": "13000:6:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 831, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "13000:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 834, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 833, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13009:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "13000:10:0" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 840, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "13037:3:0", + "subExpression": { + "argumentTypes": null, + "id": 839, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 832, + "src": "13037:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 841, + "nodeType": "ExpressionStatement", + "src": "13037:3:0" + }, + "nodeType": "ForStatement", + "src": "12996:170:0" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 864, + "name": "req", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 804, + "src": "13207:3:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", + "typeString": "struct Campaign.FundRequest storage pointer" + } + }, + "id": 865, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "description", + "nodeType": "MemberAccess", + "referencedDeclaration": 8, + "src": "13207:15:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 866, + "name": "req", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 804, + "src": "13237:3:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", + "typeString": "struct Campaign.FundRequest storage pointer" + } + }, + "id": 867, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "amount", + "nodeType": "MemberAccess", + "referencedDeclaration": 10, + "src": "13237:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 868, + "name": "req", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 804, + "src": "13262:3:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", + "typeString": "struct Campaign.FundRequest storage pointer" + } + }, + "id": 869, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "recipientsCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 16, + "src": "13262:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 870, + "name": "req", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 804, + "src": "13296:3:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", + "typeString": "struct Campaign.FundRequest storage pointer" + } + }, + "id": 871, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "disapproversCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 22, + "src": "13296:21:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 872, + "name": "req", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 804, + "src": "13332:3:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", + "typeString": "struct Campaign.FundRequest storage pointer" + } + }, + "id": 873, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "createdAt", + "nodeType": "MemberAccess", + "referencedDeclaration": 24, + "src": "13332:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 874, + "name": "req", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 804, + "src": "13360:3:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", + "typeString": "struct Campaign.FundRequest storage pointer" + } + }, + "id": 875, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isCompleted", + "nodeType": "MemberAccess", + "referencedDeclaration": 26, + "src": "13360:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 876, + "name": "req", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 804, + "src": "13390:3:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", + "typeString": "struct Campaign.FundRequest storage pointer" + } + }, + "id": 877, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "disapprovers", + "nodeType": "MemberAccess", + "referencedDeclaration": 20, + "src": "13390:16:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", + "typeString": "mapping(address => bool)" + } + }, + "id": 880, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 878, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1093, + "src": "13407:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 879, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "13407:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "13390:28:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 881, + "name": "addresses", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 812, + "src": "13433:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 882, + "name": "amounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 823, + "src": "13457:7:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 883, + "name": "req", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 804, + "src": "13479:3:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", + "typeString": "struct Campaign.FundRequest storage pointer" + } + }, + "id": 884, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isClosed", + "nodeType": "MemberAccess", + "referencedDeclaration": 28, + "src": "13479:12:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 885, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "13192:314:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_string_storage_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_bool_$_t_bool_$_t_array$_t_address_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_bool_$", + "typeString": "tuple(string storage ref,uint256,uint256,uint256,uint256,bool,bool,address[] memory,uint256[] memory,bool)" + } + }, + "functionReturnParameters": 792, + "id": 886, + "nodeType": "Return", + "src": "13186:320:0" + } + ] + }, + "documentation": null, + "id": 888, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getFundRequest", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 769, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 768, + "name": "index", + "nodeType": "VariableDeclaration", + "scope": 888, + "src": "12546:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 767, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "12546:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12545:12:0" + }, + "returnParameters": { + "id": 792, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 771, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 888, + "src": "12578:13:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 770, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "12578:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 773, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 888, + "src": "12592:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 772, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "12592:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 775, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 888, + "src": "12598:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 774, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "12598:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 777, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 888, + "src": "12604:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 776, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "12604:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 779, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 888, + "src": "12610:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 778, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "12610:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 781, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 888, + "src": "12616:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 780, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "12616:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 783, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 888, + "src": "12622:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 782, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "12622:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 786, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 888, + "src": "12628:15:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 784, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12628:7:0", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 785, + "length": null, + "nodeType": "ArrayTypeName", + "src": "12628:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 789, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 888, + "src": "12645:12:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 787, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "12645:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 788, + "length": null, + "nodeType": "ArrayTypeName", + "src": "12645:6:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 791, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 888, + "src": "12658:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 790, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "12658:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12577:86:0" + }, + "scope": 967, + "src": "12522:992:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 934, + "nodeType": "Block", + "src": "13680:402:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 917, + "name": "manager", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 31, + "src": "13713:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 918, + "name": "title", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 33, + "src": "13735:5:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + { + "argumentTypes": null, + "id": 919, + "name": "description", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 35, + "src": "13755:11:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + { + "argumentTypes": null, + "id": 920, + "name": "amountInitialGoal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37, + "src": "13781:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 921, + "name": "amountCollected", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 39, + "src": "13813:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 922, + "name": "amountDelegated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 41, + "src": "13843:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 923, + "name": "amountSpended", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 43, + "src": "13873:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 924, + "name": "fundRequestProcessTime", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "13901:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 925, + "name": "createdAt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "13938:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 926, + "name": "closedAt", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "13962:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 927, + "name": "donorsList", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46, + "src": "13985:10:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_Person_$6_storage_$dyn_storage", + "typeString": "struct Campaign.Person storage ref[] storage ref" + } + }, + "id": 928, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "13985:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 929, + "name": "fundRequests", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "14017:12:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_FundRequest_$29_storage_$dyn_storage", + "typeString": "struct Campaign.FundRequest storage ref[] storage ref" + } + }, + "id": 930, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "14017:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 931, + "name": "isActive", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 63, + "src": "14051:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 932, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", - "src": "13024:371:0", + "src": "13698:376:0", "typeDescriptions": { "typeIdentifier": "t_tuple$_t_address_$_t_string_storage_$_t_string_storage_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_bool_$", "typeString": "tuple(address,string storage ref,string storage ref,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,bool)" } }, - "functionReturnParameters": 845, - "id": 861, + "functionReturnParameters": 916, + "id": 933, "nodeType": "Return", - "src": "13017:378:0" + "src": "13691:383:0" } ] }, "documentation": null, - "id": 863, + "id": 935, "implemented": true, "kind": "function", "modifiers": [], "name": "getSummary", "nodeType": "FunctionDefinition", "parameters": { - "id": 818, + "id": 889, "nodeType": "ParameterList", "parameters": [], - "src": "12867:2:0" + "src": "13541:2:0" }, "returnParameters": { - "id": 845, + "id": 916, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 820, + "id": 891, "name": "", "nodeType": "VariableDeclaration", - "scope": 863, - "src": "12899:7:0", + "scope": 935, + "src": "13573:7:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -11696,10 +12759,10 @@ "typeString": "address" }, "typeName": { - "id": 819, + "id": 890, "name": "address", "nodeType": "ElementaryTypeName", - "src": "12899:7:0", + "src": "13573:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -11711,11 +12774,11 @@ }, { "constant": false, - "id": 822, + "id": 893, "name": "", "nodeType": "VariableDeclaration", - "scope": 863, - "src": "12908:13:0", + "scope": 935, + "src": "13582:13:0", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { @@ -11723,10 +12786,10 @@ "typeString": "string" }, "typeName": { - "id": 821, + "id": 892, "name": "string", "nodeType": "ElementaryTypeName", - "src": "12908:6:0", + "src": "13582:6:0", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" @@ -11737,11 +12800,11 @@ }, { "constant": false, - "id": 824, + "id": 895, "name": "", "nodeType": "VariableDeclaration", - "scope": 863, - "src": "12923:13:0", + "scope": 935, + "src": "13597:13:0", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { @@ -11749,10 +12812,10 @@ "typeString": "string" }, "typeName": { - "id": 823, + "id": 894, "name": "string", "nodeType": "ElementaryTypeName", - "src": "12923:6:0", + "src": "13597:6:0", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" @@ -11763,11 +12826,11 @@ }, { "constant": false, - "id": 826, + "id": 897, "name": "", "nodeType": "VariableDeclaration", - "scope": 863, - "src": "12938:4:0", + "scope": 935, + "src": "13612:4:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -11775,10 +12838,10 @@ "typeString": "uint256" }, "typeName": { - "id": 825, + "id": 896, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "12938:4:0", + "src": "13612:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -11789,11 +12852,11 @@ }, { "constant": false, - "id": 828, + "id": 899, "name": "", "nodeType": "VariableDeclaration", - "scope": 863, - "src": "12944:4:0", + "scope": 935, + "src": "13618:4:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -11801,10 +12864,10 @@ "typeString": "uint256" }, "typeName": { - "id": 827, + "id": 898, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "12944:4:0", + "src": "13618:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -11815,11 +12878,11 @@ }, { "constant": false, - "id": 830, + "id": 901, "name": "", "nodeType": "VariableDeclaration", - "scope": 863, - "src": "12950:4:0", + "scope": 935, + "src": "13624:4:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -11827,10 +12890,10 @@ "typeString": "uint256" }, "typeName": { - "id": 829, + "id": 900, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "12950:4:0", + "src": "13624:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -11841,11 +12904,11 @@ }, { "constant": false, - "id": 832, + "id": 903, "name": "", "nodeType": "VariableDeclaration", - "scope": 863, - "src": "12956:4:0", + "scope": 935, + "src": "13630:4:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -11853,10 +12916,10 @@ "typeString": "uint256" }, "typeName": { - "id": 831, + "id": 902, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "12956:4:0", + "src": "13630:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -11867,11 +12930,11 @@ }, { "constant": false, - "id": 834, + "id": 905, "name": "", "nodeType": "VariableDeclaration", - "scope": 863, - "src": "12962:4:0", + "scope": 935, + "src": "13636:4:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -11879,10 +12942,10 @@ "typeString": "uint256" }, "typeName": { - "id": 833, + "id": 904, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "12962:4:0", + "src": "13636:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -11893,11 +12956,11 @@ }, { "constant": false, - "id": 836, + "id": 907, "name": "", "nodeType": "VariableDeclaration", - "scope": 863, - "src": "12968:4:0", + "scope": 935, + "src": "13642:4:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -11905,10 +12968,10 @@ "typeString": "uint256" }, "typeName": { - "id": 835, + "id": 906, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "12968:4:0", + "src": "13642:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -11919,11 +12982,11 @@ }, { "constant": false, - "id": 838, + "id": 909, "name": "", "nodeType": "VariableDeclaration", - "scope": 863, - "src": "12974:4:0", + "scope": 935, + "src": "13648:4:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -11931,10 +12994,10 @@ "typeString": "uint256" }, "typeName": { - "id": 837, + "id": 908, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "12974:4:0", + "src": "13648:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -11945,11 +13008,11 @@ }, { "constant": false, - "id": 840, + "id": 911, "name": "", "nodeType": "VariableDeclaration", - "scope": 863, - "src": "12980:4:0", + "scope": 935, + "src": "13654:4:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -11957,10 +13020,10 @@ "typeString": "uint256" }, "typeName": { - "id": 839, + "id": 910, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "12980:4:0", + "src": "13654:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -11971,11 +13034,11 @@ }, { "constant": false, - "id": 842, + "id": 913, "name": "", "nodeType": "VariableDeclaration", - "scope": 863, - "src": "12985:4:0", + "scope": 935, + "src": "13659:4:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -11983,10 +13046,10 @@ "typeString": "uint256" }, "typeName": { - "id": 841, + "id": 912, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "12985:4:0", + "src": "13659:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -11997,11 +13060,11 @@ }, { "constant": false, - "id": 844, + "id": 915, "name": "", "nodeType": "VariableDeclaration", - "scope": 863, - "src": "12991:4:0", + "scope": 935, + "src": "13665:4:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -12009,10 +13072,10 @@ "typeString": "bool" }, "typeName": { - "id": 843, + "id": 914, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "12991:4:0", + "src": "13665:4:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -12022,36 +13085,36 @@ "visibility": "internal" } ], - "src": "12888:118:0" + "src": "13562:118:0" }, - "scope": 895, - "src": "12848:555:0", + "scope": 967, + "src": "13522:560:0", "stateMutability": "view", "superFunction": null, "visibility": "public" }, { "body": { - "id": 876, + "id": 948, "nodeType": "Block", - "src": "13498:55:0", + "src": "14177:55:0", "statements": [ { "expression": { "argumentTypes": null, - "id": 874, + "id": 946, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 872, + "id": 944, "name": "fundRequestProcessTime", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 55, - "src": "13509:22:0", + "referencedDeclaration": 57, + "src": "14188:22:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -12061,86 +13124,86 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 873, + "id": 945, "name": "processTime", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 865, - "src": "13534:11:0", + "referencedDeclaration": 937, + "src": "14213:11:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "13509:36:0", + "src": "14188:36:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 875, + "id": 947, "nodeType": "ExpressionStatement", - "src": "13509:36:0" + "src": "14188:36:0" } ] }, "documentation": null, - "id": 877, + "id": 949, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, - "id": 868, + "id": 940, "modifierName": { "argumentTypes": null, - "id": 867, + "id": 939, "name": "ifActive", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 98, - "src": "13468:8:0", + "referencedDeclaration": 100, + "src": "14147:8:0", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "13468:8:0" + "src": "14147:8:0" }, { "arguments": null, - "id": 870, + "id": 942, "modifierName": { "argumentTypes": null, - "id": 869, + "id": 941, "name": "onlyManager", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 73, - "src": "13478:11:0", + "referencedDeclaration": 75, + "src": "14157:11:0", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "13478:11:0" + "src": "14157:11:0" } ], "name": "setFundRequestProcessTime", "nodeType": "FunctionDefinition", "parameters": { - "id": 866, + "id": 938, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 865, + "id": 937, "name": "processTime", "nodeType": "VariableDeclaration", - "scope": 877, - "src": "13450:16:0", + "scope": 949, + "src": "14129:16:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -12148,10 +13211,10 @@ "typeString": "uint256" }, "typeName": { - "id": 864, + "id": 936, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "13450:4:0", + "src": "14129:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -12161,25 +13224,25 @@ "visibility": "internal" } ], - "src": "13449:18:0" + "src": "14128:18:0" }, "returnParameters": { - "id": 871, + "id": 943, "nodeType": "ParameterList", "parameters": [], - "src": "13498:0:0" + "src": "14177:0:0" }, - "scope": 895, - "src": "13415:138:0", + "scope": 967, + "src": "14094:138:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { - "id": 893, + "id": 965, "nodeType": "Block", - "src": "13609:158:0", + "src": "14288:158:0", "statements": [ { "expression": { @@ -12191,19 +13254,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 885, + "id": 957, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 883, + "id": 955, "name": "amountCollected", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 37, - "src": "13628:15:0", + "referencedDeclaration": 39, + "src": "14307:15:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -12213,18 +13276,18 @@ "operator": "==", "rightExpression": { "argumentTypes": null, - "id": 884, + "id": 956, "name": "amountSpended", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 41, - "src": "13647:13:0", + "referencedDeclaration": 43, + "src": "14326:13:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "13628:32:0", + "src": "14307:32:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -12233,14 +13296,14 @@ { "argumentTypes": null, "hexValue": "43616d706169676e2063616e6e6f7420626520636c6f7365642c2062656361757365206974207374696c6c2068617320736f6d6520756e7370656e6465642066756e6473", - "id": 886, + "id": 958, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "13661:70:0", + "src": "14340:70:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_d259561263c4179fb1862e68b69719b67bd0658e4482a6fe5eec7a75fb9e6173", @@ -12260,21 +13323,21 @@ "typeString": "literal_string \"Campaign cannot be closed, because it still has some unspended funds\"" } ], - "id": 882, + "id": 954, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1024, - 1025 + 1096, + 1097 ], - "referencedDeclaration": 1025, - "src": "13620:7:0", + "referencedDeclaration": 1097, + "src": "14299:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 887, + "id": 959, "isConstant": false, "isLValue": false, "isPure": false, @@ -12282,32 +13345,32 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "13620:112:0", + "src": "14299:112:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 888, + "id": 960, "nodeType": "ExpressionStatement", - "src": "13620:112:0" + "src": "14299:112:0" }, { "expression": { "argumentTypes": null, - "id": 891, + "id": 963, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 889, + "id": 961, "name": "isActive", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 61, - "src": "13743:8:0", + "referencedDeclaration": 63, + "src": "14422:8:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -12318,14 +13381,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "66616c7365", - "id": 890, + "id": 962, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "13754:5:0", + "src": "14433:5:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -12333,78 +13396,78 @@ }, "value": "false" }, - "src": "13743:16:0", + "src": "14422:16:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 892, + "id": 964, "nodeType": "ExpressionStatement", - "src": "13743:16:0" + "src": "14422:16:0" } ] }, "documentation": null, - "id": 894, + "id": 966, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, - "id": 880, + "id": 952, "modifierName": { "argumentTypes": null, - "id": 879, + "id": 951, "name": "onlyManager", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 73, - "src": "13590:11:0", + "referencedDeclaration": 75, + "src": "14269:11:0", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "13590:11:0" + "src": "14269:11:0" } ], "name": "deactivate", "nodeType": "FunctionDefinition", "parameters": { - "id": 878, + "id": 950, "nodeType": "ParameterList", "parameters": [], - "src": "13587:2:0" + "src": "14266:2:0" }, "returnParameters": { - "id": 881, + "id": 953, "nodeType": "ParameterList", "parameters": [], - "src": "13609:0:0" + "src": "14288:0:0" }, - "scope": 895, - "src": "13568:199:0", + "scope": 967, + "src": "14247:199:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" } ], - "scope": 896, - "src": "475:13301:0" + "scope": 968, + "src": "475:13980:0" } ], - "src": "0:13776:0" + "src": "0:14455:0" }, "legacyAST": { "absolutePath": "/F/Software Development/React Projects/de-care/ethereum/contracts/Campaign.sol", "exportedSymbols": { "Campaign": [ - 895 + 967 ] }, - "id": 896, + "id": 968, "nodeType": "SourceUnit", "nodes": [ { @@ -12424,9 +13487,9 @@ "contractKind": "contract", "documentation": null, "fullyImplemented": true, - "id": 895, + "id": 967, "linearizedBaseContracts": [ - 895 + 967 ], "name": "Campaign", "nodeType": "ContractDefinition", @@ -12491,20 +13554,20 @@ ], "name": "Person", "nodeType": "StructDefinition", - "scope": 895, + "scope": 967, "src": "575:75:0", "visibility": "public" }, { "canonicalName": "Campaign.FundRequest", - "id": 27, + "id": 29, "members": [ { "constant": false, "id": 8, "name": "description", "nodeType": "VariableDeclaration", - "scope": 27, + "scope": 29, "src": "1401:18:0", "stateVariable": false, "storageLocation": "default", @@ -12530,7 +13593,7 @@ "id": 10, "name": "amount", "nodeType": "VariableDeclaration", - "scope": 27, + "scope": 29, "src": "1484:11:0", "stateVariable": false, "storageLocation": "default", @@ -12556,7 +13619,7 @@ "id": 14, "name": "recipients", "nodeType": "VariableDeclaration", - "scope": 27, + "scope": 29, "src": "1577:32:0", "stateVariable": false, "storageLocation": "default", @@ -12603,7 +13666,7 @@ "id": 16, "name": "recipientsCount", "nodeType": "VariableDeclaration", - "scope": 27, + "scope": 29, "src": "1658:20:0", "stateVariable": false, "storageLocation": "default", @@ -12629,7 +13692,7 @@ "id": 20, "name": "disapprovers", "nodeType": "VariableDeclaration", - "scope": 27, + "scope": 29, "src": "1884:35:0", "stateVariable": false, "storageLocation": "default", @@ -12674,7 +13737,7 @@ "id": 22, "name": "disapproversCount", "nodeType": "VariableDeclaration", - "scope": 27, + "scope": 29, "src": "1970:22:0", "stateVariable": false, "storageLocation": "default", @@ -12700,7 +13763,7 @@ "id": 24, "name": "createdAt", "nodeType": "VariableDeclaration", - "scope": 27, + "scope": 29, "src": "2081:14:0", "stateVariable": false, "storageLocation": "default", @@ -12726,7 +13789,7 @@ "id": 26, "name": "isCompleted", "nodeType": "VariableDeclaration", - "scope": 27, + "scope": 29, "src": "2165:16:0", "stateVariable": false, "storageLocation": "default", @@ -12746,21 +13809,47 @@ }, "value": null, "visibility": "internal" + }, + { + "constant": false, + "id": 28, + "name": "isClosed", + "nodeType": "VariableDeclaration", + "scope": 29, + "src": "2202:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 27, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2202:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" } ], "name": "FundRequest", "nodeType": "StructDefinition", - "scope": 895, - "src": "1318:871:0", + "scope": 967, + "src": "1318:905:0", "visibility": "public" }, { "constant": false, - "id": 29, + "id": 31, "name": "manager", "nodeType": "VariableDeclaration", - "scope": 895, - "src": "2379:22:0", + "scope": 967, + "src": "2413:22:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -12768,10 +13857,10 @@ "typeString": "address" }, "typeName": { - "id": 28, + "id": 30, "name": "address", "nodeType": "ElementaryTypeName", - "src": "2379:7:0", + "src": "2413:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -12783,11 +13872,11 @@ }, { "constant": false, - "id": 31, + "id": 33, "name": "title", "nodeType": "VariableDeclaration", - "scope": 895, - "src": "2436:19:0", + "scope": 967, + "src": "2470:19:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -12795,10 +13884,10 @@ "typeString": "string" }, "typeName": { - "id": 30, + "id": 32, "name": "string", "nodeType": "ElementaryTypeName", - "src": "2436:6:0", + "src": "2470:6:0", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" @@ -12809,11 +13898,11 @@ }, { "constant": false, - "id": 33, + "id": 35, "name": "description", "nodeType": "VariableDeclaration", - "scope": 895, - "src": "2509:25:0", + "scope": 967, + "src": "2543:25:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -12821,10 +13910,10 @@ "typeString": "string" }, "typeName": { - "id": 32, + "id": 34, "name": "string", "nodeType": "ElementaryTypeName", - "src": "2509:6:0", + "src": "2543:6:0", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" @@ -12835,11 +13924,11 @@ }, { "constant": false, - "id": 35, + "id": 37, "name": "amountInitialGoal", "nodeType": "VariableDeclaration", - "scope": 895, - "src": "2633:29:0", + "scope": 967, + "src": "2667:29:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -12847,10 +13936,10 @@ "typeString": "uint256" }, "typeName": { - "id": 34, + "id": 36, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "2633:4:0", + "src": "2667:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -12861,11 +13950,11 @@ }, { "constant": false, - "id": 37, + "id": 39, "name": "amountCollected", "nodeType": "VariableDeclaration", - "scope": 895, - "src": "2723:27:0", + "scope": 967, + "src": "2757:27:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -12873,10 +13962,10 @@ "typeString": "uint256" }, "typeName": { - "id": 36, + "id": 38, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "2723:4:0", + "src": "2757:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -12887,11 +13976,11 @@ }, { "constant": false, - "id": 39, + "id": 41, "name": "amountDelegated", "nodeType": "VariableDeclaration", - "scope": 895, - "src": "2808:27:0", + "scope": 967, + "src": "2842:27:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -12899,10 +13988,10 @@ "typeString": "uint256" }, "typeName": { - "id": 38, + "id": 40, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "2808:4:0", + "src": "2842:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -12913,11 +14002,11 @@ }, { "constant": false, - "id": 41, + "id": 43, "name": "amountSpended", "nodeType": "VariableDeclaration", - "scope": 895, - "src": "2897:25:0", + "scope": 967, + "src": "2931:25:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -12925,10 +14014,10 @@ "typeString": "uint256" }, "typeName": { - "id": 40, + "id": 42, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "2897:4:0", + "src": "2931:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -12939,11 +14028,11 @@ }, { "constant": false, - "id": 44, + "id": 46, "name": "donorsList", "nodeType": "VariableDeclaration", - "scope": 895, - "src": "3217:26:0", + "scope": 967, + "src": "3251:26:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -12953,20 +14042,20 @@ "typeName": { "baseType": { "contractScope": null, - "id": 42, + "id": 44, "name": "Person", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 6, - "src": "3217:6:0", + "src": "3251:6:0", "typeDescriptions": { "typeIdentifier": "t_struct$_Person_$6_storage_ptr", "typeString": "struct Campaign.Person" } }, - "id": 43, + "id": 45, "length": null, "nodeType": "ArrayTypeName", - "src": "3217:8:0", + "src": "3251:8:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_Person_$6_storage_$dyn_storage_ptr", "typeString": "struct Campaign.Person[]" @@ -12977,11 +14066,11 @@ }, { "constant": false, - "id": 46, + "id": 48, "name": "dononrsCount", "nodeType": "VariableDeclaration", - "scope": 895, - "src": "3432:24:0", + "scope": 967, + "src": "3466:24:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -12989,10 +14078,10 @@ "typeString": "uint256" }, "typeName": { - "id": 45, + "id": 47, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "3432:4:0", + "src": "3466:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -13003,11 +14092,11 @@ }, { "constant": false, - "id": 50, + "id": 52, "name": "donors", "nodeType": "VariableDeclaration", - "scope": 895, - "src": "3574:36:0", + "scope": 967, + "src": "3608:36:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -13015,28 +14104,28 @@ "typeString": "mapping(address => uint256)" }, "typeName": { - "id": 49, + "id": 51, "keyType": { - "id": 47, + "id": 49, "name": "address", "nodeType": "ElementaryTypeName", - "src": "3582:7:0", + "src": "3616:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", - "src": "3574:22:0", + "src": "3608:22:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "valueType": { - "id": 48, + "id": 50, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "3591:4:0", + "src": "3625:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -13048,36 +14137,36 @@ }, { "constant": false, - "id": 53, + "id": 55, "name": "fundRequests", "nodeType": "VariableDeclaration", - "scope": 895, - "src": "3767:26:0", + "scope": 967, + "src": "3801:26:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_FundRequest_$27_storage_$dyn_storage", + "typeIdentifier": "t_array$_t_struct$_FundRequest_$29_storage_$dyn_storage", "typeString": "struct Campaign.FundRequest[]" }, "typeName": { "baseType": { "contractScope": null, - "id": 51, + "id": 53, "name": "FundRequest", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 27, - "src": "3767:11:0", + "referencedDeclaration": 29, + "src": "3801:11:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", "typeString": "struct Campaign.FundRequest" } }, - "id": 52, + "id": 54, "length": null, "nodeType": "ArrayTypeName", - "src": "3767:13:0", + "src": "3801:13:0", "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_FundRequest_$27_storage_$dyn_storage_ptr", + "typeIdentifier": "t_array$_t_struct$_FundRequest_$29_storage_$dyn_storage_ptr", "typeString": "struct Campaign.FundRequest[]" } }, @@ -13086,11 +14175,11 @@ }, { "constant": false, - "id": 55, + "id": 57, "name": "fundRequestProcessTime", "nodeType": "VariableDeclaration", - "scope": 895, - "src": "3884:34:0", + "scope": 967, + "src": "3918:34:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -13098,10 +14187,10 @@ "typeString": "uint256" }, "typeName": { - "id": 54, + "id": 56, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "3884:4:0", + "src": "3918:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -13112,11 +14201,11 @@ }, { "constant": false, - "id": 57, + "id": 59, "name": "createdAt", "nodeType": "VariableDeclaration", - "scope": 895, - "src": "3987:21:0", + "scope": 967, + "src": "4021:21:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -13124,10 +14213,10 @@ "typeString": "uint256" }, "typeName": { - "id": 56, + "id": 58, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "3987:4:0", + "src": "4021:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -13138,11 +14227,11 @@ }, { "constant": false, - "id": 59, + "id": 61, "name": "closedAt", "nodeType": "VariableDeclaration", - "scope": 895, - "src": "4138:20:0", + "scope": 967, + "src": "4172:20:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -13150,10 +14239,10 @@ "typeString": "uint256" }, "typeName": { - "id": 58, + "id": 60, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "4138:4:0", + "src": "4172:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -13164,11 +14253,11 @@ }, { "constant": false, - "id": 61, + "id": 63, "name": "isActive", "nodeType": "VariableDeclaration", - "scope": 895, - "src": "4207:20:0", + "scope": 967, + "src": "4241:20:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -13176,10 +14265,10 @@ "typeString": "bool" }, "typeName": { - "id": 60, + "id": 62, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "4207:4:0", + "src": "4241:4:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -13190,9 +14279,9 @@ }, { "body": { - "id": 72, + "id": 74, "nodeType": "Block", - "src": "4357:76:0", + "src": "4391:76:0", "statements": [ { "expression": { @@ -13204,19 +14293,19 @@ "typeIdentifier": "t_address", "typeString": "address" }, - "id": 67, + "id": 69, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 64, + "id": 66, "name": "manager", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 29, - "src": "4367:7:0", + "referencedDeclaration": 31, + "src": "4401:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -13228,18 +14317,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 65, + "id": 67, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1021, - "src": "4378:3:0", + "referencedDeclaration": 1093, + "src": "4412:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 66, + "id": 68, "isConstant": false, "isLValue": false, "isPure": false, @@ -13247,13 +14336,13 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "4378:10:0", + "src": "4412:10:0", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, - "src": "4367:21:0", + "src": "4401:21:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -13262,14 +14351,14 @@ { "argumentTypes": null, "hexValue": "4f6e6c79204d616e616765722063616e2063616c6c20746869732066756e6374696f6e", - "id": 68, + "id": 70, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "4389:37:0", + "src": "4423:37:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_88c6482beb7f03a9c1146d68034c8b90c5acbbb1945a67a855479b36a2ca1800", @@ -13289,21 +14378,21 @@ "typeString": "literal_string \"Only Manager can call this function\"" } ], - "id": 63, + "id": 65, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1024, - 1025 + 1096, + 1097 ], - "referencedDeclaration": 1025, - "src": "4359:7:0", + "referencedDeclaration": 1097, + "src": "4393:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 69, + "id": 71, "isConstant": false, "isLValue": false, "isPure": false, @@ -13311,41 +14400,41 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "4359:68:0", + "src": "4393:68:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 70, + "id": 72, "nodeType": "ExpressionStatement", - "src": "4359:68:0" + "src": "4393:68:0" }, { - "id": 71, + "id": 73, "nodeType": "PlaceholderStatement", - "src": "4429:1:0" + "src": "4463:1:0" } ] }, "documentation": null, - "id": 73, + "id": 75, "name": "onlyManager", "nodeType": "ModifierDefinition", "parameters": { - "id": 62, + "id": 64, "nodeType": "ParameterList", "parameters": [], - "src": "4355:2:0" + "src": "4389:2:0" }, - "src": "4335:98:0", + "src": "4369:98:0", "visibility": "internal" }, { "body": { - "id": 86, + "id": 88, "nodeType": "Block", - "src": "4459:78:0", + "src": "4493:78:0", "statements": [ { "expression": { @@ -13357,7 +14446,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 81, + "id": 83, "isConstant": false, "isLValue": false, "isPure": false, @@ -13366,34 +14455,34 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 76, + "id": 78, "name": "donors", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50, - "src": "4470:6:0", + "referencedDeclaration": 52, + "src": "4504:6:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, - "id": 79, + "id": 81, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 77, + "id": 79, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1021, - "src": "4477:3:0", + "referencedDeclaration": 1093, + "src": "4511:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 78, + "id": 80, "isConstant": false, "isLValue": false, "isPure": false, @@ -13401,7 +14490,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "4477:10:0", + "src": "4511:10:0", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -13412,7 +14501,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "4470:18:0", + "src": "4504:18:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -13423,14 +14512,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 80, + "id": 82, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "4491:1:0", + "src": "4525:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -13438,7 +14527,7 @@ }, "value": "0" }, - "src": "4470:22:0", + "src": "4504:22:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -13447,14 +14536,14 @@ { "argumentTypes": null, "hexValue": "4f6e6c7920446f6e6f722063616e2063616c6c20746869732066756e6374696f6e73", - "id": 82, + "id": 84, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "4494:36:0", + "src": "4528:36:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_8b0204c96bc5d5b261b0dff81ab6ec6f0d1589b471763e56fc84ef26e9050b83", @@ -13474,21 +14563,21 @@ "typeString": "literal_string \"Only Donor can call this functions\"" } ], - "id": 75, + "id": 77, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1024, - 1025 + 1096, + 1097 ], - "referencedDeclaration": 1025, - "src": "4461:7:0", + "referencedDeclaration": 1097, + "src": "4495:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 83, + "id": 85, "isConstant": false, "isLValue": false, "isPure": false, @@ -13496,41 +14585,41 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "4461:70:0", + "src": "4495:70:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 84, + "id": 86, "nodeType": "ExpressionStatement", - "src": "4461:70:0" + "src": "4495:70:0" }, { - "id": 85, + "id": 87, "nodeType": "PlaceholderStatement", - "src": "4533:1:0" + "src": "4567:1:0" } ] }, "documentation": null, - "id": 87, + "id": 89, "name": "onlyDonor", "nodeType": "ModifierDefinition", "parameters": { - "id": 74, + "id": 76, "nodeType": "ParameterList", "parameters": [], - "src": "4457:2:0" + "src": "4491:2:0" }, - "src": "4439:98:0", + "src": "4473:98:0", "visibility": "internal" }, { "body": { - "id": 97, + "id": 99, "nodeType": "Block", - "src": "4562:57:0", + "src": "4596:57:0", "statements": [ { "expression": { @@ -13542,19 +14631,19 @@ "typeIdentifier": "t_bool", "typeString": "bool" }, - "id": 92, + "id": 94, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 90, + "id": 92, "name": "isActive", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 61, - "src": "4573:8:0", + "referencedDeclaration": 63, + "src": "4607:8:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -13565,14 +14654,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "74727565", - "id": 91, + "id": 93, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "4585:4:0", + "src": "4619:4:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -13580,7 +14669,7 @@ }, "value": "true" }, - "src": "4573:16:0", + "src": "4607:16:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -13589,14 +14678,14 @@ { "argumentTypes": null, "hexValue": "436f6e747261637420697320636c6f736564", - "id": 93, + "id": 95, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "4592:20:0", + "src": "4626:20:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_e4b6dedfaff38b4296bb0284d8a728341843b30c49982f1f3b0987de8c0e8193", @@ -13616,21 +14705,21 @@ "typeString": "literal_string \"Contract is closed\"" } ], - "id": 89, + "id": 91, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1024, - 1025 + 1096, + 1097 ], - "referencedDeclaration": 1025, - "src": "4564:7:0", + "referencedDeclaration": 1097, + "src": "4598:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 94, + "id": 96, "isConstant": false, "isLValue": false, "isPure": false, @@ -13638,41 +14727,41 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "4564:49:0", + "src": "4598:49:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 95, + "id": 97, "nodeType": "ExpressionStatement", - "src": "4564:49:0" + "src": "4598:49:0" }, { - "id": 96, + "id": 98, "nodeType": "PlaceholderStatement", - "src": "4615:1:0" + "src": "4649:1:0" } ] }, "documentation": null, - "id": 98, + "id": 100, "name": "ifActive", "nodeType": "ModifierDefinition", "parameters": { - "id": 88, + "id": 90, "nodeType": "ParameterList", "parameters": [], - "src": "4560:2:0" + "src": "4594:2:0" }, - "src": "4543:76:0", + "src": "4577:76:0", "visibility": "internal" }, { "body": { - "id": 112, + "id": 114, "nodeType": "Block", - "src": "4650:115:0", + "src": "4684:115:0", "statements": [ { "expression": { @@ -13684,7 +14773,7 @@ "typeIdentifier": "t_bool", "typeString": "bool" }, - "id": 107, + "id": 109, "isConstant": false, "isLValue": false, "isPure": false, @@ -13695,40 +14784,40 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 103, + "id": 105, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 101, + "id": 103, "name": "closedAt", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 59, - "src": "4661:8:0", + "referencedDeclaration": 61, + "src": "4695:8:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", - "operator": ">", + "operator": "<", "rightExpression": { "argumentTypes": null, - "id": 102, + "id": 104, "name": "now", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1023, - "src": "4672:3:0", + "referencedDeclaration": 1095, + "src": "4706:3:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "4661:14:0", + "src": "4695:14:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -13742,19 +14831,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 106, + "id": 108, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 104, + "id": 106, "name": "amountCollected", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 37, - "src": "4679:15:0", + "referencedDeclaration": 39, + "src": "4713:15:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -13764,24 +14853,24 @@ "operator": ">=", "rightExpression": { "argumentTypes": null, - "id": 105, + "id": 107, "name": "amountInitialGoal", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 35, - "src": "4699:17:0", + "referencedDeclaration": 37, + "src": "4733:17:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "4679:37:0", + "src": "4713:37:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "src": "4661:55:0", + "src": "4695:55:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -13790,14 +14879,14 @@ { "argumentTypes": null, "hexValue": "43616d706169676e206861736e277420726561636865642069747320676f616c207965742e", - "id": 108, + "id": 110, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "4719:39:0", + "src": "4753:39:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_08cdbc3087c6a9ea8dff10a915c17dc40830697abe7ba7888bd88be3759b0752", @@ -13817,21 +14906,21 @@ "typeString": "literal_string \"Campaign hasn't reached its goal yet.\"" } ], - "id": 100, + "id": 102, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1024, - 1025 + 1096, + 1097 ], - "referencedDeclaration": 1025, - "src": "4652:7:0", + "referencedDeclaration": 1097, + "src": "4686:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 109, + "id": 111, "isConstant": false, "isLValue": false, "isPure": false, @@ -13839,41 +14928,41 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "4652:107:0", + "src": "4686:107:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 110, + "id": 112, "nodeType": "ExpressionStatement", - "src": "4652:107:0" + "src": "4686:107:0" }, { - "id": 111, + "id": 113, "nodeType": "PlaceholderStatement", - "src": "4761:1:0" + "src": "4795:1:0" } ] }, "documentation": null, - "id": 113, + "id": 115, "name": "hasReachedGoal", "nodeType": "ModifierDefinition", "parameters": { - "id": 99, + "id": 101, "nodeType": "ParameterList", "parameters": [], - "src": "4648:2:0" + "src": "4682:2:0" }, - "src": "4625:140:0", + "src": "4659:140:0", "visibility": "internal" }, { "body": { - "id": 191, + "id": 193, "nodeType": "Block", - "src": "5013:606:0", + "src": "5047:606:0", "statements": [ { "expression": { @@ -13885,19 +14974,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 131, + "id": 133, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 129, + "id": 131, "name": "_closedAt", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 125, - "src": "5032:9:0", + "referencedDeclaration": 127, + "src": "5066:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -13907,18 +14996,18 @@ "operator": ">", "rightExpression": { "argumentTypes": null, - "id": 130, + "id": 132, "name": "_createdAt", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 123, - "src": "5044:10:0", + "referencedDeclaration": 125, + "src": "5078:10:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "5032:22:0", + "src": "5066:22:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -13927,14 +15016,14 @@ { "argumentTypes": null, "hexValue": "43616d706169676e2073746172742074696d65206d757374206265206c657373207468616e20656e642074696d652e", - "id": 132, + "id": 134, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "5056:49:0", + "src": "5090:49:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_fa88cefc99b81f3bd34ab06dfbebe371b19ab6192a49a78724e45bb05356996b", @@ -13954,21 +15043,21 @@ "typeString": "literal_string \"Campaign start time must be less than end time.\"" } ], - "id": 128, + "id": 130, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1024, - 1025 + 1096, + 1097 ], - "referencedDeclaration": 1025, - "src": "5024:7:0", + "referencedDeclaration": 1097, + "src": "5058:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 133, + "id": 135, "isConstant": false, "isLValue": false, "isPure": false, @@ -13976,15 +15065,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "5024:82:0", + "src": "5058:82:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 134, + "id": 136, "nodeType": "ExpressionStatement", - "src": "5024:82:0" + "src": "5058:82:0" }, { "expression": { @@ -13996,19 +15085,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 140, + "id": 142, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 136, + "id": 138, "name": "_initialAmountGoal", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 121, - "src": "5125:18:0", + "referencedDeclaration": 123, + "src": "5159:18:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -14022,14 +15111,14 @@ { "argumentTypes": null, "hexValue": "30", - "id": 138, + "id": 140, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "5151:1:0", + "src": "5185:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -14045,20 +15134,20 @@ "typeString": "int_const 0" } ], - "id": 137, + "id": 139, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "5146:4:0", + "src": "5180:4:0", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": "uint" }, - "id": 139, + "id": 141, "isConstant": false, "isLValue": false, "isPure": true, @@ -14066,13 +15155,13 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "5146:7:0", + "src": "5180:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "5125:28:0", + "src": "5159:28:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -14081,14 +15170,14 @@ { "argumentTypes": null, "hexValue": "496e697469616c20616d6f756e7420676f616c20206d7573742062652067726561746572207468616e207a65726f", - "id": 141, + "id": 143, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "5156:48:0", + "src": "5190:48:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_0e04f6b4e32c0dc972145ac7874c694042b28da8abbc18198ea89e6e4d4954be", @@ -14108,21 +15197,21 @@ "typeString": "literal_string \"Initial amount goal must be greater than zero\"" } ], - "id": 135, + "id": 137, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1024, - 1025 + 1096, + 1097 ], - "referencedDeclaration": 1025, - "src": "5117:7:0", + "referencedDeclaration": 1097, + "src": "5151:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 142, + "id": 144, "isConstant": false, "isLValue": false, "isPure": false, @@ -14130,32 +15219,32 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "5117:88:0", + "src": "5151:88:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 143, + "id": 145, "nodeType": "ExpressionStatement", - "src": "5117:88:0" + "src": "5151:88:0" }, { "expression": { "argumentTypes": null, - "id": 146, + "id": 148, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 144, + "id": 146, "name": "manager", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 29, - "src": "5226:7:0", + "referencedDeclaration": 31, + "src": "5260:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -14165,43 +15254,43 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 145, + "id": 147, "name": "_manager", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 115, - "src": "5236:8:0", + "referencedDeclaration": 117, + "src": "5270:8:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "5226:18:0", + "src": "5260:18:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 147, + "id": 149, "nodeType": "ExpressionStatement", - "src": "5226:18:0" + "src": "5260:18:0" }, { "expression": { "argumentTypes": null, - "id": 150, + "id": 152, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 148, + "id": 150, "name": "title", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 31, - "src": "5255:5:0", + "referencedDeclaration": 33, + "src": "5289:5:0", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" @@ -14211,43 +15300,43 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 149, + "id": 151, "name": "_title", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 117, - "src": "5263:6:0", + "referencedDeclaration": 119, + "src": "5297:6:0", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, - "src": "5255:14:0", + "src": "5289:14:0", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" } }, - "id": 151, + "id": 153, "nodeType": "ExpressionStatement", - "src": "5255:14:0" + "src": "5289:14:0" }, { "expression": { "argumentTypes": null, - "id": 154, + "id": 156, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 152, + "id": 154, "name": "description", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 33, - "src": "5280:11:0", + "referencedDeclaration": 35, + "src": "5314:11:0", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" @@ -14257,43 +15346,43 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 153, + "id": 155, "name": "_description", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 119, - "src": "5294:12:0", + "referencedDeclaration": 121, + "src": "5328:12:0", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, - "src": "5280:26:0", + "src": "5314:26:0", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" } }, - "id": 155, + "id": 157, "nodeType": "ExpressionStatement", - "src": "5280:26:0" + "src": "5314:26:0" }, { "expression": { "argumentTypes": null, - "id": 158, + "id": 160, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 156, + "id": 158, "name": "amountInitialGoal", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 35, - "src": "5317:17:0", + "referencedDeclaration": 37, + "src": "5351:17:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -14303,43 +15392,43 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 157, + "id": 159, "name": "_initialAmountGoal", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 121, - "src": "5337:18:0", + "referencedDeclaration": 123, + "src": "5371:18:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "5317:38:0", + "src": "5351:38:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 159, + "id": 161, "nodeType": "ExpressionStatement", - "src": "5317:38:0" + "src": "5351:38:0" }, { "expression": { "argumentTypes": null, - "id": 162, + "id": 164, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 160, + "id": 162, "name": "createdAt", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 57, - "src": "5366:9:0", + "referencedDeclaration": 59, + "src": "5400:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -14349,43 +15438,43 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 161, + "id": 163, "name": "_createdAt", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 123, - "src": "5378:10:0", + "referencedDeclaration": 125, + "src": "5412:10:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "5366:22:0", + "src": "5400:22:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 163, + "id": 165, "nodeType": "ExpressionStatement", - "src": "5366:22:0" + "src": "5400:22:0" }, { "expression": { "argumentTypes": null, - "id": 166, + "id": 168, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 164, + "id": 166, "name": "closedAt", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 59, - "src": "5399:8:0", + "referencedDeclaration": 61, + "src": "5433:8:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -14395,43 +15484,43 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 165, + "id": 167, "name": "_closedAt", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 125, - "src": "5410:9:0", + "referencedDeclaration": 127, + "src": "5444:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "5399:20:0", + "src": "5433:20:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 167, + "id": 169, "nodeType": "ExpressionStatement", - "src": "5399:20:0" + "src": "5433:20:0" }, { "expression": { "argumentTypes": null, - "id": 170, + "id": 172, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 168, + "id": 170, "name": "fundRequestProcessTime", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 55, - "src": "5430:22:0", + "referencedDeclaration": 57, + "src": "5464:22:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -14442,14 +15531,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "323539323030", - "id": 169, + "id": 171, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "5455:6:0", + "src": "5489:6:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_259200_by_1", @@ -14457,32 +15546,32 @@ }, "value": "259200" }, - "src": "5430:31:0", + "src": "5464:31:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 171, + "id": 173, "nodeType": "ExpressionStatement", - "src": "5430:31:0" + "src": "5464:31:0" }, { "expression": { "argumentTypes": null, - "id": 174, + "id": 176, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 172, + "id": 174, "name": "isActive", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 61, - "src": "5493:8:0", + "referencedDeclaration": 63, + "src": "5527:8:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -14493,14 +15582,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "74727565", - "id": 173, + "id": 175, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "5504:4:0", + "src": "5538:4:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -14508,32 +15597,32 @@ }, "value": "true" }, - "src": "5493:15:0", + "src": "5527:15:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 175, + "id": 177, "nodeType": "ExpressionStatement", - "src": "5493:15:0" + "src": "5527:15:0" }, { "expression": { "argumentTypes": null, - "id": 178, + "id": 180, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 176, + "id": 178, "name": "dononrsCount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 46, - "src": "5519:12:0", + "referencedDeclaration": 48, + "src": "5553:12:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -14544,14 +15633,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "30", - "id": 177, + "id": 179, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "5534:1:0", + "src": "5568:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -14559,15 +15648,15 @@ }, "value": "0" }, - "src": "5519:16:0", + "src": "5553:16:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 179, + "id": 181, "nodeType": "ExpressionStatement", - "src": "5519:16:0" + "src": "5553:16:0" }, { "expression": { @@ -14582,14 +15671,14 @@ { "argumentTypes": null, "hexValue": "307830", - "id": 185, + "id": 187, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "5593:3:0", + "src": "5627:3:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -14605,20 +15694,20 @@ "typeString": "int_const 0" } ], - "id": 184, + "id": 186, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "5585:7:0", + "src": "5619:7:0", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": "address" }, - "id": 186, + "id": 188, "isConstant": false, "isLValue": false, "isPure": true, @@ -14626,7 +15715,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "5585:12:0", + "src": "5619:12:0", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -14635,14 +15724,14 @@ { "argumentTypes": null, "hexValue": "30", - "id": 187, + "id": 189, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "5607:1:0", + "src": "5641:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -14662,18 +15751,18 @@ "typeString": "int_const 0" } ], - "id": 183, + "id": 185, "name": "Person", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6, - "src": "5562:6:0", + "src": "5596:6:0", "typeDescriptions": { "typeIdentifier": "t_type$_t_struct$_Person_$6_storage_ptr_$", "typeString": "type(struct Campaign.Person storage pointer)" } }, - "id": 188, + "id": 190, "isConstant": false, "isLValue": false, "isPure": true, @@ -14684,7 +15773,7 @@ "amount" ], "nodeType": "FunctionCall", - "src": "5562:48:0", + "src": "5596:48:0", "typeDescriptions": { "typeIdentifier": "t_struct$_Person_$6_memory", "typeString": "struct Campaign.Person memory" @@ -14700,18 +15789,18 @@ ], "expression": { "argumentTypes": null, - "id": 180, + "id": 182, "name": "donorsList", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 44, - "src": "5546:10:0", + "referencedDeclaration": 46, + "src": "5580:10:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_Person_$6_storage_$dyn_storage", "typeString": "struct Campaign.Person storage ref[] storage ref" } }, - "id": 182, + "id": 184, "isConstant": false, "isLValue": false, "isPure": false, @@ -14719,13 +15808,13 @@ "memberName": "push", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "5546:15:0", + "src": "5580:15:0", "typeDescriptions": { "typeIdentifier": "t_function_arraypush_nonpayable$_t_struct$_Person_$6_storage_$returns$_t_uint256_$", "typeString": "function (struct Campaign.Person storage ref) returns (uint256)" } }, - "id": 189, + "id": 191, "isConstant": false, "isLValue": false, "isPure": false, @@ -14733,36 +15822,36 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "5546:65:0", + "src": "5580:65:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 190, + "id": 192, "nodeType": "ExpressionStatement", - "src": "5546:65:0" + "src": "5580:65:0" } ] }, "documentation": null, - "id": 192, + "id": 194, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { - "id": 126, + "id": 128, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 115, + "id": 117, "name": "_manager", "nodeType": "VariableDeclaration", - "scope": 192, - "src": "4881:16:0", + "scope": 194, + "src": "4915:16:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -14770,10 +15859,10 @@ "typeString": "address" }, "typeName": { - "id": 114, + "id": 116, "name": "address", "nodeType": "ElementaryTypeName", - "src": "4881:7:0", + "src": "4915:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -14785,11 +15874,11 @@ }, { "constant": false, - "id": 117, + "id": 119, "name": "_title", "nodeType": "VariableDeclaration", - "scope": 192, - "src": "4899:20:0", + "scope": 194, + "src": "4933:20:0", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { @@ -14797,10 +15886,10 @@ "typeString": "string" }, "typeName": { - "id": 116, + "id": 118, "name": "string", "nodeType": "ElementaryTypeName", - "src": "4899:6:0", + "src": "4933:6:0", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" @@ -14811,11 +15900,11 @@ }, { "constant": false, - "id": 119, + "id": 121, "name": "_description", "nodeType": "VariableDeclaration", - "scope": 192, - "src": "4921:26:0", + "scope": 194, + "src": "4955:26:0", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { @@ -14823,10 +15912,10 @@ "typeString": "string" }, "typeName": { - "id": 118, + "id": 120, "name": "string", "nodeType": "ElementaryTypeName", - "src": "4921:6:0", + "src": "4955:6:0", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" @@ -14837,11 +15926,11 @@ }, { "constant": false, - "id": 121, + "id": 123, "name": "_initialAmountGoal", "nodeType": "VariableDeclaration", - "scope": 192, - "src": "4949:23:0", + "scope": 194, + "src": "4983:23:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -14849,10 +15938,10 @@ "typeString": "uint256" }, "typeName": { - "id": 120, + "id": 122, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "4949:4:0", + "src": "4983:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -14863,11 +15952,11 @@ }, { "constant": false, - "id": 123, + "id": 125, "name": "_createdAt", "nodeType": "VariableDeclaration", - "scope": 192, - "src": "4974:15:0", + "scope": 194, + "src": "5008:15:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -14875,10 +15964,10 @@ "typeString": "uint256" }, "typeName": { - "id": 122, + "id": 124, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "4974:4:0", + "src": "5008:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -14889,11 +15978,11 @@ }, { "constant": false, - "id": 125, + "id": 127, "name": "_closedAt", "nodeType": "VariableDeclaration", - "scope": 192, - "src": "4991:14:0", + "scope": 194, + "src": "5025:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -14901,10 +15990,10 @@ "typeString": "uint256" }, "typeName": { - "id": 124, + "id": 126, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "4991:4:0", + "src": "5025:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -14914,25 +16003,25 @@ "visibility": "internal" } ], - "src": "4880:126:0" + "src": "4914:126:0" }, "returnParameters": { - "id": 127, + "id": 129, "nodeType": "ParameterList", "parameters": [], - "src": "5013:0:0" + "src": "5047:0:0" }, - "scope": 895, - "src": "4869:750:0", + "scope": 967, + "src": "4903:750:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { - "id": 267, + "id": 272, "nodeType": "Block", - "src": "5853:881:0", + "src": "5887:915:0", "statements": [ { "expression": { @@ -14944,7 +16033,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 203, + "id": 205, "isConstant": false, "isLValue": false, "isPure": false, @@ -14953,18 +16042,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 198, + "id": 200, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1021, - "src": "5872:3:0", + "referencedDeclaration": 1093, + "src": "5906:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 199, + "id": 201, "isConstant": false, "isLValue": false, "isPure": false, @@ -14972,7 +16061,7 @@ "memberName": "value", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "5872:9:0", + "src": "5906:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -14986,14 +16075,14 @@ { "argumentTypes": null, "hexValue": "30", - "id": 201, + "id": 203, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "5890:1:0", + "src": "5924:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -15009,20 +16098,20 @@ "typeString": "int_const 0" } ], - "id": 200, + "id": 202, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "5885:4:0", + "src": "5919:4:0", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": "uint" }, - "id": 202, + "id": 204, "isConstant": false, "isLValue": false, "isPure": true, @@ -15030,13 +16119,13 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "5885:7:0", + "src": "5919:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "5872:20:0", + "src": "5906:20:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -15045,14 +16134,14 @@ { "argumentTypes": null, "hexValue": "416d6f756e74206d7573742062652067726561746572207468616e207a65726f", - "id": 204, + "id": 206, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "5893:34:0", + "src": "5927:34:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_335ff2e4b249975444723ab3dc1716db90a7dff95cbce35a34ad25055762f887", @@ -15072,21 +16161,21 @@ "typeString": "literal_string \"Amount must be greater than zero\"" } ], - "id": 197, + "id": 199, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1024, - 1025 + 1096, + 1097 ], - "referencedDeclaration": 1025, - "src": "5864:7:0", + "referencedDeclaration": 1097, + "src": "5898:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 205, + "id": 207, "isConstant": false, "isLValue": false, "isPure": false, @@ -15094,28 +16183,28 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "5864:64:0", + "src": "5898:64:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 206, + "id": 208, "nodeType": "ExpressionStatement", - "src": "5864:64:0" + "src": "5898:64:0" }, { "assignments": [ - 208 + 210 ], "declarations": [ { "constant": false, - "id": 208, + "id": 210, "name": "index", "nodeType": "VariableDeclaration", - "scope": 267, - "src": "5949:10:0", + "scope": 272, + "src": "5983:10:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -15123,10 +16212,10 @@ "typeString": "uint256" }, "typeName": { - "id": 207, + "id": 209, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "5949:4:0", + "src": "5983:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -15136,39 +16225,39 @@ "visibility": "internal" } ], - "id": 213, + "id": 215, "initialValue": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 209, + "id": 211, "name": "donors", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50, - "src": "5962:6:0", + "referencedDeclaration": 52, + "src": "5996:6:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, - "id": 212, + "id": 214, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 210, + "id": 212, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1021, - "src": "5969:3:0", + "referencedDeclaration": 1093, + "src": "6003:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 211, + "id": 213, "isConstant": false, "isLValue": false, "isPure": false, @@ -15176,7 +16265,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "5969:10:0", + "src": "6003:10:0", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -15187,14 +16276,14 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "5962:18:0", + "src": "5996:18:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", - "src": "5949:31:0" + "src": "5983:31:0" }, { "condition": { @@ -15203,19 +16292,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 216, + "id": 218, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 214, + "id": 216, "name": "index", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 208, - "src": "6065:5:0", + "referencedDeclaration": 210, + "src": "6099:5:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -15226,14 +16315,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 215, + "id": 217, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "6074:1:0", + "src": "6108:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -15241,29 +16330,29 @@ }, "value": "0" }, - "src": "6065:10:0", + "src": "6099:10:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": { - "id": 260, + "id": 265, "nodeType": "Block", - "src": "6488:147:0", + "src": "6556:147:0", "statements": [ { "assignments": [ - 244 + 249 ], "declarations": [ { "constant": false, - "id": 244, + "id": 249, "name": "prevAmount", "nodeType": "VariableDeclaration", - "scope": 260, - "src": "6517:15:0", + "scope": 265, + "src": "6585:15:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -15271,10 +16360,10 @@ "typeString": "uint256" }, "typeName": { - "id": 243, + "id": 248, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "6517:4:0", + "src": "6585:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -15284,33 +16373,33 @@ "visibility": "internal" } ], - "id": 249, + "id": 254, "initialValue": { "argumentTypes": null, "expression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 245, + "id": 250, "name": "donorsList", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 44, - "src": "6535:10:0", + "referencedDeclaration": 46, + "src": "6603:10:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_Person_$6_storage_$dyn_storage", "typeString": "struct Campaign.Person storage ref[] storage ref" } }, - "id": 247, + "id": 252, "indexExpression": { "argumentTypes": null, - "id": 246, + "id": 251, "name": "index", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 208, - "src": "6546:5:0", + "referencedDeclaration": 210, + "src": "6614:5:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -15321,13 +16410,13 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "6535:17:0", + "src": "6603:17:0", "typeDescriptions": { "typeIdentifier": "t_struct$_Person_$6_storage", "typeString": "struct Campaign.Person storage ref" } }, - "id": 248, + "id": 253, "isConstant": false, "isLValue": true, "isPure": false, @@ -15335,19 +16424,19 @@ "memberName": "amount", "nodeType": "MemberAccess", "referencedDeclaration": 5, - "src": "6535:24:0", + "src": "6603:24:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", - "src": "6517:42:0" + "src": "6585:42:0" }, { "expression": { "argumentTypes": null, - "id": 258, + "id": 263, "isConstant": false, "isLValue": false, "isPure": false, @@ -15358,26 +16447,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 250, + "id": 255, "name": "donorsList", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 44, - "src": "6574:10:0", + "referencedDeclaration": 46, + "src": "6642:10:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_Person_$6_storage_$dyn_storage", "typeString": "struct Campaign.Person storage ref[] storage ref" } }, - "id": 252, + "id": 257, "indexExpression": { "argumentTypes": null, - "id": 251, + "id": 256, "name": "index", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 208, - "src": "6585:5:0", + "referencedDeclaration": 210, + "src": "6653:5:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -15388,13 +16477,13 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "6574:17:0", + "src": "6642:17:0", "typeDescriptions": { "typeIdentifier": "t_struct$_Person_$6_storage", "typeString": "struct Campaign.Person storage ref" } }, - "id": 253, + "id": 258, "isConstant": false, "isLValue": true, "isPure": false, @@ -15402,7 +16491,7 @@ "memberName": "amount", "nodeType": "MemberAccess", "referencedDeclaration": 5, - "src": "6574:24:0", + "src": "6642:24:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -15416,19 +16505,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 257, + "id": 262, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 254, + "id": 259, "name": "prevAmount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 244, - "src": "6601:10:0", + "referencedDeclaration": 249, + "src": "6669:10:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -15440,18 +16529,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 255, + "id": 260, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1021, - "src": "6614:3:0", + "referencedDeclaration": 1093, + "src": "6682:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 256, + "id": 261, "isConstant": false, "isLValue": false, "isPure": false, @@ -15459,54 +16548,54 @@ "memberName": "value", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "6614:9:0", + "src": "6682:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "6601:22:0", + "src": "6669:22:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "6574:49:0", + "src": "6642:49:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 259, + "id": 264, "nodeType": "ExpressionStatement", - "src": "6574:49:0" + "src": "6642:49:0" } ] }, - "id": 261, + "id": 266, "nodeType": "IfStatement", - "src": "6062:573:0", + "src": "6096:607:0", "trueBody": { - "id": 242, + "id": 247, "nodeType": "Block", - "src": "6076:306:0", + "src": "6110:340:0", "statements": [ { "expression": { "argumentTypes": null, - "id": 219, + "id": 221, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 217, + "id": 219, "name": "index", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 208, - "src": "6091:5:0", + "referencedDeclaration": 210, + "src": "6125:5:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -15517,14 +16606,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "31", - "id": 218, + "id": 220, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "6099:1:0", + "src": "6133:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", @@ -15532,104 +16621,15 @@ }, "value": "1" }, - "src": "6091:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 220, - "nodeType": "ExpressionStatement", - "src": "6091:9:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 226, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 221, - "name": "donors", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 50, - "src": "6166:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 224, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 222, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1021, - "src": "6173:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 223, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6173:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "6166:18:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 225, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 208, - "src": "6187:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6166:26:0", + "src": "6125:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 227, + "id": 222, "nodeType": "ExpressionStatement", - "src": "6166:26:0" + "src": "6125:9:0" }, { "expression": { @@ -15642,18 +16642,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 232, + "id": 227, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1021, - "src": "6291:3:0", + "referencedDeclaration": 1093, + "src": "6247:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 233, + "id": 228, "isConstant": false, "isLValue": false, "isPure": false, @@ -15661,7 +16661,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "6291:10:0", + "src": "6247:10:0", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -15671,18 +16671,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 234, + "id": 229, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1021, - "src": "6311:3:0", + "referencedDeclaration": 1093, + "src": "6267:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 235, + "id": 230, "isConstant": false, "isLValue": false, "isPure": false, @@ -15690,7 +16690,7 @@ "memberName": "value", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "6311:9:0", + "src": "6267:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -15708,91 +16708,233 @@ "typeString": "uint256" } ], - "id": 231, + "id": 226, "name": "Person", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6, - "src": "6268:6:0", + "src": "6224:6:0", "typeDescriptions": { "typeIdentifier": "t_type$_t_struct$_Person_$6_storage_ptr_$", "typeString": "type(struct Campaign.Person storage pointer)" } }, + "id": 231, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "names": [ + "personAddress", + "amount" + ], + "nodeType": "FunctionCall", + "src": "6224:54:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Person_$6_memory", + "typeString": "struct Campaign.Person memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Person_$6_memory", + "typeString": "struct Campaign.Person memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 223, + "name": "donorsList", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46, + "src": "6190:10:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_Person_$6_storage_$dyn_storage", + "typeString": "struct Campaign.Person storage ref[] storage ref" + } + }, + "id": 225, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6190:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_struct$_Person_$6_storage_$returns$_t_uint256_$", + "typeString": "function (struct Campaign.Person storage ref) returns (uint256)" + } + }, + "id": 232, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6190:107:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 233, + "nodeType": "ExpressionStatement", + "src": "6190:107:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 242, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 234, + "name": "donors", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 52, + "src": "6367:6:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 237, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 235, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1093, + "src": "6374:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, "id": 236, "isConstant": false, "isLValue": false, "isPure": false, - "kind": "structConstructorCall", "lValueRequested": false, - "names": [ - "personAddress", - "amount" - ], - "nodeType": "FunctionCall", - "src": "6268:54:0", + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6374:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6367:18:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 241, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 238, + "name": "donorsList", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46, + "src": "6388:10:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_Person_$6_storage_$dyn_storage", + "typeString": "struct Campaign.Person storage ref[] storage ref" + } + }, + "id": 239, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6388:17:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_Person_$6_memory", - "typeString": "struct Campaign.Person memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_Person_$6_memory", - "typeString": "struct Campaign.Person memory" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } - ], - "expression": { + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { "argumentTypes": null, - "id": 228, - "name": "donorsList", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 44, - "src": "6234:10:0", + "hexValue": "31", + "id": 240, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6408:1:0", + "subdenomination": null, "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_Person_$6_storage_$dyn_storage", - "typeString": "struct Campaign.Person storage ref[] storage ref" - } + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" }, - "id": 230, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "push", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6234:15:0", + "src": "6388:21:0", "typeDescriptions": { - "typeIdentifier": "t_function_arraypush_nonpayable$_t_struct$_Person_$6_storage_$returns$_t_uint256_$", - "typeString": "function (struct Campaign.Person storage ref) returns (uint256)" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 237, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6234:107:0", + "src": "6367:42:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 238, + "id": 243, "nodeType": "ExpressionStatement", - "src": "6234:107:0" + "src": "6367:42:0" }, { "expression": { "argumentTypes": null, - "id": 240, + "id": 245, "isConstant": false, "isLValue": false, "isPure": false, @@ -15800,15 +16942,15 @@ "nodeType": "UnaryOperation", "operator": "++", "prefix": false, - "src": "6356:14:0", + "src": "6424:14:0", "subExpression": { "argumentTypes": null, - "id": 239, + "id": 244, "name": "dononrsCount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 46, - "src": "6356:12:0", + "referencedDeclaration": 48, + "src": "6424:12:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -15819,9 +16961,9 @@ "typeString": "uint256" } }, - "id": 241, + "id": 246, "nodeType": "ExpressionStatement", - "src": "6356:14:0" + "src": "6424:14:0" } ] } @@ -15829,19 +16971,19 @@ { "expression": { "argumentTypes": null, - "id": 265, + "id": 270, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 262, + "id": 267, "name": "amountCollected", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 37, - "src": "6698:15:0", + "referencedDeclaration": 39, + "src": "6766:15:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -15853,18 +16995,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 263, + "id": 268, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1021, - "src": "6717:3:0", + "referencedDeclaration": 1093, + "src": "6785:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 264, + "id": 269, "isConstant": false, "isLValue": false, "isPure": false, @@ -15872,74 +17014,74 @@ "memberName": "value", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "6717:9:0", + "src": "6785:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "6698:28:0", + "src": "6766:28:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 266, + "id": 271, "nodeType": "ExpressionStatement", - "src": "6698:28:0" + "src": "6766:28:0" } ] }, "documentation": null, - "id": 268, + "id": 273, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, - "id": 195, + "id": 197, "modifierName": { "argumentTypes": null, - "id": 194, + "id": 196, "name": "ifActive", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 98, - "src": "5829:8:0", + "referencedDeclaration": 100, + "src": "5863:8:0", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "5829:8:0" + "src": "5863:8:0" } ], "name": "donate", "nodeType": "FunctionDefinition", "parameters": { - "id": 193, + "id": 195, "nodeType": "ParameterList", "parameters": [], - "src": "5826:2:0" + "src": "5860:2:0" }, "returnParameters": { - "id": 196, + "id": 198, "nodeType": "ParameterList", "parameters": [], - "src": "5853:0:0" + "src": "5887:0:0" }, - "scope": 895, - "src": "5811:923:0", + "scope": 967, + "src": "5845:957:0", "stateMutability": "payable", "superFunction": null, "visibility": "public" }, { "body": { - "id": 339, + "id": 344, "nodeType": "Block", - "src": "7036:957:0", + "src": "7104:957:0", "statements": [ { "expression": { @@ -15951,7 +17093,7 @@ "typeIdentifier": "t_bool", "typeString": "bool" }, - "id": 282, + "id": 287, "isConstant": false, "isLValue": false, "isPure": false, @@ -15962,19 +17104,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 278, + "id": 283, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 276, + "id": 281, "name": "amountCollected", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 37, - "src": "7205:15:0", + "referencedDeclaration": 39, + "src": "7273:15:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -15984,18 +17126,18 @@ "operator": "<", "rightExpression": { "argumentTypes": null, - "id": 277, + "id": 282, "name": "amountInitialGoal", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 35, - "src": "7223:17:0", + "referencedDeclaration": 37, + "src": "7291:17:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "7205:35:0", + "src": "7273:35:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -16009,19 +17151,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 281, + "id": 286, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 279, + "id": 284, "name": "closedAt", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 59, - "src": "7244:8:0", + "referencedDeclaration": 61, + "src": "7312:8:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -16031,24 +17173,24 @@ "operator": ">", "rightExpression": { "argumentTypes": null, - "id": 280, + "id": 285, "name": "now", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1023, - "src": "7255:3:0", + "referencedDeclaration": 1095, + "src": "7323:3:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "7244:14:0", + "src": "7312:14:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "src": "7205:53:0", + "src": "7273:53:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -16057,14 +17199,14 @@ { "argumentTypes": null, "hexValue": "446f6e6174696f6e2063616e6e6f742062652077697468647261776e", - "id": 283, + "id": 288, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "7259:30:0", + "src": "7327:30:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_5d3eb699108bf57c7070dfbbbc36d80653380d1192a83188eb2d2f164512a465", @@ -16084,21 +17226,21 @@ "typeString": "literal_string \"Donation cannot be withdrawn\"" } ], - "id": 275, + "id": 280, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1024, - 1025 + 1096, + 1097 ], - "referencedDeclaration": 1025, - "src": "7197:7:0", + "referencedDeclaration": 1097, + "src": "7265:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 284, + "id": 289, "isConstant": false, "isLValue": false, "isPure": false, @@ -16106,28 +17248,28 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "7197:93:0", + "src": "7265:93:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 285, + "id": 290, "nodeType": "ExpressionStatement", - "src": "7197:93:0" + "src": "7265:93:0" }, { "assignments": [ - 287 + 292 ], "declarations": [ { "constant": false, - "id": 287, + "id": 292, "name": "index", "nodeType": "VariableDeclaration", - "scope": 339, - "src": "7311:10:0", + "scope": 344, + "src": "7379:10:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -16135,10 +17277,10 @@ "typeString": "uint256" }, "typeName": { - "id": 286, + "id": 291, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "7311:4:0", + "src": "7379:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -16148,39 +17290,39 @@ "visibility": "internal" } ], - "id": 292, + "id": 297, "initialValue": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 288, + "id": 293, "name": "donors", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50, - "src": "7324:6:0", + "referencedDeclaration": 52, + "src": "7392:6:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, - "id": 291, + "id": 296, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 289, + "id": 294, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1021, - "src": "7331:3:0", + "referencedDeclaration": 1093, + "src": "7399:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 290, + "id": 295, "isConstant": false, "isLValue": false, "isPure": false, @@ -16188,7 +17330,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "7331:10:0", + "src": "7399:10:0", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -16199,14 +17341,14 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "7324:18:0", + "src": "7392:18:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", - "src": "7311:31:0" + "src": "7379:31:0" }, { "expression": { @@ -16218,19 +17360,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 296, + "id": 301, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 294, + "id": 299, "name": "index", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 287, - "src": "7412:5:0", + "referencedDeclaration": 292, + "src": "7480:5:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -16241,14 +17383,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 295, + "id": 300, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "7420:1:0", + "src": "7488:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -16256,7 +17398,7 @@ }, "value": "0" }, - "src": "7412:9:0", + "src": "7480:9:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -16265,14 +17407,14 @@ { "argumentTypes": null, "hexValue": "596f75206861766520746f206265206120646f6e6f7220696e206f7264657220746f20776974686472617720796f757220646f6e6174696f6e", - "id": 297, + "id": 302, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "7423:59:0", + "src": "7491:59:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_8fdf0334534394e478d5f3b4fde19be8b74db8411e622dc13802f2ef2ed0c5f1", @@ -16292,21 +17434,21 @@ "typeString": "literal_string \"You have to be a donor in order to withdraw your donation\"" } ], - "id": 293, + "id": 298, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1024, - 1025 + 1096, + 1097 ], - "referencedDeclaration": 1025, - "src": "7404:7:0", + "referencedDeclaration": 1097, + "src": "7472:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 298, + "id": 303, "isConstant": false, "isLValue": false, "isPure": false, @@ -16314,28 +17456,28 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "7404:79:0", + "src": "7472:79:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 299, + "id": 304, "nodeType": "ExpressionStatement", - "src": "7404:79:0" + "src": "7472:79:0" }, { "assignments": [ - 301 + 306 ], "declarations": [ { "constant": false, - "id": 301, + "id": 306, "name": "amount", "nodeType": "VariableDeclaration", - "scope": 339, - "src": "7504:11:0", + "scope": 344, + "src": "7572:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -16343,10 +17485,10 @@ "typeString": "uint256" }, "typeName": { - "id": 300, + "id": 305, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "7504:4:0", + "src": "7572:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -16356,33 +17498,33 @@ "visibility": "internal" } ], - "id": 306, + "id": 311, "initialValue": { "argumentTypes": null, "expression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 302, + "id": 307, "name": "donorsList", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 44, - "src": "7518:10:0", + "referencedDeclaration": 46, + "src": "7586:10:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_Person_$6_storage_$dyn_storage", "typeString": "struct Campaign.Person storage ref[] storage ref" } }, - "id": 304, + "id": 309, "indexExpression": { "argumentTypes": null, - "id": 303, + "id": 308, "name": "index", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 287, - "src": "7529:5:0", + "referencedDeclaration": 292, + "src": "7597:5:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -16393,13 +17535,13 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "7518:17:0", + "src": "7586:17:0", "typeDescriptions": { "typeIdentifier": "t_struct$_Person_$6_storage", "typeString": "struct Campaign.Person storage ref" } }, - "id": 305, + "id": 310, "isConstant": false, "isLValue": true, "isPure": false, @@ -16407,14 +17549,14 @@ "memberName": "amount", "nodeType": "MemberAccess", "referencedDeclaration": 5, - "src": "7518:24:0", + "src": "7586:24:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", - "src": "7504:38:0" + "src": "7572:38:0" }, { "condition": { @@ -16423,19 +17565,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 309, + "id": 314, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 307, + "id": 312, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 301, - "src": "7556:6:0", + "referencedDeclaration": 306, + "src": "7624:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -16446,14 +17588,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 308, + "id": 313, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "7565:1:0", + "src": "7633:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -16461,25 +17603,25 @@ }, "value": "0" }, - "src": "7556:10:0", + "src": "7624:10:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, - "id": 338, + "id": 343, "nodeType": "IfStatement", - "src": "7553:433:0", + "src": "7621:433:0", "trueBody": { - "id": 337, + "id": 342, "nodeType": "Block", - "src": "7577:409:0", + "src": "7645:409:0", "statements": [ { "expression": { "argumentTypes": null, - "id": 315, + "id": 320, "isConstant": false, "isLValue": false, "isPure": false, @@ -16488,34 +17630,34 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 310, + "id": 315, "name": "donors", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 50, - "src": "7635:6:0", + "referencedDeclaration": 52, + "src": "7703:6:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, - "id": 313, + "id": 318, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 311, + "id": 316, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1021, - "src": "7642:3:0", + "referencedDeclaration": 1093, + "src": "7710:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 312, + "id": 317, "isConstant": false, "isLValue": false, "isPure": false, @@ -16523,7 +17665,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "7642:10:0", + "src": "7710:10:0", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -16534,7 +17676,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "7635:18:0", + "src": "7703:18:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -16545,14 +17687,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "30", - "id": 314, + "id": 319, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "7656:1:0", + "src": "7724:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -16560,20 +17702,20 @@ }, "value": "0" }, - "src": "7635:22:0", + "src": "7703:22:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 316, + "id": 321, "nodeType": "ExpressionStatement", - "src": "7635:22:0" + "src": "7703:22:0" }, { "expression": { "argumentTypes": null, - "id": 320, + "id": 325, "isConstant": false, "isLValue": false, "isPure": false, @@ -16581,31 +17723,31 @@ "nodeType": "UnaryOperation", "operator": "delete", "prefix": true, - "src": "7724:24:0", + "src": "7792:24:0", "subExpression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 317, + "id": 322, "name": "donorsList", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 44, - "src": "7731:10:0", + "referencedDeclaration": 46, + "src": "7799:10:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_Person_$6_storage_$dyn_storage", "typeString": "struct Campaign.Person storage ref[] storage ref" } }, - "id": 319, + "id": 324, "indexExpression": { "argumentTypes": null, - "id": 318, + "id": 323, "name": "index", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 287, - "src": "7742:5:0", + "referencedDeclaration": 292, + "src": "7810:5:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -16616,7 +17758,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "7731:17:0", + "src": "7799:17:0", "typeDescriptions": { "typeIdentifier": "t_struct$_Person_$6_storage", "typeString": "struct Campaign.Person storage ref" @@ -16627,26 +17769,26 @@ "typeString": "tuple()" } }, - "id": 321, + "id": 326, "nodeType": "ExpressionStatement", - "src": "7724:24:0" + "src": "7792:24:0" }, { "expression": { "argumentTypes": null, - "id": 324, + "id": 329, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 322, + "id": 327, "name": "amountCollected", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 37, - "src": "7820:15:0", + "referencedDeclaration": 39, + "src": "7888:15:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -16656,31 +17798,31 @@ "operator": "-=", "rightHandSide": { "argumentTypes": null, - "id": 323, + "id": 328, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 301, - "src": "7839:6:0", + "referencedDeclaration": 306, + "src": "7907:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "7820:25:0", + "src": "7888:25:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 325, + "id": 330, "nodeType": "ExpressionStatement", - "src": "7820:25:0" + "src": "7888:25:0" }, { "expression": { "argumentTypes": null, - "id": 327, + "id": 332, "isConstant": false, "isLValue": false, "isPure": false, @@ -16688,15 +17830,15 @@ "nodeType": "UnaryOperation", "operator": "--", "prefix": false, - "src": "7874:14:0", + "src": "7942:14:0", "subExpression": { "argumentTypes": null, - "id": 326, + "id": 331, "name": "dononrsCount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 46, - "src": "7874:12:0", + "referencedDeclaration": 48, + "src": "7942:12:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -16707,9 +17849,9 @@ "typeString": "uint256" } }, - "id": 328, + "id": 333, "nodeType": "ExpressionStatement", - "src": "7874:14:0" + "src": "7942:14:0" }, { "expression": { @@ -16717,12 +17859,12 @@ "arguments": [ { "argumentTypes": null, - "id": 334, + "id": 339, "name": "amount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 301, - "src": "7967:6:0", + "referencedDeclaration": 306, + "src": "8035:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -16740,18 +17882,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 329, + "id": 334, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1021, - "src": "7947:3:0", + "referencedDeclaration": 1093, + "src": "8015:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 332, + "id": 337, "isConstant": false, "isLValue": false, "isPure": false, @@ -16759,13 +17901,13 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "7947:10:0", + "src": "8015:10:0", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, - "id": 333, + "id": 338, "isConstant": false, "isLValue": false, "isPure": false, @@ -16773,13 +17915,13 @@ "memberName": "transfer", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "7947:19:0", + "src": "8015:19:0", "typeDescriptions": { "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256)" } }, - "id": 335, + "id": 340, "isConstant": false, "isLValue": false, "isPure": false, @@ -16787,15 +17929,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "7947:27:0", + "src": "8015:27:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 336, + "id": 341, "nodeType": "ExpressionStatement", - "src": "7947:27:0" + "src": "8015:27:0" } ] } @@ -16803,49 +17945,49 @@ ] }, "documentation": null, - "id": 340, + "id": 345, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, - "id": 271, + "id": 276, "modifierName": { "argumentTypes": null, - "id": 270, + "id": 275, "name": "ifActive", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 98, - "src": "7006:8:0", + "referencedDeclaration": 100, + "src": "7074:8:0", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "7006:8:0" + "src": "7074:8:0" } ], "name": "withdrawDonation", "nodeType": "FunctionDefinition", "parameters": { - "id": 269, + "id": 274, "nodeType": "ParameterList", "parameters": [], - "src": "7003:2:0" + "src": "7071:2:0" }, "returnParameters": { - "id": 274, + "id": 279, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 273, + "id": 278, "name": "", "nodeType": "VariableDeclaration", - "scope": 340, - "src": "7030:4:0", + "scope": 345, + "src": "7098:4:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -16853,10 +17995,10 @@ "typeString": "uint256" }, "typeName": { - "id": 272, + "id": 277, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "7030:4:0", + "src": "7098:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -16866,20 +18008,136 @@ "visibility": "internal" } ], - "src": "7029:6:0" + "src": "7097:6:0" }, - "scope": 895, - "src": "6978:1015:0", + "scope": 967, + "src": "7046:1015:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { - "id": 503, + "id": 498, "nodeType": "Block", - "src": "8186:1567:0", + "src": "8254:1471:0", "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 365, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "8273:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 366, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8283:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "8273:11:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "416d6f756e742063616e6e6f74206265207a65726f2e", + "id": 368, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8285:24:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c22020d8cf79dcf6b51ac2d091be02d255eadeca71c3704c7e5bb2f17b9822f2", + "typeString": "literal_string \"Amount cannot be zero.\"" + }, + "value": "Amount cannot be zero." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c22020d8cf79dcf6b51ac2d091be02d255eadeca71c3704c7e5bb2f17b9822f2", + "typeString": "literal_string \"Amount cannot be zero.\"" + } + ], + "id": 364, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1096, + 1097 + ], + "referencedDeclaration": 1097, + "src": "8265:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 369, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8265:45:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 370, + "nodeType": "ExpressionStatement", + "src": "8265:45:0" + }, { "expression": { "argumentTypes": null, @@ -16890,7 +18148,7 @@ "typeIdentifier": "t_bool", "typeString": "bool" }, - "id": 366, + "id": 380, "isConstant": false, "isLValue": false, "isPure": false, @@ -16901,19 +18159,35 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 362, + "id": 375, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 360, - "name": "closedAt", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 59, - "src": "8205:8:0", + "expression": { + "argumentTypes": null, + "id": 372, + "name": "_recipientsAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 352, + "src": "8329:18:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 373, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8329:25:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -16923,18 +18197,23 @@ "operator": ">", "rightExpression": { "argumentTypes": null, - "id": 361, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1023, - "src": "8216:3:0", + "hexValue": "30", + "id": 374, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8357:1:0", + "subdenomination": null, "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" }, - "src": "8205:14:0", + "src": "8329:29:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -16948,46 +18227,67 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 365, + "id": 379, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 363, - "name": "amountCollected", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 37, - "src": "8223:15:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 364, - "name": "amountInitialGoal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 35, - "src": "8243:17:0", + "expression": { + "argumentTypes": null, + "id": 376, + "name": "_recipientsAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 355, + "src": "8362:17:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 377, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8362:24:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "8223:37:0", + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 378, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8389:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "8362:28:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "src": "8205:55:0", + "src": "8329:61:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -16995,21 +18295,21 @@ }, { "argumentTypes": null, - "hexValue": "43616d706169676e20636f756c646e277420726561636865642069747320676f616c2e", - "id": 367, + "hexValue": "52657175657374206d75737420636f6e7461696e2061746c65617374206f6e6520726563697069656e74", + "id": 381, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "8261:37:0", + "src": "8392:44:0", "subdenomination": null, "typeDescriptions": { - "typeIdentifier": "t_stringliteral_0d128dbbd22c97efbc2cb1ca9bae57bcb1dc8a94e098b51f1cac2faa3e277eb7", - "typeString": "literal_string \"Campaign couldn't reached its goal.\"" + "typeIdentifier": "t_stringliteral_6652da290a9849434684292b41a637a3234ce798c50d5b882fe2cb9e6225cb69", + "typeString": "literal_string \"Request must contain atleast one recipient\"" }, - "value": "Campaign couldn't reached its goal." + "value": "Request must contain atleast one recipient" } ], "expression": { @@ -17019,25 +18319,25 @@ "typeString": "bool" }, { - "typeIdentifier": "t_stringliteral_0d128dbbd22c97efbc2cb1ca9bae57bcb1dc8a94e098b51f1cac2faa3e277eb7", - "typeString": "literal_string \"Campaign couldn't reached its goal.\"" + "typeIdentifier": "t_stringliteral_6652da290a9849434684292b41a637a3234ce798c50d5b882fe2cb9e6225cb69", + "typeString": "literal_string \"Request must contain atleast one recipient\"" } ], - "id": 359, + "id": 371, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1024, - 1025 + 1096, + 1097 ], - "referencedDeclaration": 1025, - "src": "8197:7:0", + "referencedDeclaration": 1097, + "src": "8321:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 368, + "id": 382, "isConstant": false, "isLValue": false, "isPure": false, @@ -17045,15 +18345,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "8197:102:0", + "src": "8321:116:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 369, + "id": 383, "nodeType": "ExpressionStatement", - "src": "8197:102:0" + "src": "8321:116:0" }, { "expression": { @@ -17065,45 +18365,72 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 373, + "id": 389, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 371, - "name": "_amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 344, - "src": "8318:7:0", + "expression": { + "argumentTypes": null, + "id": 385, + "name": "_recipientsAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 352, + "src": "8456:18:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 386, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8456:25:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", - "operator": ">", + "operator": "==", "rightExpression": { "argumentTypes": null, - "hexValue": "30", - "id": 372, + "expression": { + "argumentTypes": null, + "id": 387, + "name": "_recipientsAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 355, + "src": "8485:17:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 388, "isConstant": false, "isLValue": false, - "isPure": true, - "kind": "number", + "isPure": false, "lValueRequested": false, - "nodeType": "Literal", - "src": "8328:1:0", - "subdenomination": null, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8485:24:0", "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } }, - "src": "8318:11:0", + "src": "8456:53:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -17111,21 +18438,21 @@ }, { "argumentTypes": null, - "hexValue": "416d6f756e742063616e6e6f74206265207a65726f2e", - "id": 374, + "hexValue": "54686572652073686f756c6420626520657175616c206e6f2e206f6620726563697069656e74732061646472657373657320616e6420616d6f756e7473", + "id": 390, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "8330:24:0", + "src": "8510:63:0", "subdenomination": null, "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c22020d8cf79dcf6b51ac2d091be02d255eadeca71c3704c7e5bb2f17b9822f2", - "typeString": "literal_string \"Amount cannot be zero.\"" + "typeIdentifier": "t_stringliteral_28041745d75545b5f7193f07c84b1c846027ff880bfab81ec0c382d8848bfc40", + "typeString": "literal_string \"There should be equal no. of recipients addresses and amounts\"" }, - "value": "Amount cannot be zero." + "value": "There should be equal no. of recipients addresses and amounts" } ], "expression": { @@ -17135,25 +18462,25 @@ "typeString": "bool" }, { - "typeIdentifier": "t_stringliteral_c22020d8cf79dcf6b51ac2d091be02d255eadeca71c3704c7e5bb2f17b9822f2", - "typeString": "literal_string \"Amount cannot be zero.\"" + "typeIdentifier": "t_stringliteral_28041745d75545b5f7193f07c84b1c846027ff880bfab81ec0c382d8848bfc40", + "typeString": "literal_string \"There should be equal no. of recipients addresses and amounts\"" } ], - "id": 370, + "id": 384, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1024, - 1025 + 1096, + 1097 ], - "referencedDeclaration": 1025, - "src": "8310:7:0", + "referencedDeclaration": 1097, + "src": "8448:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 375, + "id": 391, "isConstant": false, "isLValue": false, "isPure": false, @@ -17161,15 +18488,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "8310:45:0", + "src": "8448:126:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 376, + "id": 392, "nodeType": "ExpressionStatement", - "src": "8310:45:0" + "src": "8448:126:0" }, { "expression": { @@ -17178,10 +18505,10 @@ { "argumentTypes": null, "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, - "id": 386, + "id": 400, "isConstant": false, "isLValue": false, "isPure": false, @@ -17192,201 +18519,430 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 381, + "id": 398, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "expression": { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 396, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { "argumentTypes": null, - "id": 378, - "name": "_recipientsAddress", + "id": 394, + "name": "amountCollected", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 347, - "src": "8374:18:0", + "referencedDeclaration": 39, + "src": "8593:15:0", "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 379, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8374:25:0", + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 395, + "name": "amountSpended", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 43, + "src": "8611:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8593:31:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", - "operator": ">", + "operator": "-", "rightExpression": { "argumentTypes": null, - "hexValue": "30", - "id": 380, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8402:1:0", - "subdenomination": null, + "id": 397, + "name": "amountDelegated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 41, + "src": "8627:15:0", "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } }, - "src": "8374:29:0", + "src": "8593:49:0", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, "nodeType": "BinaryOperation", - "operator": "&&", + "operator": ">=", "rightExpression": { "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 385, + "id": 399, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "8646:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8593:60:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "43616d706169676e20646f6e2774206861766520656e6f7567682066756e647320666f7220796f757220726571756573742e", + "id": 401, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8655:52:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_84922fc6fba604d7203feb7d61843901ce53c82e7f5c1dcaecfb2ac6ab835b7b", + "typeString": "literal_string \"Campaign don't have enough funds for your request.\"" + }, + "value": "Campaign don't have enough funds for your request." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_84922fc6fba604d7203feb7d61843901ce53c82e7f5c1dcaecfb2ac6ab835b7b", + "typeString": "literal_string \"Campaign don't have enough funds for your request.\"" + } + ], + "id": 393, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1096, + 1097 + ], + "referencedDeclaration": 1097, + "src": "8585:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 402, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8585:123:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 403, + "nodeType": "ExpressionStatement", + "src": "8585:123:0" + }, + { + "assignments": [ + 405 + ], + "declarations": [ + { + "constant": false, + "id": 405, + "name": "totalAmount", + "nodeType": "VariableDeclaration", + "scope": 498, + "src": "8729:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 404, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8729:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 407, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 406, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8748:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "8729:20:0" + }, + { + "body": { + "id": 424, + "nodeType": "Block", + "src": "8806:65:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 422, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "leftExpression": { + "leftHandSide": { "argumentTypes": null, - "expression": { + "id": 418, + "name": "totalAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 405, + "src": "8821:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "baseExpression": { "argumentTypes": null, - "id": 382, + "id": 419, "name": "_recipientsAmount", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 350, - "src": "8407:17:0", + "referencedDeclaration": 355, + "src": "8836:17:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", "typeString": "uint256[] memory" } }, - "id": 383, + "id": 421, + "indexExpression": { + "argumentTypes": null, + "id": 420, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 409, + "src": "8854:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, "isConstant": false, - "isLValue": false, + "isLValue": true, "isPure": false, "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8407:24:0", + "nodeType": "IndexAccess", + "src": "8836:20:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 384, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8434:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "8407:28:0", + "src": "8821:35:0", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "src": "8374:61:0", + "id": 423, + "nodeType": "ExpressionStatement", + "src": "8821:35:0" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 414, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 411, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 409, + "src": "8772:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 412, + "name": "_recipientsAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 355, + "src": "8776:17:0", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" } }, + "id": 413, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8776:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8772:28:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 425, + "initializationExpression": { + "assignments": [ + 409 + ], + "declarations": [ { - "argumentTypes": null, - "hexValue": "52657175657374206d75737420636f6e7461696e2061746c65617374206f6e6520726563697069656e74", - "id": 387, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8437:44:0", - "subdenomination": null, + "constant": false, + "id": 409, + "name": "i", + "nodeType": "VariableDeclaration", + "scope": 425, + "src": "8764:6:0", + "stateVariable": false, + "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6652da290a9849434684292b41a637a3234ce798c50d5b882fe2cb9e6225cb69", - "typeString": "literal_string \"Request must contain atleast one recipient\"" + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, - "value": "Request must contain atleast one recipient" + "typeName": { + "id": 408, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8764:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" } ], + "id": 410, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "8764:6:0" + }, + "loopExpression": { "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_6652da290a9849434684292b41a637a3234ce798c50d5b882fe2cb9e6225cb69", - "typeString": "literal_string \"Request must contain atleast one recipient\"" + "argumentTypes": null, + "id": 416, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "8802:3:0", + "subExpression": { + "argumentTypes": null, + "id": 415, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 409, + "src": "8802:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } - ], - "id": 377, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1024, - 1025 - ], - "referencedDeclaration": 1025, - "src": "8366:7: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": 388, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8366:116:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } + "id": 417, + "nodeType": "ExpressionStatement", + "src": "8802:3:0" }, - "id": 389, - "nodeType": "ExpressionStatement", - "src": "8366:116:0" + "nodeType": "ForStatement", + "src": "8760:111:0" }, { "expression": { @@ -17398,72 +18954,40 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 395, + "id": 429, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 391, - "name": "_recipientsAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 347, - "src": "8501:18:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 392, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8501:25:0", + "id": 427, + "name": "totalAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 405, + "src": "8899:11:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 393, - "name": "_recipientsAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 350, - "src": "8530:17:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 394, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8530:24:0", + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 428, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "8914:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "8501:53:0", + "src": "8899:22:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -17471,21 +18995,21 @@ }, { "argumentTypes": null, - "hexValue": "54686572652073686f756c6420626520657175616c206e6f2e206f6620726563697069656e74732061646472657373657320616e6420616d6f756e7473", - "id": 396, + "hexValue": "546f74616c20616d6f756e742064656c65676174656420746f20726563697069656e7473206d75737420626520657175616c20746f2074686520746f74616c20616d6f756e7420696e207468652072657175657374", + "id": 430, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "8555:63:0", + "src": "8923:87:0", "subdenomination": null, "typeDescriptions": { - "typeIdentifier": "t_stringliteral_28041745d75545b5f7193f07c84b1c846027ff880bfab81ec0c382d8848bfc40", - "typeString": "literal_string \"There should be equal no. of recipients addresses and amounts\"" + "typeIdentifier": "t_stringliteral_b6b5f3db3bb418e7053cc73398a5d41d63ec230c17008d6a7eea6c44d06a91ca", + "typeString": "literal_string \"Total amount delegated to recipients must be equal to the total amount in the request\"" }, - "value": "There should be equal no. of recipients addresses and amounts" + "value": "Total amount delegated to recipients must be equal to the total amount in the request" } ], "expression": { @@ -17495,25 +19019,25 @@ "typeString": "bool" }, { - "typeIdentifier": "t_stringliteral_28041745d75545b5f7193f07c84b1c846027ff880bfab81ec0c382d8848bfc40", - "typeString": "literal_string \"There should be equal no. of recipients addresses and amounts\"" + "typeIdentifier": "t_stringliteral_b6b5f3db3bb418e7053cc73398a5d41d63ec230c17008d6a7eea6c44d06a91ca", + "typeString": "literal_string \"Total amount delegated to recipients must be equal to the total amount in the request\"" } ], - "id": 390, + "id": 426, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1024, - 1025 + 1096, + 1097 ], - "referencedDeclaration": 1025, - "src": "8493:7:0", + "referencedDeclaration": 1097, + "src": "8891:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 397, + "id": 431, "isConstant": false, "isLValue": false, "isPure": false, @@ -17521,15 +19045,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "8493:126:0", + "src": "8891:120:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 398, + "id": 432, "nodeType": "ExpressionStatement", - "src": "8493:126:0" + "src": "8891:120:0" }, { "expression": { @@ -17537,158 +19061,219 @@ "arguments": [ { "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 406, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "arguments": [ + { + "argumentTypes": null, + "id": 437, + "name": "_description", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 347, + "src": "9090:12:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } }, - "id": 404, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { + { "argumentTypes": null, - "commonType": { + "id": 438, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "9112:7:0", + "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" - }, - "id": 402, + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 439, "isConstant": false, "isLValue": false, - "isPure": false, + "isPure": true, + "kind": "number", "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 400, - "name": "amountCollected", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 37, - "src": "8638:15:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "id": 401, - "name": "amountSpended", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 41, - "src": "8656:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8638:31:0", + "nodeType": "Literal", + "src": "9138:1:0", + "subdenomination": null, "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { + { "argumentTypes": null, - "id": 403, - "name": "amountDelegated", + "id": 440, + "name": "now", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 39, - "src": "8672:15:0", + "referencedDeclaration": 1095, + "src": "9152:3:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "8638:49:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + { + "argumentTypes": null, + "hexValue": "30", + "id": 441, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9176:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 442, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9192:5:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 443, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9209:5:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 405, - "name": "_amount", + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 436, + "name": "FundRequest", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 344, - "src": "8691:7:0", + "referencedDeclaration": 29, + "src": "9064:11:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_type$_t_struct$_FundRequest_$29_storage_ptr_$", + "typeString": "type(struct Campaign.FundRequest storage pointer)" } }, - "src": "8638:60:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "43616d706169676e20646f6e2774206861766520656e6f7567682066756e647320666f7220796f757220726571756573742e", - "id": 407, + "id": 444, "isConstant": false, "isLValue": false, - "isPure": true, - "kind": "string", + "isPure": false, + "kind": "structConstructorCall", "lValueRequested": false, - "nodeType": "Literal", - "src": "8700:52:0", - "subdenomination": null, + "names": [ + "description", + "amount", + "recipientsCount", + "createdAt", + "disapproversCount", + "isCompleted", + "isClosed" + ], + "nodeType": "FunctionCall", + "src": "9064:152:0", "typeDescriptions": { - "typeIdentifier": "t_stringliteral_84922fc6fba604d7203feb7d61843901ce53c82e7f5c1dcaecfb2ac6ab835b7b", - "typeString": "literal_string \"Campaign don't have enough funds for your request.\"" - }, - "value": "Campaign don't have enough funds for your request." + "typeIdentifier": "t_struct$_FundRequest_$29_memory", + "typeString": "struct Campaign.FundRequest memory" + } } ], "expression": { "argumentTypes": [ { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_84922fc6fba604d7203feb7d61843901ce53c82e7f5c1dcaecfb2ac6ab835b7b", - "typeString": "literal_string \"Campaign don't have enough funds for your request.\"" + "typeIdentifier": "t_struct$_FundRequest_$29_memory", + "typeString": "struct Campaign.FundRequest memory" } ], - "id": 399, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1024, - 1025 - ], - "referencedDeclaration": 1025, - "src": "8630:7:0", + "expression": { + "argumentTypes": null, + "id": 433, + "name": "fundRequests", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "9032:12:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_FundRequest_$29_storage_$dyn_storage", + "typeString": "struct Campaign.FundRequest storage ref[] storage ref" + } + }, + "id": 435, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9032:17:0", "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" + "typeIdentifier": "t_function_arraypush_nonpayable$_t_struct$_FundRequest_$29_storage_$returns$_t_uint256_$", + "typeString": "function (struct Campaign.FundRequest storage ref) returns (uint256)" } }, - "id": 408, + "id": 445, "isConstant": false, "isLValue": false, "isPure": false, @@ -17696,1484 +19281,1457 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "8630:123:0", + "src": "9032:195:0", "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 409, + "id": 446, "nodeType": "ExpressionStatement", - "src": "8630:123:0" + "src": "9032:195:0" }, { "assignments": [ - 411 + 448 ], "declarations": [ { "constant": false, - "id": 411, - "name": "totalAmount", + "id": 448, + "name": "request", "nodeType": "VariableDeclaration", - "scope": 503, - "src": "8774:16:0", + "scope": 498, + "src": "9271:27:0", "stateVariable": false, - "storageLocation": "default", + "storageLocation": "storage", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", + "typeString": "struct Campaign.FundRequest" }, "typeName": { - "id": 410, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "8774:4:0", + "contractScope": null, + "id": 447, + "name": "FundRequest", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 29, + "src": "9271:11:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", + "typeString": "struct Campaign.FundRequest" } }, "value": null, "visibility": "internal" } ], - "id": 413, + "id": 455, "initialValue": { "argumentTypes": null, - "hexValue": "30", - "id": 412, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8793:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "8774:20:0" - }, - { - "body": { - "id": 430, - "nodeType": "Block", - "src": "8851:65:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 428, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 424, - "name": "totalAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 411, - "src": "8866:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 425, - "name": "_recipientsAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 350, - "src": "8881:17:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 427, - "indexExpression": { - "argumentTypes": null, - "id": 426, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 415, - "src": "8899:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8881:20:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8866:35:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 429, - "nodeType": "ExpressionStatement", - "src": "8866:35:0" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 420, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { + "baseExpression": { "argumentTypes": null, - "id": 417, - "name": "i", + "id": 449, + "name": "fundRequests", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 415, - "src": "8817:1:0", + "referencedDeclaration": 55, + "src": "9301:12:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_array$_t_struct$_FundRequest_$29_storage_$dyn_storage", + "typeString": "struct Campaign.FundRequest storage ref[] storage ref" } }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { + "id": 454, + "indexExpression": { "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 418, - "name": "_recipientsAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 350, - "src": "8821:17:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 419, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8821:24:0", - "typeDescriptions": { + "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" - } - }, - "src": "8817:28:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 431, - "initializationExpression": { - "assignments": [ - 415 - ], - "declarations": [ - { - "constant": false, - "id": 415, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 431, - "src": "8809:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 414, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "8809:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 416, - "initialValue": null, - "nodeType": "VariableDeclarationStatement", - "src": "8809:6:0" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 422, + }, + "id": 453, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "8847:3:0", - "subExpression": { - "argumentTypes": null, - "id": 421, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 415, - "src": "8847:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 423, - "nodeType": "ExpressionStatement", - "src": "8847:3:0" - }, - "nodeType": "ForStatement", - "src": "8805:111:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { + "leftExpression": { "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 435, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 433, - "name": "totalAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 411, - "src": "8944:11:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { + "expression": { "argumentTypes": null, - "id": 434, - "name": "_amount", + "id": 450, + "name": "fundRequests", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 344, - "src": "8959:7:0", + "referencedDeclaration": 55, + "src": "9314:12:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_array$_t_struct$_FundRequest_$29_storage_$dyn_storage", + "typeString": "struct Campaign.FundRequest storage ref[] storage ref" } }, - "src": "8944:22:0", + "id": 451, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9314:19:0", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - { + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { "argumentTypes": null, - "hexValue": "546f74616c20616d6f756e742064656c65676174656420746f20726563697069656e7473206d75737420626520657175616c20746f2074686520746f74616c20616d6f756e7420696e207468652072657175657374", - "id": 436, + "hexValue": "31", + "id": 452, "isConstant": false, "isLValue": false, "isPure": true, - "kind": "string", + "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "8968:87:0", + "src": "9336:1:0", "subdenomination": null, "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b6b5f3db3bb418e7053cc73398a5d41d63ec230c17008d6a7eea6c44d06a91ca", - "typeString": "literal_string \"Total amount delegated to recipients must be equal to the total amount in the request\"" + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" }, - "value": "Total amount delegated to recipients must be equal to the total amount in the request" + "value": "1" + }, + "src": "9314:23:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9301:37:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_FundRequest_$29_storage", + "typeString": "struct Campaign.FundRequest storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9271:67:0" + }, + { + "assignments": [ + 459 + ], + "declarations": [ + { + "constant": false, + "id": 459, + "name": "recipients", + "nodeType": "VariableDeclaration", + "scope": 498, + "src": "9359:40:0", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Person_$6_storage_$", + "typeString": "mapping(uint256 => struct Campaign.Person)" + }, + "typeName": { + "id": 458, + "keyType": { + "id": 456, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "9367:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } }, - { - "typeIdentifier": "t_stringliteral_b6b5f3db3bb418e7053cc73398a5d41d63ec230c17008d6a7eea6c44d06a91ca", - "typeString": "literal_string \"Total amount delegated to recipients must be equal to the total amount in the request\"" + "nodeType": "Mapping", + "src": "9359:21:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Person_$6_storage_$", + "typeString": "mapping(uint256 => struct Campaign.Person)" + }, + "valueType": { + "contractScope": null, + "id": 457, + "name": "Person", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 6, + "src": "9373:6:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Person_$6_storage_ptr", + "typeString": "struct Campaign.Person" + } } - ], - "id": 432, - "name": "require", + }, + "value": null, + "visibility": "internal" + } + ], + "id": 462, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 460, + "name": "request", "nodeType": "Identifier", - "overloadedDeclarations": [ - 1024, - 1025 - ], - "referencedDeclaration": 1025, - "src": "8936:7:0", + "overloadedDeclarations": [], + "referencedDeclaration": 448, + "src": "9402:7:0", "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", + "typeString": "struct Campaign.FundRequest storage pointer" } }, - "id": 437, + "id": 461, "isConstant": false, - "isLValue": false, + "isLValue": true, "isPure": false, - "kind": "functionCall", "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8936:120:0", + "memberName": "recipients", + "nodeType": "MemberAccess", + "referencedDeclaration": 14, + "src": "9402:18:0", "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Person_$6_storage_$", + "typeString": "mapping(uint256 => struct Campaign.Person storage ref)" } }, - "id": 438, - "nodeType": "ExpressionStatement", - "src": "8936:120:0" + "nodeType": "VariableDeclarationStatement", + "src": "9359:61:0" }, { - "expression": { - "argumentTypes": null, - "arguments": [ + "body": { + "id": 492, + "nodeType": "Block", + "src": "9512:159:0", + "statements": [ { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 443, - "name": "_description", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 342, - "src": "9135:12:0", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { + "expression": { + "argumentTypes": null, + "id": 485, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { "argumentTypes": null, - "id": 444, - "name": "_amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 344, - "src": "9157:7:0", + "baseExpression": { + "argumentTypes": null, + "id": 474, + "name": "recipients", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 459, + "src": "9527:10:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Person_$6_storage_$", + "typeString": "mapping(uint256 => struct Campaign.Person storage ref)" + } + }, + "id": 476, + "indexExpression": { + "argumentTypes": null, + "id": 475, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 464, + "src": "9538:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9527:13:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_struct$_Person_$6_storage", + "typeString": "struct Campaign.Person storage ref" } }, - { + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { "argumentTypes": null, - "hexValue": "30", - "id": 445, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 478, + "name": "_recipientsAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 352, + "src": "9566:18:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 480, + "indexExpression": { + "argumentTypes": null, + "id": 479, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 464, + "src": "9585:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9566:21:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 481, + "name": "_recipientsAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 355, + "src": "9597:17:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 483, + "indexExpression": { + "argumentTypes": null, + "id": 482, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 464, + "src": "9615:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9597:20:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 477, + "name": "Person", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 6, + "src": "9543:6:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_Person_$6_storage_ptr_$", + "typeString": "type(struct Campaign.Person storage pointer)" + } + }, + "id": 484, "isConstant": false, "isLValue": false, - "isPure": true, - "kind": "number", + "isPure": false, + "kind": "structConstructorCall", "lValueRequested": false, - "nodeType": "Literal", - "src": "9183:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "id": 446, - "name": "now", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1023, - "src": "9197:3:0", + "names": [ + "personAddress", + "amount" + ], + "nodeType": "FunctionCall", + "src": "9543:76:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_struct$_Person_$6_memory", + "typeString": "struct Campaign.Person memory" } }, - { + "src": "9527:92:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Person_$6_storage", + "typeString": "struct Campaign.Person storage ref" + } + }, + "id": 486, + "nodeType": "ExpressionStatement", + "src": "9527:92:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 490, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "9634:25:0", + "subExpression": { "argumentTypes": null, - "hexValue": "30", - "id": 447, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9221:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" + "expression": { + "argumentTypes": null, + "id": 487, + "name": "request", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 448, + "src": "9634:7:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", + "typeString": "struct Campaign.FundRequest storage pointer" + } }, - "value": "0" - }, - { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 448, + "id": 489, "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9237:5:0", - "subdenomination": null, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "recipientsCount", + "nodeType": "MemberAccess", + "referencedDeclaration": 16, + "src": "9634:23:0", "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { "typeIdentifier": "t_uint256", "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" } - ], - "id": 442, - "name": "FundRequest", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 27, - "src": "9109:11:0", + }, "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_FundRequest_$27_storage_ptr_$", - "typeString": "type(struct Campaign.FundRequest storage pointer)" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 449, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "structConstructorCall", - "lValueRequested": false, - "names": [ - "description", - "amount", - "recipientsCount", - "createdAt", - "disapproversCount", - "isCompleted" - ], - "nodeType": "FunctionCall", - "src": "9109:135:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_memory", - "typeString": "struct Campaign.FundRequest memory" - } + "id": 491, + "nodeType": "ExpressionStatement", + "src": "9634:25:0" } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_FundRequest_$27_memory", - "typeString": "struct Campaign.FundRequest memory" - } - ], + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 470, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 467, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 464, + "src": "9477:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 439, - "name": "fundRequests", + "id": 468, + "name": "_recipientsAddress", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "9077:12:0", + "referencedDeclaration": 352, + "src": "9481:18:0", "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_FundRequest_$27_storage_$dyn_storage", - "typeString": "struct Campaign.FundRequest storage ref[] storage ref" + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" } }, - "id": 441, + "id": 469, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "memberName": "push", + "memberName": "length", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "9077:17:0", + "src": "9481:25:0", "typeDescriptions": { - "typeIdentifier": "t_function_arraypush_nonpayable$_t_struct$_FundRequest_$27_storage_$returns$_t_uint256_$", - "typeString": "function (struct Campaign.FundRequest storage ref) returns (uint256)" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 450, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9077:178:0", + "src": "9477:29:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "id": 451, - "nodeType": "ExpressionStatement", - "src": "9077:178:0" - }, - { - "assignments": [ - 453 - ], - "declarations": [ - { - "constant": false, - "id": 453, - "name": "request", - "nodeType": "VariableDeclaration", - "scope": 503, - "src": "9299:27:0", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", - "typeString": "struct Campaign.FundRequest" - }, - "typeName": { - "contractScope": null, - "id": 452, - "name": "FundRequest", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 27, - "src": "9299:11:0", + "id": 493, + "initializationExpression": { + "assignments": [ + 464 + ], + "declarations": [ + { + "constant": false, + "id": 464, + "name": "i", + "nodeType": "VariableDeclaration", + "scope": 493, + "src": "9465:6:0", + "stateVariable": false, + "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", - "typeString": "struct Campaign.FundRequest" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 460, - "initialValue": { - "argumentTypes": null, - "baseExpression": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 463, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "9465:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 466, + "initialValue": { "argumentTypes": null, - "id": 454, - "name": "fundRequests", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "9329:12:0", + "hexValue": "30", + "id": 465, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9474:1:0", + "subdenomination": null, "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_FundRequest_$27_storage_$dyn_storage", - "typeString": "struct Campaign.FundRequest storage ref[] storage ref" - } + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" }, - "id": 459, - "indexExpression": { + "nodeType": "VariableDeclarationStatement", + "src": "9465:10:0" + }, + "loopExpression": { + "expression": { "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 458, + "id": 472, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, - "leftExpression": { + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "9508:3:0", + "subExpression": { "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 455, - "name": "fundRequests", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "9342:12:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_FundRequest_$27_storage_$dyn_storage", - "typeString": "struct Campaign.FundRequest storage ref[] storage ref" - } - }, - "id": 456, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9342:19:0", + "id": 471, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 464, + "src": "9508:1:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 457, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9364:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "9342:23:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, + "id": 473, + "nodeType": "ExpressionStatement", + "src": "9508:3:0" + }, + "nodeType": "ForStatement", + "src": "9461:210:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 496, "isConstant": false, - "isLValue": true, + "isLValue": false, "isPure": false, "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9329:37:0", + "leftHandSide": { + "argumentTypes": null, + "id": 494, + "name": "amountDelegated", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 41, + "src": "9691:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "id": 495, + "name": "_amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "9710:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9691:26:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage", - "typeString": "struct Campaign.FundRequest storage ref" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "nodeType": "VariableDeclarationStatement", - "src": "9299:67:0" + "id": 497, + "nodeType": "ExpressionStatement", + "src": "9691:26:0" + } + ] + }, + "documentation": null, + "id": 499, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 358, + "modifierName": { + "argumentTypes": null, + "id": 357, + "name": "hasReachedGoal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 115, + "src": "8212:14:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8212:14:0" + }, + { + "arguments": null, + "id": 360, + "modifierName": { + "argumentTypes": null, + "id": 359, + "name": "ifActive", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 100, + "src": "8227:8:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8227:8:0" + }, + { + "arguments": null, + "id": 362, + "modifierName": { + "argumentTypes": null, + "id": 361, + "name": "onlyManager", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 75, + "src": "8236:11:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } }, + "nodeType": "ModifierInvocation", + "src": "8236:11:0" + } + ], + "name": "createFundRequest", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 356, + "nodeType": "ParameterList", + "parameters": [ { - "assignments": [ - 464 - ], - "declarations": [ - { - "constant": false, - "id": 464, - "name": "recipients", - "nodeType": "VariableDeclaration", - "scope": 503, - "src": "9387:40:0", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Person_$6_storage_$", - "typeString": "mapping(uint256 => struct Campaign.Person)" - }, - "typeName": { - "id": 463, - "keyType": { - "id": 461, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "9395:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Mapping", - "src": "9387:21:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Person_$6_storage_$", - "typeString": "mapping(uint256 => struct Campaign.Person)" - }, - "valueType": { - "contractScope": null, - "id": 462, - "name": "Person", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6, - "src": "9401:6:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Person_$6_storage_ptr", - "typeString": "struct Campaign.Person" - } - } - }, - "value": null, - "visibility": "internal" + "constant": false, + "id": 347, + "name": "_description", + "nodeType": "VariableDeclaration", + "scope": 499, + "src": "8100:26:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 346, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "8100:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" } - ], - "id": 467, - "initialValue": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 465, - "name": "request", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 453, - "src": "9430:7:0", + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 349, + "name": "_amount", + "nodeType": "VariableDeclaration", + "scope": 499, + "src": "8128:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 348, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8128:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 352, + "name": "_recipientsAddress", + "nodeType": "VariableDeclaration", + "scope": 499, + "src": "8142:35:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 350, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8142:7:0", + "stateMutability": "nonpayable", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", - "typeString": "struct Campaign.FundRequest storage pointer" + "typeIdentifier": "t_address", + "typeString": "address" } }, - "id": 466, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "recipients", - "nodeType": "MemberAccess", - "referencedDeclaration": 14, - "src": "9430:18:0", + "id": 351, + "length": null, + "nodeType": "ArrayTypeName", + "src": "8142:9:0", "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Person_$6_storage_$", - "typeString": "mapping(uint256 => struct Campaign.Person storage ref)" + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" } }, - "nodeType": "VariableDeclarationStatement", - "src": "9387:61:0" + "value": null, + "visibility": "internal" }, { - "body": { - "id": 497, - "nodeType": "Block", - "src": "9540:159:0", - "statements": [ + "constant": false, + "id": 355, + "name": "_recipientsAmount", + "nodeType": "VariableDeclaration", + "scope": 499, + "src": "8179:31:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 353, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "8179:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 354, + "length": null, + "nodeType": "ArrayTypeName", + "src": "8179:6:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8099:112:0" + }, + "returnParameters": { + "id": 363, + "nodeType": "ParameterList", + "parameters": [], + "src": "8254:0:0" + }, + "scope": 967, + "src": "8073:1652:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 540, + "nodeType": "Block", + "src": "9800:294:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ { - "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 512, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { "argumentTypes": null, - "id": 490, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 479, - "name": "recipients", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 464, - "src": "9555:10:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Person_$6_storage_$", - "typeString": "mapping(uint256 => struct Campaign.Person storage ref)" - } - }, - "id": 481, - "indexExpression": { - "argumentTypes": null, - "id": 480, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 469, - "src": "9566:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "9555:13:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_Person_$6_storage", - "typeString": "struct Campaign.Person storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { + "id": 509, + "name": "index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 501, + "src": "9819:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 483, - "name": "_recipientsAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 347, - "src": "9594:18:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 485, - "indexExpression": { - "argumentTypes": null, - "id": 484, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 469, - "src": "9613:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9594:21:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 486, - "name": "_recipientsAmount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 350, - "src": "9625:17:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 488, - "indexExpression": { - "argumentTypes": null, - "id": 487, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 469, - "src": "9643:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "9625:20:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 482, - "name": "Person", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "9571:6:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_Person_$6_storage_ptr_$", - "typeString": "type(struct Campaign.Person storage pointer)" - } - }, - "id": 489, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "structConstructorCall", - "lValueRequested": false, - "names": [ - "personAddress", - "amount" - ], - "nodeType": "FunctionCall", - "src": "9571:76:0", + "id": 510, + "name": "fundRequests", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "9827:12:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_Person_$6_memory", - "typeString": "struct Campaign.Person memory" + "typeIdentifier": "t_array$_t_struct$_FundRequest_$29_storage_$dyn_storage", + "typeString": "struct Campaign.FundRequest storage ref[] storage ref" } }, - "src": "9555:92:0", + "id": 511, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9827:19:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_Person_$6_storage", - "typeString": "struct Campaign.Person storage ref" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 491, - "nodeType": "ExpressionStatement", - "src": "9555:92:0" + "src": "9819:27:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } }, { - "expression": { + "argumentTypes": null, + "hexValue": "46756e64205265717565737420646f6e27742065786973742e", + "id": 513, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9848:27:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_efb7b2b16a8b754307051c10ad659def86664f18fea8cc56be97fff2ef45c86a", + "typeString": "literal_string \"Fund Request don't exist.\"" + }, + "value": "Fund Request don't exist." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_efb7b2b16a8b754307051c10ad659def86664f18fea8cc56be97fff2ef45c86a", + "typeString": "literal_string \"Fund Request don't exist.\"" + } + ], + "id": 508, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1096, + 1097 + ], + "referencedDeclaration": 1097, + "src": "9811:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 514, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9811:65:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 515, + "nodeType": "ExpressionStatement", + "src": "9811:65:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 522, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { "argumentTypes": null, - "id": 495, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "9662:25:0", - "subExpression": { + "expression": { "argumentTypes": null, - "expression": { + "baseExpression": { "argumentTypes": null, - "id": 492, - "name": "request", + "id": 517, + "name": "fundRequests", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 453, - "src": "9662:7:0", + "referencedDeclaration": 55, + "src": "9895:12:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", - "typeString": "struct Campaign.FundRequest storage pointer" + "typeIdentifier": "t_array$_t_struct$_FundRequest_$29_storage_$dyn_storage", + "typeString": "struct Campaign.FundRequest storage ref[] storage ref" + } + }, + "id": 519, + "indexExpression": { + "argumentTypes": null, + "id": 518, + "name": "index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 501, + "src": "9908:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, - "id": 494, "isConstant": false, "isLValue": true, "isPure": false, - "lValueRequested": true, - "memberName": "recipientsCount", - "nodeType": "MemberAccess", - "referencedDeclaration": 16, - "src": "9662:23:0", + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9895:19:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_struct$_FundRequest_$29_storage", + "typeString": "struct Campaign.FundRequest storage ref" } }, + "id": 520, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isCompleted", + "nodeType": "MemberAccess", + "referencedDeclaration": 26, + "src": "9895:31:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "id": 496, - "nodeType": "ExpressionStatement", - "src": "9662:25:0" - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 475, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 472, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 469, - "src": "9505:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 473, - "name": "_recipientsAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 347, - "src": "9509:18:0", + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 521, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9930:5:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "9895:40:0", "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "id": 474, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9509:25:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "9505:29:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 498, - "initializationExpression": { - "assignments": [ - 469 - ], - "declarations": [ { - "constant": false, - "id": 469, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 498, - "src": "9493:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 468, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "9493:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 471, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 470, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "9502:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "9493:10:0" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 477, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "9536:3:0", - "subExpression": { "argumentTypes": null, - "id": 476, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 469, - "src": "9536:1:0", + "hexValue": "526571756573742068617320616c7265616479206265656e20636f6d706c657465642e", + "id": 523, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9936:37:0", + "subdenomination": null, "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_stringliteral_586f681efaa11e250d87aaf5bb7860c40cb346fb7c498ab02ff630fda9c28c16", + "typeString": "literal_string \"Request has already been completed.\"" + }, + "value": "Request has already been completed." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_586f681efaa11e250d87aaf5bb7860c40cb346fb7c498ab02ff630fda9c28c16", + "typeString": "literal_string \"Request has already been completed.\"" } - }, + ], + "id": 516, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1096, + 1097 + ], + "referencedDeclaration": 1097, + "src": "9887: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" } }, - "id": 478, - "nodeType": "ExpressionStatement", - "src": "9536:3:0" + "id": 524, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9887:87:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } }, - "nodeType": "ForStatement", - "src": "9489:210:0" + "id": 525, + "nodeType": "ExpressionStatement", + "src": "9887:87:0" }, { "expression": { "argumentTypes": null, - "id": 501, + "id": 531, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 499, + "id": 526, "name": "amountDelegated", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 39, - "src": "9719:15:0", + "referencedDeclaration": 41, + "src": "9995:15:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", - "operator": "+=", + "operator": "-=", "rightHandSide": { "argumentTypes": null, - "id": 500, - "name": "_amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 344, - "src": "9738:7:0", + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 527, + "name": "fundRequests", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "10014:12:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_FundRequest_$29_storage_$dyn_storage", + "typeString": "struct Campaign.FundRequest storage ref[] storage ref" + } + }, + "id": 529, + "indexExpression": { + "argumentTypes": null, + "id": 528, + "name": "index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 501, + "src": "10027:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10014:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_FundRequest_$29_storage", + "typeString": "struct Campaign.FundRequest storage ref" + } + }, + "id": 530, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "amount", + "nodeType": "MemberAccess", + "referencedDeclaration": 10, + "src": "10014:26:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "9719:26:0", + "src": "9995:45:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 502, + "id": 532, + "nodeType": "ExpressionStatement", + "src": "9995:45:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 538, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 533, + "name": "fundRequests", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "10051:12:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_FundRequest_$29_storage_$dyn_storage", + "typeString": "struct Campaign.FundRequest storage ref[] storage ref" + } + }, + "id": 535, + "indexExpression": { + "argumentTypes": null, + "id": 534, + "name": "index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 501, + "src": "10064:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10051:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_FundRequest_$29_storage", + "typeString": "struct Campaign.FundRequest storage ref" + } + }, + "id": 536, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "isClosed", + "nodeType": "MemberAccess", + "referencedDeclaration": 28, + "src": "10051:28:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 537, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10082:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "10051:35:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 539, "nodeType": "ExpressionStatement", - "src": "9719:26:0" + "src": "10051:35:0" } ] }, "documentation": null, - "id": 504, + "id": 541, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, - "id": 353, - "modifierName": { - "argumentTypes": null, - "id": 352, - "name": "hasReachedGoal", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 113, - "src": "8144:14:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "8144:14:0" - }, - { - "arguments": null, - "id": 355, + "id": 504, "modifierName": { "argumentTypes": null, - "id": 354, + "id": 503, "name": "ifActive", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 98, - "src": "8159:8:0", + "referencedDeclaration": 100, + "src": "9775:8:0", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "8159:8:0" + "src": "9775:8:0" }, { "arguments": null, - "id": 357, + "id": 506, "modifierName": { "argumentTypes": null, - "id": 356, - "name": "onlyManager", + "id": 505, + "name": "onlyDonor", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 73, - "src": "8168:11:0", + "referencedDeclaration": 89, + "src": "9784:9:0", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "8168:11:0" + "src": "9784:9:0" } ], - "name": "createFundRequest", + "name": "closeFundRequest", "nodeType": "FunctionDefinition", "parameters": { - "id": 351, + "id": 502, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 342, - "name": "_description", - "nodeType": "VariableDeclaration", - "scope": 504, - "src": "8032:26:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 341, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "8032:6:0", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 344, - "name": "_amount", - "nodeType": "VariableDeclaration", - "scope": 504, - "src": "8060:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 343, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "8060:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 347, - "name": "_recipientsAddress", - "nodeType": "VariableDeclaration", - "scope": 504, - "src": "8074:35:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 345, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "8074:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 346, - "length": null, - "nodeType": "ArrayTypeName", - "src": "8074:9:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 350, - "name": "_recipientsAmount", + "id": 501, + "name": "index", "nodeType": "VariableDeclaration", - "scope": 504, - "src": "8111:31:0", + "scope": 541, + "src": "9763:10:0", "stateVariable": false, - "storageLocation": "memory", + "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, "typeName": { - "baseType": { - "id": 348, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "8111:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 349, - "length": null, - "nodeType": "ArrayTypeName", - "src": "8111:6:0", + "id": 500, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "9763:4:0", "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" + "typeIdentifier": "t_uint256", + "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], - "src": "8031:112:0" + "src": "9762:12:0" }, "returnParameters": { - "id": 358, + "id": 507, "nodeType": "ParameterList", "parameters": [], - "src": "8186:0:0" + "src": "9800:0:0" }, - "scope": 895, - "src": "8005:1748:0", + "scope": 967, + "src": "9737:357:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { - "id": 559, + "id": 606, "nodeType": "Block", - "src": "9848:383:0", + "src": "10189:480:0", "statements": [ { "expression": { @@ -19185,19 +20743,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 519, + "id": 556, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 516, + "id": 553, "name": "index", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 506, - "src": "9867:5:0", + "referencedDeclaration": 543, + "src": "10208:5:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -19209,18 +20767,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 517, + "id": 554, "name": "fundRequests", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "9875:12:0", + "referencedDeclaration": 55, + "src": "10216:12:0", "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_FundRequest_$27_storage_$dyn_storage", + "typeIdentifier": "t_array$_t_struct$_FundRequest_$29_storage_$dyn_storage", "typeString": "struct Campaign.FundRequest storage ref[] storage ref" } }, - "id": 518, + "id": 555, "isConstant": false, "isLValue": true, "isPure": false, @@ -19228,13 +20786,13 @@ "memberName": "length", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "9875:19:0", + "src": "10216:19:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "9867:27:0", + "src": "10208:27:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -19243,14 +20801,14 @@ { "argumentTypes": null, "hexValue": "46756e64205265717565737420646f6e27742065786973742e", - "id": 520, + "id": 557, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "9896:27:0", + "src": "10237:27:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_efb7b2b16a8b754307051c10ad659def86664f18fea8cc56be97fff2ef45c86a", @@ -19270,21 +20828,21 @@ "typeString": "literal_string \"Fund Request don't exist.\"" } ], - "id": 515, + "id": 552, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1024, - 1025 + 1096, + 1097 ], - "referencedDeclaration": 1025, - "src": "9859:7:0", + "referencedDeclaration": 1097, + "src": "10200:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 521, + "id": 558, "isConstant": false, "isLValue": false, "isPure": false, @@ -19292,15 +20850,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "9859:65:0", + "src": "10200:65:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 522, + "id": 559, "nodeType": "ExpressionStatement", - "src": "9859:65:0" + "src": "10200:65:0" }, { "expression": { @@ -19312,7 +20870,7 @@ "typeIdentifier": "t_bool", "typeString": "bool" }, - "id": 529, + "id": 566, "isConstant": false, "isLValue": false, "isPure": false, @@ -19323,26 +20881,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 524, + "id": 561, "name": "fundRequests", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "9943:12:0", + "referencedDeclaration": 55, + "src": "10284:12:0", "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_FundRequest_$27_storage_$dyn_storage", + "typeIdentifier": "t_array$_t_struct$_FundRequest_$29_storage_$dyn_storage", "typeString": "struct Campaign.FundRequest storage ref[] storage ref" } }, - "id": 526, + "id": 563, "indexExpression": { "argumentTypes": null, - "id": 525, + "id": 562, "name": "index", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 506, - "src": "9956:5:0", + "referencedDeclaration": 543, + "src": "10297:5:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -19353,13 +20911,13 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "9943:19:0", + "src": "10284:19:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage", + "typeIdentifier": "t_struct$_FundRequest_$29_storage", "typeString": "struct Campaign.FundRequest storage ref" } }, - "id": 527, + "id": 564, "isConstant": false, "isLValue": true, "isPure": false, @@ -19367,7 +20925,7 @@ "memberName": "isCompleted", "nodeType": "MemberAccess", "referencedDeclaration": 26, - "src": "9943:31:0", + "src": "10284:31:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -19378,14 +20936,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "66616c7365", - "id": 528, + "id": 565, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "9978:5:0", + "src": "10319:5:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -19393,7 +20951,7 @@ }, "value": "false" }, - "src": "9943:40:0", + "src": "10284:40:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -19402,14 +20960,14 @@ { "argumentTypes": null, "hexValue": "526571756573742068617320616c7265616479206265656e20636f6d706c657465642e", - "id": 530, + "id": 567, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "9984:37:0", + "src": "10325:37:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_586f681efaa11e250d87aaf5bb7860c40cb346fb7c498ab02ff630fda9c28c16", @@ -19429,21 +20987,21 @@ "typeString": "literal_string \"Request has already been completed.\"" } ], - "id": 523, + "id": 560, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1024, - 1025 + 1096, + 1097 ], - "referencedDeclaration": 1025, - "src": "9935:7:0", + "referencedDeclaration": 1097, + "src": "10276:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 531, + "id": 568, "isConstant": false, "isLValue": false, "isPure": false, @@ -19451,20 +21009,179 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "9935:87:0", + "src": "10276:87:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 532, + "id": 569, + "nodeType": "ExpressionStatement", + "src": "10276:87:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 576, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 571, + "name": "fundRequests", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "10382:12:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_FundRequest_$29_storage_$dyn_storage", + "typeString": "struct Campaign.FundRequest storage ref[] storage ref" + } + }, + "id": 573, + "indexExpression": { + "argumentTypes": null, + "id": 572, + "name": "index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 543, + "src": "10395:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10382:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_FundRequest_$29_storage", + "typeString": "struct Campaign.FundRequest storage ref" + } + }, + "id": 574, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isClosed", + "nodeType": "MemberAccess", + "referencedDeclaration": 28, + "src": "10382:28:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 575, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10414:5:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "10382:37:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "5468697320526571756573742068617320616c7265616479206265656e20636c6f7365642e", + "id": 577, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10420:39:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_936705d5c893758fa1f921672bb98f3cfdba0d03afedba508a9453ce8b9d60c1", + "typeString": "literal_string \"This Request has already been closed.\"" + }, + "value": "This Request has already been closed." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_936705d5c893758fa1f921672bb98f3cfdba0d03afedba508a9453ce8b9d60c1", + "typeString": "literal_string \"This Request has already been closed.\"" + } + ], + "id": 570, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1096, + 1097 + ], + "referencedDeclaration": 1097, + "src": "10374:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 578, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10374:86:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 579, "nodeType": "ExpressionStatement", - "src": "9935:87:0" + "src": "10374:86:0" }, { "condition": { "argumentTypes": null, - "id": 540, + "id": 587, "isConstant": false, "isLValue": false, "isPure": false, @@ -19472,7 +21189,7 @@ "nodeType": "UnaryOperation", "operator": "!", "prefix": true, - "src": "10046:45:0", + "src": "10484:45:0", "subExpression": { "argumentTypes": null, "baseExpression": { @@ -19481,26 +21198,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 533, + "id": 580, "name": "fundRequests", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "10047:12:0", + "referencedDeclaration": 55, + "src": "10485:12:0", "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_FundRequest_$27_storage_$dyn_storage", + "typeIdentifier": "t_array$_t_struct$_FundRequest_$29_storage_$dyn_storage", "typeString": "struct Campaign.FundRequest storage ref[] storage ref" } }, - "id": 535, + "id": 582, "indexExpression": { "argumentTypes": null, - "id": 534, + "id": 581, "name": "index", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 506, - "src": "10060:5:0", + "referencedDeclaration": 543, + "src": "10498:5:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -19511,13 +21228,13 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "10047:19:0", + "src": "10485:19:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage", + "typeIdentifier": "t_struct$_FundRequest_$29_storage", "typeString": "struct Campaign.FundRequest storage ref" } }, - "id": 536, + "id": 583, "isConstant": false, "isLValue": true, "isPure": false, @@ -19525,29 +21242,29 @@ "memberName": "disapprovers", "nodeType": "MemberAccess", "referencedDeclaration": 20, - "src": "10047:32:0", + "src": "10485:32:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", "typeString": "mapping(address => bool)" } }, - "id": 539, + "id": 586, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 537, + "id": 584, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1021, - "src": "10080:3:0", + "referencedDeclaration": 1093, + "src": "10518:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 538, + "id": 585, "isConstant": false, "isLValue": false, "isPure": false, @@ -19555,7 +21272,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "10080:10:0", + "src": "10518:10:0", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -19566,7 +21283,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "10047:44:0", + "src": "10485:44:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -19578,18 +21295,18 @@ } }, "falseBody": null, - "id": 558, + "id": 605, "nodeType": "IfStatement", - "src": "10043:181:0", + "src": "10481:181:0", "trueBody": { - "id": 557, + "id": 604, "nodeType": "Block", - "src": "10092:132:0", + "src": "10530:132:0", "statements": [ { "expression": { "argumentTypes": null, - "id": 549, + "id": 596, "isConstant": false, "isLValue": false, "isPure": false, @@ -19602,26 +21319,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 541, + "id": 588, "name": "fundRequests", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "10107:12:0", + "referencedDeclaration": 55, + "src": "10545:12:0", "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_FundRequest_$27_storage_$dyn_storage", + "typeIdentifier": "t_array$_t_struct$_FundRequest_$29_storage_$dyn_storage", "typeString": "struct Campaign.FundRequest storage ref[] storage ref" } }, - "id": 543, + "id": 590, "indexExpression": { "argumentTypes": null, - "id": 542, + "id": 589, "name": "index", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 506, - "src": "10120:5:0", + "referencedDeclaration": 543, + "src": "10558:5:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -19632,13 +21349,13 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "10107:19:0", + "src": "10545:19:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage", + "typeIdentifier": "t_struct$_FundRequest_$29_storage", "typeString": "struct Campaign.FundRequest storage ref" } }, - "id": 544, + "id": 591, "isConstant": false, "isLValue": true, "isPure": false, @@ -19646,29 +21363,29 @@ "memberName": "disapprovers", "nodeType": "MemberAccess", "referencedDeclaration": 20, - "src": "10107:32:0", + "src": "10545:32:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", "typeString": "mapping(address => bool)" } }, - "id": 547, + "id": 594, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 545, + "id": 592, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1021, - "src": "10140:3:0", + "referencedDeclaration": 1093, + "src": "10578:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 546, + "id": 593, "isConstant": false, "isLValue": false, "isPure": false, @@ -19676,7 +21393,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "10140:10:0", + "src": "10578:10:0", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -19687,7 +21404,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "10107:44:0", + "src": "10545:44:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -19698,14 +21415,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "74727565", - "id": 548, + "id": 595, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "10154:4:0", + "src": "10592:4:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -19713,20 +21430,20 @@ }, "value": "true" }, - "src": "10107:51:0", + "src": "10545:51:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 550, + "id": 597, "nodeType": "ExpressionStatement", - "src": "10107:51:0" + "src": "10545:51:0" }, { "expression": { "argumentTypes": null, - "id": 555, + "id": 602, "isConstant": false, "isLValue": false, "isPure": false, @@ -19734,33 +21451,33 @@ "nodeType": "UnaryOperation", "operator": "++", "prefix": false, - "src": "10173:39:0", + "src": "10611:39:0", "subExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 551, + "id": 598, "name": "fundRequests", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "10173:12:0", + "referencedDeclaration": 55, + "src": "10611:12:0", "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_FundRequest_$27_storage_$dyn_storage", + "typeIdentifier": "t_array$_t_struct$_FundRequest_$29_storage_$dyn_storage", "typeString": "struct Campaign.FundRequest storage ref[] storage ref" } }, - "id": 553, + "id": 600, "indexExpression": { "argumentTypes": null, - "id": 552, + "id": 599, "name": "index", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 506, - "src": "10186:5:0", + "referencedDeclaration": 543, + "src": "10624:5:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -19771,13 +21488,13 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "10173:19:0", + "src": "10611:19:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage", + "typeIdentifier": "t_struct$_FundRequest_$29_storage", "typeString": "struct Campaign.FundRequest storage ref" } }, - "id": 554, + "id": 601, "isConstant": false, "isLValue": true, "isPure": false, @@ -19785,7 +21502,7 @@ "memberName": "disapproversCount", "nodeType": "MemberAccess", "referencedDeclaration": 22, - "src": "10173:37:0", + "src": "10611:37:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -19796,9 +21513,9 @@ "typeString": "uint256" } }, - "id": 556, + "id": 603, "nodeType": "ExpressionStatement", - "src": "10173:39:0" + "src": "10611:39:0" } ] } @@ -19806,81 +21523,81 @@ ] }, "documentation": null, - "id": 560, + "id": 607, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, - "id": 509, + "id": 546, "modifierName": { "argumentTypes": null, - "id": 508, + "id": 545, "name": "hasReachedGoal", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 113, - "src": "9808:14:0", + "referencedDeclaration": 115, + "src": "10149:14:0", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "9808:14:0" + "src": "10149:14:0" }, { "arguments": null, - "id": 511, + "id": 548, "modifierName": { "argumentTypes": null, - "id": 510, + "id": 547, "name": "ifActive", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 98, - "src": "9823:8:0", + "referencedDeclaration": 100, + "src": "10164:8:0", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "9823:8:0" + "src": "10164:8:0" }, { "arguments": null, - "id": 513, + "id": 550, "modifierName": { "argumentTypes": null, - "id": 512, + "id": 549, "name": "onlyDonor", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 87, - "src": "9832:9:0", + "referencedDeclaration": 89, + "src": "10173:9:0", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "9832:9:0" + "src": "10173:9:0" } ], "name": "disapproveFundRequest", "nodeType": "FunctionDefinition", "parameters": { - "id": 507, + "id": 544, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 506, + "id": 543, "name": "index", "nodeType": "VariableDeclaration", - "scope": 560, - "src": "9796:10:0", + "scope": 607, + "src": "10137:10:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -19888,10 +21605,10 @@ "typeString": "uint256" }, "typeName": { - "id": 505, + "id": 542, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "9796:4:0", + "src": "10137:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -19901,25 +21618,25 @@ "visibility": "internal" } ], - "src": "9795:12:0" + "src": "10136:12:0" }, "returnParameters": { - "id": 514, + "id": 551, "nodeType": "ParameterList", "parameters": [], - "src": "9848:0:0" + "src": "10189:0:0" }, - "scope": 895, - "src": "9765:466:0", + "scope": 967, + "src": "10106:563:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { - "id": 615, + "id": 672, "nodeType": "Block", - "src": "10308:587:0", + "src": "10746:684:0", "statements": [ { "expression": { @@ -19931,19 +21648,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 573, + "id": 620, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 570, + "id": 617, "name": "index", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 562, - "src": "10327:5:0", + "referencedDeclaration": 609, + "src": "10765:5:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -19955,32 +21672,191 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 571, - "name": "fundRequests", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "10335:12:0", + "id": 618, + "name": "fundRequests", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "10773:12:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_FundRequest_$29_storage_$dyn_storage", + "typeString": "struct Campaign.FundRequest storage ref[] storage ref" + } + }, + "id": 619, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10773:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10765:27:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "46756e64205265717565737420646f6e27742065786973742e", + "id": 621, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10794:27:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_efb7b2b16a8b754307051c10ad659def86664f18fea8cc56be97fff2ef45c86a", + "typeString": "literal_string \"Fund Request don't exist.\"" + }, + "value": "Fund Request don't exist." + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_efb7b2b16a8b754307051c10ad659def86664f18fea8cc56be97fff2ef45c86a", + "typeString": "literal_string \"Fund Request don't exist.\"" + } + ], + "id": 616, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1096, + 1097 + ], + "referencedDeclaration": 1097, + "src": "10757:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 622, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10757:65:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 623, + "nodeType": "ExpressionStatement", + "src": "10757:65:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 630, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 625, + "name": "fundRequests", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "10841:12:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_FundRequest_$29_storage_$dyn_storage", + "typeString": "struct Campaign.FundRequest storage ref[] storage ref" + } + }, + "id": 627, + "indexExpression": { + "argumentTypes": null, + "id": 626, + "name": "index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 609, + "src": "10854:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10841:19:0", "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_FundRequest_$27_storage_$dyn_storage", - "typeString": "struct Campaign.FundRequest storage ref[] storage ref" + "typeIdentifier": "t_struct$_FundRequest_$29_storage", + "typeString": "struct Campaign.FundRequest storage ref" } }, - "id": 572, + "id": 628, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberName": "length", + "memberName": "isCompleted", "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10335:19:0", + "referencedDeclaration": 26, + "src": "10841:31:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_bool", + "typeString": "bool" } }, - "src": "10327:27:0", + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 629, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10876:5:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "10841:40:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -19988,21 +21864,21 @@ }, { "argumentTypes": null, - "hexValue": "46756e64205265717565737420646f6e27742065786973742e", - "id": 574, + "hexValue": "526571756573742068617320616c7265616479206265656e20636f6d706c657465642e", + "id": 631, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "10356:27:0", + "src": "10882:37:0", "subdenomination": null, "typeDescriptions": { - "typeIdentifier": "t_stringliteral_efb7b2b16a8b754307051c10ad659def86664f18fea8cc56be97fff2ef45c86a", - "typeString": "literal_string \"Fund Request don't exist.\"" + "typeIdentifier": "t_stringliteral_586f681efaa11e250d87aaf5bb7860c40cb346fb7c498ab02ff630fda9c28c16", + "typeString": "literal_string \"Request has already been completed.\"" }, - "value": "Fund Request don't exist." + "value": "Request has already been completed." } ], "expression": { @@ -20012,25 +21888,25 @@ "typeString": "bool" }, { - "typeIdentifier": "t_stringliteral_efb7b2b16a8b754307051c10ad659def86664f18fea8cc56be97fff2ef45c86a", - "typeString": "literal_string \"Fund Request don't exist.\"" + "typeIdentifier": "t_stringliteral_586f681efaa11e250d87aaf5bb7860c40cb346fb7c498ab02ff630fda9c28c16", + "typeString": "literal_string \"Request has already been completed.\"" } ], - "id": 569, + "id": 624, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1024, - 1025 + 1096, + 1097 ], - "referencedDeclaration": 1025, - "src": "10319:7:0", + "referencedDeclaration": 1097, + "src": "10833:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 575, + "id": 632, "isConstant": false, "isLValue": false, "isPure": false, @@ -20038,15 +21914,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "10319:65:0", + "src": "10833:87:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 576, + "id": 633, "nodeType": "ExpressionStatement", - "src": "10319:65:0" + "src": "10833:87:0" }, { "expression": { @@ -20058,7 +21934,7 @@ "typeIdentifier": "t_bool", "typeString": "bool" }, - "id": 583, + "id": 640, "isConstant": false, "isLValue": false, "isPure": false, @@ -20069,26 +21945,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 578, + "id": 635, "name": "fundRequests", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "10403:12:0", + "referencedDeclaration": 55, + "src": "10939:12:0", "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_FundRequest_$27_storage_$dyn_storage", + "typeIdentifier": "t_array$_t_struct$_FundRequest_$29_storage_$dyn_storage", "typeString": "struct Campaign.FundRequest storage ref[] storage ref" } }, - "id": 580, + "id": 637, "indexExpression": { "argumentTypes": null, - "id": 579, + "id": 636, "name": "index", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 562, - "src": "10416:5:0", + "referencedDeclaration": 609, + "src": "10952:5:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -20099,21 +21975,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "10403:19:0", + "src": "10939:19:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage", + "typeIdentifier": "t_struct$_FundRequest_$29_storage", "typeString": "struct Campaign.FundRequest storage ref" } }, - "id": 581, + "id": 638, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, - "memberName": "isCompleted", + "memberName": "isClosed", "nodeType": "MemberAccess", - "referencedDeclaration": 26, - "src": "10403:31:0", + "referencedDeclaration": 28, + "src": "10939:28:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -20124,14 +22000,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "66616c7365", - "id": 582, + "id": 639, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "10438:5:0", + "src": "10971:5:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -20139,7 +22015,7 @@ }, "value": "false" }, - "src": "10403:40:0", + "src": "10939:37:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -20147,21 +22023,21 @@ }, { "argumentTypes": null, - "hexValue": "526571756573742068617320616c7265616479206265656e20636f6d706c657465642e", - "id": 584, + "hexValue": "5468697320526571756573742068617320616c7265616479206265656e20636c6f7365642e", + "id": 641, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "10444:37:0", + "src": "10977:39:0", "subdenomination": null, "typeDescriptions": { - "typeIdentifier": "t_stringliteral_586f681efaa11e250d87aaf5bb7860c40cb346fb7c498ab02ff630fda9c28c16", - "typeString": "literal_string \"Request has already been completed.\"" + "typeIdentifier": "t_stringliteral_936705d5c893758fa1f921672bb98f3cfdba0d03afedba508a9453ce8b9d60c1", + "typeString": "literal_string \"This Request has already been closed.\"" }, - "value": "Request has already been completed." + "value": "This Request has already been closed." } ], "expression": { @@ -20171,25 +22047,25 @@ "typeString": "bool" }, { - "typeIdentifier": "t_stringliteral_586f681efaa11e250d87aaf5bb7860c40cb346fb7c498ab02ff630fda9c28c16", - "typeString": "literal_string \"Request has already been completed.\"" + "typeIdentifier": "t_stringliteral_936705d5c893758fa1f921672bb98f3cfdba0d03afedba508a9453ce8b9d60c1", + "typeString": "literal_string \"This Request has already been closed.\"" } ], - "id": 577, + "id": 634, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1024, - 1025 + 1096, + 1097 ], - "referencedDeclaration": 1025, - "src": "10395:7:0", + "referencedDeclaration": 1097, + "src": "10931:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 585, + "id": 642, "isConstant": false, "isLValue": false, "isPure": false, @@ -20197,28 +22073,28 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "10395:87:0", + "src": "10931:86:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 586, + "id": 643, "nodeType": "ExpressionStatement", - "src": "10395:87:0" + "src": "10931:86:0" }, { "assignments": [ - 590 + 647 ], "declarations": [ { "constant": false, - "id": 590, + "id": 647, "name": "disapprovers", "nodeType": "VariableDeclaration", - "scope": 615, - "src": "10503:43:0", + "scope": 672, + "src": "11038:43:0", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { @@ -20226,28 +22102,28 @@ "typeString": "mapping(address => bool)" }, "typeName": { - "id": 589, + "id": 646, "keyType": { - "id": 587, + "id": 644, "name": "address", "nodeType": "ElementaryTypeName", - "src": "10511:7:0", + "src": "11046:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", - "src": "10503:22:0", + "src": "11038:22:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", "typeString": "mapping(address => bool)" }, "valueType": { - "id": 588, + "id": 645, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "10520:4:0", + "src": "11055:4:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -20258,33 +22134,33 @@ "visibility": "internal" } ], - "id": 595, + "id": 652, "initialValue": { "argumentTypes": null, "expression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 591, + "id": 648, "name": "fundRequests", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "10549:12:0", + "referencedDeclaration": 55, + "src": "11084:12:0", "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_FundRequest_$27_storage_$dyn_storage", + "typeIdentifier": "t_array$_t_struct$_FundRequest_$29_storage_$dyn_storage", "typeString": "struct Campaign.FundRequest storage ref[] storage ref" } }, - "id": 593, + "id": 650, "indexExpression": { "argumentTypes": null, - "id": 592, + "id": 649, "name": "index", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 562, - "src": "10562:5:0", + "referencedDeclaration": 609, + "src": "11097:5:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -20295,13 +22171,13 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "10549:19:0", + "src": "11084:19:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage", + "typeIdentifier": "t_struct$_FundRequest_$29_storage", "typeString": "struct Campaign.FundRequest storage ref" } }, - "id": 594, + "id": 651, "isConstant": false, "isLValue": true, "isPure": false, @@ -20309,48 +22185,48 @@ "memberName": "disapprovers", "nodeType": "MemberAccess", "referencedDeclaration": 20, - "src": "10549:32:0", + "src": "11084:32:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", "typeString": "mapping(address => bool)" } }, "nodeType": "VariableDeclarationStatement", - "src": "10503:78:0" + "src": "11038:78:0" }, { "condition": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 596, + "id": 653, "name": "disapprovers", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 590, - "src": "10669:12:0", + "referencedDeclaration": 647, + "src": "11204:12:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", "typeString": "mapping(address => bool)" } }, - "id": 599, + "id": 656, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 597, + "id": 654, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1021, - "src": "10682:3:0", + "referencedDeclaration": 1093, + "src": "11217:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 598, + "id": 655, "isConstant": false, "isLValue": false, "isPure": false, @@ -20358,7 +22234,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "10682:10:0", + "src": "11217:10:0", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -20369,25 +22245,25 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "10669:24:0", + "src": "11204:24:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, - "id": 614, + "id": 671, "nodeType": "IfStatement", - "src": "10666:222:0", + "src": "11201:222:0", "trueBody": { - "id": 613, + "id": 670, "nodeType": "Block", - "src": "10694:194:0", + "src": "11229:194:0", "statements": [ { "expression": { "argumentTypes": null, - "id": 605, + "id": 662, "isConstant": false, "isLValue": false, "isPure": false, @@ -20396,34 +22272,34 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 600, + "id": 657, "name": "disapprovers", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 590, - "src": "10743:12:0", + "referencedDeclaration": 647, + "src": "11278:12:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", "typeString": "mapping(address => bool)" } }, - "id": 603, + "id": 660, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 601, + "id": 658, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1021, - "src": "10756:3:0", + "referencedDeclaration": 1093, + "src": "11291:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 602, + "id": 659, "isConstant": false, "isLValue": false, "isPure": false, @@ -20431,7 +22307,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "10756:10:0", + "src": "11291:10:0", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -20442,7 +22318,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "10743:24:0", + "src": "11278:24:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -20453,14 +22329,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "66616c7365", - "id": 604, + "id": 661, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "10770:5:0", + "src": "11305:5:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -20468,20 +22344,20 @@ }, "value": "false" }, - "src": "10743:32:0", + "src": "11278:32:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 606, + "id": 663, "nodeType": "ExpressionStatement", - "src": "10743:32:0" + "src": "11278:32:0" }, { "expression": { "argumentTypes": null, - "id": 611, + "id": 668, "isConstant": false, "isLValue": false, "isPure": false, @@ -20489,33 +22365,33 @@ "nodeType": "UnaryOperation", "operator": "--", "prefix": false, - "src": "10837:39:0", + "src": "11372:39:0", "subExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 607, + "id": 664, "name": "fundRequests", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "10837:12:0", + "referencedDeclaration": 55, + "src": "11372:12:0", "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_FundRequest_$27_storage_$dyn_storage", + "typeIdentifier": "t_array$_t_struct$_FundRequest_$29_storage_$dyn_storage", "typeString": "struct Campaign.FundRequest storage ref[] storage ref" } }, - "id": 609, + "id": 666, "indexExpression": { "argumentTypes": null, - "id": 608, + "id": 665, "name": "index", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 562, - "src": "10850:5:0", + "referencedDeclaration": 609, + "src": "11385:5:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -20526,13 +22402,13 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "10837:19:0", + "src": "11372:19:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage", + "typeIdentifier": "t_struct$_FundRequest_$29_storage", "typeString": "struct Campaign.FundRequest storage ref" } }, - "id": 610, + "id": 667, "isConstant": false, "isLValue": true, "isPure": false, @@ -20540,7 +22416,7 @@ "memberName": "disapproversCount", "nodeType": "MemberAccess", "referencedDeclaration": 22, - "src": "10837:37:0", + "src": "11372:37:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -20551,139 +22427,298 @@ "typeString": "uint256" } }, - "id": 612, - "nodeType": "ExpressionStatement", - "src": "10837:39:0" + "id": 669, + "nodeType": "ExpressionStatement", + "src": "11372:39:0" + } + ] + } + } + ] + }, + "documentation": null, + "id": 673, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 612, + "modifierName": { + "argumentTypes": null, + "id": 611, + "name": "ifActive", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 100, + "src": "10721:8:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "10721:8:0" + }, + { + "arguments": null, + "id": 614, + "modifierName": { + "argumentTypes": null, + "id": 613, + "name": "onlyDonor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 89, + "src": "10730:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "10730:9:0" + } + ], + "name": "approveFundRequest", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 610, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 609, + "name": "index", + "nodeType": "VariableDeclaration", + "scope": 673, + "src": "10709:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 608, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "10709:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10708:12:0" + }, + "returnParameters": { + "id": 615, + "nodeType": "ParameterList", + "parameters": [], + "src": "10746:0:0" + }, + "scope": 967, + "src": "10681:749:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 765, + "nodeType": "Block", + "src": "11509:1001:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 688, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 683, + "name": "fundRequests", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "11528:12:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_FundRequest_$29_storage_$dyn_storage", + "typeString": "struct Campaign.FundRequest storage ref[] storage ref" + } + }, + "id": 685, + "indexExpression": { + "argumentTypes": null, + "id": 684, + "name": "index", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 675, + "src": "11541:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11528:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_FundRequest_$29_storage", + "typeString": "struct Campaign.FundRequest storage ref" + } + }, + "id": 686, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isClosed", + "nodeType": "MemberAccess", + "referencedDeclaration": 28, + "src": "11528:28:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "66616c7365", + "id": 687, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11560:5:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "11528:37:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "5468697320526571756573742068617320616c7265616479206265656e20636c6f7365642e", + "id": 689, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11566:39:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_936705d5c893758fa1f921672bb98f3cfdba0d03afedba508a9453ce8b9d60c1", + "typeString": "literal_string \"This Request has already been closed.\"" + }, + "value": "This Request has already been closed." } - ] - } - } - ] - }, - "documentation": null, - "id": 616, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 565, - "modifierName": { - "argumentTypes": null, - "id": 564, - "name": "ifActive", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 98, - "src": "10283:8:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10283:8:0" - }, - { - "arguments": null, - "id": 567, - "modifierName": { - "argumentTypes": null, - "id": 566, - "name": "onlyDonor", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 87, - "src": "10292:9:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "10292:9:0" - } - ], - "name": "approveFundRequest", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 563, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 562, - "name": "index", - "nodeType": "VariableDeclaration", - "scope": 616, - "src": "10271:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 561, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "10271:4:0", + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_936705d5c893758fa1f921672bb98f3cfdba0d03afedba508a9453ce8b9d60c1", + "typeString": "literal_string \"This Request has already been closed.\"" + } + ], + "id": 682, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1096, + 1097 + ], + "referencedDeclaration": 1097, + "src": "11520:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 690, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11520:86:0", "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" } }, - "value": null, - "visibility": "internal" - } - ], - "src": "10270:12:0" - }, - "returnParameters": { - "id": 568, - "nodeType": "ParameterList", - "parameters": [], - "src": "10308:0:0" - }, - "scope": 895, - "src": "10243:652:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 698, - "nodeType": "Block", - "src": "10974:894:0", - "statements": [ + "id": 691, + "nodeType": "ExpressionStatement", + "src": "11520:86:0" + }, { "assignments": [ - 626 + 693 ], "declarations": [ { "constant": false, - "id": 626, + "id": 693, "name": "request", "nodeType": "VariableDeclaration", - "scope": 698, - "src": "10985:27:0", + "scope": 765, + "src": "11627:27:0", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", "typeString": "struct Campaign.FundRequest" }, "typeName": { "contractScope": null, - "id": 625, + "id": 692, "name": "FundRequest", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 27, - "src": "10985:11:0", + "referencedDeclaration": 29, + "src": "11627:11:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", "typeString": "struct Campaign.FundRequest" } }, @@ -20691,31 +22726,31 @@ "visibility": "internal" } ], - "id": 630, + "id": 697, "initialValue": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 627, + "id": 694, "name": "fundRequests", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "11015:12:0", + "referencedDeclaration": 55, + "src": "11657:12:0", "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_FundRequest_$27_storage_$dyn_storage", + "typeIdentifier": "t_array$_t_struct$_FundRequest_$29_storage_$dyn_storage", "typeString": "struct Campaign.FundRequest storage ref[] storage ref" } }, - "id": 629, + "id": 696, "indexExpression": { "argumentTypes": null, - "id": 628, + "id": 695, "name": "index", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 618, - "src": "11028:5:0", + "referencedDeclaration": 675, + "src": "11670:5:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -20726,14 +22761,14 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "11015:19:0", + "src": "11657:19:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage", + "typeIdentifier": "t_struct$_FundRequest_$29_storage", "typeString": "struct Campaign.FundRequest storage ref" } }, "nodeType": "VariableDeclarationStatement", - "src": "10985:49:0" + "src": "11627:49:0" }, { "expression": { @@ -20745,7 +22780,7 @@ "typeIdentifier": "t_bool", "typeString": "bool" }, - "id": 647, + "id": 714, "isConstant": false, "isLValue": false, "isPure": false, @@ -20756,7 +22791,7 @@ "typeIdentifier": "t_bool", "typeString": "bool" }, - "id": 643, + "id": 710, "isConstant": false, "isLValue": false, "isPure": false, @@ -20767,7 +22802,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 637, + "id": 704, "isConstant": false, "isLValue": false, "isPure": false, @@ -20778,7 +22813,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 635, + "id": 702, "isConstant": false, "isLValue": false, "isPure": false, @@ -20787,18 +22822,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 632, + "id": 699, "name": "request", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 626, - "src": "11067:7:0", + "referencedDeclaration": 693, + "src": "11709:7:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", "typeString": "struct Campaign.FundRequest storage pointer" } }, - "id": 633, + "id": 700, "isConstant": false, "isLValue": true, "isPure": false, @@ -20806,7 +22841,7 @@ "memberName": "createdAt", "nodeType": "MemberAccess", "referencedDeclaration": 24, - "src": "11067:17:0", + "src": "11709:17:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -20816,18 +22851,18 @@ "operator": "+", "rightExpression": { "argumentTypes": null, - "id": 634, + "id": 701, "name": "fundRequestProcessTime", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 55, - "src": "11087:22:0", + "referencedDeclaration": 57, + "src": "11729:22:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "11067:42:0", + "src": "11709:42:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -20837,18 +22872,18 @@ "operator": "<", "rightExpression": { "argumentTypes": null, - "id": 636, + "id": 703, "name": "now", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1023, - "src": "11112:3:0", + "referencedDeclaration": 1095, + "src": "11754:3:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "11067:48:0", + "src": "11709:48:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -20862,7 +22897,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 642, + "id": 709, "isConstant": false, "isLValue": false, "isPure": false, @@ -20871,18 +22906,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 638, + "id": 705, "name": "request", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 626, - "src": "11133:7:0", + "referencedDeclaration": 693, + "src": "11775:7:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", "typeString": "struct Campaign.FundRequest storage pointer" } }, - "id": 639, + "id": 706, "isConstant": false, "isLValue": true, "isPure": false, @@ -20890,7 +22925,7 @@ "memberName": "disapproversCount", "nodeType": "MemberAccess", "referencedDeclaration": 22, - "src": "11133:25:0", + "src": "11775:25:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -20902,18 +22937,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 640, + "id": 707, "name": "donorsList", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 44, - "src": "11161:10:0", + "referencedDeclaration": 46, + "src": "11803:10:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_struct$_Person_$6_storage_$dyn_storage", "typeString": "struct Campaign.Person storage ref[] storage ref" } }, - "id": 641, + "id": 708, "isConstant": false, "isLValue": true, "isPure": false, @@ -20921,19 +22956,19 @@ "memberName": "length", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "11161:17:0", + "src": "11803:17:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "11133:45:0", + "src": "11775:45:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "src": "11067:111:0", + "src": "11709:111:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -20943,7 +22978,7 @@ "operator": "&&", "rightExpression": { "argumentTypes": null, - "id": 646, + "id": 713, "isConstant": false, "isLValue": false, "isPure": false, @@ -20951,23 +22986,23 @@ "nodeType": "UnaryOperation", "operator": "!", "prefix": true, - "src": "11195:20:0", + "src": "11837:20:0", "subExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 644, + "id": 711, "name": "request", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 626, - "src": "11196:7:0", + "referencedDeclaration": 693, + "src": "11838:7:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", "typeString": "struct Campaign.FundRequest storage pointer" } }, - "id": 645, + "id": 712, "isConstant": false, "isLValue": true, "isPure": false, @@ -20975,7 +23010,7 @@ "memberName": "isCompleted", "nodeType": "MemberAccess", "referencedDeclaration": 26, - "src": "11196:19:0", + "src": "11838:19:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -20986,7 +23021,7 @@ "typeString": "bool" } }, - "src": "11067:148:0", + "src": "11709:148:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -20995,14 +23030,14 @@ { "argumentTypes": null, "hexValue": "46756e6420526571756573742063616e6e6f742062652070726f6365737365642c20656974686572207468652072657175697265642074696d65206973206e6f74207265616368656420796574206f72206d6f737420646f6e6f72732068617320646973617070726f7665642069742e", - "id": 648, + "id": 715, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "11231:114:0", + "src": "11873:114:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_d81dcd825f5bd9e87cb48f5c72bfb07db3cf3801a35b989e9b32b1e4e154d6c3", @@ -21022,21 +23057,21 @@ "typeString": "literal_string \"Fund Request cannot be processed, either the required time is not reached yet or most donors has disapproved it.\"" } ], - "id": 631, + "id": 698, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1024, - 1025 + 1096, + 1097 ], - "referencedDeclaration": 1025, - "src": "11045:7:0", + "referencedDeclaration": 1097, + "src": "11687:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 649, + "id": 716, "isConstant": false, "isLValue": false, "isPure": false, @@ -21044,20 +23079,20 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "11045:301:0", + "src": "11687:301:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 650, + "id": 717, "nodeType": "ExpressionStatement", - "src": "11045:301:0" + "src": "11687:301:0" }, { "expression": { "argumentTypes": null, - "id": 655, + "id": 722, "isConstant": false, "isLValue": false, "isPure": false, @@ -21066,18 +23101,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 651, + "id": 718, "name": "request", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 626, - "src": "11373:7:0", + "referencedDeclaration": 693, + "src": "12015:7:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", "typeString": "struct Campaign.FundRequest storage pointer" } }, - "id": 653, + "id": 720, "isConstant": false, "isLValue": true, "isPure": false, @@ -21085,7 +23120,7 @@ "memberName": "isCompleted", "nodeType": "MemberAccess", "referencedDeclaration": 26, - "src": "11373:19:0", + "src": "12015:19:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -21096,14 +23131,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "74727565", - "id": 654, + "id": 721, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "11395:4:0", + "src": "12037:4:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -21111,32 +23146,32 @@ }, "value": "true" }, - "src": "11373:26:0", + "src": "12015:26:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 656, + "id": 723, "nodeType": "ExpressionStatement", - "src": "11373:26:0" + "src": "12015:26:0" }, { "expression": { "argumentTypes": null, - "id": 660, + "id": 727, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 657, + "id": 724, "name": "amountDelegated", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 39, - "src": "11414:15:0", + "referencedDeclaration": 41, + "src": "12056:15:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -21148,18 +23183,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 658, + "id": 725, "name": "request", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 626, - "src": "11433:7:0", + "referencedDeclaration": 693, + "src": "12075:7:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", "typeString": "struct Campaign.FundRequest storage pointer" } }, - "id": 659, + "id": 726, "isConstant": false, "isLValue": true, "isPure": false, @@ -21167,38 +23202,38 @@ "memberName": "amount", "nodeType": "MemberAccess", "referencedDeclaration": 10, - "src": "11433:14:0", + "src": "12075:14:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "11414:33:0", + "src": "12056:33:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 661, + "id": 728, "nodeType": "ExpressionStatement", - "src": "11414:33:0" + "src": "12056:33:0" }, { "expression": { "argumentTypes": null, - "id": 665, + "id": 732, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 662, + "id": 729, "name": "amountSpended", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 41, - "src": "11462:13:0", + "referencedDeclaration": 43, + "src": "12104:13:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -21210,18 +23245,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 663, + "id": 730, "name": "request", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 626, - "src": "11479:7:0", + "referencedDeclaration": 693, + "src": "12121:7:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", "typeString": "struct Campaign.FundRequest storage pointer" } }, - "id": 664, + "id": 731, "isConstant": false, "isLValue": true, "isPure": false, @@ -21229,40 +23264,40 @@ "memberName": "amount", "nodeType": "MemberAccess", "referencedDeclaration": 10, - "src": "11479:14:0", + "src": "12121:14:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "11462:31:0", + "src": "12104:31:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 666, + "id": 733, "nodeType": "ExpressionStatement", - "src": "11462:31:0" + "src": "12104:31:0" }, { "body": { - "id": 696, + "id": 763, "nodeType": "Block", - "src": "11557:294:0", + "src": "12199:294:0", "statements": [ { "assignments": [ - 679 + 746 ], "declarations": [ { "constant": false, - "id": 679, + "id": 746, "name": "recipient", "nodeType": "VariableDeclaration", - "scope": 696, - "src": "11576:24:0", + "scope": 763, + "src": "12218:24:0", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { @@ -21271,11 +23306,11 @@ }, "typeName": { "contractScope": null, - "id": 678, + "id": 745, "name": "Person", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 6, - "src": "11576:6:0", + "src": "12218:6:0", "typeDescriptions": { "typeIdentifier": "t_struct$_Person_$6_storage_ptr", "typeString": "struct Campaign.Person" @@ -21285,25 +23320,25 @@ "visibility": "internal" } ], - "id": 684, + "id": 751, "initialValue": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 680, + "id": 747, "name": "request", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 626, - "src": "11603:7:0", + "referencedDeclaration": 693, + "src": "12245:7:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", "typeString": "struct Campaign.FundRequest storage pointer" } }, - "id": 681, + "id": 748, "isConstant": false, "isLValue": true, "isPure": false, @@ -21311,21 +23346,21 @@ "memberName": "recipients", "nodeType": "MemberAccess", "referencedDeclaration": 14, - "src": "11603:18:0", + "src": "12245:18:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Person_$6_storage_$", "typeString": "mapping(uint256 => struct Campaign.Person storage ref)" } }, - "id": 683, + "id": 750, "indexExpression": { "argumentTypes": null, - "id": 682, + "id": 749, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 668, - "src": "11622:1:0", + "referencedDeclaration": 735, + "src": "12264:1:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -21336,14 +23371,14 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "11603:21:0", + "src": "12245:21:0", "typeDescriptions": { "typeIdentifier": "t_struct$_Person_$6_storage", "typeString": "struct Campaign.Person storage ref" } }, "nodeType": "VariableDeclarationStatement", - "src": "11576:48:0" + "src": "12218:48:0" }, { "expression": { @@ -21353,18 +23388,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 692, + "id": 759, "name": "recipient", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 679, - "src": "11818:9:0", + "referencedDeclaration": 746, + "src": "12460:9:0", "typeDescriptions": { "typeIdentifier": "t_struct$_Person_$6_storage_ptr", "typeString": "struct Campaign.Person storage pointer" } }, - "id": 693, + "id": 760, "isConstant": false, "isLValue": true, "isPure": false, @@ -21372,7 +23407,7 @@ "memberName": "amount", "nodeType": "MemberAccess", "referencedDeclaration": 5, - "src": "11818:16:0", + "src": "12460:16:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -21396,18 +23431,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 687, + "id": 754, "name": "recipient", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 679, - "src": "11783:9:0", + "referencedDeclaration": 746, + "src": "12425:9:0", "typeDescriptions": { "typeIdentifier": "t_struct$_Person_$6_storage_ptr", "typeString": "struct Campaign.Person storage pointer" } }, - "id": 688, + "id": 755, "isConstant": false, "isLValue": true, "isPure": false, @@ -21415,7 +23450,7 @@ "memberName": "personAddress", "nodeType": "MemberAccess", "referencedDeclaration": 3, - "src": "11783:23:0", + "src": "12425:23:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -21429,20 +23464,20 @@ "typeString": "address" } ], - "id": 686, + "id": 753, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "11775:7:0", + "src": "12417:7:0", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint160_$", "typeString": "type(uint160)" }, "typeName": "uint160" }, - "id": 689, + "id": 756, "isConstant": false, "isLValue": false, "isPure": false, @@ -21450,7 +23485,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "11775:32:0", + "src": "12417:32:0", "typeDescriptions": { "typeIdentifier": "t_uint160", "typeString": "uint160" @@ -21464,20 +23499,20 @@ "typeString": "uint160" } ], - "id": 685, + "id": 752, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "11767:7:0", + "src": "12409:7:0", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": "address" }, - "id": 690, + "id": 757, "isConstant": false, "isLValue": false, "isPure": false, @@ -21485,13 +23520,13 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "11767:41:0", + "src": "12409:41:0", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, - "id": 691, + "id": 758, "isConstant": false, "isLValue": false, "isPure": false, @@ -21499,13 +23534,13 @@ "memberName": "transfer", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "11767:50:0", + "src": "12409:50:0", "typeDescriptions": { "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256)" } }, - "id": 694, + "id": 761, "isConstant": false, "isLValue": false, "isPure": false, @@ -21513,15 +23548,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "11767:68:0", + "src": "12409:68:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 695, + "id": 762, "nodeType": "ExpressionStatement", - "src": "11767:68:0" + "src": "12409:68:0" } ] }, @@ -21531,19 +23566,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 674, + "id": 741, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 671, + "id": 738, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 668, - "src": "11524:1:0", + "referencedDeclaration": 735, + "src": "12166:1:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -21555,18 +23590,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 672, + "id": 739, "name": "request", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 626, - "src": "11528:7:0", + "referencedDeclaration": 693, + "src": "12170:7:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", "typeString": "struct Campaign.FundRequest storage pointer" } }, - "id": 673, + "id": 740, "isConstant": false, "isLValue": true, "isPure": false, @@ -21574,31 +23609,31 @@ "memberName": "recipientsCount", "nodeType": "MemberAccess", "referencedDeclaration": 16, - "src": "11528:23:0", + "src": "12170:23:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "11524:27:0", + "src": "12166:27:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 697, + "id": 764, "initializationExpression": { "assignments": [ - 668 + 735 ], "declarations": [ { "constant": false, - "id": 668, + "id": 735, "name": "i", "nodeType": "VariableDeclaration", - "scope": 697, - "src": "11512:6:0", + "scope": 764, + "src": "12154:6:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -21606,10 +23641,10 @@ "typeString": "uint256" }, "typeName": { - "id": 667, + "id": 734, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "11512:4:0", + "src": "12154:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -21619,18 +23654,18 @@ "visibility": "internal" } ], - "id": 670, + "id": 737, "initialValue": { "argumentTypes": null, "hexValue": "30", - "id": 669, + "id": 736, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "11521:1:0", + "src": "12163:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -21639,12 +23674,12 @@ "value": "0" }, "nodeType": "VariableDeclarationStatement", - "src": "11512:10:0" + "src": "12154:10:0" }, "loopExpression": { "expression": { "argumentTypes": null, - "id": 676, + "id": 743, "isConstant": false, "isLValue": false, "isPure": false, @@ -21652,15 +23687,15 @@ "nodeType": "UnaryOperation", "operator": "++", "prefix": false, - "src": "11553:3:0", + "src": "12195:3:0", "subExpression": { "argumentTypes": null, - "id": 675, + "id": 742, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 668, - "src": "11553:1:0", + "referencedDeclaration": 735, + "src": "12195:1:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -21671,72 +23706,72 @@ "typeString": "uint256" } }, - "id": 677, + "id": 744, "nodeType": "ExpressionStatement", - "src": "11553:3:0" + "src": "12195:3:0" }, "nodeType": "ForStatement", - "src": "11508:343:0" + "src": "12150:343:0" } ] }, "documentation": null, - "id": 699, + "id": 766, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, - "id": 621, + "id": 678, "modifierName": { "argumentTypes": null, - "id": 620, + "id": 677, "name": "ifActive", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 98, - "src": "10947:8:0", + "referencedDeclaration": 100, + "src": "11482:8:0", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "10947:8:0" + "src": "11482:8:0" }, { "arguments": null, - "id": 623, + "id": 680, "modifierName": { "argumentTypes": null, - "id": 622, + "id": 679, "name": "onlyManager", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 73, - "src": "10956:11:0", + "referencedDeclaration": 75, + "src": "11491:11:0", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "10956:11:0" + "src": "11491:11:0" } ], "name": "processFundRequest", "nodeType": "FunctionDefinition", "parameters": { - "id": 619, + "id": 676, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 618, + "id": 675, "name": "index", "nodeType": "VariableDeclaration", - "scope": 699, - "src": "10935:10:0", + "scope": 766, + "src": "11470:10:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -21744,10 +23779,10 @@ "typeString": "uint256" }, "typeName": { - "id": 617, + "id": 674, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "10935:4:0", + "src": "11470:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -21757,25 +23792,25 @@ "visibility": "internal" } ], - "src": "10934:12:0" + "src": "11469:12:0" }, "returnParameters": { - "id": 624, + "id": 681, "nodeType": "ParameterList", "parameters": [], - "src": "10974:0:0" + "src": "11509:0:0" }, - "scope": 895, - "src": "10907:961:0", + "scope": 967, + "src": "11442:1068:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { - "id": 816, + "id": 887, "nodeType": "Block", - "src": "12016:824:0", + "src": "12663:851:0", "statements": [ { "expression": { @@ -21787,7 +23822,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 730, + "id": 799, "isConstant": false, "isLValue": false, "isPure": false, @@ -21798,7 +23833,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 728, + "id": 797, "isConstant": false, "isLValue": false, "isPure": false, @@ -21807,18 +23842,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 725, + "id": 794, "name": "fundRequests", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "12035:12:0", + "referencedDeclaration": 55, + "src": "12682:12:0", "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_FundRequest_$27_storage_$dyn_storage", + "typeIdentifier": "t_array$_t_struct$_FundRequest_$29_storage_$dyn_storage", "typeString": "struct Campaign.FundRequest storage ref[] storage ref" } }, - "id": 726, + "id": 795, "isConstant": false, "isLValue": true, "isPure": false, @@ -21826,7 +23861,7 @@ "memberName": "length", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "12035:19:0", + "src": "12682:19:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -21837,14 +23872,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "31", - "id": 727, + "id": 796, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "12057:1:0", + "src": "12704:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", @@ -21852,7 +23887,7 @@ }, "value": "1" }, - "src": "12035:23:0", + "src": "12682:23:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -21862,18 +23897,18 @@ "operator": ">", "rightExpression": { "argumentTypes": null, - "id": 729, + "id": 798, "name": "index", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 701, - "src": "12061:5:0", + "referencedDeclaration": 768, + "src": "12708:5:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "12035:31:0", + "src": "12682:31:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -21882,14 +23917,14 @@ { "argumentTypes": null, "hexValue": "496e646578206973206f7574206f662072616e67652e", - "id": 731, + "id": 800, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "12067:24:0", + "src": "12714:24:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_d62057eb16a8d3c41dcbeafe24392eb41394b614c96b859090d8ab67c6b16e97", @@ -21909,21 +23944,21 @@ "typeString": "literal_string \"Index is out of range.\"" } ], - "id": 724, + "id": 793, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1024, - 1025 + 1096, + 1097 ], - "referencedDeclaration": 1025, - "src": "12027:7:0", + "referencedDeclaration": 1097, + "src": "12674:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 732, + "id": 801, "isConstant": false, "isLValue": false, "isPure": false, @@ -21931,43 +23966,43 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "12027:65:0", + "src": "12674:65:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 733, + "id": 802, "nodeType": "ExpressionStatement", - "src": "12027:65:0" + "src": "12674:65:0" }, { "assignments": [ - 735 + 804 ], "declarations": [ { "constant": false, - "id": 735, + "id": 804, "name": "req", "nodeType": "VariableDeclaration", - "scope": 816, - "src": "12143:23:0", + "scope": 887, + "src": "12790:23:0", "stateVariable": false, "storageLocation": "storage", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", "typeString": "struct Campaign.FundRequest" }, "typeName": { "contractScope": null, - "id": 734, + "id": 803, "name": "FundRequest", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 27, - "src": "12143:11:0", + "referencedDeclaration": 29, + "src": "12790:11:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", "typeString": "struct Campaign.FundRequest" } }, @@ -21975,31 +24010,31 @@ "visibility": "internal" } ], - "id": 739, + "id": 808, "initialValue": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 736, + "id": 805, "name": "fundRequests", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "12169:12:0", + "referencedDeclaration": 55, + "src": "12816:12:0", "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_FundRequest_$27_storage_$dyn_storage", + "typeIdentifier": "t_array$_t_struct$_FundRequest_$29_storage_$dyn_storage", "typeString": "struct Campaign.FundRequest storage ref[] storage ref" } }, - "id": 738, + "id": 807, "indexExpression": { "argumentTypes": null, - "id": 737, + "id": 806, "name": "index", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 701, - "src": "12182:5:0", + "referencedDeclaration": 768, + "src": "12829:5:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -22010,27 +24045,27 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "12169:19:0", + "src": "12816:19:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage", + "typeIdentifier": "t_struct$_FundRequest_$29_storage", "typeString": "struct Campaign.FundRequest storage ref" } }, "nodeType": "VariableDeclarationStatement", - "src": "12143:45:0" + "src": "12790:45:0" }, { "assignments": [ - 743 + 812 ], "declarations": [ { "constant": false, - "id": 743, + "id": 812, "name": "addresses", "nodeType": "VariableDeclaration", - "scope": 816, - "src": "12199:26:0", + "scope": 887, + "src": "12846:26:0", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { @@ -22039,19 +24074,19 @@ }, "typeName": { "baseType": { - "id": 741, + "id": 810, "name": "address", "nodeType": "ElementaryTypeName", - "src": "12199:7:0", + "src": "12846:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 742, + "id": 811, "length": null, "nodeType": "ArrayTypeName", - "src": "12199:9:0", + "src": "12846:9:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", "typeString": "address[]" @@ -22061,7 +24096,7 @@ "visibility": "internal" } ], - "id": 750, + "id": 819, "initialValue": { "argumentTypes": null, "arguments": [ @@ -22069,18 +24104,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 747, + "id": 816, "name": "req", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 735, - "src": "12242:3:0", + "referencedDeclaration": 804, + "src": "12889:3:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", "typeString": "struct Campaign.FundRequest storage pointer" } }, - "id": 748, + "id": 817, "isConstant": false, "isLValue": true, "isPure": false, @@ -22088,7 +24123,7 @@ "memberName": "recipientsCount", "nodeType": "MemberAccess", "referencedDeclaration": 16, - "src": "12242:19:0", + "src": "12889:19:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -22102,40 +24137,40 @@ "typeString": "uint256" } ], - "id": 746, + "id": 815, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "NewExpression", - "src": "12228:13:0", + "src": "12875:13:0", "typeDescriptions": { "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_$", "typeString": "function (uint256) pure returns (address[] memory)" }, "typeName": { "baseType": { - "id": 744, + "id": 813, "name": "address", "nodeType": "ElementaryTypeName", - "src": "12232:7:0", + "src": "12879:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 745, + "id": 814, "length": null, "nodeType": "ArrayTypeName", - "src": "12232:9:0", + "src": "12879:9:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", "typeString": "address[]" } } }, - "id": 749, + "id": 818, "isConstant": false, "isLValue": false, "isPure": false, @@ -22143,27 +24178,27 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "12228:34:0", + "src": "12875:34:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_memory", "typeString": "address[] memory" } }, "nodeType": "VariableDeclarationStatement", - "src": "12199:63:0" + "src": "12846:63:0" }, { "assignments": [ - 754 + 823 ], "declarations": [ { "constant": false, - "id": 754, + "id": 823, "name": "amounts", "nodeType": "VariableDeclaration", - "scope": 816, - "src": "12273:21:0", + "scope": 887, + "src": "12920:21:0", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { @@ -22172,19 +24207,19 @@ }, "typeName": { "baseType": { - "id": 752, + "id": 821, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "12273:4:0", + "src": "12920:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 753, + "id": 822, "length": null, "nodeType": "ArrayTypeName", - "src": "12273:6:0", + "src": "12920:6:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", "typeString": "uint256[]" @@ -22194,7 +24229,7 @@ "visibility": "internal" } ], - "id": 761, + "id": 830, "initialValue": { "argumentTypes": null, "arguments": [ @@ -22202,18 +24237,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 758, + "id": 827, "name": "req", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 735, - "src": "12308:3:0", + "referencedDeclaration": 804, + "src": "12955:3:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", "typeString": "struct Campaign.FundRequest storage pointer" } }, - "id": 759, + "id": 828, "isConstant": false, "isLValue": true, "isPure": false, @@ -22221,7 +24256,7 @@ "memberName": "recipientsCount", "nodeType": "MemberAccess", "referencedDeclaration": 16, - "src": "12308:19:0", + "src": "12955:19:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -22235,39 +24270,39 @@ "typeString": "uint256" } ], - "id": 757, + "id": 826, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "NewExpression", - "src": "12297:10:0", + "src": "12944:10:0", "typeDescriptions": { "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_$", "typeString": "function (uint256) pure returns (uint256[] memory)" }, "typeName": { "baseType": { - "id": 755, + "id": 824, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "12301:4:0", + "src": "12948:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 756, + "id": 825, "length": null, "nodeType": "ArrayTypeName", - "src": "12301:6:0", + "src": "12948:6:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", "typeString": "uint256[]" } } }, - "id": 760, + "id": 829, "isConstant": false, "isLValue": false, "isPure": false, @@ -22275,25 +24310,25 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "12297:31:0", + "src": "12944:31:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_memory", "typeString": "uint256[] memory" } }, "nodeType": "VariableDeclarationStatement", - "src": "12273:55:0" + "src": "12920:55:0" }, { "body": { - "id": 793, + "id": 862, "nodeType": "Block", - "src": "12394:125:0", + "src": "13041:125:0", "statements": [ { "expression": { "argumentTypes": null, - "id": 781, + "id": 850, "isConstant": false, "isLValue": false, "isPure": false, @@ -22302,26 +24337,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 773, + "id": 842, "name": "addresses", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 743, - "src": "12409:9:0", + "referencedDeclaration": 812, + "src": "13056:9:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", "typeString": "address[] memory" } }, - "id": 775, + "id": 844, "indexExpression": { "argumentTypes": null, - "id": 774, + "id": 843, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 763, - "src": "12419:1:0", + "referencedDeclaration": 832, + "src": "13066:1:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -22332,7 +24367,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "12409:12:0", + "src": "13056:12:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -22348,18 +24383,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 776, + "id": 845, "name": "req", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 735, - "src": "12424:3:0", + "referencedDeclaration": 804, + "src": "13071:3:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", "typeString": "struct Campaign.FundRequest storage pointer" } }, - "id": 777, + "id": 846, "isConstant": false, "isLValue": true, "isPure": false, @@ -22367,21 +24402,21 @@ "memberName": "recipients", "nodeType": "MemberAccess", "referencedDeclaration": 14, - "src": "12424:14:0", + "src": "13071:14:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Person_$6_storage_$", "typeString": "mapping(uint256 => struct Campaign.Person storage ref)" } }, - "id": 779, + "id": 848, "indexExpression": { "argumentTypes": null, - "id": 778, + "id": 847, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 763, - "src": "12439:1:0", + "referencedDeclaration": 832, + "src": "13086:1:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -22392,13 +24427,13 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "12424:17:0", + "src": "13071:17:0", "typeDescriptions": { "typeIdentifier": "t_struct$_Person_$6_storage", "typeString": "struct Campaign.Person storage ref" } }, - "id": 780, + "id": 849, "isConstant": false, "isLValue": true, "isPure": false, @@ -22406,26 +24441,26 @@ "memberName": "personAddress", "nodeType": "MemberAccess", "referencedDeclaration": 3, - "src": "12424:31:0", + "src": "13071:31:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "src": "12409:46:0", + "src": "13056:46:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 782, + "id": 851, "nodeType": "ExpressionStatement", - "src": "12409:46:0" + "src": "13056:46:0" }, { "expression": { "argumentTypes": null, - "id": 791, + "id": 860, "isConstant": false, "isLValue": false, "isPure": false, @@ -22434,26 +24469,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 783, + "id": 852, "name": "amounts", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 754, - "src": "12470:7:0", + "referencedDeclaration": 823, + "src": "13117:7:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", "typeString": "uint256[] memory" } }, - "id": 785, + "id": 854, "indexExpression": { "argumentTypes": null, - "id": 784, + "id": 853, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 763, - "src": "12478:1:0", + "referencedDeclaration": 832, + "src": "13125:1:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -22464,7 +24499,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "12470:10:0", + "src": "13117:10:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -22480,18 +24515,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 786, + "id": 855, "name": "req", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 735, - "src": "12483:3:0", + "referencedDeclaration": 804, + "src": "13130:3:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", "typeString": "struct Campaign.FundRequest storage pointer" } }, - "id": 787, + "id": 856, "isConstant": false, "isLValue": true, "isPure": false, @@ -22499,21 +24534,21 @@ "memberName": "recipients", "nodeType": "MemberAccess", "referencedDeclaration": 14, - "src": "12483:14:0", + "src": "13130:14:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Person_$6_storage_$", "typeString": "mapping(uint256 => struct Campaign.Person storage ref)" } }, - "id": 789, + "id": 858, "indexExpression": { "argumentTypes": null, - "id": 788, + "id": 857, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 763, - "src": "12498:1:0", + "referencedDeclaration": 832, + "src": "13145:1:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -22524,13 +24559,13 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "12483:17:0", + "src": "13130:17:0", "typeDescriptions": { "typeIdentifier": "t_struct$_Person_$6_storage", "typeString": "struct Campaign.Person storage ref" } }, - "id": 790, + "id": 859, "isConstant": false, "isLValue": true, "isPure": false, @@ -22538,21 +24573,21 @@ "memberName": "amount", "nodeType": "MemberAccess", "referencedDeclaration": 5, - "src": "12483:24:0", + "src": "13130:24:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "12470:37:0", + "src": "13117:37:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 792, + "id": 861, "nodeType": "ExpressionStatement", - "src": "12470:37:0" + "src": "13117:37:0" } ] }, @@ -22562,19 +24597,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 769, + "id": 838, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 766, + "id": 835, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 763, - "src": "12365:1:0", + "referencedDeclaration": 832, + "src": "13012:1:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -22586,18 +24621,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 767, + "id": 836, "name": "req", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 735, - "src": "12369:3:0", + "referencedDeclaration": 804, + "src": "13016:3:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", "typeString": "struct Campaign.FundRequest storage pointer" } }, - "id": 768, + "id": 837, "isConstant": false, "isLValue": true, "isPure": false, @@ -22605,31 +24640,31 @@ "memberName": "recipientsCount", "nodeType": "MemberAccess", "referencedDeclaration": 16, - "src": "12369:19:0", + "src": "13016:19:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "12365:23:0", + "src": "13012:23:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 794, + "id": 863, "initializationExpression": { "assignments": [ - 763 + 832 ], "declarations": [ { "constant": false, - "id": 763, + "id": 832, "name": "i", "nodeType": "VariableDeclaration", - "scope": 794, - "src": "12353:6:0", + "scope": 863, + "src": "13000:6:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -22637,10 +24672,10 @@ "typeString": "uint256" }, "typeName": { - "id": 762, + "id": 831, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "12353:4:0", + "src": "13000:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -22650,18 +24685,18 @@ "visibility": "internal" } ], - "id": 765, + "id": 834, "initialValue": { "argumentTypes": null, "hexValue": "30", - "id": 764, + "id": 833, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "12362:1:0", + "src": "13009:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -22670,12 +24705,12 @@ "value": "0" }, "nodeType": "VariableDeclarationStatement", - "src": "12353:10:0" + "src": "13000:10:0" }, "loopExpression": { "expression": { "argumentTypes": null, - "id": 771, + "id": 840, "isConstant": false, "isLValue": false, "isPure": false, @@ -22683,15 +24718,15 @@ "nodeType": "UnaryOperation", "operator": "++", "prefix": false, - "src": "12390:3:0", + "src": "13037:3:0", "subExpression": { "argumentTypes": null, - "id": 770, + "id": 839, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 763, - "src": "12390:1:0", + "referencedDeclaration": 832, + "src": "13037:1:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -22702,12 +24737,12 @@ "typeString": "uint256" } }, - "id": 772, + "id": 841, "nodeType": "ExpressionStatement", - "src": "12390:3:0" + "src": "13037:3:0" }, "nodeType": "ForStatement", - "src": "12349:170:0" + "src": "12996:170:0" }, { "expression": { @@ -22717,18 +24752,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 795, + "id": 864, "name": "req", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 735, - "src": "12560:3:0", + "referencedDeclaration": 804, + "src": "13207:3:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", "typeString": "struct Campaign.FundRequest storage pointer" } }, - "id": 796, + "id": 865, "isConstant": false, "isLValue": true, "isPure": false, @@ -22736,7 +24771,7 @@ "memberName": "description", "nodeType": "MemberAccess", "referencedDeclaration": 8, - "src": "12560:15:0", + "src": "13207:15:0", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" @@ -22746,18 +24781,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 797, + "id": 866, "name": "req", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 735, - "src": "12590:3:0", + "referencedDeclaration": 804, + "src": "13237:3:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", "typeString": "struct Campaign.FundRequest storage pointer" } }, - "id": 798, + "id": 867, "isConstant": false, "isLValue": true, "isPure": false, @@ -22765,7 +24800,7 @@ "memberName": "amount", "nodeType": "MemberAccess", "referencedDeclaration": 10, - "src": "12590:10:0", + "src": "13237:10:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -22775,18 +24810,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 799, + "id": 868, "name": "req", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 735, - "src": "12615:3:0", + "referencedDeclaration": 804, + "src": "13262:3:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", "typeString": "struct Campaign.FundRequest storage pointer" } }, - "id": 800, + "id": 869, "isConstant": false, "isLValue": true, "isPure": false, @@ -22794,7 +24829,7 @@ "memberName": "recipientsCount", "nodeType": "MemberAccess", "referencedDeclaration": 16, - "src": "12615:19:0", + "src": "13262:19:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -22804,18 +24839,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 801, + "id": 870, "name": "req", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 735, - "src": "12649:3:0", + "referencedDeclaration": 804, + "src": "13296:3:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", "typeString": "struct Campaign.FundRequest storage pointer" } }, - "id": 802, + "id": 871, "isConstant": false, "isLValue": true, "isPure": false, @@ -22823,7 +24858,7 @@ "memberName": "disapproversCount", "nodeType": "MemberAccess", "referencedDeclaration": 22, - "src": "12649:21:0", + "src": "13296:21:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -22833,18 +24868,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 803, + "id": 872, "name": "req", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 735, - "src": "12685:3:0", + "referencedDeclaration": 804, + "src": "13332:3:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", "typeString": "struct Campaign.FundRequest storage pointer" } }, - "id": 804, + "id": 873, "isConstant": false, "isLValue": true, "isPure": false, @@ -22852,7 +24887,7 @@ "memberName": "createdAt", "nodeType": "MemberAccess", "referencedDeclaration": 24, - "src": "12685:13:0", + "src": "13332:13:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -22862,18 +24897,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 805, + "id": 874, "name": "req", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 735, - "src": "12713:3:0", + "referencedDeclaration": 804, + "src": "13360:3:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", "typeString": "struct Campaign.FundRequest storage pointer" } }, - "id": 806, + "id": 875, "isConstant": false, "isLValue": true, "isPure": false, @@ -22881,7 +24916,7 @@ "memberName": "isCompleted", "nodeType": "MemberAccess", "referencedDeclaration": 26, - "src": "12713:15:0", + "src": "13360:15:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -22893,18 +24928,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 807, + "id": 876, "name": "req", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 735, - "src": "12743:3:0", + "referencedDeclaration": 804, + "src": "13390:3:0", "typeDescriptions": { - "typeIdentifier": "t_struct$_FundRequest_$27_storage_ptr", + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", "typeString": "struct Campaign.FundRequest storage pointer" } }, - "id": 808, + "id": 877, "isConstant": false, "isLValue": true, "isPure": false, @@ -22912,29 +24947,29 @@ "memberName": "disapprovers", "nodeType": "MemberAccess", "referencedDeclaration": 20, - "src": "12743:16:0", + "src": "13390:16:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_bool_$", "typeString": "mapping(address => bool)" } }, - "id": 811, + "id": 880, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 809, + "id": 878, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 1021, - "src": "12760:3:0", + "referencedDeclaration": 1093, + "src": "13407:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 810, + "id": 879, "isConstant": false, "isLValue": false, "isPure": false, @@ -22942,7 +24977,7 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "12760:10:0", + "src": "13407:10:0", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -22953,7 +24988,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "12743:28:0", + "src": "13390:28:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -22961,12 +24996,12 @@ }, { "argumentTypes": null, - "id": 812, + "id": 881, "name": "addresses", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 743, - "src": "12786:9:0", + "referencedDeclaration": 812, + "src": "13433:9:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", "typeString": "address[] memory" @@ -22974,56 +25009,85 @@ }, { "argumentTypes": null, - "id": 813, + "id": 882, "name": "amounts", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 754, - "src": "12810:7:0", + "referencedDeclaration": 823, + "src": "13457:7:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", "typeString": "uint256[] memory" } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 883, + "name": "req", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 804, + "src": "13479:3:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_FundRequest_$29_storage_ptr", + "typeString": "struct Campaign.FundRequest storage pointer" + } + }, + "id": 884, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isClosed", + "nodeType": "MemberAccess", + "referencedDeclaration": 28, + "src": "13479:12:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } } ], - "id": 814, + "id": 885, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", - "src": "12545:287:0", + "src": "13192:314:0", "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_string_storage_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_bool_$_t_bool_$_t_array$_t_address_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$", - "typeString": "tuple(string storage ref,uint256,uint256,uint256,uint256,bool,bool,address[] memory,uint256[] memory)" + "typeIdentifier": "t_tuple$_t_string_storage_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_bool_$_t_bool_$_t_array$_t_address_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_bool_$", + "typeString": "tuple(string storage ref,uint256,uint256,uint256,uint256,bool,bool,address[] memory,uint256[] memory,bool)" } }, - "functionReturnParameters": 723, - "id": 815, + "functionReturnParameters": 792, + "id": 886, "nodeType": "Return", - "src": "12539:293:0" + "src": "13186:320:0" } ] }, "documentation": null, - "id": 817, + "id": 888, "implemented": true, "kind": "function", "modifiers": [], "name": "getFundRequest", "nodeType": "FunctionDefinition", "parameters": { - "id": 702, + "id": 769, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 701, + "id": 768, "name": "index", "nodeType": "VariableDeclaration", - "scope": 817, - "src": "11904:10:0", + "scope": 888, + "src": "12546:10:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -23031,10 +25095,10 @@ "typeString": "uint256" }, "typeName": { - "id": 700, + "id": 767, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "11904:4:0", + "src": "12546:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -23044,19 +25108,19 @@ "visibility": "internal" } ], - "src": "11903:12:0" + "src": "12545:12:0" }, "returnParameters": { - "id": 723, + "id": 792, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 704, + "id": 771, "name": "", "nodeType": "VariableDeclaration", - "scope": 817, - "src": "11936:13:0", + "scope": 888, + "src": "12578:13:0", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { @@ -23064,10 +25128,10 @@ "typeString": "string" }, "typeName": { - "id": 703, + "id": 770, "name": "string", "nodeType": "ElementaryTypeName", - "src": "11936:6:0", + "src": "12578:6:0", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" @@ -23078,11 +25142,11 @@ }, { "constant": false, - "id": 706, + "id": 773, "name": "", "nodeType": "VariableDeclaration", - "scope": 817, - "src": "11950:4:0", + "scope": 888, + "src": "12592:4:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -23090,10 +25154,10 @@ "typeString": "uint256" }, "typeName": { - "id": 705, + "id": 772, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "11950:4:0", + "src": "12592:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -23104,11 +25168,11 @@ }, { "constant": false, - "id": 708, + "id": 775, "name": "", "nodeType": "VariableDeclaration", - "scope": 817, - "src": "11956:4:0", + "scope": 888, + "src": "12598:4:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -23116,10 +25180,10 @@ "typeString": "uint256" }, "typeName": { - "id": 707, + "id": 774, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "11956:4:0", + "src": "12598:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -23130,11 +25194,11 @@ }, { "constant": false, - "id": 710, + "id": 777, "name": "", "nodeType": "VariableDeclaration", - "scope": 817, - "src": "11962:4:0", + "scope": 888, + "src": "12604:4:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -23142,10 +25206,10 @@ "typeString": "uint256" }, "typeName": { - "id": 709, + "id": 776, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "11962:4:0", + "src": "12604:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -23156,11 +25220,11 @@ }, { "constant": false, - "id": 712, + "id": 779, "name": "", "nodeType": "VariableDeclaration", - "scope": 817, - "src": "11968:4:0", + "scope": 888, + "src": "12610:4:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -23168,10 +25232,10 @@ "typeString": "uint256" }, "typeName": { - "id": 711, + "id": 778, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "11968:4:0", + "src": "12610:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -23182,11 +25246,11 @@ }, { "constant": false, - "id": 714, + "id": 781, "name": "", "nodeType": "VariableDeclaration", - "scope": 817, - "src": "11974:4:0", + "scope": 888, + "src": "12616:4:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -23194,10 +25258,10 @@ "typeString": "bool" }, "typeName": { - "id": 713, + "id": 780, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "11974:4:0", + "src": "12616:4:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -23208,11 +25272,11 @@ }, { "constant": false, - "id": 716, + "id": 783, "name": "", "nodeType": "VariableDeclaration", - "scope": 817, - "src": "11980:4:0", + "scope": 888, + "src": "12622:4:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -23220,10 +25284,10 @@ "typeString": "bool" }, "typeName": { - "id": 715, + "id": 782, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "11980:4:0", + "src": "12622:4:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -23234,11 +25298,11 @@ }, { "constant": false, - "id": 719, + "id": 786, "name": "", "nodeType": "VariableDeclaration", - "scope": 817, - "src": "11986:15:0", + "scope": 888, + "src": "12628:15:0", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { @@ -23247,20 +25311,20 @@ }, "typeName": { "baseType": { - "id": 717, + "id": 784, "name": "address", "nodeType": "ElementaryTypeName", - "src": "11986:7:0", + "src": "12628:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 718, + "id": 785, "length": null, "nodeType": "ArrayTypeName", - "src": "11986:9:0", + "src": "12628:9:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", "typeString": "address[]" @@ -23271,11 +25335,11 @@ }, { "constant": false, - "id": 722, + "id": 789, "name": "", "nodeType": "VariableDeclaration", - "scope": 817, - "src": "12003:12:0", + "scope": 888, + "src": "12645:12:0", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { @@ -23284,19 +25348,19 @@ }, "typeName": { "baseType": { - "id": 720, + "id": 787, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "12003:4:0", + "src": "12645:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 721, + "id": 788, "length": null, "nodeType": "ArrayTypeName", - "src": "12003:6:0", + "src": "12645:6:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", "typeString": "uint256[]" @@ -23304,21 +25368,47 @@ }, "value": null, "visibility": "internal" + }, + { + "constant": false, + "id": 791, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 888, + "src": "12658:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 790, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "12658:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" } ], - "src": "11935:81:0" + "src": "12577:86:0" }, - "scope": 895, - "src": "11880:960:0", + "scope": 967, + "src": "12522:992:0", "stateMutability": "view", "superFunction": null, "visibility": "public" }, { "body": { - "id": 862, + "id": 934, "nodeType": "Block", - "src": "13006:397:0", + "src": "13680:402:0", "statements": [ { "expression": { @@ -23326,12 +25416,12 @@ "components": [ { "argumentTypes": null, - "id": 846, + "id": 917, "name": "manager", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 29, - "src": "13039:7:0", + "referencedDeclaration": 31, + "src": "13713:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -23339,12 +25429,12 @@ }, { "argumentTypes": null, - "id": 847, + "id": 918, "name": "title", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 31, - "src": "13061:5:0", + "referencedDeclaration": 33, + "src": "13735:5:0", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" @@ -23352,12 +25442,12 @@ }, { "argumentTypes": null, - "id": 848, + "id": 919, "name": "description", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 33, - "src": "13081:11:0", + "referencedDeclaration": 35, + "src": "13755:11:0", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" @@ -23365,12 +25455,12 @@ }, { "argumentTypes": null, - "id": 849, + "id": 920, "name": "amountInitialGoal", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 35, - "src": "13107:17:0", + "referencedDeclaration": 37, + "src": "13781:17:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -23378,12 +25468,12 @@ }, { "argumentTypes": null, - "id": 850, + "id": 921, "name": "amountCollected", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 37, - "src": "13139:15:0", + "referencedDeclaration": 39, + "src": "13813:15:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -23391,12 +25481,12 @@ }, { "argumentTypes": null, - "id": 851, + "id": 922, "name": "amountDelegated", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 39, - "src": "13169:15:0", + "referencedDeclaration": 41, + "src": "13843:15:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -23404,12 +25494,12 @@ }, { "argumentTypes": null, - "id": 852, + "id": 923, "name": "amountSpended", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 41, - "src": "13199:13:0", + "referencedDeclaration": 43, + "src": "13873:13:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -23417,12 +25507,12 @@ }, { "argumentTypes": null, - "id": 853, + "id": 924, "name": "fundRequestProcessTime", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 55, - "src": "13227:22:0", + "referencedDeclaration": 57, + "src": "13901:22:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -23430,12 +25520,12 @@ }, { "argumentTypes": null, - "id": 854, + "id": 925, "name": "createdAt", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 57, - "src": "13264:9:0", + "referencedDeclaration": 59, + "src": "13938:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -23443,12 +25533,12 @@ }, { "argumentTypes": null, - "id": 855, + "id": 926, "name": "closedAt", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 59, - "src": "13288:8:0", + "referencedDeclaration": 61, + "src": "13962:8:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -23456,12 +25546,28 @@ }, { "argumentTypes": null, - "id": 856, - "name": "dononrsCount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46, - "src": "13311:12:0", + "expression": { + "argumentTypes": null, + "id": 927, + "name": "donorsList", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 46, + "src": "13985:10:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_struct$_Person_$6_storage_$dyn_storage", + "typeString": "struct Campaign.Person storage ref[] storage ref" + } + }, + "id": 928, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "13985:17:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -23471,18 +25577,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 857, + "id": 929, "name": "fundRequests", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "13338:12:0", + "referencedDeclaration": 55, + "src": "14017:12:0", "typeDescriptions": { - "typeIdentifier": "t_array$_t_struct$_FundRequest_$27_storage_$dyn_storage", + "typeIdentifier": "t_array$_t_struct$_FundRequest_$29_storage_$dyn_storage", "typeString": "struct Campaign.FundRequest storage ref[] storage ref" } }, - "id": 858, + "id": 930, "isConstant": false, "isLValue": true, "isPure": false, @@ -23490,7 +25596,7 @@ "memberName": "length", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "13338:19:0", + "src": "14017:19:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -23498,62 +25604,62 @@ }, { "argumentTypes": null, - "id": 859, + "id": 931, "name": "isActive", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 61, - "src": "13372:8:0", + "referencedDeclaration": 63, + "src": "14051:8:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], - "id": 860, + "id": 932, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", - "src": "13024:371:0", + "src": "13698:376:0", "typeDescriptions": { "typeIdentifier": "t_tuple$_t_address_$_t_string_storage_$_t_string_storage_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_bool_$", "typeString": "tuple(address,string storage ref,string storage ref,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,bool)" } }, - "functionReturnParameters": 845, - "id": 861, + "functionReturnParameters": 916, + "id": 933, "nodeType": "Return", - "src": "13017:378:0" + "src": "13691:383:0" } ] }, "documentation": null, - "id": 863, + "id": 935, "implemented": true, "kind": "function", "modifiers": [], "name": "getSummary", "nodeType": "FunctionDefinition", "parameters": { - "id": 818, + "id": 889, "nodeType": "ParameterList", "parameters": [], - "src": "12867:2:0" + "src": "13541:2:0" }, "returnParameters": { - "id": 845, + "id": 916, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 820, + "id": 891, "name": "", "nodeType": "VariableDeclaration", - "scope": 863, - "src": "12899:7:0", + "scope": 935, + "src": "13573:7:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -23561,10 +25667,10 @@ "typeString": "address" }, "typeName": { - "id": 819, + "id": 890, "name": "address", "nodeType": "ElementaryTypeName", - "src": "12899:7:0", + "src": "13573:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -23576,11 +25682,11 @@ }, { "constant": false, - "id": 822, + "id": 893, "name": "", "nodeType": "VariableDeclaration", - "scope": 863, - "src": "12908:13:0", + "scope": 935, + "src": "13582:13:0", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { @@ -23588,10 +25694,10 @@ "typeString": "string" }, "typeName": { - "id": 821, + "id": 892, "name": "string", "nodeType": "ElementaryTypeName", - "src": "12908:6:0", + "src": "13582:6:0", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" @@ -23602,11 +25708,11 @@ }, { "constant": false, - "id": 824, + "id": 895, "name": "", "nodeType": "VariableDeclaration", - "scope": 863, - "src": "12923:13:0", + "scope": 935, + "src": "13597:13:0", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { @@ -23614,10 +25720,10 @@ "typeString": "string" }, "typeName": { - "id": 823, + "id": 894, "name": "string", "nodeType": "ElementaryTypeName", - "src": "12923:6:0", + "src": "13597:6:0", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" @@ -23628,11 +25734,11 @@ }, { "constant": false, - "id": 826, + "id": 897, "name": "", "nodeType": "VariableDeclaration", - "scope": 863, - "src": "12938:4:0", + "scope": 935, + "src": "13612:4:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -23640,10 +25746,10 @@ "typeString": "uint256" }, "typeName": { - "id": 825, + "id": 896, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "12938:4:0", + "src": "13612:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -23654,11 +25760,11 @@ }, { "constant": false, - "id": 828, + "id": 899, "name": "", "nodeType": "VariableDeclaration", - "scope": 863, - "src": "12944:4:0", + "scope": 935, + "src": "13618:4:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -23666,10 +25772,10 @@ "typeString": "uint256" }, "typeName": { - "id": 827, + "id": 898, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "12944:4:0", + "src": "13618:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -23680,11 +25786,11 @@ }, { "constant": false, - "id": 830, + "id": 901, "name": "", "nodeType": "VariableDeclaration", - "scope": 863, - "src": "12950:4:0", + "scope": 935, + "src": "13624:4:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -23692,10 +25798,10 @@ "typeString": "uint256" }, "typeName": { - "id": 829, + "id": 900, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "12950:4:0", + "src": "13624:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -23706,11 +25812,11 @@ }, { "constant": false, - "id": 832, + "id": 903, "name": "", "nodeType": "VariableDeclaration", - "scope": 863, - "src": "12956:4:0", + "scope": 935, + "src": "13630:4:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -23718,10 +25824,10 @@ "typeString": "uint256" }, "typeName": { - "id": 831, + "id": 902, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "12956:4:0", + "src": "13630:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -23732,11 +25838,11 @@ }, { "constant": false, - "id": 834, + "id": 905, "name": "", "nodeType": "VariableDeclaration", - "scope": 863, - "src": "12962:4:0", + "scope": 935, + "src": "13636:4:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -23744,10 +25850,10 @@ "typeString": "uint256" }, "typeName": { - "id": 833, + "id": 904, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "12962:4:0", + "src": "13636:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -23758,11 +25864,11 @@ }, { "constant": false, - "id": 836, + "id": 907, "name": "", "nodeType": "VariableDeclaration", - "scope": 863, - "src": "12968:4:0", + "scope": 935, + "src": "13642:4:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -23770,10 +25876,10 @@ "typeString": "uint256" }, "typeName": { - "id": 835, + "id": 906, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "12968:4:0", + "src": "13642:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -23784,11 +25890,11 @@ }, { "constant": false, - "id": 838, + "id": 909, "name": "", "nodeType": "VariableDeclaration", - "scope": 863, - "src": "12974:4:0", + "scope": 935, + "src": "13648:4:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -23796,10 +25902,10 @@ "typeString": "uint256" }, "typeName": { - "id": 837, + "id": 908, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "12974:4:0", + "src": "13648:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -23810,11 +25916,11 @@ }, { "constant": false, - "id": 840, + "id": 911, "name": "", "nodeType": "VariableDeclaration", - "scope": 863, - "src": "12980:4:0", + "scope": 935, + "src": "13654:4:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -23822,10 +25928,10 @@ "typeString": "uint256" }, "typeName": { - "id": 839, + "id": 910, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "12980:4:0", + "src": "13654:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -23836,11 +25942,11 @@ }, { "constant": false, - "id": 842, + "id": 913, "name": "", "nodeType": "VariableDeclaration", - "scope": 863, - "src": "12985:4:0", + "scope": 935, + "src": "13659:4:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -23848,10 +25954,10 @@ "typeString": "uint256" }, "typeName": { - "id": 841, + "id": 912, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "12985:4:0", + "src": "13659:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -23862,11 +25968,11 @@ }, { "constant": false, - "id": 844, + "id": 915, "name": "", "nodeType": "VariableDeclaration", - "scope": 863, - "src": "12991:4:0", + "scope": 935, + "src": "13665:4:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -23874,10 +25980,10 @@ "typeString": "bool" }, "typeName": { - "id": 843, + "id": 914, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "12991:4:0", + "src": "13665:4:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -23887,36 +25993,36 @@ "visibility": "internal" } ], - "src": "12888:118:0" + "src": "13562:118:0" }, - "scope": 895, - "src": "12848:555:0", + "scope": 967, + "src": "13522:560:0", "stateMutability": "view", "superFunction": null, "visibility": "public" }, { "body": { - "id": 876, + "id": 948, "nodeType": "Block", - "src": "13498:55:0", + "src": "14177:55:0", "statements": [ { "expression": { "argumentTypes": null, - "id": 874, + "id": 946, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 872, + "id": 944, "name": "fundRequestProcessTime", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 55, - "src": "13509:22:0", + "referencedDeclaration": 57, + "src": "14188:22:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -23926,86 +26032,86 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 873, + "id": 945, "name": "processTime", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 865, - "src": "13534:11:0", + "referencedDeclaration": 937, + "src": "14213:11:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "13509:36:0", + "src": "14188:36:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 875, + "id": 947, "nodeType": "ExpressionStatement", - "src": "13509:36:0" + "src": "14188:36:0" } ] }, "documentation": null, - "id": 877, + "id": 949, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, - "id": 868, + "id": 940, "modifierName": { "argumentTypes": null, - "id": 867, + "id": 939, "name": "ifActive", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 98, - "src": "13468:8:0", + "referencedDeclaration": 100, + "src": "14147:8:0", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "13468:8:0" + "src": "14147:8:0" }, { "arguments": null, - "id": 870, + "id": 942, "modifierName": { "argumentTypes": null, - "id": 869, + "id": 941, "name": "onlyManager", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 73, - "src": "13478:11:0", + "referencedDeclaration": 75, + "src": "14157:11:0", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "13478:11:0" + "src": "14157:11:0" } ], "name": "setFundRequestProcessTime", "nodeType": "FunctionDefinition", "parameters": { - "id": 866, + "id": 938, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 865, + "id": 937, "name": "processTime", "nodeType": "VariableDeclaration", - "scope": 877, - "src": "13450:16:0", + "scope": 949, + "src": "14129:16:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -24013,10 +26119,10 @@ "typeString": "uint256" }, "typeName": { - "id": 864, + "id": 936, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "13450:4:0", + "src": "14129:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -24026,25 +26132,25 @@ "visibility": "internal" } ], - "src": "13449:18:0" + "src": "14128:18:0" }, "returnParameters": { - "id": 871, + "id": 943, "nodeType": "ParameterList", "parameters": [], - "src": "13498:0:0" + "src": "14177:0:0" }, - "scope": 895, - "src": "13415:138:0", + "scope": 967, + "src": "14094:138:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { - "id": 893, + "id": 965, "nodeType": "Block", - "src": "13609:158:0", + "src": "14288:158:0", "statements": [ { "expression": { @@ -24056,19 +26162,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 885, + "id": 957, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 883, + "id": 955, "name": "amountCollected", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 37, - "src": "13628:15:0", + "referencedDeclaration": 39, + "src": "14307:15:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -24078,18 +26184,18 @@ "operator": "==", "rightExpression": { "argumentTypes": null, - "id": 884, + "id": 956, "name": "amountSpended", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 41, - "src": "13647:13:0", + "referencedDeclaration": 43, + "src": "14326:13:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "13628:32:0", + "src": "14307:32:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -24098,14 +26204,14 @@ { "argumentTypes": null, "hexValue": "43616d706169676e2063616e6e6f7420626520636c6f7365642c2062656361757365206974207374696c6c2068617320736f6d6520756e7370656e6465642066756e6473", - "id": 886, + "id": 958, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", - "src": "13661:70:0", + "src": "14340:70:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_d259561263c4179fb1862e68b69719b67bd0658e4482a6fe5eec7a75fb9e6173", @@ -24125,21 +26231,21 @@ "typeString": "literal_string \"Campaign cannot be closed, because it still has some unspended funds\"" } ], - "id": 882, + "id": 954, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ - 1024, - 1025 + 1096, + 1097 ], - "referencedDeclaration": 1025, - "src": "13620:7:0", + "referencedDeclaration": 1097, + "src": "14299:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, - "id": 887, + "id": 959, "isConstant": false, "isLValue": false, "isPure": false, @@ -24147,32 +26253,32 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "13620:112:0", + "src": "14299:112:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 888, + "id": 960, "nodeType": "ExpressionStatement", - "src": "13620:112:0" + "src": "14299:112:0" }, { "expression": { "argumentTypes": null, - "id": 891, + "id": 963, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 889, + "id": 961, "name": "isActive", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 61, - "src": "13743:8:0", + "referencedDeclaration": 63, + "src": "14422:8:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -24183,14 +26289,14 @@ "rightHandSide": { "argumentTypes": null, "hexValue": "66616c7365", - "id": 890, + "id": 962, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "13754:5:0", + "src": "14433:5:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -24198,69 +26304,69 @@ }, "value": "false" }, - "src": "13743:16:0", + "src": "14422:16:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "id": 892, + "id": 964, "nodeType": "ExpressionStatement", - "src": "13743:16:0" + "src": "14422:16:0" } ] }, "documentation": null, - "id": 894, + "id": 966, "implemented": true, "kind": "function", "modifiers": [ { "arguments": null, - "id": 880, + "id": 952, "modifierName": { "argumentTypes": null, - "id": 879, + "id": 951, "name": "onlyManager", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 73, - "src": "13590:11:0", + "referencedDeclaration": 75, + "src": "14269:11:0", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", - "src": "13590:11:0" + "src": "14269:11:0" } ], "name": "deactivate", "nodeType": "FunctionDefinition", "parameters": { - "id": 878, + "id": 950, "nodeType": "ParameterList", "parameters": [], - "src": "13587:2:0" + "src": "14266:2:0" }, "returnParameters": { - "id": 881, + "id": 953, "nodeType": "ParameterList", "parameters": [], - "src": "13609:0:0" + "src": "14288:0:0" }, - "scope": 895, - "src": "13568:199:0", + "scope": 967, + "src": "14247:199:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" } ], - "scope": 896, - "src": "475:13301:0" + "scope": 968, + "src": "475:13980:0" } ], - "src": "0:13776:0" + "src": "0:14455:0" }, "compiler": { "name": "solc", @@ -24268,7 +26374,7 @@ }, "networks": {}, "schemaVersion": "3.2.2", - "updatedAt": "2020-08-11T18:47:40.815Z", + "updatedAt": "2020-08-13T11:44:40.510Z", "devdoc": { "methods": {} }, diff --git a/src/services/ethereum/ethService.js b/src/services/ethereum/ethService.js index 8066a34..5773bb1 100644 --- a/src/services/ethereum/ethService.js +++ b/src/services/ethereum/ethService.js @@ -71,7 +71,7 @@ export const getCampaign = async (campaignAddress, userAddress) => { isDonor = await campaign.methods.donors(userAddress).call() != 0; } - return { + let campaignSummary = { manager: summary[0], title: summary[1], description: summary[2], @@ -87,8 +87,18 @@ export const getCampaign = async (campaignAddress, userAddress) => { isActive: summary[12], address: campaignAddress, donorsCount: donorsCount, - isDonor: isDonor + isDonor: isDonor, } + if (campaignSummary.isActive) { + if (campaignSummary.amountInitialGoal > campaignSummary.amountCollected) + campaignSummary.status = 'Goal Pending'; + else + campaignSummary.status = 'Goal Reached'; + } + else { + campaignSummary.status = 'Closed'; + } + return campaignSummary; } export const getCampaignsCount = async () => { @@ -142,6 +152,11 @@ export const createFundRequest = async (address, description, amount, recipientA await campaign.methods.createFundRequest(description, amount, recipientAddresses, recipientAmount).send({ from: currentAccount }); } +export const closeFundRequest = async (address, index) => { + let campaign = new Contract(CAMPAIGN_ABI, address); + await campaign.methods.closeFundRequest(index).send({ from: currentAccount }); +} + export const getSingleFundRequest = async (address, index) => { const campaign = new Contract(CAMPAIGN_ABI, address); const req = await campaign.methods.getFundRequest(index).call(); @@ -156,6 +171,7 @@ export const getSingleFundRequest = async (address, index) => { recipients: req[7].map((x, i) => { return { address: x, amount: req[8][i] }; }), + isClosed: req[9], index: index, } return request; diff --git a/src/services/firebase/databaseService.js b/src/services/firebase/databaseService.js index 16e8f05..b868b7a 100644 --- a/src/services/firebase/databaseService.js +++ b/src/services/firebase/databaseService.js @@ -44,6 +44,11 @@ export const getTransaction = async (campaignAddress, userAddress) => { return await read(`donations/${campaignAddress}/${userAddress}`); } +export const getUserDonations = async (userAddress) => { + return (await database.ref('donations').orderByChild(`${userAddress}`).once('value')).val(); +} + +//donations structure // const donations = { // ['campaign address']: { // ['user address']: {