UNPKG

@netvote/elections-solidity

Version:
1,107 lines (1,106 loc) 69 kB
{ "contractName": "MintableToken", "abi": [ { "constant": true, "inputs": [], "name": "mintingFinished", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "name": "_spender", "type": "address" }, { "name": "_value", "type": "uint256" } ], "name": "approve", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "totalSupply", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "name": "_from", "type": "address" }, { "name": "_to", "type": "address" }, { "name": "_value", "type": "uint256" } ], "name": "transferFrom", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "_to", "type": "address" }, { "name": "_amount", "type": "uint256" } ], "name": "mint", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "_spender", "type": "address" }, { "name": "_subtractedValue", "type": "uint256" } ], "name": "decreaseApproval", "outputs": [ { "name": "success", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [ { "name": "_owner", "type": "address" } ], "name": "balanceOf", "outputs": [ { "name": "balance", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [], "name": "finishMinting", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "owner", "outputs": [ { "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "name": "_to", "type": "address" }, { "name": "_value", "type": "uint256" } ], "name": "transfer", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "_spender", "type": "address" }, { "name": "_addedValue", "type": "uint256" } ], "name": "increaseApproval", "outputs": [ { "name": "success", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [ { "name": "_owner", "type": "address" }, { "name": "_spender", "type": "address" } ], "name": "allowance", "outputs": [ { "name": "remaining", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "name": "newOwner", "type": "address" } ], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "to", "type": "address" }, { "indexed": false, "name": "amount", "type": "uint256" } ], "name": "Mint", "type": "event" }, { "anonymous": false, "inputs": [], "name": "MintFinished", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "previousOwner", "type": "address" }, { "indexed": true, "name": "newOwner", "type": "address" } ], "name": "OwnershipTransferred", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "owner", "type": "address" }, { "indexed": true, "name": "spender", "type": "address" }, { "indexed": false, "name": "value", "type": "uint256" } ], "name": "Approval", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "from", "type": "address" }, { "indexed": true, "name": "to", "type": "address" }, { "indexed": false, "name": "value", "type": "uint256" } ], "name": "Transfer", "type": "event" } ], "bytecode": "0x606060405260038054600160a860020a03191633600160a060020a03161790556109a68061002e6000396000f3006060604052600436106100c45763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166305d2035b81146100c9578063095ea7b3146100f057806318160ddd1461011257806323b872dd1461013757806340c10f191461015f578063661884631461018157806370a08231146101a35780637d64bcb4146101c25780638da5cb5b146101d5578063a9059cbb14610204578063d73dd62314610226578063dd62ed3e14610248578063f2fde38b1461026d575b600080fd5b34156100d457600080fd5b6100dc61028e565b604051901515815260200160405180910390f35b34156100fb57600080fd5b6100dc600160a060020a03600435166024356102af565b341561011d57600080fd5b61012561031b565b60405190815260200160405180910390f35b341561014257600080fd5b6100dc600160a060020a0360043581169060243516604435610321565b341561016a57600080fd5b6100dc600160a060020a036004351660243561044b565b341561018c57600080fd5b6100dc600160a060020a0360043516602435610569565b34156101ae57600080fd5b610125600160a060020a0360043516610663565b34156101cd57600080fd5b6100dc61067e565b34156101e057600080fd5b6101e8610703565b604051600160a060020a03909116815260200160405180910390f35b341561020f57600080fd5b6100dc600160a060020a0360043516602435610712565b341561023157600080fd5b6100dc600160a060020a03600435166024356107e8565b341561025357600080fd5b610125600160a060020a036004358116906024351661088c565b341561027857600080fd5b61028c600160a060020a03600435166108b7565b005b60035474010000000000000000000000000000000000000000900460ff1681565b600160a060020a03338116600081815260026020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60005481565b600080600160a060020a038416151561033957600080fd5b50600160a060020a0380851660008181526002602090815260408083203390951683529381528382205492825260019052919091205461037f908463ffffffff61095216565b600160a060020a0380871660009081526001602052604080822093909355908616815220546103b4908463ffffffff61096416565b600160a060020a0385166000908152600160205260409020556103dd818463ffffffff61095216565b600160a060020a03808716600081815260026020908152604080832033861684529091529081902093909355908616917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9086905190815260200160405180910390a3506001949350505050565b60035460009033600160a060020a0390811691161461046957600080fd5b60035474010000000000000000000000000000000000000000900460ff161561049157600080fd5b6000546104a4908363ffffffff61096416565b6000908155600160a060020a0384168152600160205260409020546104cf908363ffffffff61096416565b600160a060020a0384166000818152600160205260409081902092909255907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859084905190815260200160405180910390a282600160a060020a031660007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405190815260200160405180910390a350600192915050565b600160a060020a033381166000908152600260209081526040808320938616835292905290812054808311156105c657600160a060020a0333811660009081526002602090815260408083209388168352929052908120556105fd565b6105d6818463ffffffff61095216565b600160a060020a033381166000908152600260209081526040808320938916835292905220555b600160a060020a0333811660008181526002602090815260408083209489168084529490915290819020547f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925915190815260200160405180910390a35060019392505050565b600160a060020a031660009081526001602052604090205490565b60035460009033600160a060020a0390811691161461069c57600080fd5b6003805474ff00000000000000000000000000000000000000001916740100000000000000000000000000000000000000001790557fae5184fba832cb2b1f702aca6117b8d265eaf03ad33eb133f19dde0f5920fa0860405160405180910390a150600190565b600354600160a060020a031681565b6000600160a060020a038316151561072957600080fd5b600160a060020a033316600090815260016020526040902054610752908363ffffffff61095216565b600160a060020a033381166000908152600160205260408082209390935590851681522054610787908363ffffffff61096416565b600160a060020a0380851660008181526001602052604090819020939093559133909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a350600192915050565b600160a060020a033381166000908152600260209081526040808320938616835292905290812054610820908363ffffffff61096416565b600160a060020a0333811660008181526002602090815260408083209489168084529490915290819020849055919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591905190815260200160405180910390a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b60035433600160a060020a039081169116146108d257600080fd5b600160a060020a03811615156108e757600080fd5b600354600160a060020a0380831691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60008282111561095e57fe5b50900390565b60008282018381101561097357fe5b93925050505600a165627a7a72305820abb1aeae5458bc6ca95fe8b385abb627e9de8e252090eafa26ad5dc511af88e00029", "deployedBytecode": "0x6060604052600436106100c45763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166305d2035b81146100c9578063095ea7b3146100f057806318160ddd1461011257806323b872dd1461013757806340c10f191461015f578063661884631461018157806370a08231146101a35780637d64bcb4146101c25780638da5cb5b146101d5578063a9059cbb14610204578063d73dd62314610226578063dd62ed3e14610248578063f2fde38b1461026d575b600080fd5b34156100d457600080fd5b6100dc61028e565b604051901515815260200160405180910390f35b34156100fb57600080fd5b6100dc600160a060020a03600435166024356102af565b341561011d57600080fd5b61012561031b565b60405190815260200160405180910390f35b341561014257600080fd5b6100dc600160a060020a0360043581169060243516604435610321565b341561016a57600080fd5b6100dc600160a060020a036004351660243561044b565b341561018c57600080fd5b6100dc600160a060020a0360043516602435610569565b34156101ae57600080fd5b610125600160a060020a0360043516610663565b34156101cd57600080fd5b6100dc61067e565b34156101e057600080fd5b6101e8610703565b604051600160a060020a03909116815260200160405180910390f35b341561020f57600080fd5b6100dc600160a060020a0360043516602435610712565b341561023157600080fd5b6100dc600160a060020a03600435166024356107e8565b341561025357600080fd5b610125600160a060020a036004358116906024351661088c565b341561027857600080fd5b61028c600160a060020a03600435166108b7565b005b60035474010000000000000000000000000000000000000000900460ff1681565b600160a060020a03338116600081815260026020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60005481565b600080600160a060020a038416151561033957600080fd5b50600160a060020a0380851660008181526002602090815260408083203390951683529381528382205492825260019052919091205461037f908463ffffffff61095216565b600160a060020a0380871660009081526001602052604080822093909355908616815220546103b4908463ffffffff61096416565b600160a060020a0385166000908152600160205260409020556103dd818463ffffffff61095216565b600160a060020a03808716600081815260026020908152604080832033861684529091529081902093909355908616917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9086905190815260200160405180910390a3506001949350505050565b60035460009033600160a060020a0390811691161461046957600080fd5b60035474010000000000000000000000000000000000000000900460ff161561049157600080fd5b6000546104a4908363ffffffff61096416565b6000908155600160a060020a0384168152600160205260409020546104cf908363ffffffff61096416565b600160a060020a0384166000818152600160205260409081902092909255907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859084905190815260200160405180910390a282600160a060020a031660007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405190815260200160405180910390a350600192915050565b600160a060020a033381166000908152600260209081526040808320938616835292905290812054808311156105c657600160a060020a0333811660009081526002602090815260408083209388168352929052908120556105fd565b6105d6818463ffffffff61095216565b600160a060020a033381166000908152600260209081526040808320938916835292905220555b600160a060020a0333811660008181526002602090815260408083209489168084529490915290819020547f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925915190815260200160405180910390a35060019392505050565b600160a060020a031660009081526001602052604090205490565b60035460009033600160a060020a0390811691161461069c57600080fd5b6003805474ff00000000000000000000000000000000000000001916740100000000000000000000000000000000000000001790557fae5184fba832cb2b1f702aca6117b8d265eaf03ad33eb133f19dde0f5920fa0860405160405180910390a150600190565b600354600160a060020a031681565b6000600160a060020a038316151561072957600080fd5b600160a060020a033316600090815260016020526040902054610752908363ffffffff61095216565b600160a060020a033381166000908152600160205260408082209390935590851681522054610787908363ffffffff61096416565b600160a060020a0380851660008181526001602052604090819020939093559133909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a350600192915050565b600160a060020a033381166000908152600260209081526040808320938616835292905290812054610820908363ffffffff61096416565b600160a060020a0333811660008181526002602090815260408083209489168084529490915290819020849055919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591905190815260200160405180910390a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b60035433600160a060020a039081169116146108d257600080fd5b600160a060020a03811615156108e757600080fd5b600354600160a060020a0380831691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60008282111561095e57fe5b50900390565b60008282018381101561097357fe5b93925050505600a165627a7a72305820abb1aeae5458bc6ca95fe8b385abb627e9de8e252090eafa26ad5dc511af88e00029", "sourceMap": "386:965:26:-;;;514:35;;;-1:-1:-1;;;;;;494:18:21;502:10;-1:-1:-1;;;;;494:18:21;;;;386:965:26;;;-1:-1:-1;386:965:26;;", "deployedSourceMap": "386:965:26:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;514:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1884:183:27;;;;;;;;;;-1:-1:-1;;;;;1884:183:27;;;;;;;179:26:25;;;;;;;;;;;;;;;;;;;;;;;;;;;728:533:27;;;;;;;;;;-1:-1:-1;;;;;728:533:27;;;;;;;;;;;;853:255:26;;;;;;;;;;-1:-1:-1;;;;;853:255:26;;;;;;;3033:404:27;;;;;;;;;;-1:-1:-1;;;;;3033:404:27;;;;;;;973:111:22;;;;;;;;;;-1:-1:-1;;;;;973:111:22;;;;;1222:127:26;;;;;;;;;;;;238:20:21;;;;;;;;;;;;;;;-1:-1:-1;;;;;238:20:21;;;;;;;;;;;;;;437:334:22;;;;;;;;;;-1:-1:-1;;;;;437:334:22;;;;;;;2766:263:27;;;;;;;;;;-1:-1:-1;;;;;2766:263:27;;;;;;;2386:140;;;;;;;;;;-1:-1:-1;;;;;2386:140:27;;;;;;;;;;827:169:21;;;;;;;;;;-1:-1:-1;;;;;827:169:21;;;;;;;514:35:26;;;;;;;;;:::o;1884:183:27:-;-1:-1:-1;;;;;1971:10:27;1963:19;;1951:4;1963:19;;;:7;:19;;;;;;;;:29;;;;;;;;;;;;;:38;;;1951:4;;1963:29;:19;2007:38;;1995:6;;2007:38;;;;;;;;;;;;;-1:-1:-1;2058:4:27;1884:183;;;;:::o;179:26:25:-;;;;:::o;728:533:27:-;810:4;;-1:-1:-1;;;;;830:17:27;;;;822:26;;;;;;-1:-1:-1;;;;;;876:14:27;;;;;;;:7;:14;;;;;;;;891:10;876:26;;;;;;;;;;;;1074:15;;;:8;:15;;;;;;;:27;;1094:6;1074:27;:19;:27;:::i;:::-;-1:-1:-1;;;;;1056:15:27;;;;;;;:8;:15;;;;;;:45;;;;1123:13;;;;;;;:25;;1141:6;1123:25;:17;:25;:::i;:::-;-1:-1:-1;;;;;1107:13:27;;;;;;:8;:13;;;;;:41;1183:22;:10;1198:6;1183:22;:14;:22;:::i;:::-;-1:-1:-1;;;;;1154:14:27;;;;;;;:7;:14;;;;;;;;1169:10;1154:26;;;;;;;;;;;:51;;;;1211:28;;;;;;1232:6;;1211:28;;;;;;;;;;;;;-1:-1:-1;1252:4:27;;728:533;-1:-1:-1;;;;728:533:27:o;853:255:26:-;647:5:21;;931:4:26;;633:10:21;-1:-1:-1;;;;;633:19:21;;;647:5;;633:19;625:28;;;;;;589:15:26;;;;;;;588:16;580:25;;;;;;957:11;;:24;;973:7;957:24;:15;:24;:::i;:::-;943:11;:38;;;-1:-1:-1;;;;;1003:13:26;;;;:8;:13;;;;;;:26;;1021:7;1003:26;:17;:26;:::i;:::-;-1:-1:-1;;;;;987:13:26;;;;;;:8;:13;;;;;;;:42;;;;:13;1035:18;;1045:7;;1035:18;;;;;;;;;;;;;1073:3;-1:-1:-1;;;;;1059:27:26;1068:3;1059:27;1078:7;1059:27;;;;;;;;;;;;;;-1:-1:-1;1099:4:26;853:255;;;;:::o;3033:404:27:-;-1:-1:-1;;;;;3158:10:27;3150:19;;3114:12;3150:19;;;:7;:19;;;;;;;;:29;;;;;;;;;;;;3189:27;;;3185:164;;;-1:-1:-1;;;;;3234:10:27;3226:19;;3258:1;3226:19;;;:7;:19;;;;;;;;:29;;;;;;;;;;;:33;3185:164;;;3312:30;:8;3325:16;3312:30;:12;:30;:::i;:::-;-1:-1:-1;;;;;3288:10:27;3280:19;;;;;;:7;:19;;;;;;;;:29;;;;;;;;;:62;3185:164;-1:-1:-1;;;;;3363:10:27;3354:61;;3385:19;;;;:7;:19;;;;;;;;3354:61;;;3385:29;;;;;;;;;;;;3354:61;;;;;;;;;;;;;;;-1:-1:-1;3428:4:27;;3033:404;-1:-1:-1;;;3033:404:27:o;973:111:22:-;-1:-1:-1;;;;;1063:16:22;1033:15;1063:16;;;:8;:16;;;;;;;973:111::o;1222:127:26:-;647:5:21;;1273:4:26;;633:10:21;-1:-1:-1;;;;;633:19:21;;;647:5;;633:19;625:28;;;;;;1285:15:26;:22;;-1:-1:-1;;1285:22:26;;;;;1313:14;;;;;;;;;;-1:-1:-1;1340:4:26;1222:127;:::o;238:20:21:-;;;-1:-1:-1;;;;;238:20:21;;:::o;437:334:22:-;500:4;-1:-1:-1;;;;;520:17:22;;;;512:26;;;;;;-1:-1:-1;;;;;640:10:22;631:20;;;;;:8;:20;;;;;;:32;;656:6;631:32;:24;:32;:::i;:::-;-1:-1:-1;;;;;617:10:22;608:20;;;;;;:8;:20;;;;;;:55;;;;685:13;;;;;;;:25;;703:6;685:25;:17;:25;:::i;:::-;-1:-1:-1;;;;;669:13:22;;;;;;;:8;:13;;;;;;;:41;;;;:13;725:10;716:33;;;;;;742:6;;716:33;;;;;;;;;;;;;-1:-1:-1;762:4:22;437:334;;;;:::o;2766:263:27:-;-1:-1:-1;;;;;2902:10:27;2894:19;;2842:12;2894:19;;;:7;:19;;;;;;;;:29;;;;;;;;;;;;:46;;2928:11;2894:46;:33;:46;:::i;:::-;-1:-1:-1;;;;;2870:10:27;2862:19;;;;;;:7;:19;;;;;;;;:29;;;;;;;;;;;;;;:78;;;:29;;:19;;2946:61;;2862:78;2946:61;;;;;;;;;;;;;-1:-1:-1;3020:4:27;2766:263;;;;:::o;2386:140::-;-1:-1:-1;;;;;2496:15:27;;;2464:17;2496:15;;;:7;:15;;;;;;;;:25;;;;;;;;;;;;;2386:140::o;827:169:21:-;647:5;;633:10;-1:-1:-1;;;;;633:19:21;;;647:5;;633:19;625:28;;;;;;-1:-1:-1;;;;;903:22:21;;;;895:31;;;;;;953:5;;-1:-1:-1;;;;;932:37:21;;;;953:5;932:37;;;;;;;;;;975:5;:16;;-1:-1:-1;;975:16:21;-1:-1:-1;;;;;975:16:21;;;;;;;;;;827:169::o;562:114:20:-;624:7;646:6;;;;639:14;;;;-1:-1:-1;666:5:20;;;562:114::o;680:133::-;742:7;769:5;;;787:6;;;;780:14;;;;807:1;680:133;-1:-1:-1;;;680:133:20:o", "source": "pragma solidity ^0.4.11;\n\n\nimport './StandardToken.sol';\nimport '../ownership/Ownable.sol';\n\n\n\n/**\n * @title Mintable token\n * @dev Simple ERC20 Token example, with mintable token creation\n * @dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120\n * Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol\n */\n\ncontract MintableToken is StandardToken, Ownable {\n event Mint(address indexed to, uint256 amount);\n event MintFinished();\n\n bool public mintingFinished = false;\n\n\n modifier canMint() {\n require(!mintingFinished);\n _;\n }\n\n /**\n * @dev Function to mint tokens\n * @param _to The address that will receive the minted tokens.\n * @param _amount The amount of tokens to mint.\n * @return A boolean that indicates if the operation was successful.\n */\n function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) {\n totalSupply = totalSupply.add(_amount);\n balances[_to] = balances[_to].add(_amount);\n Mint(_to, _amount);\n Transfer(0x0, _to, _amount);\n return true;\n }\n\n /**\n * @dev Function to stop minting new tokens.\n * @return True if the operation was successful.\n */\n function finishMinting() onlyOwner public returns (bool) {\n mintingFinished = true;\n MintFinished();\n return true;\n }\n}\n", "sourcePath": "zeppelin-solidity/contracts/token/MintableToken.sol", "ast": { "attributes": { "absolutePath": "zeppelin-solidity/contracts/token/MintableToken.sol", "exportedSymbols": { "MintableToken": [ 2995 ] } }, "children": [ { "attributes": { "literals": [ "solidity", "^", "0.4", ".11" ] }, "id": 2906, "name": "PragmaDirective", "src": "0:24:26" }, { "attributes": { "SourceUnit": 3227, "absolutePath": "zeppelin-solidity/contracts/token/StandardToken.sol", "file": "./StandardToken.sol", "scope": 2996, "symbolAliases": [ null ], "unitAlias": "" }, "id": 2907, "name": "ImportDirective", "src": "27:29:26" }, { "attributes": { "SourceUnit": 2704, "absolutePath": "zeppelin-solidity/contracts/ownership/Ownable.sol", "file": "../ownership/Ownable.sol", "scope": 2996, "symbolAliases": [ null ], "unitAlias": "" }, "id": 2908, "name": "ImportDirective", "src": "57:34:26" }, { "attributes": { "contractDependencies": [ 2703, 2780, 2875, 2904, 3226 ], "contractKind": "contract", "documentation": "@title Mintable token\n@dev Simple ERC20 Token example, with mintable token creation\n@dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120\nBased on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol", "fullyImplemented": true, "linearizedBaseContracts": [ 2995, 2703, 3226, 2780, 2875, 2904 ], "name": "MintableToken", "scope": 2996 }, "children": [ { "attributes": { "arguments": [ null ] }, "children": [ { "attributes": { "contractScope": null, "name": "StandardToken", "referencedDeclaration": 3226, "type": "contract StandardToken" }, "id": 2909, "name": "UserDefinedTypeName", "src": "412:13:26" } ], "id": 2910, "name": "InheritanceSpecifier", "src": "412:13:26" }, { "attributes": { "arguments": [ null ] }, "children": [ { "attributes": { "contractScope": null, "name": "Ownable", "referencedDeclaration": 2703, "type": "contract Ownable" }, "id": 2911, "name": "UserDefinedTypeName", "src": "427:7:26" } ], "id": 2912, "name": "InheritanceSpecifier", "src": "427:7:26" }, { "attributes": { "anonymous": false, "name": "Mint" }, "children": [ { "children": [ { "attributes": { "constant": false, "indexed": true, "name": "to", "scope": 2918, "stateVariable": false, "storageLocation": "default", "type": "address", "value": null, "visibility": "internal" }, "children": [ { "attributes": { "name": "address", "type": "address" }, "id": 2913, "name": "ElementaryTypeName", "src": "450:7:26" } ], "id": 2914, "name": "VariableDeclaration", "src": "450:18:26" }, { "attributes": { "constant": false, "indexed": false, "name": "amount", "scope": 2918, "stateVariable": false, "storageLocation": "default", "type": "uint256", "value": null, "visibility": "internal" }, "children": [ { "attributes": { "name": "uint256", "type": "uint256" }, "id": 2915, "name": "ElementaryTypeName", "src": "470:7:26" } ], "id": 2916, "name": "VariableDeclaration", "src": "470:14:26" } ], "id": 2917, "name": "ParameterList", "src": "449:36:26" } ], "id": 2918, "name": "EventDefinition", "src": "439:47:26" }, { "attributes": { "anonymous": false, "name": "MintFinished" }, "children": [ { "attributes": { "parameters": [ null ] }, "children": [], "id": 2919, "name": "ParameterList", "src": "507:2:26" } ], "id": 2920, "name": "EventDefinition", "src": "489:21:26" }, { "attributes": { "constant": false, "name": "mintingFinished", "scope": 2995, "stateVariable": true, "storageLocation": "default", "type": "bool", "visibility": "public" }, "children": [ { "attributes": { "name": "bool", "type": "bool" }, "id": 2921, "name": "ElementaryTypeName", "src": "514:4:26" }, { "attributes": { "argumentTypes": null, "hexvalue": "66616c7365", "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "subdenomination": null, "token": "bool", "type": "bool", "value": "false" }, "id": 2922, "name": "Literal", "src": "544:5:26" } ], "id": 2923, "name": "VariableDeclaration", "src": "514:35:26" }, { "attributes": { "name": "canMint", "visibility": "internal" }, "children": [ { "attributes": { "parameters": [ null ] }, "children": [], "id": 2924, "name": "ParameterList", "src": "571:2:26" }, { "children": [ { "children": [ { "attributes": { "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, "isStructConstructorCall": false, "lValueRequested": false, "names": [ null ], "type": "tuple()", "type_conversion": false }, "children": [ { "attributes": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "overloadedDeclarations": [ null ], "referencedDeclaration": 3241, "type": "function (bool) pure", "value": "require" }, "id": 2925, "name": "Identifier", "src": "580:7:26" }, { "attributes": { "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "operator": "!", "prefix": true, "type": "bool" }, "children": [ { "attributes": { "argumentTypes": null, "overloadedDeclarations": [ null ], "referencedDeclaration": 2923, "type": "bool", "value": "mintingFinished" }, "id": 2926, "name": "Identifier", "src": "589:15:26" } ], "id": 2927, "name": "UnaryOperation", "src": "588:16:26" } ], "id": 2928, "name": "FunctionCall", "src": "580:25:26" } ], "id": 2929, "name": "ExpressionStatement", "src": "580:25:26" }, { "id": 2930, "name": "PlaceholderStatement", "src": "611:1:26" } ], "id": 2931, "name": "Block", "src": "574:43:26" } ], "id": 2932, "name": "ModifierDefinition", "src": "555:62:26" }, { "attributes": { "constant": false, "implemented": true, "isConstructor": false, "name": "mint", "payable": false, "scope": 2995, "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, "children": [ { "children": [ { "attributes": { "constant": false, "name": "_to", "scope": 2977, "stateVariable": false, "storageLocation": "default", "type": "address", "value": null, "visibility": "internal" }, "children": [ { "attributes": { "name": "address", "type": "address" }, "id": 2933, "name": "ElementaryTypeName", "src": "867:7:26" } ], "id": 2934, "name": "VariableDeclaration", "src": "867:11:26" }, { "attributes": { "constant": false, "name": "_amount", "scope": 2977, "stateVariable": false, "storageLocation": "default", "type": "uint256", "value": null, "visibility": "internal" }, "children": [ { "attributes": { "name": "uint256", "type": "uint256" }, "id": 2935, "name": "ElementaryTypeName", "src": "880:7:26" } ], "id": 2936, "name": "VariableDeclaration", "src": "880:15:26" } ], "id": 2937, "name": "ParameterList", "src": "866:30:26" }, { "children": [ { "attributes": { "constant": false, "name": "", "scope": 2977, "stateVariable": false, "storageLocation": "default", "type": "bool", "value": null, "visibility": "internal" }, "children": [ { "attributes": { "name": "bool", "type": "bool" }, "id": 2942, "name": "ElementaryTypeName", "src": "931:4:26" } ], "id": 2943, "name": "VariableDeclaration", "src": "931:4:26" } ], "id": 2944, "name": "ParameterList", "src": "930:6:26" }, { "attributes": { "arguments": [ null ] }, "children": [ { "attributes": { "argumentTypes": null, "overloadedDeclarations": [ null ], "referencedDeclaration": 2677, "type": "modifier ()", "value": "onlyOwner" }, "id": 2938, "name": "Identifier", "src": "897:9:26" } ], "id": 2939, "name": "ModifierInvocation", "src": "897:9:26" }, { "attributes": { "arguments": [ null ] }, "children": [ { "attributes": { "argumentTypes": null, "overloadedDeclarations": [ null ], "referencedDeclaration": 2932, "type": "modifier ()", "value": "canMint" }, "id": 2940, "name": "Identifier", "src": "907:7:26" } ], "id": 2941, "name": "ModifierInvocation", "src": "907:7:26" }, { "children": [ { "children": [ { "attributes": { "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "operator": "=", "type": "uint256" }, "children": [ { "attributes": { "argumentTypes": null, "overloadedDeclarations": [ null ], "referencedDeclaration": 2879, "type": "uint256", "value": "totalSupply" }, "id": 2945, "name": "Identifier", "src": "943:11:26" }, { "attributes": { "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, "isStructConstructorCall": false, "lValueRequested": false, "names": [ null ], "type": "uint256", "type_conversion": false }, "children": [ { "attributes": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "member_name": "add", "referencedDeclaration": 2646, "type": "function (uint256,uint256) view returns (uint256)" }, "children": [ { "attributes": { "argumentTypes": null, "overloadedDeclarations": [ null ], "referencedDeclaration": 2879, "type": "uint256", "value": "totalSupply" }, "id": 2946, "name": "Identifier", "src": "957:11:26" } ], "id": 2947, "name": "MemberAccess", "src": "957:15:26" }, { "attributes": { "argumentTypes": null, "overloadedDeclarations": [ null ], "referencedDeclaration": 2936, "type": "uint256", "value": "_amount" }, "id": 2948, "name": "Identifier", "src": "973:7:26" } ], "id": 2949, "name": "FunctionCall", "src": "957:24:26" } ], "id": 2950, "name": "Assignment", "src": "943:38:26" } ], "id": 2951, "name": "ExpressionStatement", "src": "943:38:26" }, { "children": [ { "attributes": { "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "operator": "=", "type": "uint256" }, "children": [ { "attributes": { "argumentTypes": null, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "type": "uint256" }, "children": [ { "attributes": { "argumentTypes": null, "overloadedDeclarations": [ null ], "referencedDeclaration": 2716, "type": "mapping(address => uint256)", "value": "balances" }, "id": 2952, "name": "Identifier", "src": "987:8:26" }, { "attributes": { "argumentTypes": null, "overloadedDeclarations": [ null ], "referencedDeclaration": 2934, "type": "address", "value": "_to" }, "id": 2953, "name": "Identifier", "src": "996:3:26" } ], "id": 2954, "name": "IndexAccess", "src": "987:13:26" }, { "attributes": { "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, "isStructConstructorCall": false, "lValueRequested": false, "names": [ null ], "type": "uint256", "type_conversion": false }, "children": [ { "attributes": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "member_name": "add", "referencedDeclaration": 2646, "type": "function (uint256,uint256) view returns (uint256)" }, "children": [ { "attributes": { "argumentTypes": null, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "type": "uint256" }, "children": [ { "attributes": { "argumentTypes": null, "overloadedDeclarations": [ null ], "referencedDeclaration": 2716, "type": "mapping(address => uint256)", "value": "balances" }, "id": 2955, "name": "Identifier", "src": "1003:8:26" }, { "attributes": { "argumentTypes": null, "overloadedDeclarations": [ null ], "referencedDeclaration": 2934, "type": "address", "value": "_to" },