diff --git a/build/contracts/CapCoin.json b/build/contracts/CapCoin.json index b0886c9b..b9442981 100644 --- a/build/contracts/CapCoin.json +++ b/build/contracts/CapCoin.json @@ -23,37 +23,33 @@ { "constant": false, "inputs": [ - { - "name": "name", - "type": "string" - }, - { - "name": "url", - "type": "string" - }, { "name": "amount", "type": "uint256" } ], - "name": "seed", + "name": "buyTokens", "outputs": [], - "payable": false, - "stateMutability": "nonpayable", + "payable": true, + "stateMutability": "payable", "type": "function" }, { "constant": false, "inputs": [ { - "name": "amount", - "type": "uint256" + "name": "url", + "type": "string" + }, + { + "name": "caption", + "type": "string" } ], - "name": "buyTokens", + "name": "createPost", "outputs": [], - "payable": true, - "stateMutability": "payable", + "payable": false, + "stateMutability": "nonpayable", "type": "function" }, { @@ -136,6 +132,10 @@ { "name": "owner", "type": "address" + }, + { + "name": "caption", + "type": "string" } ], "payable": false, @@ -189,12 +189,24 @@ { "constant": false, "inputs": [ + { + "name": "name", + "type": "string" + }, { "name": "url", "type": "string" + }, + { + "name": "amount", + "type": "uint256" + }, + { + "name": "caption", + "type": "string" } ], - "name": "createPost", + "name": "seed", "outputs": [], "payable": false, "stateMutability": "nonpayable", @@ -279,6 +291,11 @@ "indexed": false, "name": "url", "type": "string" + }, + { + "indexed": false, + "name": "caption", + "type": "string" } ], "name": "CreatedPost", @@ -344,18 +361,18 @@ "type": "event" } ], - "bytecode": "0x6060604052620f42406001556000600255341561001b57600080fd5b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555033600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061178c806100ab6000396000f3006060604052600436106100c5576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630b1e7f83146100c757806326ec928f1461012a5780633610724e146101d357806341c0e1b5146101eb57806341f3004a14610200578063483515291461026a578063507ffba5146102ac578063763f17c414610309578063832880e71461049b5780638da5cb5b146105d6578063c7303c611461062b578063edf5388614610688578063f2fde38b1461075e575b005b34156100d257600080fd5b6100e86004808035906020019091905050610797565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561013557600080fd5b6101d1600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919080359060200190919050506107d6565b005b6101e960048080359060200190919050506107f6565b005b34156101f657600080fd5b6101fe6108f2565b005b341561020b57600080fd5b610213610985565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561025657808201518184015260208101905061023b565b505050509050019250505060405180910390f35b341561027557600080fd5b6102aa600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610a19565b005b34156102b757600080fd5b610307600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050610e18565b005b341561031457600080fd5b610340600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610f1e565b6040518080602001806020018581526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381038352878181546001816001161561010002031660029004815260200191508054600181600116156101000203166002900480156104055780601f106103da57610100808354040283529160200191610405565b820191906000526020600020905b8154815290600101906020018083116103e857829003601f168201915b50508381038252868181546001816001161561010002031660029004815260200191508054600181600116156101000203166002900480156104885780601f1061045d57610100808354040283529160200191610488565b820191906000526020600020905b81548152906001019060200180831161046b57829003601f168201915b5050965050505050505060405180910390f35b34156104a657600080fd5b6104ae610f6c565b6040518080602001868152602001806020018581526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838103835288818151815260200191508051906020019080838360005b83811015610530578082015181840152602081019050610515565b50505050905090810190601f16801561055d5780820380516001836020036101000a031916815260200191505b50838103825286818151815260200191508051906020019080838360005b8381101561059657808201518184015260208101905061057b565b50505050905090810190601f1680156105c35780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390f35b34156105e157600080fd5b6105e96111d5565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561063657600080fd5b610686600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506111fa565b005b341561069357600080fd5b6106bf600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611468565b604051808060200183815260200182810382528481815460018160011615610100020316600290048152602001915080546001816001161561010002031660029004801561074e5780601f106107235761010080835404028352916020019161074e565b820191906000526020600020905b81548152906001019060200180831161073157829003601f168201915b5050935050505060405180910390f35b341561076957600080fd5b610795600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061148b565b005b6007818154811015156107a657fe5b90600052602060002090016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6107df83610e18565b6107e8816107f6565b6107f1826111fa565b505050565b80600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101600082825401925050819055508060026000828254019250508190555080600160008282540392505081905550346004600082825401925050819055507ffe1367e498701f2dfab80a3d41740d46fd7cba533430e611917f0f3df823279a600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101546040518082815260200191505060405180910390a150565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561098357600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16ff5b565b61098d6115e0565b6007805480602002602001604051908101604052809291908181526020018280548015610a0f57602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190600101908083116109c5575b5050505050905090565b80600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206002016000828254019250508190555080600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000828254019250508190555080600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101600082825403925050819055507f050cbab7fede968f252efba864c75069d68302f756e7f9c0093fb37faf2ba79b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020154600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000184600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000133600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015460405180888152602001806020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001868152602001806020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001848152602001838103835289818154600181600116156101000203166002900481526020019150805460018160011615610100020316600290048015610d7c5780601f10610d5157610100808354040283529160200191610d7c565b820191906000526020600020905b815481529060010190602001808311610d5f57829003601f168201915b5050838103825286818154600181600116156101000203166002900481526020019150805460018160011615610100020316600290048015610dff5780601f10610dd457610100808354040283529160200191610dff565b820191906000526020600020905b815481529060010190602001808311610de257829003601f168201915b5050995050505050505050505060405180910390a15050565b6000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905081816000019080519060200190610e739291906115f4565b50600081600101819055507f66ab3fea2083d9ba15d99b595186fe7fc18e6eba393c0fc056f420e96c3caa44826040518080602001828103825283818151815260200191508051906020019080838360005b83811015610ee0578082015181840152602081019050610ec5565b50505050905090810190601f168015610f0d5780820380516001836020036101000a031916815260200191505b509250505060405180910390a15050565b6006602052806000526040600020600091509050806000019080600101908060020154908060030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905084565b610f74611674565b6000610f7e611674565b600080600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206002015433848054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156111215780601f106110f657610100808354040283529160200191611121565b820191906000526020600020905b81548152906001019060200180831161110457829003601f168201915b50505050509450828054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156111bd5780601f10611192576101008083540402835291602001916111bd565b820191906000526020600020905b8154815290600101906020018083116111a057829003601f168201915b50505050509250945094509450945094509091929394565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050818160000190805190602001906112559291906115f4565b5060058160020160008282540392505081905550600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018160010190805460018160011615610100020316600290046112ce929190611688565b50338160030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600160078054806001018281611328919061170f565b9160005260206000209001600033909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505060058060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101600082825403925050819055507f3b6c110dfadc879ec2bbc1dc567f9065fd5ea5846bce75fddba0f60ffcc79fac826040518080602001828103825283818151815260200191508051906020019080838360005b8381101561142a57808201518184015260208101905061140f565b50505050905090810190601f1680156114575780820380516001836020036101000a031916815260200191505b509250505060405180910390a15050565b600560205280600052604060002060009150905080600001908060010154905082565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156114e657600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561152257600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b602060405190810160405280600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061163557805160ff1916838001178555611663565b82800160010185558215611663579182015b82811115611662578251825591602001919060010190611647565b5b509050611670919061173b565b5090565b602060405190810160405280600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106116c157805485556116fe565b828001600101855582156116fe57600052602060002091601f016020900482015b828111156116fd5782548255916001019190600101906116e2565b5b50905061170b919061173b565b5090565b81548183558181151161173657818360005260206000209182019101611735919061173b565b5b505050565b61175d91905b80821115611759576000816000905550600101611741565b5090565b905600a165627a7a723058209bf6da214a14801f0c8a1e8ec9edc4bda96578d11db1b161891a9a3594209bb60029", - "deployedBytecode": "0x6060604052600436106100c5576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630b1e7f83146100c757806326ec928f1461012a5780633610724e146101d357806341c0e1b5146101eb57806341f3004a14610200578063483515291461026a578063507ffba5146102ac578063763f17c414610309578063832880e71461049b5780638da5cb5b146105d6578063c7303c611461062b578063edf5388614610688578063f2fde38b1461075e575b005b34156100d257600080fd5b6100e86004808035906020019091905050610797565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561013557600080fd5b6101d1600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919080359060200190919050506107d6565b005b6101e960048080359060200190919050506107f6565b005b34156101f657600080fd5b6101fe6108f2565b005b341561020b57600080fd5b610213610985565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561025657808201518184015260208101905061023b565b505050509050019250505060405180910390f35b341561027557600080fd5b6102aa600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610a19565b005b34156102b757600080fd5b610307600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050610e18565b005b341561031457600080fd5b610340600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610f1e565b6040518080602001806020018581526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381038352878181546001816001161561010002031660029004815260200191508054600181600116156101000203166002900480156104055780601f106103da57610100808354040283529160200191610405565b820191906000526020600020905b8154815290600101906020018083116103e857829003601f168201915b50508381038252868181546001816001161561010002031660029004815260200191508054600181600116156101000203166002900480156104885780601f1061045d57610100808354040283529160200191610488565b820191906000526020600020905b81548152906001019060200180831161046b57829003601f168201915b5050965050505050505060405180910390f35b34156104a657600080fd5b6104ae610f6c565b6040518080602001868152602001806020018581526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838103835288818151815260200191508051906020019080838360005b83811015610530578082015181840152602081019050610515565b50505050905090810190601f16801561055d5780820380516001836020036101000a031916815260200191505b50838103825286818151815260200191508051906020019080838360005b8381101561059657808201518184015260208101905061057b565b50505050905090810190601f1680156105c35780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390f35b34156105e157600080fd5b6105e96111d5565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561063657600080fd5b610686600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506111fa565b005b341561069357600080fd5b6106bf600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611468565b604051808060200183815260200182810382528481815460018160011615610100020316600290048152602001915080546001816001161561010002031660029004801561074e5780601f106107235761010080835404028352916020019161074e565b820191906000526020600020905b81548152906001019060200180831161073157829003601f168201915b5050935050505060405180910390f35b341561076957600080fd5b610795600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061148b565b005b6007818154811015156107a657fe5b90600052602060002090016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6107df83610e18565b6107e8816107f6565b6107f1826111fa565b505050565b80600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101600082825401925050819055508060026000828254019250508190555080600160008282540392505081905550346004600082825401925050819055507ffe1367e498701f2dfab80a3d41740d46fd7cba533430e611917f0f3df823279a600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101546040518082815260200191505060405180910390a150565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561098357600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16ff5b565b61098d6115e0565b6007805480602002602001604051908101604052809291908181526020018280548015610a0f57602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190600101908083116109c5575b5050505050905090565b80600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206002016000828254019250508190555080600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000828254019250508190555080600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101600082825403925050819055507f050cbab7fede968f252efba864c75069d68302f756e7f9c0093fb37faf2ba79b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020154600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000184600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000133600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015460405180888152602001806020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001868152602001806020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001848152602001838103835289818154600181600116156101000203166002900481526020019150805460018160011615610100020316600290048015610d7c5780601f10610d5157610100808354040283529160200191610d7c565b820191906000526020600020905b815481529060010190602001808311610d5f57829003601f168201915b5050838103825286818154600181600116156101000203166002900481526020019150805460018160011615610100020316600290048015610dff5780601f10610dd457610100808354040283529160200191610dff565b820191906000526020600020905b815481529060010190602001808311610de257829003601f168201915b5050995050505050505050505060405180910390a15050565b6000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905081816000019080519060200190610e739291906115f4565b50600081600101819055507f66ab3fea2083d9ba15d99b595186fe7fc18e6eba393c0fc056f420e96c3caa44826040518080602001828103825283818151815260200191508051906020019080838360005b83811015610ee0578082015181840152602081019050610ec5565b50505050905090810190601f168015610f0d5780820380516001836020036101000a031916815260200191505b509250505060405180910390a15050565b6006602052806000526040600020600091509050806000019080600101908060020154908060030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905084565b610f74611674565b6000610f7e611674565b600080600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206002015433848054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156111215780601f106110f657610100808354040283529160200191611121565b820191906000526020600020905b81548152906001019060200180831161110457829003601f168201915b50505050509450828054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156111bd5780601f10611192576101008083540402835291602001916111bd565b820191906000526020600020905b8154815290600101906020018083116111a057829003601f168201915b50505050509250945094509450945094509091929394565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050818160000190805190602001906112559291906115f4565b5060058160020160008282540392505081905550600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018160010190805460018160011615610100020316600290046112ce929190611688565b50338160030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600160078054806001018281611328919061170f565b9160005260206000209001600033909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505060058060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101600082825403925050819055507f3b6c110dfadc879ec2bbc1dc567f9065fd5ea5846bce75fddba0f60ffcc79fac826040518080602001828103825283818151815260200191508051906020019080838360005b8381101561142a57808201518184015260208101905061140f565b50505050905090810190601f1680156114575780820380516001836020036101000a031916815260200191505b509250505060405180910390a15050565b600560205280600052604060002060009150905080600001908060010154905082565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156114e657600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561152257600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b602060405190810160405280600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061163557805160ff1916838001178555611663565b82800160010185558215611663579182015b82811115611662578251825591602001919060010190611647565b5b509050611670919061173b565b5090565b602060405190810160405280600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106116c157805485556116fe565b828001600101855582156116fe57600052602060002091601f016020900482015b828111156116fd5782548255916001019190600101906116e2565b5b50905061170b919061173b565b5090565b81548183558181151161173657818360005260206000209182019101611735919061173b565b5b505050565b61175d91905b80821115611759576000816000905550600101611741565b5090565b905600a165627a7a723058209bf6da214a14801f0c8a1e8ec9edc4bda96578d11db1b161891a9a3594209bb60029", - "sourceMap": "87:2542:0:-;;;403:7;385:25;;433:1;414:20;;470:49;;;;;;;;509:10:1;501:5;;:18;;;;;;;;;;;;;;;;;;504:10:0;496:5;;:18;;;;;;;;;;;;;;;;;;87:2542;;;;;;", - "deployedSourceMap": "87:2542:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;783:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2367:136;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1272:239;;;;;;;;;;;;;;;;;;2509:93;;;;;;;;;;;;;;2286:77;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:2;8:100;;;99:1;94:3;90;84:5;80:1;75:3;71;64:6;52:2;49:1;45:3;40:15;;8:100;;;12:14;3:109;;;;;;;;;;;;;;;;;1861:421:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;810:154;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;733:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;968:273;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:2;8:100;;;99:1;94:3;90;84:5;80:1;75:3;71;64:6;52:2;49:1;45:3;40:15;;8:100;;;12:14;3:109;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1;8:100;33:3;30:1;27:2;8:100;;;99:1;94:3;90;84:5;80:1;75:3;71;64:6;52:2;49:1;45:3;40:15;;8:100;;;12:14;3:109;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;238:20:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1515:342:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;683:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;834:169:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;783:22:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;2367:136::-;2434:16;2445:4;2434:10;:16::i;:::-;2458:17;2468:6;2458:9;:17::i;:::-;2483:15;2494:3;2483:10;:15::i;:::-;2367:136;;;:::o;1272:239::-;1366:6;1325:13;:25;1339:10;1325:25;;;;;;;;;;;;;;;:37;;;:47;;;;;;;;;;;1393:6;1378:11;;:21;;;;;;;;;;;1419:6;1405:10;;:20;;;;;;;;;;;1440:9;1431:5;;:18;;;;;;;;;;;1455:51;1468:13;:25;1482:10;1468:25;;;;;;;;;;;;;;;:37;;;1455:51;;;;;;;;;;;;;;;;;;1272:239;:::o;2509:93::-;2551:5;;;;;;;;;;;2537:19;;:10;:19;;;2533:63;;;2581:5;;;;;;;;;;;2568:19;;;2533:63;2509:93::o;2286:77::-;2327:9;;:::i;:::-;2353:5;2346:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2286:77;:::o;1861:421::-;1960:6;1919:13;:19;1933:4;1919:19;;;;;;;;;;;;;;;:33;;;:48;;;;;;;;;;;2008:6;1973:13;:19;1987:4;1973:19;;;;;;;;;;;;;;;:31;;;:41;;;;;;;;;;;2061:6;2020:13;:25;2034:10;2020:25;;;;;;;;;;;;;;;:37;;;:47;;;;;;;;;;;2073:204;2083:13;:19;2097:4;2083:19;;;;;;;;;;;;;;;:33;;;2124:13;:19;2138:4;2124:19;;;;;;;;;;;;;;;:24;;2150:4;2156:13;:19;2170:4;2156:19;;;;;;;;;;;;;;;:31;;;2195:13;:25;2209:10;2195:25;;;;;;;;;;;;;;;:30;;2227:10;2239:13;:25;2253:10;2239:25;;;;;;;;;;;;;;;:37;;;2073:204;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1861:421;;:::o;810:154::-;856:8;867:13;:25;881:10;867:25;;;;;;;;;;;;;;;856:36;;910:4;898;:9;;:16;;;;;;;;;;;;:::i;:::-;;939:1;920:4;:16;;:20;;;;946:13;954:4;946:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:2;8:100;;;99:1;94:3;90;84:5;80:1;75:3;71;64:6;52:2;49:1;45:3;40:15;;8:100;;;12:14;3:109;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;810:154:0;;:::o;733:46::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;968:273::-;1008:6;;:::i;:::-;1016:4;1022:6;;:::i;:::-;1030:3;1035:7;1058:13;:25;1072:10;1058:25;;;;;;;;;;;;;;;:30;;1096:13;:25;1110:10;1096:25;;;;;;;;;;;;;;;:37;;;1141:13;:25;1155:10;1141:25;;;;;;;;;;;;;;;:29;;1178:13;:25;1192:10;1178:25;;;;;;;;;;;;;;;:39;;;1225:10;1050:186;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;968:273;;;;;:::o;238:20:1:-;;;;;;;;;;;;;:::o;1515:342:0:-;1584:8;1595:13;:25;1609:10;1595:25;;;;;;;;;;;;;;;1584:36;;1637:3;1626:4;:8;;:14;;;;;;;;;;;;:::i;:::-;;1668:1;1646:4;:18;;;:23;;;;;;;;;;;1691:13;:25;1705:10;1691:25;;;;;;;;;;;;;;;:30;;1675:4;:13;;:46;;;;;;;;;;;;;;;;;;;;:::i;:::-;;1740:10;1727:4;:10;;;:23;;;;;;;;;;;;;;;;;;1781:1;1757:5;:22;;;;;;;;;;;:::i;:::-;;;;;;;;;;1768:10;1757:22;;;;;;;;;;;;;;;;;;;;;;:25;;1829:1;1788:13;:25;1802:10;1788:25;;;;;;;;;;;;;;;:37;;;:42;;;;;;;;;;;1836:16;1848:3;1836:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:2;8:100;;;99:1;94:3;90;84:5;80:1;75:3;71;64:6;52:2;49:1;45:3;40:15;;8:100;;;12:14;3:109;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1515:342:0;;:::o;683:46::-;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;834:169:1:-;654:5;;;;;;;;;;;640:19;;:10;:19;;;632:28;;;;;;;;930:1;910:22;;:8;:22;;;;902:31;;;;;;;;967:8;939:37;;960:5;;;;;;;;;;;939:37;;;;;;;;;;;;990:8;982:5;;:16;;;;;;;;;;;;;;;;;;834:169;:::o;87:2542:0:-;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o", - "source": "pragma solidity ^0.4.18;\n\nimport 'zeppelin-solidity/contracts/ownership/Ownable.sol';\n\ncontract CapCoin is Ownable {\n\n event NewUser(string name);\n event BoughtTokens(uint coinBalance);\n event CreatedPost(string url);\n event LikedPost(int lotteryAmount, string posterName,\n address poster, uint posterCoinbalance, string likerName,\n address liker, uint likerCoinbalance);\n\n uint coinSupply = 1000000;\n uint coinsBought = 0;\n address owner;\n uint value;\n\n function CapCoin () {\n owner = msg.sender;\n }\n\n struct User {\n string name;\n uint coinBalance;\n }\n\n struct Post {\n string url;\n string userName;\n int lotteryAmount;\n address owner;\n }\n\n mapping (address => User) public addressToUser;\n mapping (address => Post) public addressToPost;\n address[] public posts;\n\n function createUser(string name) public {\n var user = addressToUser[msg.sender];\n user.name = name;\n user.coinBalance = 0;\n NewUser(name);\n }\n\n function getUser() public view returns (string, uint, string, int, address) {\n return (addressToUser[msg.sender].name,\n addressToUser[msg.sender].coinBalance,\n addressToPost[msg.sender].url,\n addressToPost[msg.sender].lotteryAmount,\n msg.sender);\n }\n\n // need to add economics\n function buyTokens(uint amount) payable public {\n addressToUser[msg.sender].coinBalance += amount;\n coinsBought += amount;\n coinSupply -= amount;\n value += msg.value;\n BoughtTokens(addressToUser[msg.sender].coinBalance);\n }\n\n function createPost(string url) public {\n // 5 coins per post\n var post = addressToPost[msg.sender];\n post.url = url;\n post.lotteryAmount -= 5;\n post.userName = addressToUser[msg.sender].name;\n post.owner = msg.sender;\n\n posts.push(msg.sender) -1;\n addressToUser[msg.sender].coinBalance -= 5;\n CreatedPost(url);\n }\n\n function likePost(address post, uint amount) public {\n addressToPost[post].lotteryAmount += int(amount);\n addressToUser[post].coinBalance += amount;\n addressToUser[msg.sender].coinBalance -= amount;\n LikedPost(addressToPost[post].lotteryAmount,\n addressToUser[post].name, post, addressToUser[post].coinBalance,\n addressToUser[msg.sender].name, msg.sender, addressToUser[msg.sender].coinBalance);\n }\n\n function getPosts() public view returns (address[]) {\n return posts;\n }\n\n function seed(string name, string url, uint amount) public {\n createUser(name);\n buyTokens(amount);\n createPost(url);\n }\n\n function kill() {\n if (msg.sender == owner) {\n selfdestruct(owner);\n }\n }\n\n function() payable {}\n}\n", + "bytecode": "0x6060604052620f42406001556000600255341561001b57600080fd5b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555033600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550611929806100ab6000396000f3006060604052600436106100c5576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630b1e7f83146100c75780633610724e1461012a578063392338f51461014257806341c0e1b5146101e257806341f3004a146101f75780634835152914610261578063507ffba5146102a3578063763f17c414610300578063832880e71461051b5780638da5cb5b14610656578063d36a3e5e146106ab578063edf5388614610797578063f2fde38b1461086d575b005b34156100d257600080fd5b6100e860048080359060200190919050506108a6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61014060048080359060200190919050506108e5565b005b341561014d57600080fd5b6101e0600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506109e1565b005b34156101ed57600080fd5b6101f5610cd6565b005b341561020257600080fd5b61020a610d69565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561024d578082015181840152602081019050610232565b505050509050019250505060405180910390f35b341561026c57600080fd5b6102a1600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610dfd565b005b34156102ae57600080fd5b6102fe600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506111fc565b005b341561030b57600080fd5b610337600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611302565b6040518080602001806020018681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001806020018481038452898181546001816001161561010002031660029004815260200191508054600181600116156101000203166002900480156104005780601f106103d557610100808354040283529160200191610400565b820191906000526020600020905b8154815290600101906020018083116103e357829003601f168201915b50508481038352888181546001816001161561010002031660029004815260200191508054600181600116156101000203166002900480156104835780601f1061045857610100808354040283529160200191610483565b820191906000526020600020905b81548152906001019060200180831161046657829003601f168201915b50508481038252858181546001816001161561010002031660029004815260200191508054600181600116156101000203166002900480156105065780601f106104db57610100808354040283529160200191610506565b820191906000526020600020905b8154815290600101906020018083116104e957829003601f168201915b50509850505050505050505060405180910390f35b341561052657600080fd5b61052e611355565b6040518080602001868152602001806020018581526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838103835288818151815260200191508051906020019080838360005b838110156105b0578082015181840152602081019050610595565b50505050905090810190601f1680156105dd5780820380516001836020036101000a031916815260200191505b50838103825286818151815260200191508051906020019080838360005b838110156106165780820151818401526020810190506105fb565b50505050905090810190601f1680156106435780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390f35b341561066157600080fd5b6106696115be565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156106b657600080fd5b610795600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001909190803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506115e3565b005b34156107a257600080fd5b6107ce600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611605565b604051808060200183815260200182810382528481815460018160011615610100020316600290048152602001915080546001816001161561010002031660029004801561085d5780601f106108325761010080835404028352916020019161085d565b820191906000526020600020905b81548152906001019060200180831161084057829003601f168201915b5050935050505060405180910390f35b341561087857600080fd5b6108a4600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611628565b005b6007818154811015156108b557fe5b90600052602060002090016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b80600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101600082825401925050819055508060026000828254019250508190555080600160008282540392505081905550346004600082825401925050819055507ffe1367e498701f2dfab80a3d41740d46fd7cba533430e611917f0f3df823279a600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101546040518082815260200191505060405180910390a150565b6000600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905082816000019080519060200190610a3c92919061177d565b5060058160020160008282540392505081905550600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001816001019080546001816001161561010002031660029004610ab59291906117fd565b50338160030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081816004019080519060200190610b1192919061177d565b50600160078054806001018281610b289190611884565b9160005260206000209001600033909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505060058060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101600082825403925050819055507fbdf2d095118b35ed77302e18d5db303371ab8e69762dea74b3b96b8bddc781f98383604051808060200180602001838103835285818151815260200191508051906020019080838360005b83811015610c2f578082015181840152602081019050610c14565b50505050905090810190601f168015610c5c5780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b83811015610c95578082015181840152602081019050610c7a565b50505050905090810190601f168015610cc25780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a1505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610d6757600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16ff5b565b610d716118b0565b6007805480602002602001604051908101604052809291908181526020018280548015610df357602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311610da9575b5050505050905090565b80600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206002016000828254019250508190555080600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000828254019250508190555080600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101600082825403925050819055507f050cbab7fede968f252efba864c75069d68302f756e7f9c0093fb37faf2ba79b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020154600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000184600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000133600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015460405180888152602001806020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001868152602001806020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381038352898181546001816001161561010002031660029004815260200191508054600181600116156101000203166002900480156111605780601f1061113557610100808354040283529160200191611160565b820191906000526020600020905b81548152906001019060200180831161114357829003601f168201915b50508381038252868181546001816001161561010002031660029004815260200191508054600181600116156101000203166002900480156111e35780601f106111b8576101008083540402835291602001916111e3565b820191906000526020600020905b8154815290600101906020018083116111c657829003601f168201915b5050995050505050505050505060405180910390a15050565b6000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090508181600001908051906020019061125792919061177d565b50600081600101819055507f66ab3fea2083d9ba15d99b595186fe7fc18e6eba393c0fc056f420e96c3caa44826040518080602001828103825283818151815260200191508051906020019080838360005b838110156112c45780820151818401526020810190506112a9565b50505050905090810190601f1680156112f15780820380516001836020036101000a031916815260200191505b509250505060405180910390a15050565b6006602052806000526040600020600091509050806000019080600101908060020154908060030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169080600401905085565b61135d6118c4565b60006113676118c4565b600080600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206002015433848054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561150a5780601f106114df5761010080835404028352916020019161150a565b820191906000526020600020905b8154815290600101906020018083116114ed57829003601f168201915b50505050509450828054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156115a65780601f1061157b576101008083540402835291602001916115a6565b820191906000526020600020905b81548152906001019060200180831161158957829003601f168201915b50505050509250945094509450945094509091929394565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6115ec846111fc565b6115f5826108e5565b6115ff83826109e1565b50505050565b600560205280600052604060002060009150905080600001908060010154905082565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561168357600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156116bf57600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106117be57805160ff19168380011785556117ec565b828001600101855582156117ec579182015b828111156117eb5782518255916020019190600101906117d0565b5b5090506117f991906118d8565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106118365780548555611873565b8280016001018555821561187357600052602060002091601f016020900482015b82811115611872578254825591600101919060010190611857565b5b50905061188091906118d8565b5090565b8154818355818115116118ab578183600052602060002091820191016118aa91906118d8565b5b505050565b602060405190810160405280600081525090565b602060405190810160405280600081525090565b6118fa91905b808211156118f65760008160009055506001016118de565b5090565b905600a165627a7a7230582064bb6b709ff92ac45497816404687cef18fdf549a72690d5f4e9f3de1ab516490029", + "deployedBytecode": "0x6060604052600436106100c5576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630b1e7f83146100c75780633610724e1461012a578063392338f51461014257806341c0e1b5146101e257806341f3004a146101f75780634835152914610261578063507ffba5146102a3578063763f17c414610300578063832880e71461051b5780638da5cb5b14610656578063d36a3e5e146106ab578063edf5388614610797578063f2fde38b1461086d575b005b34156100d257600080fd5b6100e860048080359060200190919050506108a6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61014060048080359060200190919050506108e5565b005b341561014d57600080fd5b6101e0600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506109e1565b005b34156101ed57600080fd5b6101f5610cd6565b005b341561020257600080fd5b61020a610d69565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561024d578082015181840152602081019050610232565b505050509050019250505060405180910390f35b341561026c57600080fd5b6102a1600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610dfd565b005b34156102ae57600080fd5b6102fe600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506111fc565b005b341561030b57600080fd5b610337600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611302565b6040518080602001806020018681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001806020018481038452898181546001816001161561010002031660029004815260200191508054600181600116156101000203166002900480156104005780601f106103d557610100808354040283529160200191610400565b820191906000526020600020905b8154815290600101906020018083116103e357829003601f168201915b50508481038352888181546001816001161561010002031660029004815260200191508054600181600116156101000203166002900480156104835780601f1061045857610100808354040283529160200191610483565b820191906000526020600020905b81548152906001019060200180831161046657829003601f168201915b50508481038252858181546001816001161561010002031660029004815260200191508054600181600116156101000203166002900480156105065780601f106104db57610100808354040283529160200191610506565b820191906000526020600020905b8154815290600101906020018083116104e957829003601f168201915b50509850505050505050505060405180910390f35b341561052657600080fd5b61052e611355565b6040518080602001868152602001806020018581526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838103835288818151815260200191508051906020019080838360005b838110156105b0578082015181840152602081019050610595565b50505050905090810190601f1680156105dd5780820380516001836020036101000a031916815260200191505b50838103825286818151815260200191508051906020019080838360005b838110156106165780820151818401526020810190506105fb565b50505050905090810190601f1680156106435780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390f35b341561066157600080fd5b6106696115be565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156106b657600080fd5b610795600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001909190803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506115e3565b005b34156107a257600080fd5b6107ce600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611605565b604051808060200183815260200182810382528481815460018160011615610100020316600290048152602001915080546001816001161561010002031660029004801561085d5780601f106108325761010080835404028352916020019161085d565b820191906000526020600020905b81548152906001019060200180831161084057829003601f168201915b5050935050505060405180910390f35b341561087857600080fd5b6108a4600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611628565b005b6007818154811015156108b557fe5b90600052602060002090016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b80600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101600082825401925050819055508060026000828254019250508190555080600160008282540392505081905550346004600082825401925050819055507ffe1367e498701f2dfab80a3d41740d46fd7cba533430e611917f0f3df823279a600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101546040518082815260200191505060405180910390a150565b6000600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905082816000019080519060200190610a3c92919061177d565b5060058160020160008282540392505081905550600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001816001019080546001816001161561010002031660029004610ab59291906117fd565b50338160030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081816004019080519060200190610b1192919061177d565b50600160078054806001018281610b289190611884565b9160005260206000209001600033909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505060058060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101600082825403925050819055507fbdf2d095118b35ed77302e18d5db303371ab8e69762dea74b3b96b8bddc781f98383604051808060200180602001838103835285818151815260200191508051906020019080838360005b83811015610c2f578082015181840152602081019050610c14565b50505050905090810190601f168015610c5c5780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b83811015610c95578082015181840152602081019050610c7a565b50505050905090810190601f168015610cc25780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a1505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610d6757600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16ff5b565b610d716118b0565b6007805480602002602001604051908101604052809291908181526020018280548015610df357602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311610da9575b5050505050905090565b80600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206002016000828254019250508190555080600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000828254019250508190555080600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101600082825403925050819055507f050cbab7fede968f252efba864c75069d68302f756e7f9c0093fb37faf2ba79b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020154600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000184600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000133600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015460405180888152602001806020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001868152602001806020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381038352898181546001816001161561010002031660029004815260200191508054600181600116156101000203166002900480156111605780601f1061113557610100808354040283529160200191611160565b820191906000526020600020905b81548152906001019060200180831161114357829003601f168201915b50508381038252868181546001816001161561010002031660029004815260200191508054600181600116156101000203166002900480156111e35780601f106111b8576101008083540402835291602001916111e3565b820191906000526020600020905b8154815290600101906020018083116111c657829003601f168201915b5050995050505050505050505060405180910390a15050565b6000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090508181600001908051906020019061125792919061177d565b50600081600101819055507f66ab3fea2083d9ba15d99b595186fe7fc18e6eba393c0fc056f420e96c3caa44826040518080602001828103825283818151815260200191508051906020019080838360005b838110156112c45780820151818401526020810190506112a9565b50505050905090810190601f1680156112f15780820380516001836020036101000a031916815260200191505b509250505060405180910390a15050565b6006602052806000526040600020600091509050806000019080600101908060020154908060030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169080600401905085565b61135d6118c4565b60006113676118c4565b600080600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206002015433848054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561150a5780601f106114df5761010080835404028352916020019161150a565b820191906000526020600020905b8154815290600101906020018083116114ed57829003601f168201915b50505050509450828054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156115a65780601f1061157b576101008083540402835291602001916115a6565b820191906000526020600020905b81548152906001019060200180831161158957829003601f168201915b50505050509250945094509450945094509091929394565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6115ec846111fc565b6115f5826108e5565b6115ff83826109e1565b50505050565b600560205280600052604060002060009150905080600001908060010154905082565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561168357600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156116bf57600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106117be57805160ff19168380011785556117ec565b828001600101855582156117ec579182015b828111156117eb5782518255916020019190600101906117d0565b5b5090506117f991906118d8565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106118365780548555611873565b8280016001018555821561187357600052602060002091601f016020900482015b82811115611872578254825591600101919060010190611857565b5b50905061188091906118d8565b5090565b8154818355818115116118ab578183600052602060002091820191016118aa91906118d8565b5b505050565b602060405190810160405280600081525090565b602060405190810160405280600081525090565b6118fa91905b808211156118f65760008160009055506001016118de565b5090565b905600a165627a7a7230582064bb6b709ff92ac45497816404687cef18fdf549a72690d5f4e9f3de1ab516490029", + "sourceMap": "87:2656:0:-;;;419:7;401:25;;449:1;430:20;;486:49;;;;;;;;509:10:1;501:5;;:18;;;;;;;;;;;;;;;;;;520:10:0;512:5;;:18;;;;;;;;;;;;;;;;;;87:2656;;;;;;", + "deployedSourceMap": "87:2656:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;819:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1308:239;;;;;;;;;;;;;;;;;;1551:395;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2623:93;;;;;;;;;;;;;;2375:77;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:2;8:100;;;99:1;94:3;90;84:5;80:1;75:3;71;64:6;52:2;49:1;45:3;40:15;;8:100;;;12:14;3:109;;;;;;;;;;;;;;;;;1950:421:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;846:154;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;769:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1004:273;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:2;8:100;;;99:1;94:3;90;84:5;80:1;75:3;71;64:6;52:2;49:1;45:3;40:15;;8:100;;;12:14;3:109;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1;8:100;33:3;30:1;27:2;8:100;;;99:1;94:3;90;84:5;80:1;75:3;71;64:6;52:2;49:1;45:3;40:15;;8:100;;;12:14;3:109;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;238:20:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2456:161:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;719:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;834:169:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;819:22:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;1308:239::-;1402:6;1361:13;:25;1375:10;1361:25;;;;;;;;;;;;;;;:37;;;:47;;;;;;;;;;;1429:6;1414:11;;:21;;;;;;;;;;;1455:6;1441:10;;:20;;;;;;;;;;;1476:9;1467:5;;:18;;;;;;;;;;;1491:51;1504:13;:25;1518:10;1504:25;;;;;;;;;;;;;;;:37;;;1491:51;;;;;;;;;;;;;;;;;;1308:239;:::o;1551:395::-;1636:8;1647:13;:25;1661:10;1647:25;;;;;;;;;;;;;;;1636:36;;1689:3;1678:4;:8;;:14;;;;;;;;;;;;:::i;:::-;;1720:1;1698:4;:18;;;:23;;;;;;;;;;;1743:13;:25;1757:10;1743:25;;;;;;;;;;;;;;;:30;;1727:4;:13;;:46;;;;;;;;;;;;;;;;;;;;:::i;:::-;;1792:10;1779:4;:10;;;:23;;;;;;;;;;;;;;;;;;1823:7;1808:4;:12;;:22;;;;;;;;;;;;:::i;:::-;;1861:1;1837:5;:22;;;;;;;;;;;:::i;:::-;;;;;;;;;;1848:10;1837:22;;;;;;;;;;;;;;;;;;;;;;:25;;1909:1;1868:13;:25;1882:10;1868:25;;;;;;;;;;;;;;;:37;;;:42;;;;;;;;;;;1916:25;1928:3;1933:7;1916:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:2;8:100;;;99:1;94:3;90;84:5;80:1;75:3;71;64:6;52:2;49:1;45:3;40:15;;8:100;;;12:14;3:109;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1;8:100;33:3;30:1;27:2;8:100;;;99:1;94:3;90;84:5;80:1;75:3;71;64:6;52:2;49:1;45:3;40:15;;8:100;;;12:14;3:109;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1551:395:0;;;:::o;2623:93::-;2665:5;;;;;;;;;;;2651:19;;:10;:19;;;2647:63;;;2695:5;;;;;;;;;;;2682:19;;;2647:63;2623:93::o;2375:77::-;2416:9;;:::i;:::-;2442:5;2435:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2375:77;:::o;1950:421::-;2049:6;2008:13;:19;2022:4;2008:19;;;;;;;;;;;;;;;:33;;;:48;;;;;;;;;;;2097:6;2062:13;:19;2076:4;2062:19;;;;;;;;;;;;;;;:31;;;:41;;;;;;;;;;;2150:6;2109:13;:25;2123:10;2109:25;;;;;;;;;;;;;;;:37;;;:47;;;;;;;;;;;2162:204;2172:13;:19;2186:4;2172:19;;;;;;;;;;;;;;;:33;;;2213:13;:19;2227:4;2213:19;;;;;;;;;;;;;;;:24;;2239:4;2245:13;:19;2259:4;2245:19;;;;;;;;;;;;;;;:31;;;2284:13;:25;2298:10;2284:25;;;;;;;;;;;;;;;:30;;2316:10;2328:13;:25;2342:10;2328:25;;;;;;;;;;;;;;;:37;;;2162:204;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1950:421;;:::o;846:154::-;892:8;903:13;:25;917:10;903:25;;;;;;;;;;;;;;;892:36;;946:4;934;:9;;:16;;;;;;;;;;;;:::i;:::-;;975:1;956:4;:16;;:20;;;;982:13;990:4;982:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:2;8:100;;;99:1;94:3;90;84:5;80:1;75:3;71;64:6;52:2;49:1;45:3;40:15;;8:100;;;12:14;3:109;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;846:154:0;;:::o;769:46::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;1004:273::-;1044:6;;:::i;:::-;1052:4;1058:6;;:::i;:::-;1066:3;1071:7;1094:13;:25;1108:10;1094:25;;;;;;;;;;;;;;;:30;;1132:13;:25;1146:10;1132:25;;;;;;;;;;;;;;;:37;;;1177:13;:25;1191:10;1177:25;;;;;;;;;;;;;;;:29;;1214:13;:25;1228:10;1214:25;;;;;;;;;;;;;;;:39;;;1261:10;1086:186;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1004:273;;;;;:::o;238:20:1:-;;;;;;;;;;;;;:::o;2456:161:0:-;2539:16;2550:4;2539:10;:16::i;:::-;2563:17;2573:6;2563:9;:17::i;:::-;2588:24;2599:3;2604:7;2588:10;:24::i;:::-;2456:161;;;;:::o;719:46::-;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;834:169:1:-;654:5;;;;;;;;;;;640:19;;:10;:19;;;632:28;;;;;;;;930:1;910:22;;:8;:22;;;;902:31;;;;;;;;967:8;939:37;;960:5;;;;;;;;;;;939:37;;;;;;;;;;;;990:8;982:5;;:16;;;;;;;;;;;;;;;;;;834:169;:::o;87:2656:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;:::o;:::-;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o", + "source": "pragma solidity ^0.4.18;\n\nimport 'zeppelin-solidity/contracts/ownership/Ownable.sol';\n\ncontract CapCoin is Ownable {\n\n event NewUser(string name);\n event BoughtTokens(uint coinBalance);\n event CreatedPost(string url, string caption);\n event LikedPost(int lotteryAmount, string posterName,\n address poster, uint posterCoinbalance, string likerName,\n address liker, uint likerCoinbalance);\n\n uint coinSupply = 1000000;\n uint coinsBought = 0;\n address owner;\n uint value;\n\n function CapCoin () {\n owner = msg.sender;\n }\n\n struct User {\n string name;\n uint coinBalance;\n }\n\n struct Post {\n string url;\n string userName;\n int lotteryAmount;\n address owner;\n string caption;\n }\n\n mapping (address => User) public addressToUser;\n mapping (address => Post) public addressToPost;\n address[] public posts;\n\n function createUser(string name) public {\n var user = addressToUser[msg.sender];\n user.name = name;\n user.coinBalance = 0;\n NewUser(name);\n }\n\n function getUser() public view returns (string, uint, string, int, address) {\n return (addressToUser[msg.sender].name,\n addressToUser[msg.sender].coinBalance,\n addressToPost[msg.sender].url,\n addressToPost[msg.sender].lotteryAmount,\n msg.sender);\n }\n\n // need to add economics\n function buyTokens(uint amount) payable public {\n addressToUser[msg.sender].coinBalance += amount;\n coinsBought += amount;\n coinSupply -= amount;\n value += msg.value;\n BoughtTokens(addressToUser[msg.sender].coinBalance);\n }\n\n function createPost(string url, string caption) public {\n // 5 coins per post\n var post = addressToPost[msg.sender];\n post.url = url;\n post.lotteryAmount -= 5;\n post.userName = addressToUser[msg.sender].name;\n post.owner = msg.sender;\n post.caption = caption;\n\n posts.push(msg.sender) -1;\n addressToUser[msg.sender].coinBalance -= 5;\n CreatedPost(url, caption);\n }\n\n function likePost(address post, uint amount) public {\n addressToPost[post].lotteryAmount += int(amount);\n addressToUser[post].coinBalance += amount;\n addressToUser[msg.sender].coinBalance -= amount;\n LikedPost(addressToPost[post].lotteryAmount,\n addressToUser[post].name, post, addressToUser[post].coinBalance,\n addressToUser[msg.sender].name, msg.sender, addressToUser[msg.sender].coinBalance);\n }\n\n function getPosts() public view returns (address[]) {\n return posts;\n }\n\n function seed(string name, string url, uint amount, string caption) public {\n createUser(name);\n buyTokens(amount);\n createPost(url, caption);\n }\n\n function kill() {\n if (msg.sender == owner) {\n selfdestruct(owner);\n }\n }\n\n function() payable {}\n}\n", "sourcePath": "/Users/schwartzz8990/Dropbox/fullstack/capCoin/contracts/CapCoin.sol", "ast": { "attributes": { "absolutePath": "/Users/schwartzz8990/Dropbox/fullstack/capCoin/contracts/CapCoin.sol", "exportedSymbols": { "CapCoin": [ - 349 + 365 ] } }, @@ -375,10 +392,10 @@ }, { "attributes": { - "SourceUnit": 406, + "SourceUnit": 422, "absolutePath": "zeppelin-solidity/contracts/ownership/Ownable.sol", "file": "zeppelin-solidity/contracts/ownership/Ownable.sol", - "scope": 350, + "scope": 366, "symbolAliases": [ null ], @@ -391,17 +408,17 @@ { "attributes": { "contractDependencies": [ - 405 + 421 ], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "linearizedBaseContracts": [ - 349, - 405 + 365, + 421 ], "name": "CapCoin", - "scope": 350 + "scope": 366 }, "children": [ { @@ -415,7 +432,7 @@ "attributes": { "contractScope": null, "name": "Ownable", - "referencedDeclaration": 405, + "referencedDeclaration": 421, "type": "contract Ownable" }, "id": 3, @@ -530,7 +547,7 @@ "constant": false, "indexed": false, "name": "url", - "scope": 16, + "scope": 18, "stateVariable": false, "storageLocation": "default", "type": "string memory", @@ -551,16 +568,43 @@ "id": 14, "name": "VariableDeclaration", "src": "208:10:0" + }, + { + "attributes": { + "constant": false, + "indexed": false, + "name": "caption", + "scope": 18, + "stateVariable": false, + "storageLocation": "default", + "type": "string memory", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "string", + "type": "string storage pointer" + }, + "id": 15, + "name": "ElementaryTypeName", + "src": "220:6:0" + } + ], + "id": 16, + "name": "VariableDeclaration", + "src": "220:14:0" } ], - "id": 15, + "id": 17, "name": "ParameterList", - "src": "207:12:0" + "src": "207:28:0" } ], - "id": 16, + "id": 18, "name": "EventDefinition", - "src": "190:30:0" + "src": "190:46:0" }, { "attributes": { @@ -575,7 +619,7 @@ "constant": false, "indexed": false, "name": "lotteryAmount", - "scope": 32, + "scope": 34, "stateVariable": false, "storageLocation": "default", "type": "int256", @@ -588,21 +632,21 @@ "name": "int", "type": "int256" }, - "id": 17, + "id": 19, "name": "ElementaryTypeName", - "src": "239:3:0" + "src": "255:3:0" } ], - "id": 18, + "id": 20, "name": "VariableDeclaration", - "src": "239:17:0" + "src": "255:17:0" }, { "attributes": { "constant": false, "indexed": false, "name": "posterName", - "scope": 32, + "scope": 34, "stateVariable": false, "storageLocation": "default", "type": "string memory", @@ -615,21 +659,21 @@ "name": "string", "type": "string storage pointer" }, - "id": 19, + "id": 21, "name": "ElementaryTypeName", - "src": "258:6:0" + "src": "274:6:0" } ], - "id": 20, + "id": 22, "name": "VariableDeclaration", - "src": "258:17:0" + "src": "274:17:0" }, { "attributes": { "constant": false, "indexed": false, "name": "poster", - "scope": 32, + "scope": 34, "stateVariable": false, "storageLocation": "default", "type": "address", @@ -642,21 +686,21 @@ "name": "address", "type": "address" }, - "id": 21, + "id": 23, "name": "ElementaryTypeName", - "src": "281:7:0" + "src": "297:7:0" } ], - "id": 22, + "id": 24, "name": "VariableDeclaration", - "src": "281:14:0" + "src": "297:14:0" }, { "attributes": { "constant": false, "indexed": false, "name": "posterCoinbalance", - "scope": 32, + "scope": 34, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -669,21 +713,21 @@ "name": "uint", "type": "uint256" }, - "id": 23, + "id": 25, "name": "ElementaryTypeName", - "src": "297:4:0" + "src": "313:4:0" } ], - "id": 24, + "id": 26, "name": "VariableDeclaration", - "src": "297:22:0" + "src": "313:22:0" }, { "attributes": { "constant": false, "indexed": false, "name": "likerName", - "scope": 32, + "scope": 34, "stateVariable": false, "storageLocation": "default", "type": "string memory", @@ -696,21 +740,21 @@ "name": "string", "type": "string storage pointer" }, - "id": 25, + "id": 27, "name": "ElementaryTypeName", - "src": "321:6:0" + "src": "337:6:0" } ], - "id": 26, + "id": 28, "name": "VariableDeclaration", - "src": "321:16:0" + "src": "337:16:0" }, { "attributes": { "constant": false, "indexed": false, "name": "liker", - "scope": 32, + "scope": 34, "stateVariable": false, "storageLocation": "default", "type": "address", @@ -723,21 +767,21 @@ "name": "address", "type": "address" }, - "id": 27, + "id": 29, "name": "ElementaryTypeName", - "src": "343:7:0" + "src": "359:7:0" } ], - "id": 28, + "id": 30, "name": "VariableDeclaration", - "src": "343:13:0" + "src": "359:13:0" }, { "attributes": { "constant": false, "indexed": false, "name": "likerCoinbalance", - "scope": 32, + "scope": 34, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -750,30 +794,30 @@ "name": "uint", "type": "uint256" }, - "id": 29, + "id": 31, "name": "ElementaryTypeName", - "src": "358:4:0" + "src": "374:4:0" } ], - "id": 30, + "id": 32, "name": "VariableDeclaration", - "src": "358:21:0" + "src": "374:21:0" } ], - "id": 31, + "id": 33, "name": "ParameterList", - "src": "238:142:0" + "src": "254:142:0" } ], - "id": 32, + "id": 34, "name": "EventDefinition", - "src": "223:158:0" + "src": "239:158:0" }, { "attributes": { "constant": false, "name": "coinSupply", - "scope": 349, + "scope": 365, "stateVariable": true, "storageLocation": "default", "type": "uint256", @@ -785,9 +829,9 @@ "name": "uint", "type": "uint256" }, - "id": 33, + "id": 35, "name": "ElementaryTypeName", - "src": "385:4:0" + "src": "401:4:0" }, { "attributes": { @@ -802,20 +846,20 @@ "type": "int_const 1000000", "value": "1000000" }, - "id": 34, + "id": 36, "name": "Literal", - "src": "403:7:0" + "src": "419:7:0" } ], - "id": 35, + "id": 37, "name": "VariableDeclaration", - "src": "385:25:0" + "src": "401:25:0" }, { "attributes": { "constant": false, "name": "coinsBought", - "scope": 349, + "scope": 365, "stateVariable": true, "storageLocation": "default", "type": "uint256", @@ -827,9 +871,9 @@ "name": "uint", "type": "uint256" }, - "id": 36, + "id": 38, "name": "ElementaryTypeName", - "src": "414:4:0" + "src": "430:4:0" }, { "attributes": { @@ -844,20 +888,20 @@ "type": "int_const 0", "value": "0" }, - "id": 37, + "id": 39, "name": "Literal", - "src": "433:1:0" + "src": "449:1:0" } ], - "id": 38, + "id": 40, "name": "VariableDeclaration", - "src": "414:20:0" + "src": "430:20:0" }, { "attributes": { "constant": false, "name": "owner", - "scope": 349, + "scope": 365, "stateVariable": true, "storageLocation": "default", "type": "address", @@ -870,20 +914,20 @@ "name": "address", "type": "address" }, - "id": 39, + "id": 41, "name": "ElementaryTypeName", - "src": "438:7:0" + "src": "454:7:0" } ], - "id": 40, + "id": 42, "name": "VariableDeclaration", - "src": "438:13:0" + "src": "454:13:0" }, { "attributes": { "constant": false, "name": "value", - "scope": 349, + "scope": 365, "stateVariable": true, "storageLocation": "default", "type": "uint256", @@ -896,14 +940,14 @@ "name": "uint", "type": "uint256" }, - "id": 41, + "id": 43, "name": "ElementaryTypeName", - "src": "455:4:0" + "src": "471:4:0" } ], - "id": 42, + "id": 44, "name": "VariableDeclaration", - "src": "455:10:0" + "src": "471:10:0" }, { "attributes": { @@ -915,7 +959,7 @@ ], "name": "CapCoin", "payable": false, - "scope": 349, + "scope": 365, "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" @@ -928,9 +972,9 @@ ] }, "children": [], - "id": 43, + "id": 45, "name": "ParameterList", - "src": "487:2:0" + "src": "503:2:0" }, { "attributes": { @@ -939,9 +983,9 @@ ] }, "children": [], - "id": 44, + "id": 46, "name": "ParameterList", - "src": "490:0:0" + "src": "506:0:0" }, { "children": [ @@ -964,13 +1008,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 40, + "referencedDeclaration": 42, "type": "address", "value": "owner" }, - "id": 45, + "id": 47, "name": "Identifier", - "src": "496:5:0" + "src": "512:5:0" }, { "attributes": { @@ -990,44 +1034,44 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 417, + "referencedDeclaration": 433, "type": "msg", "value": "msg" }, - "id": 46, + "id": 48, "name": "Identifier", - "src": "504:3:0" + "src": "520:3:0" } ], - "id": 47, + "id": 49, "name": "MemberAccess", - "src": "504:10:0" + "src": "520:10:0" } ], - "id": 48, + "id": 50, "name": "Assignment", - "src": "496:18:0" + "src": "512:18:0" } ], - "id": 49, + "id": 51, "name": "ExpressionStatement", - "src": "496:18:0" + "src": "512:18:0" } ], - "id": 50, + "id": 52, "name": "Block", - "src": "490:29:0" + "src": "506:29:0" } ], - "id": 51, + "id": 53, "name": "FunctionDefinition", - "src": "470:49:0" + "src": "486:49:0" }, { "attributes": { "canonicalName": "CapCoin.User", "name": "User", - "scope": 349, + "scope": 365, "visibility": "public" }, "children": [ @@ -1035,7 +1079,7 @@ "attributes": { "constant": false, "name": "name", - "scope": 56, + "scope": 58, "stateVariable": false, "storageLocation": "default", "type": "string storage pointer", @@ -1048,20 +1092,20 @@ "name": "string", "type": "string storage pointer" }, - "id": 52, + "id": 54, "name": "ElementaryTypeName", - "src": "541:6:0" + "src": "557:6:0" } ], - "id": 53, + "id": 55, "name": "VariableDeclaration", - "src": "541:11:0" + "src": "557:11:0" }, { "attributes": { "constant": false, "name": "coinBalance", - "scope": 56, + "scope": 58, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -1074,25 +1118,25 @@ "name": "uint", "type": "uint256" }, - "id": 54, + "id": 56, "name": "ElementaryTypeName", - "src": "558:4:0" + "src": "574:4:0" } ], - "id": 55, + "id": 57, "name": "VariableDeclaration", - "src": "558:16:0" + "src": "574:16:0" } ], - "id": 56, + "id": 58, "name": "StructDefinition", - "src": "523:56:0" + "src": "539:56:0" }, { "attributes": { "canonicalName": "CapCoin.Post", "name": "Post", - "scope": 349, + "scope": 365, "visibility": "public" }, "children": [ @@ -1100,7 +1144,7 @@ "attributes": { "constant": false, "name": "url", - "scope": 65, + "scope": 69, "stateVariable": false, "storageLocation": "default", "type": "string storage pointer", @@ -1113,20 +1157,20 @@ "name": "string", "type": "string storage pointer" }, - "id": 57, + "id": 59, "name": "ElementaryTypeName", - "src": "601:6:0" + "src": "617:6:0" } ], - "id": 58, + "id": 60, "name": "VariableDeclaration", - "src": "601:10:0" + "src": "617:10:0" }, { "attributes": { "constant": false, "name": "userName", - "scope": 65, + "scope": 69, "stateVariable": false, "storageLocation": "default", "type": "string storage pointer", @@ -1139,20 +1183,20 @@ "name": "string", "type": "string storage pointer" }, - "id": 59, + "id": 61, "name": "ElementaryTypeName", - "src": "617:6:0" + "src": "633:6:0" } ], - "id": 60, + "id": 62, "name": "VariableDeclaration", - "src": "617:15:0" + "src": "633:15:0" }, { "attributes": { "constant": false, "name": "lotteryAmount", - "scope": 65, + "scope": 69, "stateVariable": false, "storageLocation": "default", "type": "int256", @@ -1165,20 +1209,20 @@ "name": "int", "type": "int256" }, - "id": 61, + "id": 63, "name": "ElementaryTypeName", - "src": "638:3:0" + "src": "654:3:0" } ], - "id": 62, + "id": 64, "name": "VariableDeclaration", - "src": "638:17:0" + "src": "654:17:0" }, { "attributes": { "constant": false, "name": "owner", - "scope": 65, + "scope": 69, "stateVariable": false, "storageLocation": "default", "type": "address", @@ -1191,25 +1235,51 @@ "name": "address", "type": "address" }, - "id": 63, + "id": 65, "name": "ElementaryTypeName", - "src": "661:7:0" + "src": "677:7:0" } ], - "id": 64, + "id": 66, + "name": "VariableDeclaration", + "src": "677:13:0" + }, + { + "attributes": { + "constant": false, + "name": "caption", + "scope": 69, + "stateVariable": false, + "storageLocation": "default", + "type": "string storage pointer", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "string", + "type": "string storage pointer" + }, + "id": 67, + "name": "ElementaryTypeName", + "src": "696:6:0" + } + ], + "id": 68, "name": "VariableDeclaration", - "src": "661:13:0" + "src": "696:14:0" } ], - "id": 65, + "id": 69, "name": "StructDefinition", - "src": "583:96:0" + "src": "599:116:0" }, { "attributes": { "constant": false, "name": "addressToUser", - "scope": 349, + "scope": 365, "stateVariable": true, "storageLocation": "default", "type": "mapping(address => struct CapCoin.User storage ref)", @@ -1227,36 +1297,36 @@ "name": "address", "type": "address" }, - "id": 66, + "id": 70, "name": "ElementaryTypeName", - "src": "692:7:0" + "src": "728:7:0" }, { "attributes": { "contractScope": null, "name": "User", - "referencedDeclaration": 56, + "referencedDeclaration": 58, "type": "struct CapCoin.User storage pointer" }, - "id": 67, + "id": 71, "name": "UserDefinedTypeName", - "src": "703:4:0" + "src": "739:4:0" } ], - "id": 68, + "id": 72, "name": "Mapping", - "src": "683:25:0" + "src": "719:25:0" } ], - "id": 69, + "id": 73, "name": "VariableDeclaration", - "src": "683:46:0" + "src": "719:46:0" }, { "attributes": { "constant": false, "name": "addressToPost", - "scope": 349, + "scope": 365, "stateVariable": true, "storageLocation": "default", "type": "mapping(address => struct CapCoin.Post storage ref)", @@ -1274,36 +1344,36 @@ "name": "address", "type": "address" }, - "id": 70, + "id": 74, "name": "ElementaryTypeName", - "src": "742:7:0" + "src": "778:7:0" }, { "attributes": { "contractScope": null, "name": "Post", - "referencedDeclaration": 65, + "referencedDeclaration": 69, "type": "struct CapCoin.Post storage pointer" }, - "id": 71, + "id": 75, "name": "UserDefinedTypeName", - "src": "753:4:0" + "src": "789:4:0" } ], - "id": 72, + "id": 76, "name": "Mapping", - "src": "733:25:0" + "src": "769:25:0" } ], - "id": 73, + "id": 77, "name": "VariableDeclaration", - "src": "733:46:0" + "src": "769:46:0" }, { "attributes": { "constant": false, "name": "posts", - "scope": 349, + "scope": 365, "stateVariable": true, "storageLocation": "default", "type": "address[] storage ref", @@ -1322,19 +1392,19 @@ "name": "address", "type": "address" }, - "id": 74, + "id": 78, "name": "ElementaryTypeName", - "src": "783:7:0" + "src": "819:7:0" } ], - "id": 75, + "id": 79, "name": "ArrayTypeName", - "src": "783:9:0" + "src": "819:9:0" } ], - "id": 76, + "id": 80, "name": "VariableDeclaration", - "src": "783:22:0" + "src": "819:22:0" }, { "attributes": { @@ -1346,7 +1416,7 @@ ], "name": "createUser", "payable": false, - "scope": 349, + "scope": 365, "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" @@ -1358,7 +1428,7 @@ "attributes": { "constant": false, "name": "name", - "scope": 104, + "scope": 108, "stateVariable": false, "storageLocation": "default", "type": "string memory", @@ -1371,19 +1441,19 @@ "name": "string", "type": "string storage pointer" }, - "id": 77, + "id": 81, "name": "ElementaryTypeName", - "src": "830:6:0" + "src": "866:6:0" } ], - "id": 78, + "id": 82, "name": "VariableDeclaration", - "src": "830:11:0" + "src": "866:11:0" } ], - "id": 79, + "id": 83, "name": "ParameterList", - "src": "829:13:0" + "src": "865:13:0" }, { "attributes": { @@ -1392,16 +1462,16 @@ ] }, "children": [], - "id": 80, + "id": 84, "name": "ParameterList", - "src": "850:0:0" + "src": "886:0:0" }, { "children": [ { "attributes": { "assignments": [ - 81 + 85 ] }, "children": [ @@ -1409,7 +1479,7 @@ "attributes": { "constant": false, "name": "user", - "scope": 104, + "scope": 108, "stateVariable": false, "storageLocation": "default", "type": "struct CapCoin.User storage pointer", @@ -1418,9 +1488,9 @@ "visibility": "internal" }, "children": [], - "id": 81, + "id": 85, "name": "VariableDeclaration", - "src": "856:8:0" + "src": "892:8:0" }, { "attributes": { @@ -1438,13 +1508,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 69, + "referencedDeclaration": 73, "type": "mapping(address => struct CapCoin.User storage ref)", "value": "addressToUser" }, - "id": 82, + "id": 86, "name": "Identifier", - "src": "867:13:0" + "src": "903:13:0" }, { "attributes": { @@ -1464,28 +1534,28 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 417, + "referencedDeclaration": 433, "type": "msg", "value": "msg" }, - "id": 83, + "id": 87, "name": "Identifier", - "src": "881:3:0" + "src": "917:3:0" } ], - "id": 84, + "id": 88, "name": "MemberAccess", - "src": "881:10:0" + "src": "917:10:0" } ], - "id": 85, + "id": 89, "name": "IndexAccess", - "src": "867:25:0" + "src": "903:25:0" } ], - "id": 86, + "id": 90, "name": "VariableDeclarationStatement", - "src": "856:36:0" + "src": "892:36:0" }, { "children": [ @@ -1508,7 +1578,7 @@ "isPure": false, "lValueRequested": true, "member_name": "name", - "referencedDeclaration": 53, + "referencedDeclaration": 55, "type": "string storage ref" }, "children": [ @@ -1518,18 +1588,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 81, + "referencedDeclaration": 85, "type": "struct CapCoin.User storage pointer", "value": "user" }, - "id": 87, + "id": 91, "name": "Identifier", - "src": "898:4:0" + "src": "934:4:0" } ], - "id": 89, + "id": 93, "name": "MemberAccess", - "src": "898:9:0" + "src": "934:9:0" }, { "attributes": { @@ -1537,23 +1607,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 78, + "referencedDeclaration": 82, "type": "string memory", "value": "name" }, - "id": 90, + "id": 94, "name": "Identifier", - "src": "910:4:0" + "src": "946:4:0" } ], - "id": 91, + "id": 95, "name": "Assignment", - "src": "898:16:0" + "src": "934:16:0" } ], - "id": 92, + "id": 96, "name": "ExpressionStatement", - "src": "898:16:0" + "src": "934:16:0" }, { "children": [ @@ -1576,7 +1646,7 @@ "isPure": false, "lValueRequested": true, "member_name": "coinBalance", - "referencedDeclaration": 55, + "referencedDeclaration": 57, "type": "uint256" }, "children": [ @@ -1586,18 +1656,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 81, + "referencedDeclaration": 85, "type": "struct CapCoin.User storage pointer", "value": "user" }, - "id": 93, + "id": 97, "name": "Identifier", - "src": "920:4:0" + "src": "956:4:0" } ], - "id": 95, + "id": 99, "name": "MemberAccess", - "src": "920:16:0" + "src": "956:16:0" }, { "attributes": { @@ -1612,19 +1682,19 @@ "type": "int_const 0", "value": "0" }, - "id": 96, + "id": 100, "name": "Literal", - "src": "939:1:0" + "src": "975:1:0" } ], - "id": 97, + "id": 101, "name": "Assignment", - "src": "920:20:0" + "src": "956:20:0" } ], - "id": 98, + "id": 102, "name": "ExpressionStatement", - "src": "920:20:0" + "src": "956:20:0" }, { "children": [ @@ -1658,9 +1728,9 @@ "type": "function (string memory)", "value": "NewUser" }, - "id": 99, + "id": 103, "name": "Identifier", - "src": "946:7:0" + "src": "982:7:0" }, { "attributes": { @@ -1668,33 +1738,33 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 78, + "referencedDeclaration": 82, "type": "string memory", "value": "name" }, - "id": 100, + "id": 104, "name": "Identifier", - "src": "954:4:0" + "src": "990:4:0" } ], - "id": 101, + "id": 105, "name": "FunctionCall", - "src": "946:13:0" + "src": "982:13:0" } ], - "id": 102, + "id": 106, "name": "ExpressionStatement", - "src": "946:13:0" + "src": "982:13:0" } ], - "id": 103, + "id": 107, "name": "Block", - "src": "850:114:0" + "src": "886:114:0" } ], - "id": 104, + "id": 108, "name": "FunctionDefinition", - "src": "810:154:0" + "src": "846:154:0" }, { "attributes": { @@ -1706,7 +1776,7 @@ ], "name": "getUser", "payable": false, - "scope": 349, + "scope": 365, "stateMutability": "view", "superFunction": null, "visibility": "public" @@ -1719,9 +1789,9 @@ ] }, "children": [], - "id": 105, + "id": 109, "name": "ParameterList", - "src": "984:2:0" + "src": "1020:2:0" }, { "children": [ @@ -1729,7 +1799,7 @@ "attributes": { "constant": false, "name": "", - "scope": 142, + "scope": 146, "stateVariable": false, "storageLocation": "default", "type": "string memory", @@ -1742,20 +1812,20 @@ "name": "string", "type": "string storage pointer" }, - "id": 106, + "id": 110, "name": "ElementaryTypeName", - "src": "1008:6:0" + "src": "1044:6:0" } ], - "id": 107, + "id": 111, "name": "VariableDeclaration", - "src": "1008:6:0" + "src": "1044:6:0" }, { "attributes": { "constant": false, "name": "", - "scope": 142, + "scope": 146, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -1768,20 +1838,20 @@ "name": "uint", "type": "uint256" }, - "id": 108, + "id": 112, "name": "ElementaryTypeName", - "src": "1016:4:0" + "src": "1052:4:0" } ], - "id": 109, + "id": 113, "name": "VariableDeclaration", - "src": "1016:4:0" + "src": "1052:4:0" }, { "attributes": { "constant": false, "name": "", - "scope": 142, + "scope": 146, "stateVariable": false, "storageLocation": "default", "type": "string memory", @@ -1794,20 +1864,20 @@ "name": "string", "type": "string storage pointer" }, - "id": 110, + "id": 114, "name": "ElementaryTypeName", - "src": "1022:6:0" + "src": "1058:6:0" } ], - "id": 111, + "id": 115, "name": "VariableDeclaration", - "src": "1022:6:0" + "src": "1058:6:0" }, { "attributes": { "constant": false, "name": "", - "scope": 142, + "scope": 146, "stateVariable": false, "storageLocation": "default", "type": "int256", @@ -1820,20 +1890,20 @@ "name": "int", "type": "int256" }, - "id": 112, + "id": 116, "name": "ElementaryTypeName", - "src": "1030:3:0" + "src": "1066:3:0" } ], - "id": 113, + "id": 117, "name": "VariableDeclaration", - "src": "1030:3:0" + "src": "1066:3:0" }, { "attributes": { "constant": false, "name": "", - "scope": 142, + "scope": 146, "stateVariable": false, "storageLocation": "default", "type": "address", @@ -1846,25 +1916,25 @@ "name": "address", "type": "address" }, - "id": 114, + "id": 118, "name": "ElementaryTypeName", - "src": "1035:7:0" + "src": "1071:7:0" } ], - "id": 115, + "id": 119, "name": "VariableDeclaration", - "src": "1035:7:0" + "src": "1071:7:0" } ], - "id": 116, + "id": 120, "name": "ParameterList", - "src": "1007:36:0" + "src": "1043:36:0" }, { "children": [ { "attributes": { - "functionReturnParameters": 116 + "functionReturnParameters": 120 }, "children": [ { @@ -1886,7 +1956,7 @@ "isPure": false, "lValueRequested": false, "member_name": "name", - "referencedDeclaration": 53, + "referencedDeclaration": 55, "type": "string storage ref" }, "children": [ @@ -1906,13 +1976,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 69, + "referencedDeclaration": 73, "type": "mapping(address => struct CapCoin.User storage ref)", "value": "addressToUser" }, - "id": 117, + "id": 121, "name": "Identifier", - "src": "1058:13:0" + "src": "1094:13:0" }, { "attributes": { @@ -1932,28 +2002,28 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 417, + "referencedDeclaration": 433, "type": "msg", "value": "msg" }, - "id": 118, + "id": 122, "name": "Identifier", - "src": "1072:3:0" + "src": "1108:3:0" } ], - "id": 119, + "id": 123, "name": "MemberAccess", - "src": "1072:10:0" + "src": "1108:10:0" } ], - "id": 120, + "id": 124, "name": "IndexAccess", - "src": "1058:25:0" + "src": "1094:25:0" } ], - "id": 121, + "id": 125, "name": "MemberAccess", - "src": "1058:30:0" + "src": "1094:30:0" }, { "attributes": { @@ -1963,7 +2033,7 @@ "isPure": false, "lValueRequested": false, "member_name": "coinBalance", - "referencedDeclaration": 55, + "referencedDeclaration": 57, "type": "uint256" }, "children": [ @@ -1983,13 +2053,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 69, + "referencedDeclaration": 73, "type": "mapping(address => struct CapCoin.User storage ref)", "value": "addressToUser" }, - "id": 122, + "id": 126, "name": "Identifier", - "src": "1096:13:0" + "src": "1132:13:0" }, { "attributes": { @@ -2009,28 +2079,28 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 417, + "referencedDeclaration": 433, "type": "msg", "value": "msg" }, - "id": 123, + "id": 127, "name": "Identifier", - "src": "1110:3:0" + "src": "1146:3:0" } ], - "id": 124, + "id": 128, "name": "MemberAccess", - "src": "1110:10:0" + "src": "1146:10:0" } ], - "id": 125, + "id": 129, "name": "IndexAccess", - "src": "1096:25:0" + "src": "1132:25:0" } ], - "id": 126, + "id": 130, "name": "MemberAccess", - "src": "1096:37:0" + "src": "1132:37:0" }, { "attributes": { @@ -2040,7 +2110,7 @@ "isPure": false, "lValueRequested": false, "member_name": "url", - "referencedDeclaration": 58, + "referencedDeclaration": 60, "type": "string storage ref" }, "children": [ @@ -2060,13 +2130,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 73, + "referencedDeclaration": 77, "type": "mapping(address => struct CapCoin.Post storage ref)", "value": "addressToPost" }, - "id": 127, + "id": 131, "name": "Identifier", - "src": "1141:13:0" + "src": "1177:13:0" }, { "attributes": { @@ -2086,28 +2156,28 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 417, + "referencedDeclaration": 433, "type": "msg", "value": "msg" }, - "id": 128, + "id": 132, "name": "Identifier", - "src": "1155:3:0" + "src": "1191:3:0" } ], - "id": 129, + "id": 133, "name": "MemberAccess", - "src": "1155:10:0" + "src": "1191:10:0" } ], - "id": 130, + "id": 134, "name": "IndexAccess", - "src": "1141:25:0" + "src": "1177:25:0" } ], - "id": 131, + "id": 135, "name": "MemberAccess", - "src": "1141:29:0" + "src": "1177:29:0" }, { "attributes": { @@ -2117,7 +2187,7 @@ "isPure": false, "lValueRequested": false, "member_name": "lotteryAmount", - "referencedDeclaration": 62, + "referencedDeclaration": 64, "type": "int256" }, "children": [ @@ -2137,13 +2207,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 73, + "referencedDeclaration": 77, "type": "mapping(address => struct CapCoin.Post storage ref)", "value": "addressToPost" }, - "id": 132, + "id": 136, "name": "Identifier", - "src": "1178:13:0" + "src": "1214:13:0" }, { "attributes": { @@ -2163,28 +2233,28 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 417, + "referencedDeclaration": 433, "type": "msg", "value": "msg" }, - "id": 133, + "id": 137, "name": "Identifier", - "src": "1192:3:0" + "src": "1228:3:0" } ], - "id": 134, + "id": 138, "name": "MemberAccess", - "src": "1192:10:0" + "src": "1228:10:0" } ], - "id": 135, + "id": 139, "name": "IndexAccess", - "src": "1178:25:0" + "src": "1214:25:0" } ], - "id": 136, + "id": 140, "name": "MemberAccess", - "src": "1178:39:0" + "src": "1214:39:0" }, { "attributes": { @@ -2204,38 +2274,38 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 417, + "referencedDeclaration": 433, "type": "msg", "value": "msg" }, - "id": 137, + "id": 141, "name": "Identifier", - "src": "1225:3:0" + "src": "1261:3:0" } ], - "id": 138, + "id": 142, "name": "MemberAccess", - "src": "1225:10:0" + "src": "1261:10:0" } ], - "id": 139, + "id": 143, "name": "TupleExpression", - "src": "1057:179:0" + "src": "1093:179:0" } ], - "id": 140, + "id": 144, "name": "Return", - "src": "1050:186:0" + "src": "1086:186:0" } ], - "id": 141, + "id": 145, "name": "Block", - "src": "1044:197:0" + "src": "1080:197:0" } ], - "id": 142, + "id": 146, "name": "FunctionDefinition", - "src": "968:273:0" + "src": "1004:273:0" }, { "attributes": { @@ -2247,7 +2317,7 @@ ], "name": "buyTokens", "payable": true, - "scope": 349, + "scope": 365, "stateMutability": "payable", "superFunction": null, "visibility": "public" @@ -2259,7 +2329,7 @@ "attributes": { "constant": false, "name": "amount", - "scope": 177, + "scope": 181, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -2272,19 +2342,19 @@ "name": "uint", "type": "uint256" }, - "id": 143, + "id": 147, "name": "ElementaryTypeName", - "src": "1291:4:0" + "src": "1327:4:0" } ], - "id": 144, + "id": 148, "name": "VariableDeclaration", - "src": "1291:11:0" + "src": "1327:11:0" } ], - "id": 145, + "id": 149, "name": "ParameterList", - "src": "1290:13:0" + "src": "1326:13:0" }, { "attributes": { @@ -2293,9 +2363,9 @@ ] }, "children": [], - "id": 146, + "id": 150, "name": "ParameterList", - "src": "1319:0:0" + "src": "1355:0:0" }, { "children": [ @@ -2320,7 +2390,7 @@ "isPure": false, "lValueRequested": true, "member_name": "coinBalance", - "referencedDeclaration": 55, + "referencedDeclaration": 57, "type": "uint256" }, "children": [ @@ -2340,13 +2410,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 69, + "referencedDeclaration": 73, "type": "mapping(address => struct CapCoin.User storage ref)", "value": "addressToUser" }, - "id": 147, + "id": 151, "name": "Identifier", - "src": "1325:13:0" + "src": "1361:13:0" }, { "attributes": { @@ -2366,28 +2436,28 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 417, + "referencedDeclaration": 433, "type": "msg", "value": "msg" }, - "id": 148, + "id": 152, "name": "Identifier", - "src": "1339:3:0" + "src": "1375:3:0" } ], - "id": 149, + "id": 153, "name": "MemberAccess", - "src": "1339:10:0" + "src": "1375:10:0" } ], - "id": 150, + "id": 154, "name": "IndexAccess", - "src": "1325:25:0" + "src": "1361:25:0" } ], - "id": 151, + "id": 155, "name": "MemberAccess", - "src": "1325:37:0" + "src": "1361:37:0" }, { "attributes": { @@ -2395,23 +2465,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 144, + "referencedDeclaration": 148, "type": "uint256", "value": "amount" }, - "id": 152, + "id": 156, "name": "Identifier", - "src": "1366:6:0" + "src": "1402:6:0" } ], - "id": 153, + "id": 157, "name": "Assignment", - "src": "1325:47:0" + "src": "1361:47:0" } ], - "id": 154, + "id": 158, "name": "ExpressionStatement", - "src": "1325:47:0" + "src": "1361:47:0" }, { "children": [ @@ -2432,13 +2502,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 38, + "referencedDeclaration": 40, "type": "uint256", "value": "coinsBought" }, - "id": 155, + "id": 159, "name": "Identifier", - "src": "1378:11:0" + "src": "1414:11:0" }, { "attributes": { @@ -2446,23 +2516,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 144, + "referencedDeclaration": 148, "type": "uint256", "value": "amount" }, - "id": 156, + "id": 160, "name": "Identifier", - "src": "1393:6:0" + "src": "1429:6:0" } ], - "id": 157, + "id": 161, "name": "Assignment", - "src": "1378:21:0" + "src": "1414:21:0" } ], - "id": 158, + "id": 162, "name": "ExpressionStatement", - "src": "1378:21:0" + "src": "1414:21:0" }, { "children": [ @@ -2483,13 +2553,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 35, + "referencedDeclaration": 37, "type": "uint256", "value": "coinSupply" }, - "id": 159, + "id": 163, "name": "Identifier", - "src": "1405:10:0" + "src": "1441:10:0" }, { "attributes": { @@ -2497,23 +2567,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 144, + "referencedDeclaration": 148, "type": "uint256", "value": "amount" }, - "id": 160, + "id": 164, "name": "Identifier", - "src": "1419:6:0" + "src": "1455:6:0" } ], - "id": 161, + "id": 165, "name": "Assignment", - "src": "1405:20:0" + "src": "1441:20:0" } ], - "id": 162, + "id": 166, "name": "ExpressionStatement", - "src": "1405:20:0" + "src": "1441:20:0" }, { "children": [ @@ -2534,13 +2604,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 42, + "referencedDeclaration": 44, "type": "uint256", "value": "value" }, - "id": 163, + "id": 167, "name": "Identifier", - "src": "1431:5:0" + "src": "1467:5:0" }, { "attributes": { @@ -2560,28 +2630,28 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 417, + "referencedDeclaration": 433, "type": "msg", "value": "msg" }, - "id": 164, + "id": 168, "name": "Identifier", - "src": "1440:3:0" + "src": "1476:3:0" } ], - "id": 165, + "id": 169, "name": "MemberAccess", - "src": "1440:9:0" + "src": "1476:9:0" } ], - "id": 166, + "id": 170, "name": "Assignment", - "src": "1431:18:0" + "src": "1467:18:0" } ], - "id": 167, + "id": 171, "name": "ExpressionStatement", - "src": "1431:18:0" + "src": "1467:18:0" }, { "children": [ @@ -2615,9 +2685,9 @@ "type": "function (uint256)", "value": "BoughtTokens" }, - "id": 168, + "id": 172, "name": "Identifier", - "src": "1455:12:0" + "src": "1491:12:0" }, { "attributes": { @@ -2627,7 +2697,7 @@ "isPure": false, "lValueRequested": false, "member_name": "coinBalance", - "referencedDeclaration": 55, + "referencedDeclaration": 57, "type": "uint256" }, "children": [ @@ -2647,13 +2717,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 69, + "referencedDeclaration": 73, "type": "mapping(address => struct CapCoin.User storage ref)", "value": "addressToUser" }, - "id": 169, + "id": 173, "name": "Identifier", - "src": "1468:13:0" + "src": "1504:13:0" }, { "attributes": { @@ -2673,48 +2743,48 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 417, + "referencedDeclaration": 433, "type": "msg", "value": "msg" }, - "id": 170, + "id": 174, "name": "Identifier", - "src": "1482:3:0" + "src": "1518:3:0" } ], - "id": 171, + "id": 175, "name": "MemberAccess", - "src": "1482:10:0" + "src": "1518:10:0" } ], - "id": 172, + "id": 176, "name": "IndexAccess", - "src": "1468:25:0" + "src": "1504:25:0" } ], - "id": 173, + "id": 177, "name": "MemberAccess", - "src": "1468:37:0" + "src": "1504:37:0" } ], - "id": 174, + "id": 178, "name": "FunctionCall", - "src": "1455:51:0" + "src": "1491:51:0" } ], - "id": 175, + "id": 179, "name": "ExpressionStatement", - "src": "1455:51:0" + "src": "1491:51:0" } ], - "id": 176, + "id": 180, "name": "Block", - "src": "1319:192:0" + "src": "1355:192:0" } ], - "id": 177, + "id": 181, "name": "FunctionDefinition", - "src": "1272:239:0" + "src": "1308:239:0" }, { "attributes": { @@ -2726,7 +2796,7 @@ ], "name": "createPost", "payable": false, - "scope": 349, + "scope": 365, "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" @@ -2738,7 +2808,7 @@ "attributes": { "constant": false, "name": "url", - "scope": 239, + "scope": 252, "stateVariable": false, "storageLocation": "default", "type": "string memory", @@ -2751,19 +2821,45 @@ "name": "string", "type": "string storage pointer" }, - "id": 178, + "id": 182, "name": "ElementaryTypeName", - "src": "1535:6:0" + "src": "1571:6:0" } ], - "id": 179, + "id": 183, + "name": "VariableDeclaration", + "src": "1571:10:0" + }, + { + "attributes": { + "constant": false, + "name": "caption", + "scope": 252, + "stateVariable": false, + "storageLocation": "default", + "type": "string memory", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "string", + "type": "string storage pointer" + }, + "id": 184, + "name": "ElementaryTypeName", + "src": "1583:6:0" + } + ], + "id": 185, "name": "VariableDeclaration", - "src": "1535:10:0" + "src": "1583:14:0" } ], - "id": 180, + "id": 186, "name": "ParameterList", - "src": "1534:12:0" + "src": "1570:28:0" }, { "attributes": { @@ -2772,16 +2868,16 @@ ] }, "children": [], - "id": 181, + "id": 187, "name": "ParameterList", - "src": "1554:0:0" + "src": "1606:0:0" }, { "children": [ { "attributes": { "assignments": [ - 182 + 188 ] }, "children": [ @@ -2789,7 +2885,7 @@ "attributes": { "constant": false, "name": "post", - "scope": 239, + "scope": 252, "stateVariable": false, "storageLocation": "default", "type": "struct CapCoin.Post storage pointer", @@ -2798,9 +2894,9 @@ "visibility": "internal" }, "children": [], - "id": 182, + "id": 188, "name": "VariableDeclaration", - "src": "1584:8:0" + "src": "1636:8:0" }, { "attributes": { @@ -2818,13 +2914,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 73, + "referencedDeclaration": 77, "type": "mapping(address => struct CapCoin.Post storage ref)", "value": "addressToPost" }, - "id": 183, + "id": 189, "name": "Identifier", - "src": "1595:13:0" + "src": "1647:13:0" }, { "attributes": { @@ -2844,28 +2940,28 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 417, + "referencedDeclaration": 433, "type": "msg", "value": "msg" }, - "id": 184, + "id": 190, "name": "Identifier", - "src": "1609:3:0" + "src": "1661:3:0" } ], - "id": 185, + "id": 191, "name": "MemberAccess", - "src": "1609:10:0" + "src": "1661:10:0" } ], - "id": 186, + "id": 192, "name": "IndexAccess", - "src": "1595:25:0" + "src": "1647:25:0" } ], - "id": 187, + "id": 193, "name": "VariableDeclarationStatement", - "src": "1584:36:0" + "src": "1636:36:0" }, { "children": [ @@ -2888,7 +2984,7 @@ "isPure": false, "lValueRequested": true, "member_name": "url", - "referencedDeclaration": 58, + "referencedDeclaration": 60, "type": "string storage ref" }, "children": [ @@ -2898,18 +2994,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 182, + "referencedDeclaration": 188, "type": "struct CapCoin.Post storage pointer", "value": "post" }, - "id": 188, + "id": 194, "name": "Identifier", - "src": "1626:4:0" + "src": "1678:4:0" } ], - "id": 190, + "id": 196, "name": "MemberAccess", - "src": "1626:8:0" + "src": "1678:8:0" }, { "attributes": { @@ -2917,23 +3013,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 179, + "referencedDeclaration": 183, "type": "string memory", "value": "url" }, - "id": 191, + "id": 197, "name": "Identifier", - "src": "1637:3:0" + "src": "1689:3:0" } ], - "id": 192, + "id": 198, "name": "Assignment", - "src": "1626:14:0" + "src": "1678:14:0" } ], - "id": 193, + "id": 199, "name": "ExpressionStatement", - "src": "1626:14:0" + "src": "1678:14:0" }, { "children": [ @@ -2956,7 +3052,7 @@ "isPure": false, "lValueRequested": true, "member_name": "lotteryAmount", - "referencedDeclaration": 62, + "referencedDeclaration": 64, "type": "int256" }, "children": [ @@ -2966,18 +3062,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 182, + "referencedDeclaration": 188, "type": "struct CapCoin.Post storage pointer", "value": "post" }, - "id": 194, + "id": 200, "name": "Identifier", - "src": "1646:4:0" + "src": "1698:4:0" } ], - "id": 196, + "id": 202, "name": "MemberAccess", - "src": "1646:18:0" + "src": "1698:18:0" }, { "attributes": { @@ -2992,19 +3088,19 @@ "type": "int_const 5", "value": "5" }, - "id": 197, + "id": 203, "name": "Literal", - "src": "1668:1:0" + "src": "1720:1:0" } ], - "id": 198, + "id": 204, "name": "Assignment", - "src": "1646:23:0" + "src": "1698:23:0" } ], - "id": 199, + "id": 205, "name": "ExpressionStatement", - "src": "1646:23:0" + "src": "1698:23:0" }, { "children": [ @@ -3027,7 +3123,7 @@ "isPure": false, "lValueRequested": true, "member_name": "userName", - "referencedDeclaration": 60, + "referencedDeclaration": 62, "type": "string storage ref" }, "children": [ @@ -3037,18 +3133,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 182, + "referencedDeclaration": 188, "type": "struct CapCoin.Post storage pointer", "value": "post" }, - "id": 200, + "id": 206, "name": "Identifier", - "src": "1675:4:0" + "src": "1727:4:0" } ], - "id": 202, + "id": 208, "name": "MemberAccess", - "src": "1675:13:0" + "src": "1727:13:0" }, { "attributes": { @@ -3058,7 +3154,7 @@ "isPure": false, "lValueRequested": false, "member_name": "name", - "referencedDeclaration": 53, + "referencedDeclaration": 55, "type": "string storage ref" }, "children": [ @@ -3078,13 +3174,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 69, + "referencedDeclaration": 73, "type": "mapping(address => struct CapCoin.User storage ref)", "value": "addressToUser" }, - "id": 203, + "id": 209, "name": "Identifier", - "src": "1691:13:0" + "src": "1743:13:0" }, { "attributes": { @@ -3104,38 +3200,38 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 417, + "referencedDeclaration": 433, "type": "msg", "value": "msg" }, - "id": 204, + "id": 210, "name": "Identifier", - "src": "1705:3:0" + "src": "1757:3:0" } ], - "id": 205, + "id": 211, "name": "MemberAccess", - "src": "1705:10:0" + "src": "1757:10:0" } ], - "id": 206, + "id": 212, "name": "IndexAccess", - "src": "1691:25:0" + "src": "1743:25:0" } ], - "id": 207, + "id": 213, "name": "MemberAccess", - "src": "1691:30:0" + "src": "1743:30:0" } ], - "id": 208, + "id": 214, "name": "Assignment", - "src": "1675:46:0" + "src": "1727:46:0" } ], - "id": 209, + "id": 215, "name": "ExpressionStatement", - "src": "1675:46:0" + "src": "1727:46:0" }, { "children": [ @@ -3158,7 +3254,7 @@ "isPure": false, "lValueRequested": true, "member_name": "owner", - "referencedDeclaration": 64, + "referencedDeclaration": 66, "type": "address" }, "children": [ @@ -3168,18 +3264,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 182, + "referencedDeclaration": 188, "type": "struct CapCoin.Post storage pointer", "value": "post" }, - "id": 210, + "id": 216, "name": "Identifier", - "src": "1727:4:0" + "src": "1779:4:0" } ], - "id": 212, + "id": 218, "name": "MemberAccess", - "src": "1727:10:0" + "src": "1779:10:0" }, { "attributes": { @@ -3199,28 +3295,96 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 417, + "referencedDeclaration": 433, "type": "msg", "value": "msg" }, - "id": 213, + "id": 219, "name": "Identifier", - "src": "1740:3:0" + "src": "1792:3:0" } ], - "id": 214, + "id": 220, "name": "MemberAccess", - "src": "1740:10:0" + "src": "1792:10:0" + } + ], + "id": 221, + "name": "Assignment", + "src": "1779:23:0" + } + ], + "id": 222, + "name": "ExpressionStatement", + "src": "1779:23:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "string storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "member_name": "caption", + "referencedDeclaration": 68, + "type": "string storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 188, + "type": "struct CapCoin.Post storage pointer", + "value": "post" + }, + "id": 223, + "name": "Identifier", + "src": "1808:4:0" + } + ], + "id": 225, + "name": "MemberAccess", + "src": "1808:12:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 185, + "type": "string memory", + "value": "caption" + }, + "id": 226, + "name": "Identifier", + "src": "1823:7:0" } ], - "id": 215, + "id": 227, "name": "Assignment", - "src": "1727:23:0" + "src": "1808:22:0" } ], - "id": 216, + "id": 228, "name": "ExpressionStatement", - "src": "1727:23:0" + "src": "1808:22:0" }, { "children": [ @@ -3277,18 +3441,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 76, + "referencedDeclaration": 80, "type": "address[] storage ref", "value": "posts" }, - "id": 217, + "id": 229, "name": "Identifier", - "src": "1757:5:0" + "src": "1837:5:0" } ], - "id": 219, + "id": 231, "name": "MemberAccess", - "src": "1757:10:0" + "src": "1837:10:0" }, { "attributes": { @@ -3308,23 +3472,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 417, + "referencedDeclaration": 433, "type": "msg", "value": "msg" }, - "id": 220, + "id": 232, "name": "Identifier", - "src": "1768:3:0" + "src": "1848:3:0" } ], - "id": 221, + "id": 233, "name": "MemberAccess", - "src": "1768:10:0" + "src": "1848:10:0" } ], - "id": 222, + "id": 234, "name": "FunctionCall", - "src": "1757:22:0" + "src": "1837:22:0" }, { "attributes": { @@ -3339,19 +3503,19 @@ "type": "int_const 1", "value": "1" }, - "id": 223, + "id": 235, "name": "Literal", - "src": "1781:1:0" + "src": "1861:1:0" } ], - "id": 224, + "id": 236, "name": "BinaryOperation", - "src": "1757:25:0" + "src": "1837:25:0" } ], - "id": 225, + "id": 237, "name": "ExpressionStatement", - "src": "1757:25:0" + "src": "1837:25:0" }, { "children": [ @@ -3374,7 +3538,7 @@ "isPure": false, "lValueRequested": true, "member_name": "coinBalance", - "referencedDeclaration": 55, + "referencedDeclaration": 57, "type": "uint256" }, "children": [ @@ -3394,13 +3558,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 69, + "referencedDeclaration": 73, "type": "mapping(address => struct CapCoin.User storage ref)", "value": "addressToUser" }, - "id": 226, + "id": 238, "name": "Identifier", - "src": "1788:13:0" + "src": "1868:13:0" }, { "attributes": { @@ -3420,28 +3584,28 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 417, + "referencedDeclaration": 433, "type": "msg", "value": "msg" }, - "id": 227, + "id": 239, "name": "Identifier", - "src": "1802:3:0" + "src": "1882:3:0" } ], - "id": 228, + "id": 240, "name": "MemberAccess", - "src": "1802:10:0" + "src": "1882:10:0" } ], - "id": 229, + "id": 241, "name": "IndexAccess", - "src": "1788:25:0" + "src": "1868:25:0" } ], - "id": 230, + "id": 242, "name": "MemberAccess", - "src": "1788:37:0" + "src": "1868:37:0" }, { "attributes": { @@ -3456,19 +3620,19 @@ "type": "int_const 5", "value": "5" }, - "id": 231, + "id": 243, "name": "Literal", - "src": "1829:1:0" + "src": "1909:1:0" } ], - "id": 232, + "id": 244, "name": "Assignment", - "src": "1788:42:0" + "src": "1868:42:0" } ], - "id": 233, + "id": 245, "name": "ExpressionStatement", - "src": "1788:42:0" + "src": "1868:42:0" }, { "children": [ @@ -3490,6 +3654,10 @@ { "attributes": { "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" @@ -3498,13 +3666,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 16, - "type": "function (string memory)", + "referencedDeclaration": 18, + "type": "function (string memory,string memory)", "value": "CreatedPost" }, - "id": 234, + "id": 246, "name": "Identifier", - "src": "1836:11:0" + "src": "1916:11:0" }, { "attributes": { @@ -3512,33 +3680,47 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 179, + "referencedDeclaration": 183, "type": "string memory", "value": "url" }, - "id": 235, + "id": 247, + "name": "Identifier", + "src": "1928:3:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 185, + "type": "string memory", + "value": "caption" + }, + "id": 248, "name": "Identifier", - "src": "1848:3:0" + "src": "1933:7:0" } ], - "id": 236, + "id": 249, "name": "FunctionCall", - "src": "1836:16:0" + "src": "1916:25:0" } ], - "id": 237, + "id": 250, "name": "ExpressionStatement", - "src": "1836:16:0" + "src": "1916:25:0" } ], - "id": 238, + "id": 251, "name": "Block", - "src": "1554:303:0" + "src": "1606:340:0" } ], - "id": 239, + "id": 252, "name": "FunctionDefinition", - "src": "1515:342:0" + "src": "1551:395:0" }, { "attributes": { @@ -3550,7 +3732,7 @@ ], "name": "likePost", "payable": false, - "scope": 349, + "scope": 365, "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" @@ -3562,7 +3744,7 @@ "attributes": { "constant": false, "name": "post", - "scope": 299, + "scope": 312, "stateVariable": false, "storageLocation": "default", "type": "address", @@ -3575,20 +3757,20 @@ "name": "address", "type": "address" }, - "id": 240, + "id": 253, "name": "ElementaryTypeName", - "src": "1879:7:0" + "src": "1968:7:0" } ], - "id": 241, + "id": 254, "name": "VariableDeclaration", - "src": "1879:12:0" + "src": "1968:12:0" }, { "attributes": { "constant": false, "name": "amount", - "scope": 299, + "scope": 312, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -3601,19 +3783,19 @@ "name": "uint", "type": "uint256" }, - "id": 242, + "id": 255, "name": "ElementaryTypeName", - "src": "1893:4:0" + "src": "1982:4:0" } ], - "id": 243, + "id": 256, "name": "VariableDeclaration", - "src": "1893:11:0" + "src": "1982:11:0" } ], - "id": 244, + "id": 257, "name": "ParameterList", - "src": "1878:27:0" + "src": "1967:27:0" }, { "attributes": { @@ -3622,9 +3804,9 @@ ] }, "children": [], - "id": 245, + "id": 258, "name": "ParameterList", - "src": "1913:0:0" + "src": "2002:0:0" }, { "children": [ @@ -3649,7 +3831,7 @@ "isPure": false, "lValueRequested": true, "member_name": "lotteryAmount", - "referencedDeclaration": 62, + "referencedDeclaration": 64, "type": "int256" }, "children": [ @@ -3669,13 +3851,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 73, + "referencedDeclaration": 77, "type": "mapping(address => struct CapCoin.Post storage ref)", "value": "addressToPost" }, - "id": 246, + "id": 259, "name": "Identifier", - "src": "1919:13:0" + "src": "2008:13:0" }, { "attributes": { @@ -3683,23 +3865,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 241, + "referencedDeclaration": 254, "type": "address", "value": "post" }, - "id": 247, + "id": 260, "name": "Identifier", - "src": "1933:4:0" + "src": "2022:4:0" } ], - "id": 248, + "id": 261, "name": "IndexAccess", - "src": "1919:19:0" + "src": "2008:19:0" } ], - "id": 249, + "id": 262, "name": "MemberAccess", - "src": "1919:33:0" + "src": "2008:33:0" }, { "attributes": { @@ -3731,9 +3913,9 @@ "type": "type(int256)", "value": "int" }, - "id": 250, + "id": 263, "name": "ElementaryTypeNameExpression", - "src": "1956:3:0" + "src": "2045:3:0" }, { "attributes": { @@ -3741,28 +3923,28 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 243, + "referencedDeclaration": 256, "type": "uint256", "value": "amount" }, - "id": 251, + "id": 264, "name": "Identifier", - "src": "1960:6:0" + "src": "2049:6:0" } ], - "id": 252, + "id": 265, "name": "FunctionCall", - "src": "1956:11:0" + "src": "2045:11:0" } ], - "id": 253, + "id": 266, "name": "Assignment", - "src": "1919:48:0" + "src": "2008:48:0" } ], - "id": 254, + "id": 267, "name": "ExpressionStatement", - "src": "1919:48:0" + "src": "2008:48:0" }, { "children": [ @@ -3785,7 +3967,7 @@ "isPure": false, "lValueRequested": true, "member_name": "coinBalance", - "referencedDeclaration": 55, + "referencedDeclaration": 57, "type": "uint256" }, "children": [ @@ -3805,13 +3987,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 69, + "referencedDeclaration": 73, "type": "mapping(address => struct CapCoin.User storage ref)", "value": "addressToUser" }, - "id": 255, + "id": 268, "name": "Identifier", - "src": "1973:13:0" + "src": "2062:13:0" }, { "attributes": { @@ -3819,23 +4001,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 241, + "referencedDeclaration": 254, "type": "address", "value": "post" }, - "id": 256, + "id": 269, "name": "Identifier", - "src": "1987:4:0" + "src": "2076:4:0" } ], - "id": 257, + "id": 270, "name": "IndexAccess", - "src": "1973:19:0" + "src": "2062:19:0" } ], - "id": 258, + "id": 271, "name": "MemberAccess", - "src": "1973:31:0" + "src": "2062:31:0" }, { "attributes": { @@ -3843,23 +4025,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 243, + "referencedDeclaration": 256, "type": "uint256", "value": "amount" }, - "id": 259, + "id": 272, "name": "Identifier", - "src": "2008:6:0" + "src": "2097:6:0" } ], - "id": 260, + "id": 273, "name": "Assignment", - "src": "1973:41:0" + "src": "2062:41:0" } ], - "id": 261, + "id": 274, "name": "ExpressionStatement", - "src": "1973:41:0" + "src": "2062:41:0" }, { "children": [ @@ -3882,7 +4064,7 @@ "isPure": false, "lValueRequested": true, "member_name": "coinBalance", - "referencedDeclaration": 55, + "referencedDeclaration": 57, "type": "uint256" }, "children": [ @@ -3902,13 +4084,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 69, + "referencedDeclaration": 73, "type": "mapping(address => struct CapCoin.User storage ref)", "value": "addressToUser" }, - "id": 262, + "id": 275, "name": "Identifier", - "src": "2020:13:0" + "src": "2109:13:0" }, { "attributes": { @@ -3928,28 +4110,28 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 417, + "referencedDeclaration": 433, "type": "msg", "value": "msg" }, - "id": 263, + "id": 276, "name": "Identifier", - "src": "2034:3:0" + "src": "2123:3:0" } ], - "id": 264, + "id": 277, "name": "MemberAccess", - "src": "2034:10:0" + "src": "2123:10:0" } ], - "id": 265, + "id": 278, "name": "IndexAccess", - "src": "2020:25:0" + "src": "2109:25:0" } ], - "id": 266, + "id": 279, "name": "MemberAccess", - "src": "2020:37:0" + "src": "2109:37:0" }, { "attributes": { @@ -3957,23 +4139,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 243, + "referencedDeclaration": 256, "type": "uint256", "value": "amount" }, - "id": 267, + "id": 280, "name": "Identifier", - "src": "2061:6:0" + "src": "2150:6:0" } ], - "id": 268, + "id": 281, "name": "Assignment", - "src": "2020:47:0" + "src": "2109:47:0" } ], - "id": 269, + "id": 282, "name": "ExpressionStatement", - "src": "2020:47:0" + "src": "2109:47:0" }, { "children": [ @@ -4027,13 +4209,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 32, + "referencedDeclaration": 34, "type": "function (int256,string memory,address,uint256,string memory,address,uint256)", "value": "LikedPost" }, - "id": 270, + "id": 283, "name": "Identifier", - "src": "2073:9:0" + "src": "2162:9:0" }, { "attributes": { @@ -4043,7 +4225,7 @@ "isPure": false, "lValueRequested": false, "member_name": "lotteryAmount", - "referencedDeclaration": 62, + "referencedDeclaration": 64, "type": "int256" }, "children": [ @@ -4063,13 +4245,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 73, + "referencedDeclaration": 77, "type": "mapping(address => struct CapCoin.Post storage ref)", "value": "addressToPost" }, - "id": 271, + "id": 284, "name": "Identifier", - "src": "2083:13:0" + "src": "2172:13:0" }, { "attributes": { @@ -4077,23 +4259,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 241, + "referencedDeclaration": 254, "type": "address", "value": "post" }, - "id": 272, + "id": 285, "name": "Identifier", - "src": "2097:4:0" + "src": "2186:4:0" } ], - "id": 273, + "id": 286, "name": "IndexAccess", - "src": "2083:19:0" + "src": "2172:19:0" } ], - "id": 274, + "id": 287, "name": "MemberAccess", - "src": "2083:33:0" + "src": "2172:33:0" }, { "attributes": { @@ -4103,7 +4285,7 @@ "isPure": false, "lValueRequested": false, "member_name": "name", - "referencedDeclaration": 53, + "referencedDeclaration": 55, "type": "string storage ref" }, "children": [ @@ -4123,13 +4305,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 69, + "referencedDeclaration": 73, "type": "mapping(address => struct CapCoin.User storage ref)", "value": "addressToUser" }, - "id": 275, + "id": 288, "name": "Identifier", - "src": "2124:13:0" + "src": "2213:13:0" }, { "attributes": { @@ -4137,23 +4319,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 241, + "referencedDeclaration": 254, "type": "address", "value": "post" }, - "id": 276, + "id": 289, "name": "Identifier", - "src": "2138:4:0" + "src": "2227:4:0" } ], - "id": 277, + "id": 290, "name": "IndexAccess", - "src": "2124:19:0" + "src": "2213:19:0" } ], - "id": 278, + "id": 291, "name": "MemberAccess", - "src": "2124:24:0" + "src": "2213:24:0" }, { "attributes": { @@ -4161,13 +4343,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 241, + "referencedDeclaration": 254, "type": "address", "value": "post" }, - "id": 279, + "id": 292, "name": "Identifier", - "src": "2150:4:0" + "src": "2239:4:0" }, { "attributes": { @@ -4177,7 +4359,7 @@ "isPure": false, "lValueRequested": false, "member_name": "coinBalance", - "referencedDeclaration": 55, + "referencedDeclaration": 57, "type": "uint256" }, "children": [ @@ -4197,13 +4379,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 69, + "referencedDeclaration": 73, "type": "mapping(address => struct CapCoin.User storage ref)", "value": "addressToUser" }, - "id": 280, + "id": 293, "name": "Identifier", - "src": "2156:13:0" + "src": "2245:13:0" }, { "attributes": { @@ -4211,23 +4393,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 241, + "referencedDeclaration": 254, "type": "address", "value": "post" }, - "id": 281, + "id": 294, "name": "Identifier", - "src": "2170:4:0" + "src": "2259:4:0" } ], - "id": 282, + "id": 295, "name": "IndexAccess", - "src": "2156:19:0" + "src": "2245:19:0" } ], - "id": 283, + "id": 296, "name": "MemberAccess", - "src": "2156:31:0" + "src": "2245:31:0" }, { "attributes": { @@ -4237,7 +4419,7 @@ "isPure": false, "lValueRequested": false, "member_name": "name", - "referencedDeclaration": 53, + "referencedDeclaration": 55, "type": "string storage ref" }, "children": [ @@ -4257,13 +4439,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 69, + "referencedDeclaration": 73, "type": "mapping(address => struct CapCoin.User storage ref)", "value": "addressToUser" }, - "id": 284, + "id": 297, "name": "Identifier", - "src": "2195:13:0" + "src": "2284:13:0" }, { "attributes": { @@ -4283,28 +4465,28 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 417, + "referencedDeclaration": 433, "type": "msg", "value": "msg" }, - "id": 285, + "id": 298, "name": "Identifier", - "src": "2209:3:0" + "src": "2298:3:0" } ], - "id": 286, + "id": 299, "name": "MemberAccess", - "src": "2209:10:0" + "src": "2298:10:0" } ], - "id": 287, + "id": 300, "name": "IndexAccess", - "src": "2195:25:0" + "src": "2284:25:0" } ], - "id": 288, + "id": 301, "name": "MemberAccess", - "src": "2195:30:0" + "src": "2284:30:0" }, { "attributes": { @@ -4324,18 +4506,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 417, + "referencedDeclaration": 433, "type": "msg", "value": "msg" }, - "id": 289, + "id": 302, "name": "Identifier", - "src": "2227:3:0" + "src": "2316:3:0" } ], - "id": 290, + "id": 303, "name": "MemberAccess", - "src": "2227:10:0" + "src": "2316:10:0" }, { "attributes": { @@ -4345,7 +4527,7 @@ "isPure": false, "lValueRequested": false, "member_name": "coinBalance", - "referencedDeclaration": 55, + "referencedDeclaration": 57, "type": "uint256" }, "children": [ @@ -4365,13 +4547,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 69, + "referencedDeclaration": 73, "type": "mapping(address => struct CapCoin.User storage ref)", "value": "addressToUser" }, - "id": 291, + "id": 304, "name": "Identifier", - "src": "2239:13:0" + "src": "2328:13:0" }, { "attributes": { @@ -4391,48 +4573,48 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 417, + "referencedDeclaration": 433, "type": "msg", "value": "msg" }, - "id": 292, + "id": 305, "name": "Identifier", - "src": "2253:3:0" + "src": "2342:3:0" } ], - "id": 293, + "id": 306, "name": "MemberAccess", - "src": "2253:10:0" + "src": "2342:10:0" } ], - "id": 294, + "id": 307, "name": "IndexAccess", - "src": "2239:25:0" + "src": "2328:25:0" } ], - "id": 295, + "id": 308, "name": "MemberAccess", - "src": "2239:37:0" + "src": "2328:37:0" } ], - "id": 296, + "id": 309, "name": "FunctionCall", - "src": "2073:204:0" + "src": "2162:204:0" } ], - "id": 297, + "id": 310, "name": "ExpressionStatement", - "src": "2073:204:0" + "src": "2162:204:0" } ], - "id": 298, + "id": 311, "name": "Block", - "src": "1913:369:0" + "src": "2002:369:0" } ], - "id": 299, + "id": 312, "name": "FunctionDefinition", - "src": "1861:421:0" + "src": "1950:421:0" }, { "attributes": { @@ -4444,7 +4626,7 @@ ], "name": "getPosts", "payable": false, - "scope": 349, + "scope": 365, "stateMutability": "view", "superFunction": null, "visibility": "public" @@ -4457,9 +4639,9 @@ ] }, "children": [], - "id": 300, + "id": 313, "name": "ParameterList", - "src": "2303:2:0" + "src": "2392:2:0" }, { "children": [ @@ -4467,7 +4649,7 @@ "attributes": { "constant": false, "name": "", - "scope": 308, + "scope": 321, "stateVariable": false, "storageLocation": "default", "type": "address[] memory", @@ -4486,30 +4668,30 @@ "name": "address", "type": "address" }, - "id": 301, + "id": 314, "name": "ElementaryTypeName", - "src": "2327:7:0" + "src": "2416:7:0" } ], - "id": 302, + "id": 315, "name": "ArrayTypeName", - "src": "2327:9:0" + "src": "2416:9:0" } ], - "id": 303, + "id": 316, "name": "VariableDeclaration", - "src": "2327:9:0" + "src": "2416:9:0" } ], - "id": 304, + "id": 317, "name": "ParameterList", - "src": "2326:11:0" + "src": "2415:11:0" }, { "children": [ { "attributes": { - "functionReturnParameters": 304 + "functionReturnParameters": 317 }, "children": [ { @@ -4518,28 +4700,28 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 76, + "referencedDeclaration": 80, "type": "address[] storage ref", "value": "posts" }, - "id": 305, + "id": 318, "name": "Identifier", - "src": "2353:5:0" + "src": "2442:5:0" } ], - "id": 306, + "id": 319, "name": "Return", - "src": "2346:12:0" + "src": "2435:12:0" } ], - "id": 307, + "id": 320, "name": "Block", - "src": "2338:25:0" + "src": "2427:25:0" } ], - "id": 308, + "id": 321, "name": "FunctionDefinition", - "src": "2286:77:0" + "src": "2375:77:0" }, { "attributes": { @@ -4551,7 +4733,7 @@ ], "name": "seed", "payable": false, - "scope": 349, + "scope": 365, "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" @@ -4563,7 +4745,7 @@ "attributes": { "constant": false, "name": "name", - "scope": 330, + "scope": 346, "stateVariable": false, "storageLocation": "default", "type": "string memory", @@ -4576,20 +4758,20 @@ "name": "string", "type": "string storage pointer" }, - "id": 309, + "id": 322, "name": "ElementaryTypeName", - "src": "2381:6:0" + "src": "2470:6:0" } ], - "id": 310, + "id": 323, "name": "VariableDeclaration", - "src": "2381:11:0" + "src": "2470:11:0" }, { "attributes": { "constant": false, "name": "url", - "scope": 330, + "scope": 346, "stateVariable": false, "storageLocation": "default", "type": "string memory", @@ -4602,20 +4784,20 @@ "name": "string", "type": "string storage pointer" }, - "id": 311, + "id": 324, "name": "ElementaryTypeName", - "src": "2394:6:0" + "src": "2483:6:0" } ], - "id": 312, + "id": 325, "name": "VariableDeclaration", - "src": "2394:10:0" + "src": "2483:10:0" }, { "attributes": { "constant": false, "name": "amount", - "scope": 330, + "scope": 346, "stateVariable": false, "storageLocation": "default", "type": "uint256", @@ -4628,19 +4810,45 @@ "name": "uint", "type": "uint256" }, - "id": 313, + "id": 326, "name": "ElementaryTypeName", - "src": "2406:4:0" + "src": "2495:4:0" } ], - "id": 314, + "id": 327, "name": "VariableDeclaration", - "src": "2406:11:0" + "src": "2495:11:0" + }, + { + "attributes": { + "constant": false, + "name": "caption", + "scope": 346, + "stateVariable": false, + "storageLocation": "default", + "type": "string memory", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "string", + "type": "string storage pointer" + }, + "id": 328, + "name": "ElementaryTypeName", + "src": "2508:6:0" + } + ], + "id": 329, + "name": "VariableDeclaration", + "src": "2508:14:0" } ], - "id": 315, + "id": 330, "name": "ParameterList", - "src": "2380:38:0" + "src": "2469:54:0" }, { "attributes": { @@ -4649,9 +4857,9 @@ ] }, "children": [], - "id": 316, + "id": 331, "name": "ParameterList", - "src": "2426:0:0" + "src": "2531:0:0" }, { "children": [ @@ -4683,13 +4891,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 104, + "referencedDeclaration": 108, "type": "function (string memory)", "value": "createUser" }, - "id": 317, + "id": 332, "name": "Identifier", - "src": "2434:10:0" + "src": "2539:10:0" }, { "attributes": { @@ -4697,23 +4905,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 310, + "referencedDeclaration": 323, "type": "string memory", "value": "name" }, - "id": 318, + "id": 333, "name": "Identifier", - "src": "2445:4:0" + "src": "2550:4:0" } ], - "id": 319, + "id": 334, "name": "FunctionCall", - "src": "2434:16:0" + "src": "2539:16:0" } ], - "id": 320, + "id": 335, "name": "ExpressionStatement", - "src": "2434:16:0" + "src": "2539:16:0" }, { "children": [ @@ -4743,13 +4951,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 177, + "referencedDeclaration": 181, "type": "function (uint256)", "value": "buyTokens" }, - "id": 321, + "id": 336, "name": "Identifier", - "src": "2458:9:0" + "src": "2563:9:0" }, { "attributes": { @@ -4757,23 +4965,23 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 314, + "referencedDeclaration": 327, "type": "uint256", "value": "amount" }, - "id": 322, + "id": 337, "name": "Identifier", - "src": "2468:6:0" + "src": "2573:6:0" } ], - "id": 323, + "id": 338, "name": "FunctionCall", - "src": "2458:17:0" + "src": "2563:17:0" } ], - "id": 324, + "id": 339, "name": "ExpressionStatement", - "src": "2458:17:0" + "src": "2563:17:0" }, { "children": [ @@ -4795,6 +5003,10 @@ { "attributes": { "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" @@ -4803,13 +5015,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 239, - "type": "function (string memory)", + "referencedDeclaration": 252, + "type": "function (string memory,string memory)", "value": "createPost" }, - "id": 325, + "id": 340, "name": "Identifier", - "src": "2483:10:0" + "src": "2588:10:0" }, { "attributes": { @@ -4817,33 +5029,47 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 312, + "referencedDeclaration": 325, "type": "string memory", "value": "url" }, - "id": 326, + "id": 341, + "name": "Identifier", + "src": "2599:3:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 329, + "type": "string memory", + "value": "caption" + }, + "id": 342, "name": "Identifier", - "src": "2494:3:0" + "src": "2604:7:0" } ], - "id": 327, + "id": 343, "name": "FunctionCall", - "src": "2483:15:0" + "src": "2588:24:0" } ], - "id": 328, + "id": 344, "name": "ExpressionStatement", - "src": "2483:15:0" + "src": "2588:24:0" } ], - "id": 329, + "id": 345, "name": "Block", - "src": "2426:77:0" + "src": "2531:86:0" } ], - "id": 330, + "id": 346, "name": "FunctionDefinition", - "src": "2367:136:0" + "src": "2456:161:0" }, { "attributes": { @@ -4855,7 +5081,7 @@ ], "name": "kill", "payable": false, - "scope": 349, + "scope": 365, "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" @@ -4868,9 +5094,9 @@ ] }, "children": [], - "id": 331, + "id": 347, "name": "ParameterList", - "src": "2522:2:0" + "src": "2636:2:0" }, { "attributes": { @@ -4879,9 +5105,9 @@ ] }, "children": [], - "id": 332, + "id": 348, "name": "ParameterList", - "src": "2525:0:0" + "src": "2639:0:0" }, { "children": [ @@ -4923,18 +5149,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 417, + "referencedDeclaration": 433, "type": "msg", "value": "msg" }, - "id": 333, + "id": 349, "name": "Identifier", - "src": "2537:3:0" + "src": "2651:3:0" } ], - "id": 334, + "id": 350, "name": "MemberAccess", - "src": "2537:10:0" + "src": "2651:10:0" }, { "attributes": { @@ -4942,18 +5168,18 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 40, + "referencedDeclaration": 42, "type": "address", "value": "owner" }, - "id": 335, + "id": 351, "name": "Identifier", - "src": "2551:5:0" + "src": "2665:5:0" } ], - "id": 336, + "id": 352, "name": "BinaryOperation", - "src": "2537:19:0" + "src": "2651:19:0" }, { "children": [ @@ -4985,13 +5211,13 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 423, + "referencedDeclaration": 439, "type": "function (address)", "value": "selfdestruct" }, - "id": 337, + "id": 353, "name": "Identifier", - "src": "2568:12:0" + "src": "2682:12:0" }, { "attributes": { @@ -4999,43 +5225,43 @@ "overloadedDeclarations": [ null ], - "referencedDeclaration": 40, + "referencedDeclaration": 42, "type": "address", "value": "owner" }, - "id": 338, + "id": 354, "name": "Identifier", - "src": "2581:5:0" + "src": "2695:5:0" } ], - "id": 339, + "id": 355, "name": "FunctionCall", - "src": "2568:19:0" + "src": "2682:19:0" } ], - "id": 340, + "id": 356, "name": "ExpressionStatement", - "src": "2568:19:0" + "src": "2682:19:0" } ], - "id": 341, + "id": 357, "name": "Block", - "src": "2558:38:0" + "src": "2672:38:0" } ], - "id": 342, + "id": 358, "name": "IfStatement", - "src": "2533:63:0" + "src": "2647:63:0" } ], - "id": 343, + "id": 359, "name": "Block", - "src": "2525:77:0" + "src": "2639:77:0" } ], - "id": 344, + "id": 360, "name": "FunctionDefinition", - "src": "2509:93:0" + "src": "2623:93:0" }, { "attributes": { @@ -5047,7 +5273,7 @@ ], "name": "", "payable": true, - "scope": 349, + "scope": 365, "stateMutability": "payable", "superFunction": null, "visibility": "public" @@ -5060,9 +5286,9 @@ ] }, "children": [], - "id": 345, + "id": 361, "name": "ParameterList", - "src": "2614:2:0" + "src": "2728:2:0" }, { "attributes": { @@ -5071,9 +5297,9 @@ ] }, "children": [], - "id": 346, + "id": 362, "name": "ParameterList", - "src": "2625:0:0" + "src": "2739:0:0" }, { "attributes": { @@ -5082,24 +5308,24 @@ ] }, "children": [], - "id": 347, + "id": 363, "name": "Block", - "src": "2625:2:0" + "src": "2739:2:0" } ], - "id": 348, + "id": 364, "name": "FunctionDefinition", - "src": "2606:21:0" + "src": "2720:21:0" } ], - "id": 349, + "id": 365, "name": "ContractDefinition", - "src": "87:2542:0" + "src": "87:2656:0" } ], - "id": 350, + "id": 366, "name": "SourceUnit", - "src": "0:2630:0" + "src": "0:2744:0" }, "compiler": { "name": "solc", @@ -5109,9 +5335,9 @@ "5777": { "events": {}, "links": {}, - "address": "0xf12b5dd4ead5f743c6baa640b0216200e89b60da" + "address": "0x345ca3e014aaf5dca488057592ee47305d9b3e10" } }, "schemaVersion": "1.0.1", - "updatedAt": "2018-01-20T19:00:49.730Z" + "updatedAt": "2018-01-20T19:30:59.029Z" } \ No newline at end of file diff --git a/build/contracts/Migrations.json b/build/contracts/Migrations.json index 373501ac..9e661d10 100644 --- a/build/contracts/Migrations.json +++ b/build/contracts/Migrations.json @@ -823,5 +823,5 @@ } }, "schemaVersion": "1.0.1", - "updatedAt": "2018-01-20T19:00:49.726Z" + "updatedAt": "2018-01-20T19:30:59.025Z" } \ No newline at end of file diff --git a/build/contracts/SimpleStorage.json b/build/contracts/SimpleStorage.json index edca7576..b8b6d9c1 100644 --- a/build/contracts/SimpleStorage.json +++ b/build/contracts/SimpleStorage.json @@ -344,5 +344,5 @@ } }, "schemaVersion": "1.0.1", - "updatedAt": "2018-01-20T19:00:49.725Z" + "updatedAt": "2018-01-20T19:30:59.025Z" } \ No newline at end of file diff --git a/contracts/CapCoin.sol b/contracts/CapCoin.sol index 52dc28d1..08831083 100644 --- a/contracts/CapCoin.sol +++ b/contracts/CapCoin.sol @@ -6,7 +6,7 @@ contract CapCoin is Ownable { event NewUser(string name); event BoughtTokens(uint coinBalance); - event CreatedPost(string url); + event CreatedPost(string url, string caption); event LikedPost(int lotteryAmount, string posterName, address poster, uint posterCoinbalance, string likerName, address liker, uint likerCoinbalance); @@ -30,6 +30,7 @@ contract CapCoin is Ownable { string userName; int lotteryAmount; address owner; + string caption; } mapping (address => User) public addressToUser; @@ -60,17 +61,18 @@ contract CapCoin is Ownable { BoughtTokens(addressToUser[msg.sender].coinBalance); } - function createPost(string url) public { + function createPost(string url, string caption) public { // 5 coins per post var post = addressToPost[msg.sender]; post.url = url; post.lotteryAmount -= 5; post.userName = addressToUser[msg.sender].name; post.owner = msg.sender; + post.caption = caption; posts.push(msg.sender) -1; addressToUser[msg.sender].coinBalance -= 5; - CreatedPost(url); + CreatedPost(url, caption); } function likePost(address post, uint amount) public { @@ -86,10 +88,10 @@ contract CapCoin is Ownable { return posts; } - function seed(string name, string url, uint amount) public { + function seed(string name, string url, uint amount, string caption) public { createUser(name); buyTokens(amount); - createPost(url); + createPost(url, caption); } function kill() { diff --git a/src/App.css b/src/App.css index 40c66b8c..2f76bdb6 100644 --- a/src/App.css +++ b/src/App.css @@ -79,6 +79,7 @@ code { #main-header { font-size: 3em; + text-align: center; } #post-container { @@ -100,3 +101,25 @@ code { #action-options { margin-right: 1em; } + +.action-box { + + border: 2px solid silver; + border-radius: 4px; +} + +#create-post-container { + display: flex; + flex-direction: column; + align-items: center +} + +.home-button{ + position: fixed; + top: 7.5%; + right: 7.5%; +} + +.error-message { + color: red +} diff --git a/src/components/CreatePost.js b/src/components/CreatePost.js index 0dff5c5c..b228120e 100644 --- a/src/components/CreatePost.js +++ b/src/components/CreatePost.js @@ -6,11 +6,13 @@ import Post from './Post'; import RaisedButton from 'material-ui/RaisedButton'; import { post } from '../store/posts'; +const styles={urlBox: {margin: '.5em'}} + class CreatePost extends Component { constructor(props){ super(props); this.state = { canPost: this.props.user.coinBalance >= 5, - postUrl: "" } + postUrl: "", caption: "" } } handleChange = (event) => { @@ -19,34 +21,54 @@ class CreatePost extends Component { }); }; + handleCaption = (event) => { + this.setState({caption: event.target.value}) + } + render(){ return(