arc_dx
Version:
A platform for building DAOs
592 lines (591 loc) • 592 kB
JSON
{
"contractName": "SimpleICO",
"abi": [
{
"constant": true,
"inputs": [
{
"name": "",
"type": "bytes32"
}
],
"name": "parameters",
"outputs": [
{
"name": "cap",
"type": "uint256"
},
{
"name": "price",
"type": "uint256"
},
{
"name": "startBlock",
"type": "uint256"
},
{
"name": "endBlock",
"type": "uint256"
},
{
"name": "beneficiary",
"type": "address"
},
{
"name": "admin",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_hashedParameters",
"type": "bytes32"
}
],
"name": "updateParameters",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "",
"type": "address"
}
],
"name": "organizationsICOInfo",
"outputs": [
{
"name": "paramsHash",
"type": "bytes32"
},
{
"name": "avatarContractICO",
"type": "address"
},
{
"name": "totalEthRaised",
"type": "uint256"
},
{
"name": "isHalted",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [],
"name": "renounceOwnership",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "owner",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "hashedParameters",
"outputs": [
{
"name": "",
"type": "bytes32"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "organization",
"type": "address"
},
{
"indexed": true,
"name": "_beneficiary",
"type": "address"
},
{
"indexed": false,
"name": "_incomingEther",
"type": "uint256"
},
{
"indexed": true,
"name": "_tokensAmount",
"type": "uint256"
}
],
"name": "DonationReceived",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "previousOwner",
"type": "address"
}
],
"name": "OwnershipRenounced",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "previousOwner",
"type": "address"
},
{
"indexed": true,
"name": "newOwner",
"type": "address"
}
],
"name": "OwnershipTransferred",
"type": "event"
},
{
"constant": false,
"inputs": [
{
"name": "_cap",
"type": "uint256"
},
{
"name": "_price",
"type": "uint256"
},
{
"name": "_startBlock",
"type": "uint256"
},
{
"name": "_endBlock",
"type": "uint256"
},
{
"name": "_beneficiary",
"type": "address"
},
{
"name": "_admin",
"type": "address"
}
],
"name": "setParameters",
"outputs": [
{
"name": "",
"type": "bytes32"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_cap",
"type": "uint256"
},
{
"name": "_price",
"type": "uint256"
},
{
"name": "_startBlock",
"type": "uint256"
},
{
"name": "_endBlock",
"type": "uint256"
},
{
"name": "_beneficiary",
"type": "address"
},
{
"name": "_admin",
"type": "address"
}
],
"name": "getParametersHash",
"outputs": [
{
"name": "",
"type": "bytes32"
}
],
"payable": false,
"stateMutability": "pure",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_avatar",
"type": "address"
}
],
"name": "start",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_avatar",
"type": "address"
}
],
"name": "haltICO",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_avatar",
"type": "address"
}
],
"name": "resumeICO",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_avatar",
"type": "address"
}
],
"name": "isActive",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_avatar",
"type": "address"
},
{
"name": "_beneficiary",
"type": "address"
}
],
"name": "donate",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": true,
"stateMutability": "payable",
"type": "function"
}
],
"bytecode": "0x608060405260008054600160a060020a03191633179055611287806100256000396000f3006080604052600436106100b65763ffffffff60e060020a6000350416630250680481146100bb5780630d6099391461011257806321bea7cc146101575780632ac2af53146101715780634b9f69b81461018b5780634eb09bf4146101dc578063715018a61461020f5780638da5cb5b146102245780639f8a13d714610255578063bdbb829d1461028a578063dd0b281e146102ab578063e270bc81146102cc578063f2fde38b146102ed578063f98e87ba1461030e575b600080fd5b3480156100c757600080fd5b506100d3600435610323565b604080519687526020870195909552858501939093526060850191909152600160a060020a0390811660808501521660a0830152519081900360c00190f35b34801561011e57600080fd5b50610145600435602435604435606435600160a060020a0360843581169060a43516610367565b60408051918252519081900360200190f35b610145600160a060020a0360043581169060243516610449565b34801561017d57600080fd5b5061018960043561078f565b005b34801561019757600080fd5b506101ac600160a060020a03600435166107ab565b60408051948552600160a060020a0390931660208501528383019190915215156060830152519081900360800190f35b3480156101e857600080fd5b50610145600435602435604435606435600160a060020a0360843581169060a435166107e0565b34801561021b57600080fd5b506101896108a1565b34801561023057600080fd5b5061023961090d565b60408051600160a060020a039092168252519081900360200190f35b34801561026157600080fd5b50610276600160a060020a036004351661091c565b604080519115158252519081900360200190f35b34801561029657600080fd5b50610189600160a060020a0360043516610a1e565b3480156102b757600080fd5b50610189600160a060020a0360043516610a7b565b3480156102d857600080fd5b50610189600160a060020a0360043516610b71565b3480156102f957600080fd5b50610189600160a060020a0360043516610bcb565b34801561031a57600080fd5b50610145610bee565b60036020819052600091825260409091208054600182015460028301549383015460048401546005909401549294919391929091600160a060020a03908116911686565b60008087151561037657600080fd5b6103848888888888886107e0565b600081815260036020526040902054909150151561043e576040805160c08101825289815260208082018a81528284018a8152606084018a8152600160a060020a03808b16608087019081528a821660a0880190815260008a81526003978890529890982096518755935160018701559151600286015551928401929092555160048301805491831673ffffffffffffffffffffffffffffffffffffffff1992831617905592516005909201805492909116919092161790555b979650505050505050565b6000610453610dba565b61045b610de1565b5050600160a060020a03808416600090815260026020818152604080842081516080818101845282548083526001808501548a1684880152848801548487015260039485015460ff161515606080860191909152918952848752858920865160c08101885281548152918101549782019790975296860154948701949094529184015492850192909252600483015486169084015260059091015490931660a082015290808061050a8861091c565b151561051557600080fd5b60608501511561052457600080fd5b6040850151845161053a9163ffffffff610bf416565b34111561057057604085015184516105579163ffffffff610bf416565b9250610569348463ffffffff610bf416565b9150610574565b3492505b602084015161058a90849063ffffffff610c0b16565b600160a060020a03808a166000908152600260208190526040808320909101805488019055608088015190519394509091169185156108fc0291869190818181858888f193505050501580156105e4573d6000803e3d6000fd5b5087600160a060020a0316638da5cb5b6040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561062357600080fd5b505af1158015610637573d6000803e3d6000fd5b505050506040513d602081101561064d57600080fd5b5051604080517f6407e43200000000000000000000000000000000000000000000000000000000815260048101849052600160a060020a038a811660248301528b8116604483015291519190921691636407e4329160648083019260209291908290030181600087803b1580156106c357600080fd5b505af11580156106d7573d6000803e3d6000fd5b505050506040513d60208110156106ed57600080fd5b505115156106fa57600080fd5b811561073857604051600160a060020a0388169083156108fc029084906000818181858888f19350505050158015610736573d6000803e3d6000fd5b505b8087600160a060020a031689600160a060020a03167fce9409ee3dc10e35de83dda0f830e4a13935452188fe71a956b850ecb839425f866040518082815260200191505060405180910390a4979650505050505050565b600054600160a060020a031633146107a657600080fd5b600155565b600260208190526000918252604090912080546001820154928201546003909201549092600160a060020a0316919060ff1684565b60408051602080820189905281830188905260608201879052608082018690526c01000000000000000000000000600160a060020a03808716820260a085015285160260b4830152825160a881840301815260c8909201928390528151600093918291908401908083835b6020831061086a5780518252601f19909201916020918201910161084b565b5181516020939093036101000a600019018019909116921691909117905260405192018290039091209a9950505050505050505050565b600054600160a060020a031633146108b857600080fd5b60008054604051600160a060020a03909116917ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482091a26000805473ffffffffffffffffffffffffffffffffffffffff19169055565b600054600160a060020a031681565b6000610926610dba565b61092e610de1565b5050600160a060020a03808316600090815260026020818152604080842081516080818101845282548083526001808501548a16848801528488015484870190815260039586015460ff161515606080870191909152928a5285885298869020865160c0810188528154808252928201549881019890985297880154958701959095529286015492850192909252600485015487169184019190915260059093015490941660a082015291519092116109ea5760009250610a17565b606081015143106109fe5760009250610a17565b60408101514311610a125760009250610a17565b600192505b5050919050565b600160a060020a0381811660009081526002602090815260408083205483526003909152902060050154163314610a5457600080fd5b600160a060020a03166000908152600260205260409020600301805460ff19166001179055565b610a83610dba565b610a8c8261091c565b15610a9657600080fd5b610a9f82610c34565b8082526000908152600360205260409020541515610abc57600080fd5b8130610ac6610e2a565b600160a060020a03928316815291166020820152604080519182900301906000f080158015610af9573d6000803e3d6000fd5b50600160a060020a039081166020838101918252938216600090815260029485905260409081902084518155915160018301805473ffffffffffffffffffffffffffffffffffffffff191691909416179092559082015192810192909255606001516003909101805460ff1916911515919091179055565b600160a060020a0381811660009081526002602090815260408083205483526003909152902060050154163314610ba757600080fd5b600160a060020a03166000908152600260205260409020600301805460ff19169055565b600054600160a060020a03163314610be257600080fd5b610beb81610d3d565b50565b60015481565b600082821115610c0057fe5b508082035b92915050565b6000821515610c1c57506000610c05565b50818102818382811515610c2c57fe5b0414610c0557fe5b600081600160a060020a0316638da5cb5b6040518163ffffffff1660e060020a028152600401602060405180830381600087803b158015610c7457600080fd5b505af1158015610c88573d6000803e3d6000fd5b505050506040513d6020811015610c9e57600080fd5b5051604080517f1c4d5608000000000000000000000000000000000000000000000000000000008152306004820152600160a060020a03858116602483015291519190921691631c4d56089160448083019260209291908290030181600087803b158015610d0b57600080fd5b505af1158015610d1f573d6000803e3d6000fd5b505050506040513d6020811015610d3557600080fd5b505192915050565b600160a060020a0381161515610d5257600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60408051608081018252600080825260208201819052918101829052606081019190915290565b60c060405190810160405280600081526020016000815260200160008152602001600081526020016000600160a060020a031681526020016000600160a060020a031681525090565b60405161042180610e3b833901905600608060405234801561001057600080fd5b5060405160408061042183398101604052805160209091015160008054600160a060020a0319908116331790915560018054600160a060020a03948516908316179055600280549390921692169190911790556103af806100726000396000f3006080604052600436106100825763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631ebbede2811461013b57806323bd4d7a1461016c578063715018a61461018157806383197ef0146101965780638da5cb5b146101ab578063f2fde38b146101c0578063f5074f41146101e1575b34151561008e57600080fd5b600254600154604080517f21bea7cc000000000000000000000000000000000000000000000000000000008152600160a060020a039283166004820152336024820152905191909216916321bea7cc91349160448082019260209290919082900301818588803b15801561010157600080fd5b505af1158015610115573d6000803e3d6000fd5b50505050506040513d602081101561012c57600080fd5b5051151561013957600080fd5b005b34801561014757600080fd5b50610150610202565b60408051600160a060020a039092168252519081900360200190f35b34801561017857600080fd5b50610150610211565b34801561018d57600080fd5b50610139610220565b3480156101a257600080fd5b5061013961028c565b3480156101b757600080fd5b506101506102b1565b3480156101cc57600080fd5b50610139600160a060020a03600435166102c0565b3480156101ed57600080fd5b50610139600160a060020a03600435166102e3565b600254600160a060020a031681565b600154600160a060020a031681565b600054600160a060020a0316331461023757600080fd5b60008054604051600160a060020a03909116917ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482091a26000805473ffffffffffffffffffffffffffffffffffffffff19169055565b600054600160a060020a031633146102a357600080fd5b600054600160a060020a0316ff5b600054600160a060020a031681565b600054600160a060020a031633146102d757600080fd5b6102e081610306565b50565b600054600160a060020a031633146102fa57600080fd5b80600160a060020a0316ff5b600160a060020a038116151561031b57600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555600a165627a7a72305820237703e0ba7ee17d4b61790f56099c4f1c7cd01ec89abd6fefd29cf227c411660029a165627a7a7230582046eac2669ec5e2d7ea4fba776cb71fbd53029d826b48d21a390eeca6984987a10029",
"deployedBytecode": "0x6080604052600436106100b65763ffffffff60e060020a6000350416630250680481146100bb5780630d6099391461011257806321bea7cc146101575780632ac2af53146101715780634b9f69b81461018b5780634eb09bf4146101dc578063715018a61461020f5780638da5cb5b146102245780639f8a13d714610255578063bdbb829d1461028a578063dd0b281e146102ab578063e270bc81146102cc578063f2fde38b146102ed578063f98e87ba1461030e575b600080fd5b3480156100c757600080fd5b506100d3600435610323565b604080519687526020870195909552858501939093526060850191909152600160a060020a0390811660808501521660a0830152519081900360c00190f35b34801561011e57600080fd5b50610145600435602435604435606435600160a060020a0360843581169060a43516610367565b60408051918252519081900360200190f35b610145600160a060020a0360043581169060243516610449565b34801561017d57600080fd5b5061018960043561078f565b005b34801561019757600080fd5b506101ac600160a060020a03600435166107ab565b60408051948552600160a060020a0390931660208501528383019190915215156060830152519081900360800190f35b3480156101e857600080fd5b50610145600435602435604435606435600160a060020a0360843581169060a435166107e0565b34801561021b57600080fd5b506101896108a1565b34801561023057600080fd5b5061023961090d565b60408051600160a060020a039092168252519081900360200190f35b34801561026157600080fd5b50610276600160a060020a036004351661091c565b604080519115158252519081900360200190f35b34801561029657600080fd5b50610189600160a060020a0360043516610a1e565b3480156102b757600080fd5b50610189600160a060020a0360043516610a7b565b3480156102d857600080fd5b50610189600160a060020a0360043516610b71565b3480156102f957600080fd5b50610189600160a060020a0360043516610bcb565b34801561031a57600080fd5b50610145610bee565b60036020819052600091825260409091208054600182015460028301549383015460048401546005909401549294919391929091600160a060020a03908116911686565b60008087151561037657600080fd5b6103848888888888886107e0565b600081815260036020526040902054909150151561043e576040805160c08101825289815260208082018a81528284018a8152606084018a8152600160a060020a03808b16608087019081528a821660a0880190815260008a81526003978890529890982096518755935160018701559151600286015551928401929092555160048301805491831673ffffffffffffffffffffffffffffffffffffffff1992831617905592516005909201805492909116919092161790555b979650505050505050565b6000610453610dba565b61045b610de1565b5050600160a060020a03808416600090815260026020818152604080842081516080818101845282548083526001808501548a1684880152848801548487015260039485015460ff161515606080860191909152918952848752858920865160c08101885281548152918101549782019790975296860154948701949094529184015492850192909252600483015486169084015260059091015490931660a082015290808061050a8861091c565b151561051557600080fd5b60608501511561052457600080fd5b6040850151845161053a9163ffffffff610bf416565b34111561057057604085015184516105579163ffffffff610bf416565b9250610569348463ffffffff610bf416565b9150610574565b3492505b602084015161058a90849063ffffffff610c0b16565b600160a060020a03808a166000908152600260208190526040808320909101805488019055608088015190519394509091169185156108fc0291869190818181858888f193505050501580156105e4573d6000803e3d6000fd5b5087600160a060020a0316638da5cb5b6040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561062357600080fd5b505af1158015610637573d6000803e3d6000fd5b505050506040513d602081101561064d57600080fd5b5051604080517f6407e43200000000000000000000000000000000000000000000000000000000815260048101849052600160a060020a038a811660248301528b8116604483015291519190921691636407e4329160648083019260209291908290030181600087803b1580156106c357600080fd5b505af11580156106d7573d6000803e3d6000fd5b505050506040513d60208110156106ed57600080fd5b505115156106fa57600080fd5b811561073857604051600160a060020a0388169083156108fc029084906000818181858888f19350505050158015610736573d6000803e3d6000fd5b505b8087600160a060020a031689600160a060020a03167fce9409ee3dc10e35de83dda0f830e4a13935452188fe71a956b850ecb839425f866040518082815260200191505060405180910390a4979650505050505050565b600054600160a060020a031633146107a657600080fd5b600155565b600260208190526000918252604090912080546001820154928201546003909201549092600160a060020a0316919060ff1684565b60408051602080820189905281830188905260608201879052608082018690526c01000000000000000000000000600160a060020a03808716820260a085015285160260b4830152825160a881840301815260c8909201928390528151600093918291908401908083835b6020831061086a5780518252601f19909201916020918201910161084b565b5181516020939093036101000a600019018019909116921691909117905260405192018290039091209a9950505050505050505050565b600054600160a060020a031633146108b857600080fd5b60008054604051600160a060020a03909116917ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482091a26000805473ffffffffffffffffffffffffffffffffffffffff19169055565b600054600160a060020a031681565b6000610926610dba565b61092e610de1565b5050600160a060020a03808316600090815260026020818152604080842081516080818101845282548083526001808501548a16848801528488015484870190815260039586015460ff161515606080870191909152928a5285885298869020865160c0810188528154808252928201549881019890985297880154958701959095529286015492850192909252600485015487169184019190915260059093015490941660a082015291519092116109ea5760009250610a17565b606081015143106109fe5760009250610a17565b60408101514311610a125760009250610a17565b600192505b5050919050565b600160a060020a0381811660009081526002602090815260408083205483526003909152902060050154163314610a5457600080fd5b600160a060020a03166000908152600260205260409020600301805460ff19166001179055565b610a83610dba565b610a8c8261091c565b15610a9657600080fd5b610a9f82610c34565b8082526000908152600360205260409020541515610abc57600080fd5b8130610ac6610e2a565b600160a060020a03928316815291166020820152604080519182900301906000f080158015610af9573d6000803e3d6000fd5b50600160a060020a039081166020838101918252938216600090815260029485905260409081902084518155915160018301805473ffffffffffffffffffffffffffffffffffffffff191691909416179092559082015192810192909255606001516003909101805460ff1916911515919091179055565b600160a060020a0381811660009081526002602090815260408083205483526003909152902060050154163314610ba757600080fd5b600160a060020a03166000908152600260205260409020600301805460ff19169055565b600054600160a060020a03163314610be257600080fd5b610beb81610d3d565b50565b60015481565b600082821115610c0057fe5b508082035b92915050565b6000821515610c1c57506000610c05565b50818102818382811515610c2c57fe5b0414610c0557fe5b600081600160a060020a0316638da5cb5b6040518163ffffffff1660e060020a028152600401602060405180830381600087803b158015610c7457600080fd5b505af1158015610c88573d6000803e3d6000fd5b505050506040513d6020811015610c9e57600080fd5b5051604080517f1c4d5608000000000000000000000000000000000000000000000000000000008152306004820152600160a060020a03858116602483015291519190921691631c4d56089160448083019260209291908290030181600087803b158015610d0b57600080fd5b505af1158015610d1f573d6000803e3d6000fd5b505050506040513d6020811015610d3557600080fd5b505192915050565b600160a060020a0381161515610d5257600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60408051608081018252600080825260208201819052918101829052606081019190915290565b60c060405190810160405280600081526020016000815260200160008152602001600081526020016000600160a060020a031681526020016000600160a060020a031681525090565b60405161042180610e3b833901905600608060405234801561001057600080fd5b5060405160408061042183398101604052805160209091015160008054600160a060020a0319908116331790915560018054600160a060020a03948516908316179055600280549390921692169190911790556103af806100726000396000f3006080604052600436106100825763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631ebbede2811461013b57806323bd4d7a1461016c578063715018a61461018157806383197ef0146101965780638da5cb5b146101ab578063f2fde38b146101c0578063f5074f41146101e1575b34151561008e57600080fd5b600254600154604080517f21bea7cc000000000000000000000000000000000000000000000000000000008152600160a060020a039283166004820152336024820152905191909216916321bea7cc91349160448082019260209290919082900301818588803b15801561010157600080fd5b505af1158015610115573d6000803e3d6000fd5b50505050506040513d602081101561012c57600080fd5b5051151561013957600080fd5b005b34801561014757600080fd5b50610150610202565b60408051600160a060020a039092168252519081900360200190f35b34801561017857600080fd5b50610150610211565b34801561018d57600080fd5b50610139610220565b3480156101a257600080fd5b5061013961028c565b3480156101b757600080fd5b506101506102b1565b3480156101cc57600080fd5b50610139600160a060020a03600435166102c0565b3480156101ed57600080fd5b50610139600160a060020a03600435166102e3565b600254600160a060020a031681565b600154600160a060020a031681565b600054600160a060020a0316331461023757600080fd5b60008054604051600160a060020a03909116917ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482091a26000805473ffffffffffffffffffffffffffffffffffffffff19169055565b600054600160a060020a031633146102a357600080fd5b600054600160a060020a0316ff5b600054600160a060020a031681565b600054600160a060020a031633146102d757600080fd5b6102e081610306565b50565b600054600160a060020a031633146102fa57600080fd5b80600160a060020a0316ff5b600160a060020a038116151561031b57600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555600a165627a7a72305820237703e0ba7ee17d4b61790f56099c4f1c7cd01ec89abd6fefd29cf227c411660029a165627a7a7230582046eac2669ec5e2d7ea4fba776cb71fbd53029d826b48d21a390eeca6984987a10029",
"sourceMap": "1391:7071:32:-;;;567:5:55;:18;;-1:-1:-1;;;;;;567:18:55;575:10;567:18;;;1391:7071:32;;;;;;",
"deployedSourceMap": "1391:7071:32:-;;;;;;;;;-1:-1:-1;;;1391:7071:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2498:46;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2498:46:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2498:46:32;;;;;;;;;;;;;;;;;;;;;3113:798;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3113:798:32;;;;;;;;;-1:-1:-1;;;;;3113:798:32;;;;;;;;;;;;;;;;;;;;;;;;;;7130:1330;;-1:-1:-1;;;;;7130:1330:32;;;;;;;;;;419:157:33;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;419:157:33;;;;;;;2433:58:32;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2433:58:32;-1:-1:-1;;;;;2433:58:32;;;;;;;;;;;;-1:-1:-1;;;;;2433:58:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4316:441;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;4316:441:32;;;;;;;;;-1:-1:-1;;;;;4316:441:32;;;;;;;;;;1001:111:55;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1001:111:55;;;;238:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;238:20:55;;;;;;;;-1:-1:-1;;;;;238:20:55;;;;;;;;;;;;;;6266:470:32;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;6266:470:32;-1:-1:-1;;;;;6266:470:32;;;;;;;;;;;;;;;;;;;;;;;5343:194;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;5343:194:32;-1:-1:-1;;;;;5343:194:32;;;;;4859:364;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;4859:364:32;-1:-1:-1;;;;;4859:364:32;;;;;5659:197;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;5659:197:32;-1:-1:-1;;;;;5659:197:32;;;;;1274:103:55;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1274:103:55;-1:-1:-1;;;;;1274:103:55;;;;;356:31:33;;8:9:-1;5:2;;;30:1;27;20:12;5:2;356:31:33;;;;2498:46:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2498:46:32;;;;;;:::o;3113:798::-;3317:7;;3348:9;;;3340:18;;;;;;3389:159;3420:4;3438:6;3458:11;3483:9;3506:12;3532:6;3389:17;:159::i;:::-;3562:22;;;;:10;:22;;;;;:26;3368:180;;-1:-1:-1;3562:31:32;3558:320;;;3634:233;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3634:233:32;;;;;;;;;;;;;;;;;;-1:-1:-1;3609:22:32;;;:10;:22;;;;;;;;:258;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;3609:258:32;;;;;;;;;;;;;;;;;;;;;;;;;3558:320;3894:10;3113:798;-1:-1:-1;;;;;;;3113:798:32:o;7130:1330::-;7207:4;7223:23;;:::i;:::-;7288:24;;:::i;:::-;-1:-1:-1;;;;;;;7249:29:32;;;7491:18;7249:29;;;:20;:29;;;;;;;;7223:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7315:26;;;;;;;;;7288:53;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7491:18;;7392:17;7270:7;7392:8;:17::i;:::-;7384:26;;;;;;;;7466:12;;;;7465:13;7457:22;;;;;;7618:18;;;;7602:10;;7601:36;;;:16;:36;:::i;:::-;7589:9;:48;7584:242;;;7687:18;;;;7671:10;;7670:36;;;:16;:36;:::i;:::-;7654:52;-1:-1:-1;7729:30:32;7730:9;7654:52;7729:30;:15;:30;:::i;:::-;7720:39;;7584:242;;;7806:9;7790:25;;7584:242;7868:12;;;;7850:31;;:13;;:31;:17;:31;:::i;:::-;-1:-1:-1;;;;;7970:29:32;;;;;;;:20;:29;;;;;;;;:44;;;:61;;;;;;8125:18;;;;:42;;7836:45;;-1:-1:-1;8125:27:32;;;;:42;;;;;8018:13;;8125:42;;7970:29;8125:42;8018:13;8125:27;:42;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;8125:42:32;8206:7;-1:-1:-1;;;;;8206:13:32;;:15;;;;;-1:-1:-1;;;8206:15:32;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;8206:15:32;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;8206:15:32;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;8206:15:32;8186:86;;;;;;;;;;;;-1:-1:-1;;;;;8186:86:32;;;;;;;;;;;;;;;;:47;;;;;;;:86;;;;;8206:15;;8186:86;;;;;;;-1:-1:-1;8186:47:32;:86;;;5:2:-1;;;;30:1;27;20:12;5:2;8186:86:32;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;8186:86:32;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;8186:86:32;8178:95;;;;;;;;8287:11;;8283:71;;8314:29;;-1:-1:-1;;;;;8314:21:32;;;:29;;;;;8336:6;;8314:29;;;;8336:6;8314:21;:29;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;8314:29:32;8283:71;8423:6;8394:12;-1:-1:-1;;;;;8368:62:32;8385:7;-1:-1:-1;;;;;8368:62:32;;8408:13;8368:62;;;;;;;;;;;;;;;;;;8447:6;7130:1330;-1:-1:-1;;;;;;;7130:1330:32:o;419:157:33:-;719:5:55;;-1:-1:-1;;;;;719:5:55;705:10;:19;697:28;;;;;;533:16:33;:36;419:157::o;2433:58:32:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2433:58:32;;;;;;:::o;4316:441::-;4590:158;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;4590:158:32;;;;;;;;;;;;;;;;;;22:32:-1;26:21;;;22:32;6:49;;4590:158:32;;;;;;;;4567:182;;4537:7;;4590:158;;;4567:182;;;;;4590:158;4567:182;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;;;;365:33;;4567:182:32;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;4316:441:32:o;1001:111:55:-;719:5;;-1:-1:-1;;;;;719:5:55;705:10;:19;697:28;;;;;;1077:5;;;1058:25;;-1:-1:-1;;;;;1077:5:55;;;;1058:25;;;1105:1;1089:18;;-1:-1:-1;;1089:18:55;;;1001:111::o;238:20::-;;;-1:-1:-1;;;;;238:20:55;;:::o;6266:470:32:-;6321:4;6337:23;;:::i;:::-;6402:24;;:::i;:::-;-1:-1:-1;;;;;;;6363:29:32;;;;;;;:20;:29;;;;;;;;6337:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6429:26;;;;;;;;;;6402:53;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6470:18;;6337:55;;-1:-1:-1;6466:75:32;;6525:5;6518:12;;;;6466:75;6570:15;;;;6554:12;:31;6550:74;;6608:5;6601:12;;;;6550:74;6653:17;;;;6637:12;:33;6633:76;;6693:5;6686:12;;;;6633:76;6725:4;6718:11;;6266:470;;;;;;:::o;5343:194::-;-1:-1:-1;;;;;5427:29:32;;;5416:52;5427:29;;;:20;:29;;;;;;;;:40;5416:52;;:10;:52;;;;;:58;;;;5402:10;:72;5394:81;;;;;;-1:-1:-1;;;;;5485:29:32;;;;;:20;:29;;;;;:38;;:45;;-1:-1:-1;;5485:45:32;5526:4;5485:45;;;5343:194::o;4859:364::-;4945:23;;:::i;:::-;4917:17;4926:7;4917:8;:17::i;:::-;4916:18;4908:27;;;;;;4995:44;5030:7;4995:27;:44::i;:::-;4978:61;;;:14;5057:26;;;:10;:26;;;;;:30;:35;;5049:44;;;;;;5156:7;5166:4;5127:44;;:::i;:::-;-1:-1:-1;;;;;5127:44:32;;;;;;;;;;;;;;;;;;;;-1:-1:-1;5127:44:32;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;;;;;5103:68:32;;;:21;;;;:68;;;5181:29;;;;;;;:20;:29;;;;;;;;;:35;;;;;;;;;;;-1:-1:-1;;5181:35:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;5181:35:32;;;;;;;;;;4859:364::o;5659:197::-;-1:-1:-1;;;;;5745:29:32;;;5734:52;5745:29;;;:20;:29;;;;;;;;:40;5734:52;;:10;:52;;;;;:58;;;;5720:10;:72;5712:81;;;;;;-1:-1:-1;;;;;5803:29:32;5844:5;5803:29;;;:20;:29;;;;;:38;;:46;;-1:-1:-1;;5803:46:32;;;5659:197::o;1274:103:55:-;719:5;;-1:-1:-1;;;;;719:5:55;705:10;:19;697:28;;;;;;1343:29;1362:9;1343:18;:29::i;:::-;1274:103;:::o;356:31:33:-;;;;:::o;1060:116:54:-;1120:7;1142:8;;;;1135:16;;;;-1:-1:-1;1164:7:54;;;1060:116;;;;;:::o;203:380::-;263:9;489:7;;485:36;;;-1:-1:-1;513:1:54;506:8;;485:36;-1:-1:-1;531:7:54;;;536:2;531;:7;551:6;;;;;;;;:12;544:20;;;671:187:33;746:7;792;-1:-1:-1;;;;;792:13:33;;:15;;;;;-1:-1:-1;;;792:15:33;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;792:15:33;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;792:15:33;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;792:15:33;772:79;;;;;;829:4;772:79;;;;-1:-1:-1;;;;;772:79:33;;;;;;;;;:56;;;;;;;:79;;;;;792:15;;772:79;;;;;;;-1:-1:-1;772:56:33;:79;;;5:2:-1;;;;30:1;27;20:12;5:2;772:79:33;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;772:79:33;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;772:79:33;;671:187;-1:-1:-1;;671:187:33:o;1512:171:55:-;-1:-1:-1;;;;;1582:23:55;;;;1574:32;;;;;;1638:5;;;1617:38;;-1:-1:-1;;;;;1617:38:55;;;;1638:5;;;1617:38;;;1661:5;:17;;-1:-1:-1;;1661:17:55;-1:-1:-1;;;;;1661:17:55;;;;;;;;;;1512:171::o;1391:7071:32:-;;;;;;;;;-1:-1:-1;1391:7071:32;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1391:7071:32;;;;;;-1:-1:-1;;;;;1391:7071:32;;;;;:::o;:::-;;;;;;;;;;:::o",
"source": "pragma solidity ^0.4.25;\n\nimport \"./UniversalScheme.sol\";\nimport \"openzeppelin-solidity/contracts/ownership/Ownable.sol\";\nimport \"openzeppelin-solidity/contracts/math/SafeMath.sol\";\nimport \"openzeppelin-solidity/contracts/lifecycle/Destructible.sol\";\n\n\n/**\n * @title An avatar contract for ICO.\n * @dev Allow people to donate by simply sending ether to an address.\n */\ncontract MirrorContractICO is Destructible {\n Avatar public organization; // The organization address (the avatar)\n SimpleICO public simpleICO; // The ICO contract address\n /**\n * @dev Constructor, setting the organization and ICO scheme.\n * @param _organization The organization's avatar.\n * @param _simpleICO The ICO Scheme.\n */\n constructor(Avatar _organization, SimpleICO _simpleICO) public {\n organization = _organization;\n simpleICO = _simpleICO;\n }\n\n /**\n * @dev Fallback function, when ether is sent it will donate to the ICO.\n * The ether will be returned if the donation is failed.\n */\n function () public payable {\n // Not to waste gas, if no value.\n require(msg.value != 0);\n\n // Return ether if couldn't donate.\n require(simpleICO.donate.value(msg.value)(organization, msg.sender) != 0);\n }\n}\n\n\n/**\n * @title SimpleICO scheme.\n * @dev A universal scheme to allow organizations to open a simple ICO and get donations.\n */\ncontract SimpleICO is UniversalScheme {\n using SafeMath for uint;\n\n // Struct holding the data for each organization\n struct Organization {\n bytes32 paramsHash; // Save the parameters approved by the org to open the ICO, so reuse of ICO will not change.\n address avatarContractICO; // Avatar is a contract for users that want to send ether without calling a function.\n uint totalEthRaised;\n bool isHalted; // The admin of the ICO can halt the ICO at any time, and also resume it.\n }\n\n // A mapping from hashes to parameters (use to store a particular configuration on the controller)\n struct Parameters {\n uint cap; // Cap in Eth\n uint price; // Price represents Tokens per 1 Eth\n uint startBlock;\n uint endBlock;\n address beneficiary; // all funds received will be transferred to this address.\n address admin; // The admin can halt or resume ICO.\n }\n\n // A mapping from the organization (Avatar) address to the saved data of the organization:\n mapping(address=>Organization) public organizationsICOInfo;\n\n mapping(bytes32=>Parameters) public parameters;\n\n event DonationReceived(address indexed organization, address indexed _beneficiary, uint _incomingEther, uint indexed _tokensAmount);\n\n /**\n * @dev Hash the parameters, save them if necessary, and return the hash value\n * @param _cap the ico cap\n * @param _price represents Tokens per 1 Eth\n * @param _startBlock ico start block\n * @param _endBlock ico end\n * @param _beneficiary the ico ether beneficiary\n * @param _admin the address of the ico admin which can hold and resume the ICO.\n * @return bytes32 -the params hash\n */\n function setParameters(\n uint _cap,\n uint _price,\n uint _startBlock,\n uint _endBlock,\n address _beneficiary,\n address _admin\n )\n public\n returns(bytes32)\n {\n require(_cap != 0);\n bytes32 paramsHash = getParametersHash(\n _cap,\n _price,\n _startBlock,\n _endBlock,\n _beneficiary,\n _admin\n );\n if (parameters[paramsHash].cap == 0) {\n parameters[paramsHash] = Parameters({\n cap: _cap,\n price: _price,\n startBlock: _startBlock,\n endBlock:_endBlock,\n beneficiary:_beneficiary,\n admin:_admin\n });\n }\n return paramsHash;\n }\n\n /**\n * @dev Hash the parameters and return the hash value\n * @param _cap the ico cap\n * @param _price represents Tokens per 1 Eth\n * @param _startBlock ico start block\n * @param _endBlock ico end\n * @param _beneficiary the ico ether beneficiary\n * @param _admin the address of the ico admin which can hold and resume the ICO.\n * @return bytes32 -the params hash\n */\n function getParametersHash(\n uint _cap,\n uint _price,\n uint _startBlock,\n uint _endBlock,\n address _beneficiary,\n address _admin\n )\n public\n pure\n returns(bytes32)\n {\n return (keccak256(\n abi.encodePacked(\n _cap,\n _price,\n _startBlock,\n _endBlock,\n _beneficiary,\n _admin\n )));\n }\n\n /**\n * @dev start an ICO\n * @param _avatar The Avatar's of the organization\n */\n function start(address _avatar) public {\n require(!isActive(_avatar));\n Organization memory org;\n org.paramsHash = getParametersFromController(Avatar(_avatar));\n require(parameters[org.paramsHash].cap != 0);\n org.avatarContractICO = new MirrorContractICO(Avatar(_avatar), this);\n organizationsICOInfo[_avatar] = org;\n }\n\n /**\n * @dev Allowing admin to halt an ICO.\n * @param _avatar The Avatar's of the organization\n */\n function haltICO(address _avatar) public {\n require(msg.sender == parameters[organizationsICOInfo[_avatar].paramsHash].admin);\n organizationsICOInfo[_avatar].isHalted = true;\n }\n\n /**\n * @dev Allowing admin to reopen an ICO.\n * @param _avatar The Avatar's of the organization\n */\n function resumeICO(address _avatar) public {\n require(msg.sender == parameters[organizationsICOInfo[_avatar].paramsHash].admin);\n organizationsICOInfo[_avatar].isHalted = false;\n }\n\n /**\n * @dev Check is an ICO is active (halted is still considered active). Active ICO:\n * 1. The organization is registered.\n * 2. The ICO didn't reach it's cap yet.\n * 3. The current block isn't bigger than the \"endBlock\" & Smaller then the \"startBlock\"\n * @param _avatar The Avatar's of the organization\n * @return bool which represents a successful of the function\n */\n function isActive(address _avatar) public view returns(bool) {\n Organization memory org = organizationsICOInfo[_avatar];\n Parameters memory params = parameters[org.paramsHash];\n\n if (org.totalEthRaised >= params.cap) {\n return false;\n }\n if (block.number >= params.endBlock) {\n return false;\n }\n if (block.number <= params.startBlock) {\n return false;\n }\n return true;\n }\n\n /**\n * @dev Donating ethers to get tokens.\n * If the donation is higher than the remaining ethers in the \"cap\",\n * The donator will get the change in ethers.\n * @param _avatar The Avatar's of the organization.\n * @param _beneficiary The donator's address - which will receive the ICO's tokens.\n * @return uint number of tokens minted for the donation.\n */\n function donate(Avatar _avatar, address _beneficiary) public payable returns(uint) {\n Organization memory org = organizationsICOInfo[_avatar];\n Parameters memory params = parameters[org.paramsHash];\n\n // Check ICO is active:\n require(isActive(_avatar));\n\n // Check ICO is not halted:\n require(!org.isHalted);\n\n\n uint incomingEther;\n uint change;\n\n // Compute how much tokens to buy:\n if ( msg.value > (params.cap).sub(org.totalEthRaised) ) {\n incomingEther = (params.cap).sub(org.totalEthRaised);\n change = (msg.value).sub(incomingEther);\n } else {\n incomingEther = msg.value;\n }\n\n uint tokens = incomingEther.mul(params.price);\n // Update total raised, call event and return amount of tokens bought:\n organizationsICOInfo[_avatar].totalEthRaised += incomingEther;\n // Send ether to the defined address, mint, and send change to beneficiary:\n params.beneficiary.transfer(incomingEther);\n\n require(ControllerInterface(_avatar.owner()).mintTokens(tokens, _beneficiary,address(_avatar)));\n if (change != 0) {\n _beneficiary.transfer(change);\n }\n emit DonationReceived(_avatar, _beneficiary, incomingEther, tokens);\n return tokens;\n }\n}\n",
"sourcePath": "/Users/oren/daostack/daostack2/daostack/contracts/universalSchemes/SimpleICO.sol",
"ast": {
"absolutePath": "/Users/oren/daostack/daostack2/daostack/contracts/universalSchemes/SimpleICO.sol",
"exportedSymbols": {
"MirrorContractICO": [
10195
],
"SimpleICO": [
10622
]
},
"id": 10623,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 10142,
"literals": [
"solidity",
"^",
"0.4",
".25"
],
"nodeType": "PragmaDirective",
"src": "0:24:32"
},
{
"absolutePath": "/Users/oren/daostack/daostack2/daostack/contracts/universalSchemes/UniversalScheme.sol",
"file": "./UniversalScheme.sol",
"id": 10143,
"nodeType": "ImportDirective",
"scope": 10623,
"sourceUnit": 10669,
"src": "26:31:32",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "openzeppelin-solidity/contracts/ownership/Ownable.sol",
"file": "openzeppelin-solidity/contracts/ownership/Ownable.sol",
"id": 10144,
"nodeType": "ImportDirective",
"scope": 10623,
"sourceUnit": 20878,
"src": "58:63:32",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "openzeppelin-solidity/contracts/math/SafeMath.sol",
"file": "openzeppelin-solidity/contracts/math/SafeMath.sol",
"id": 10145,
"nodeType": "ImportDirective",
"scope": 10623,
"sourceUnit": 20792,
"src": "122:59:32",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "openzeppelin-solidity/contracts/lifecycle/Destructible.sol",
"file": "openzeppelin-solidity/contracts/lifecycle/Destructible.sol",
"id": 10146,
"nodeType": "ImportDirective",
"scope": 10623,
"sourceUnit": 20698,
"src": "182:68:32",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 10147,
"name": "Destructible",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 20697,
"src": "399:12:32",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Destructible_$20697",
"typeString": "contract Destructible"
}
},
"id": 10148,
"nodeType": "InheritanceSpecifier",
"src": "399:12:32"
}
],
"contractDependencies": [
20697,
20877
],
"contractKind": "contract",
"documentation": "@title An avatar contract for ICO.\n@dev Allow people to donate by simply sending ether to an address.",
"fullyImplemented": true,
"id": 10195,
"linearizedBaseContracts": [
10195,
20697,
20877
],
"name": "MirrorContractICO",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 10150,
"name": "organization",
"nodeType": "VariableDeclaration",
"scope": 10195,
"src": "418:26:32",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Avatar_$333",
"typeString": "contract Avatar"
},
"typeName": {
"contractScope": null,
"id": 10149,
"name": "Avatar",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 333,
"src": "418:6:32",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Avatar_$333",
"typeString": "contract Avatar"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 10152,
"name": "simpleICO",
"nodeType": "VariableDeclaration",
"scope": 10195,
"src": "491:26:32",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_SimpleICO_$10622",
"typeString": "contract SimpleICO"
},
"typeName": {
"contractScope": null,
"id": 10151,
"name": "SimpleICO",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 10622,
"src": "491:9:32",
"typeDescriptions": {
"typeIdentifier": "t_contract$_SimpleICO_$10622",
"typeString": "contract SimpleICO"
}
},
"value": null,
"visibility": "public"
},
{
"body": {
"id": 10167,
"nodeType": "Block",
"src": "789:77:32",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 10161,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 10159,
"name": "organization",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10150,
"src": "799:12:32",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Avatar_$333",
"typeString": "contract Avatar"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 10160,
"name": "_organization",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10154,
"src": "814:13:32",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Avatar_$333",
"typeString": "contract Avatar"
}
},
"src": "799:28:32",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Avatar_$333",
"typeString": "contract Avatar"
}
},
"id": 10162,
"nodeType": "ExpressionStatement",
"src": "799:28:32"
},
{
"expression": {
"argumentTypes": null,
"id": 10165,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 10163,
"name": "simpleICO",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10152,