diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..3c3629e64 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +node_modules diff --git a/build/contracts/DappToken.json b/build/contracts/DappToken.json index a0aeb4c3b..c7ff99347 100644 --- a/build/contracts/DappToken.json +++ b/build/contracts/DappToken.json @@ -228,20 +228,21 @@ "type": "function" } ], - "bytecode": "0x60606040526040805190810160405280600a81526020017f4441707020546f6b656e000000000000000000000000000000000000000000008152506000908051906020019061004f929190610160565b506040805190810160405280600481526020017f44415050000000000000000000000000000000000000000000000000000000008152506001908051906020019061009b929190610160565b506040805190810160405280600f81526020017f4441707020546f6b656e2076312e300000000000000000000000000000000000815250600290805190602001906100e7929190610160565b5034156100f357600080fd5b604051602080610d6e8339810160405280805190602001909190505080600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508060038190555050610205565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106101a157805160ff19168380011785556101cf565b828001600101855582156101cf579182015b828111156101ce5782518255916020019190600101906101b3565b5b5090506101dc91906101e0565b5090565b61020291905b808211156101fe5760008160009055506001016101e6565b5090565b90565b610b5a806102146000396000f300606060405260043610610099576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde031461009e578063095ea7b31461012c57806318160ddd1461018657806323b872dd146101af5780635a3b7e421461022857806370a08231146102b657806395d89b4114610303578063a9059cbb14610391578063dd62ed3e146103eb575b600080fd5b34156100a957600080fd5b6100b1610457565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100f15780820151818401526020810190506100d6565b50505050905090810190601f16801561011e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561013757600080fd5b61016c600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506104f5565b604051808215151515815260200191505060405180910390f35b341561019157600080fd5b6101996105e7565b6040518082815260200191505060405180910390f35b34156101ba57600080fd5b61020e600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506105ed565b604051808215151515815260200191505060405180910390f35b341561023357600080fd5b61023b61085c565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561027b578082015181840152602081019050610260565b50505050905090810190601f1680156102a85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156102c157600080fd5b6102ed600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506108fa565b6040518082815260200191505060405180910390f35b341561030e57600080fd5b610316610912565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561035657808201518184015260208101905061033b565b50505050905090810190601f1680156103835780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561039c57600080fd5b6103d1600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506109b0565b604051808215151515815260200191505060405180910390f35b34156103f657600080fd5b610441600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610b09565b6040518082815260200191505060405180910390f35b60008054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104ed5780601f106104c2576101008083540402835291602001916104ed565b820191906000526020600020905b8154815290600101906020018083116104d057829003601f168201915b505050505081565b600081600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60035481565b6000600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561063d57600080fd5b600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111515156106c857600080fd5b81600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254019250508190555081600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b60028054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108f25780601f106108c7576101008083540402835291602001916108f2565b820191906000526020600020905b8154815290600101906020018083116108d557829003601f168201915b505050505081565b60046020528060005260406000206000915090505481565b60018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156109a85780601f1061097d576101008083540402835291602001916109a8565b820191906000526020600020905b81548152906001019060200180831161098b57829003601f168201915b505050505081565b600081600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410151515610a0057600080fd5b81600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b60056020528160005260406000206020528060005260406000206000915091505054815600a165627a7a7230582018827c088b5e1ab3cfca0b0a576ff95337bf1c42ffabcbdb7f382d3c20fde00b0029", - "deployedBytecode": "0x606060405260043610610099576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde031461009e578063095ea7b31461012c57806318160ddd1461018657806323b872dd146101af5780635a3b7e421461022857806370a08231146102b657806395d89b4114610303578063a9059cbb14610391578063dd62ed3e146103eb575b600080fd5b34156100a957600080fd5b6100b1610457565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100f15780820151818401526020810190506100d6565b50505050905090810190601f16801561011e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561013757600080fd5b61016c600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506104f5565b604051808215151515815260200191505060405180910390f35b341561019157600080fd5b6101996105e7565b6040518082815260200191505060405180910390f35b34156101ba57600080fd5b61020e600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506105ed565b604051808215151515815260200191505060405180910390f35b341561023357600080fd5b61023b61085c565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561027b578082015181840152602081019050610260565b50505050905090810190601f1680156102a85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156102c157600080fd5b6102ed600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506108fa565b6040518082815260200191505060405180910390f35b341561030e57600080fd5b610316610912565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561035657808201518184015260208101905061033b565b50505050905090810190601f1680156103835780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561039c57600080fd5b6103d1600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506109b0565b604051808215151515815260200191505060405180910390f35b34156103f657600080fd5b610441600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610b09565b6040518082815260200191505060405180910390f35b60008054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104ed5780601f106104c2576101008083540402835291602001916104ed565b820191906000526020600020905b8154815290600101906020018083116104d057829003601f168201915b505050505081565b600081600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60035481565b6000600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561063d57600080fd5b600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111515156106c857600080fd5b81600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254019250508190555081600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b60028054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108f25780601f106108c7576101008083540402835291602001916108f2565b820191906000526020600020905b8154815290600101906020018083116108d557829003601f168201915b505050505081565b60046020528060005260406000206000915090505481565b60018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156109a85780601f1061097d576101008083540402835291602001916109a8565b820191906000526020600020905b81548152906001019060200180831161098b57829003601f168201915b505050505081565b600081600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410151515610a0057600080fd5b81600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b60056020528160005260406000206020528060005260406000206000915091505054815600a165627a7a7230582018827c088b5e1ab3cfca0b0a576ff95337bf1c42ffabcbdb7f382d3c20fde00b0029", - "sourceMap": "25:1567:0:-;;;50:34;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;90:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;126:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;557:144;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;642:14;618:9;:21;628:10;618:21;;;;;;;;;;;;;;;:38;;;;680:14;666:11;:28;;;;557:144;25:1567;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;", - "deployedSourceMap": "25:1567:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;50:34;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;989:209:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;175:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1204:386;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;126:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;436:44:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;90:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;707:276:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;486:64;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;50:34;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;989:209::-;1056:12;1114:6;1080:9;:21;1090:10;1080:21;;;;;;;;;;;;;;;:31;1102:8;1080:31;;;;;;;;;;;;;;;:40;;;;1152:8;1131:38;;1140:10;1131:38;;;1162:6;1131:38;;;;;;;;;;;;;;;;;;1187:4;1180:11;;989:209;;;;:::o;175:26::-;;;;:::o;1204:386::-;1286:12;1328:9;:16;1338:5;1328:16;;;;;;;;;;;;;;;;1318:6;:26;;1310:35;;;;;;;;1373:9;:16;1383:5;1373:16;;;;;;;;;;;;;;;:28;1390:10;1373:28;;;;;;;;;;;;;;;;1363:6;:38;;1355:47;;;;;;;;1433:6;1413:9;:16;1423:5;1413:16;;;;;;;;;;;;;;;;:26;;;;;;;;;;;1467:6;1449:9;:14;1459:3;1449:14;;;;;;;;;;;;;;;;:24;;;;;;;;;;;1516:6;1484:9;:16;1494:5;1484:16;;;;;;;;;;;;;;;:28;1501:10;1484:28;;;;;;;;;;;;;;;;:38;;;;;;;;;;;1549:3;1533:28;;1542:5;1533:28;;;1554:6;1533:28;;;;;;;;;;;;;;;;;;1579:4;1572:11;;1204:386;;;;;:::o;126:43::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;436:44::-;;;;;;;;;;;;;;;;;:::o;90:30::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;707:276::-;770:12;827:6;802:9;:21;812:10;802:21;;;;;;;;;;;;;;;;:31;;794:40;;;;;;;;870:6;845:9;:21;855:10;845:21;;;;;;;;;;;;;;;;:31;;;;;;;;;;;904:6;886:9;:14;896:3;886:14;;;;;;;;;;;;;;;;:24;;;;;;;;;;;942:3;921:33;;930:10;921:33;;;947:6;921:33;;;;;;;;;;;;;;;;;;972:4;965:11;;707:276;;;;:::o;486:64::-;;;;;;;;;;;;;;;;;;;;;;;;;;:::o", - "source": "pragma solidity ^0.4.2;\n\ncontract DappToken {\n string public name = \"DApp Token\";\n string public symbol = \"DAPP\";\n string public standard = \"DApp Token v1.0\";\n uint256 public totalSupply;\n\n event Transfer(\n address indexed _from,\n address indexed _to,\n uint256 _value\n );\n\n event Approval(\n address indexed _owner,\n address indexed _spender,\n uint256 _value\n );\n\n mapping(address => uint256) public balanceOf;\n mapping(address => mapping(address => uint256)) public allowance;\n\n function DappToken (uint256 _initialSupply) public {\n balanceOf[msg.sender] = _initialSupply;\n totalSupply = _initialSupply;\n }\n\n function transfer(address _to, uint256 _value) public returns (bool success) {\n require(balanceOf[msg.sender] >= _value);\n\n balanceOf[msg.sender] -= _value;\n balanceOf[_to] += _value;\n\n Transfer(msg.sender, _to, _value);\n\n return true;\n }\n\n function approve(address _spender, uint256 _value) public returns (bool success) {\n allowance[msg.sender][_spender] = _value;\n\n Approval(msg.sender, _spender, _value);\n\n return true;\n }\n\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {\n require(_value <= balanceOf[_from]);\n require(_value <= allowance[_from][msg.sender]);\n\n balanceOf[_from] -= _value;\n balanceOf[_to] += _value;\n\n allowance[_from][msg.sender] -= _value;\n\n Transfer(_from, _to, _value);\n\n return true;\n }\n}\n", - "sourcePath": "/Users/gregory/code/token_sale/contracts/DappToken.sol", + "metadata": "{\"compiler\":{\"version\":\"0.5.0+commit.1d4f565a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"success\",\"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\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"standard\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"},{\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"_initialSupply\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"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\"},{\"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\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/shayanja/projects/blockchain/token_sale/contracts/DappToken.sol\":\"DappToken\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/shayanja/projects/blockchain/token_sale/contracts/DappToken.sol\":{\"keccak256\":\"0x6ea42b0ee91837bc6ed4f7e5a4783a36fc97fd489c8a6ccda012d87138d5752c\",\"urls\":[\"bzzr://42fa621ea27be530632f98f9a1fb9574a56f61c100f5dfd18ef3329111f20d8e\"]}},\"version\":1}", + "bytecode": "0x60806040526040805190810160405280600a81526020017f4441707020546f6b656e00000000000000000000000000000000000000000000815250600090805190602001906200005192919062000187565b506040805190810160405280600481526020017f4441505000000000000000000000000000000000000000000000000000000000815250600190805190602001906200009f92919062000187565b506040805190810160405280600f81526020017f4441707020546f6b656e2076312e30000000000000000000000000000000000081525060029080519060200190620000ed92919062000187565b50620124f86003553480156200010257600080fd5b5060405160208062000f86833981018060405260208110156200012457600080fd5b810190808051906020019092919050505080600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550806003819055505062000236565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620001ca57805160ff1916838001178555620001fb565b82800160010185558215620001fb579182015b82811115620001fa578251825591602001919060010190620001dd565b5b5090506200020a91906200020e565b5090565b6200023391905b808211156200022f57600081600090555060010162000215565b5090565b90565b610d4080620002466000396000f3fe608060405260043610610099576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde031461009e578063095ea7b31461012e57806318160ddd146101a157806323b872dd146101cc5780635a3b7e421461025f57806370a08231146102ef57806395d89b4114610354578063a9059cbb146103e4578063dd62ed3e14610457575b600080fd5b3480156100aa57600080fd5b506100b36104dc565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100f35780820151818401526020810190506100d8565b50505050905090810190601f1680156101205780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561013a57600080fd5b506101876004803603604081101561015157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061057a565b604051808215151515815260200191505060405180910390f35b3480156101ad57600080fd5b506101b661066c565b6040518082815260200191505060405180910390f35b3480156101d857600080fd5b50610245600480360360608110156101ef57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610672565b604051808215151515815260200191505060405180910390f35b34801561026b57600080fd5b506102746109d9565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156102b4578082015181840152602081019050610299565b50505050905090810190601f1680156102e15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102fb57600080fd5b5061033e6004803603602081101561031257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610a77565b6040518082815260200191505060405180910390f35b34801561036057600080fd5b50610369610a8f565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103a957808201518184015260208101905061038e565b50505050905090810190601f1680156103d65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156103f057600080fd5b5061043d6004803603604081101561040757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b2d565b604051808215151515815260200191505060405180910390f35b34801561046357600080fd5b506104c66004803603604081101561047a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610cef565b6040518082815260200191505060405180910390f35b60008054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105725780601f1061054757610100808354040283529160200191610572565b820191906000526020600020905b81548152906001019060200180831161055557829003601f168201915b505050505081565b600081600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60035481565b6000600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561072b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f416d6f756e742073686f756c64206e6f74206578636565642062616c616e636581525060200191505060405180910390fd5b600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515610845576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001807f416d6f756e742073686f756c64206e6f742065786365656420616c6c6f77616e81526020017f636500000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b81600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254019250508190555081600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b60028054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610a6f5780601f10610a4457610100808354040283529160200191610a6f565b820191906000526020600020905b815481529060010190602001808311610a5257829003601f168201915b505050505081565b60046020528060005260406000206000915090505481565b60018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610b255780601f10610afa57610100808354040283529160200191610b25565b820191906000526020600020905b815481529060010190602001808311610b0857829003601f168201915b505050505081565b600081600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410151515610be6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f496e73756666696369656e742073656e6465722062616c616e6365000000000081525060200191505060405180910390fd5b81600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b600560205281600052604060002060205280600052604060002060009150915050548156fea165627a7a72305820ccadcf1a9d7f2777e1aa45086afc09c67af37bf7719c4b4912857fc8a1e534da0029", + "deployedBytecode": "0x608060405260043610610099576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde031461009e578063095ea7b31461012e57806318160ddd146101a157806323b872dd146101cc5780635a3b7e421461025f57806370a08231146102ef57806395d89b4114610354578063a9059cbb146103e4578063dd62ed3e14610457575b600080fd5b3480156100aa57600080fd5b506100b36104dc565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100f35780820151818401526020810190506100d8565b50505050905090810190601f1680156101205780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561013a57600080fd5b506101876004803603604081101561015157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061057a565b604051808215151515815260200191505060405180910390f35b3480156101ad57600080fd5b506101b661066c565b6040518082815260200191505060405180910390f35b3480156101d857600080fd5b50610245600480360360608110156101ef57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610672565b604051808215151515815260200191505060405180910390f35b34801561026b57600080fd5b506102746109d9565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156102b4578082015181840152602081019050610299565b50505050905090810190601f1680156102e15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102fb57600080fd5b5061033e6004803603602081101561031257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610a77565b6040518082815260200191505060405180910390f35b34801561036057600080fd5b50610369610a8f565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103a957808201518184015260208101905061038e565b50505050905090810190601f1680156103d65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156103f057600080fd5b5061043d6004803603604081101561040757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b2d565b604051808215151515815260200191505060405180910390f35b34801561046357600080fd5b506104c66004803603604081101561047a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610cef565b6040518082815260200191505060405180910390f35b60008054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105725780601f1061054757610100808354040283529160200191610572565b820191906000526020600020905b81548152906001019060200180831161055557829003601f168201915b505050505081565b600081600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60035481565b6000600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561072b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f416d6f756e742073686f756c64206e6f74206578636565642062616c616e636581525060200191505060405180910390fd5b600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515610845576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001807f416d6f756e742073686f756c64206e6f742065786365656420616c6c6f77616e81526020017f636500000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b81600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254019250508190555081600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b60028054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610a6f5780601f10610a4457610100808354040283529160200191610a6f565b820191906000526020600020905b815481529060010190602001808311610a5257829003601f168201915b505050505081565b60046020528060005260406000206000915090505481565b60018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610b255780601f10610afa57610100808354040283529160200191610b25565b820191906000526020600020905b815481529060010190602001808311610b0857829003601f168201915b505050505081565b600081600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410151515610be6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f496e73756666696369656e742073656e6465722062616c616e6365000000000081525060200191505060405180910390fd5b81600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b600560205281600052604060002060205280600052604060002060009150915050548156fea165627a7a72305820ccadcf1a9d7f2777e1aa45086afc09c67af37bf7719c4b4912857fc8a1e534da0029", + "sourceMap": "25:1688:0:-;;;50:34;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;90:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;126:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;204:5;175:34;;565:137;8:9:-1;5:2;;;30:1;27;20:12;5:2;565:137:0;;;;;;;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;565:137:0;;;;;;;;;;;;;;;;643:14;619:9;:21;629:10;619:21;;;;;;;;;;;;;;;:38;;;;681:14;667:11;:28;;;;565:137;25:1688;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;", + "deployedSourceMap": "25:1688:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;50:34;;8:9:-1;5:2;;;30:1;27;20:12;5:2;50:34:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;50:34:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1026:214;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1026:214:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1026:214:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;175:34;;8:9:-1;5:2;;;30:1;27;20:12;5:2;175:34:0;;;;;;;;;;;;;;;;;;;;;;;1246:465;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1246:465:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1246:465:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;126:43;;8:9:-1;5:2;;;30:1;27;20:12;5:2;126:43:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;126:43:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;444:44;;8:9:-1;5:2;;;30:1;27;20:12;5:2;444:44:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;444:44:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;90:30;;8:9:-1;5:2;;;30:1;27;20:12;5:2;90:30:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;90:30:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;708:312;;8:9:-1;5:2;;;30:1;27;20:12;5:2;708:312:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;708:312:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;494:64;;8:9:-1;5:2;;;30:1;27;20:12;5:2;494:64:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;494:64:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;50:34;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;1026:214::-;1093:12;1151:6;1117:9;:21;1127:10;1117:21;;;;;;;;;;;;;;;:31;1139:8;1117:31;;;;;;;;;;;;;;;:40;;;;1194:8;1173:38;;1182:10;1173:38;;;1204:6;1173:38;;;;;;;;;;;;;;;;;;1229:4;1222:11;;1026:214;;;;:::o;175:34::-;;;;:::o;1246:465::-;1328:12;1370:9;:16;1380:5;1370:16;;;;;;;;;;;;;;;;1360:6;:26;;1352:71;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1451:9;:16;1461:5;1451:16;;;;;;;;;;;;;;;:28;1468:10;1451:28;;;;;;;;;;;;;;;;1441:6;:38;;1433:85;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1549:6;1529:9;:16;1539:5;1529:16;;;;;;;;;;;;;;;;:26;;;;;;;;;;;1583:6;1565:9;:14;1575:3;1565:14;;;;;;;;;;;;;;;;:24;;;;;;;;;;;1632:6;1600:9;:16;1610:5;1600:16;;;;;;;;;;;;;;;:28;1617:10;1600:28;;;;;;;;;;;;;;;;:38;;;;;;;;;;;1670:3;1654:28;;1663:5;1654:28;;;1675:6;1654:28;;;;;;;;;;;;;;;;;;1700:4;1693:11;;1246:465;;;;;:::o;126:43::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;444:44::-;;;;;;;;;;;;;;;;;:::o;90:30::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;708:312::-;771:12;828:6;803:9;:21;813:10;803:21;;;;;;;;;;;;;;;;:31;;795:71;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;902:6;877:9;:21;887:10;877:21;;;;;;;;;;;;;;;;:31;;;;;;;;;;;936:6;918:9;:14;928:3;918:14;;;;;;;;;;;;;;;;:24;;;;;;;;;;;979:3;958:33;;967:10;958:33;;;984:6;958:33;;;;;;;;;;;;;;;;;;1009:4;1002:11;;708:312;;;;:::o;494:64::-;;;;;;;;;;;;;;;;;;;;;;;;;;:::o", + "source": "pragma solidity ^0.5.0;\n\ncontract DappToken {\n string public name = \"DApp Token\";\n string public symbol = \"DAPP\";\n string public standard = \"DApp Token v1.0\";\n uint256 public totalSupply = 75000;\n\n event Transfer(\n address indexed _from,\n address indexed _to,\n uint256 _value\n );\n\n event Approval(\n address indexed _owner,\n address indexed _spender,\n uint256 _value\n );\n\n mapping(address => uint256) public balanceOf;\n mapping(address => mapping(address => uint256)) public allowance;\n\n constructor (uint256 _initialSupply) public {\n balanceOf[msg.sender] = _initialSupply;\n totalSupply = _initialSupply;\n }\n\n function transfer(address _to, uint256 _value) public returns (bool success) {\n require(balanceOf[msg.sender] >= _value, \"Insufficient sender balance\");\n\n balanceOf[msg.sender] -= _value;\n balanceOf[_to] += _value;\n\n emit Transfer(msg.sender, _to, _value);\n\n return true;\n }\n\n function approve(address _spender, uint256 _value) public returns (bool success) {\n allowance[msg.sender][_spender] = _value;\n\n emit Approval(msg.sender, _spender, _value);\n\n return true;\n }\n\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {\n require(_value <= balanceOf[_from], 'Amount should not exceed balance');\n require(_value <= allowance[_from][msg.sender], 'Amount should not exceed allowance');\n\n balanceOf[_from] -= _value;\n balanceOf[_to] += _value;\n\n allowance[_from][msg.sender] -= _value;\n\n emit Transfer(_from, _to, _value);\n\n return true;\n }\n}\n", + "sourcePath": "/Users/shayanja/projects/blockchain/token_sale/contracts/DappToken.sol", "ast": { - "absolutePath": "/Users/gregory/code/token_sale/contracts/DappToken.sol", + "absolutePath": "/Users/shayanja/projects/blockchain/token_sale/contracts/DappToken.sol", "exportedSymbols": { "DappToken": [ - 185 + 189 ] }, - "id": 186, + "id": 190, "nodeType": "SourceUnit", "nodes": [ { @@ -249,8 +250,8 @@ "literals": [ "solidity", "^", - "0.4", - ".2" + "0.5", + ".0" ], "nodeType": "PragmaDirective", "src": "0:23:0" @@ -261,9 +262,9 @@ "contractKind": "contract", "documentation": null, "fullyImplemented": true, - "id": 185, + "id": 189, "linearizedBaseContracts": [ - 185 + 189 ], "name": "DappToken", "nodeType": "ContractDefinition", @@ -273,13 +274,13 @@ "id": 4, "name": "name", "nodeType": "VariableDeclaration", - "scope": 185, + "scope": 189, "src": "50:34:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" + "typeString": "string" }, "typeName": { "id": 2, @@ -288,7 +289,7 @@ "src": "50:6:0", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", - "typeString": "string storage pointer" + "typeString": "string" } }, "value": { @@ -316,13 +317,13 @@ "id": 7, "name": "symbol", "nodeType": "VariableDeclaration", - "scope": 185, + "scope": 189, "src": "90:30:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" + "typeString": "string" }, "typeName": { "id": 5, @@ -331,7 +332,7 @@ "src": "90:6:0", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", - "typeString": "string storage pointer" + "typeString": "string" } }, "value": { @@ -359,13 +360,13 @@ "id": 10, "name": "standard", "nodeType": "VariableDeclaration", - "scope": 185, + "scope": 189, "src": "126:43:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" + "typeString": "string" }, "typeName": { "id": 8, @@ -374,7 +375,7 @@ "src": "126:6:0", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", - "typeString": "string storage pointer" + "typeString": "string" } }, "value": { @@ -399,11 +400,11 @@ }, { "constant": false, - "id": 12, + "id": 13, "name": "totalSupply", "nodeType": "VariableDeclaration", - "scope": 185, - "src": "175:26:0", + "scope": 189, + "src": "175:34:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -420,26 +421,44 @@ "typeString": "uint256" } }, - "value": null, + "value": { + "argumentTypes": null, + "hexValue": "3735303030", + "id": 12, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "204:5:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_75000_by_1", + "typeString": "int_const 75000" + }, + "value": "75000" + }, "visibility": "public" }, { "anonymous": false, - "id": 20, + "documentation": null, + "id": 21, "name": "Transfer", "nodeType": "EventDefinition", "parameters": { - "id": 19, + "id": 20, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 14, + "id": 15, "indexed": true, "name": "_from", "nodeType": "VariableDeclaration", - "scope": 20, - "src": "232:21:0", + "scope": 21, + "src": "240:21:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -447,10 +466,11 @@ "typeString": "address" }, "typeName": { - "id": 13, + "id": 14, "name": "address", "nodeType": "ElementaryTypeName", - "src": "232:7:0", + "src": "240:7:0", + "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -461,12 +481,12 @@ }, { "constant": false, - "id": 16, + "id": 17, "indexed": true, "name": "_to", "nodeType": "VariableDeclaration", - "scope": 20, - "src": "263:19:0", + "scope": 21, + "src": "271:19:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -474,10 +494,11 @@ "typeString": "address" }, "typeName": { - "id": 15, + "id": 16, "name": "address", "nodeType": "ElementaryTypeName", - "src": "263:7:0", + "src": "271:7:0", + "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -488,12 +509,12 @@ }, { "constant": false, - "id": 18, + "id": 19, "indexed": false, "name": "_value", "nodeType": "VariableDeclaration", - "scope": 20, - "src": "292:14:0", + "scope": 21, + "src": "300:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -501,10 +522,10 @@ "typeString": "uint256" }, "typeName": { - "id": 17, + "id": 18, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "292:7:0", + "src": "300:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -514,27 +535,28 @@ "visibility": "internal" } ], - "src": "222:90:0" + "src": "230:90:0" }, - "src": "208:105:0" + "src": "216:105:0" }, { "anonymous": false, - "id": 28, + "documentation": null, + "id": 29, "name": "Approval", "nodeType": "EventDefinition", "parameters": { - "id": 27, + "id": 28, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 22, + "id": 23, "indexed": true, "name": "_owner", "nodeType": "VariableDeclaration", - "scope": 28, - "src": "343:22:0", + "scope": 29, + "src": "351:22:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -542,10 +564,11 @@ "typeString": "address" }, "typeName": { - "id": 21, + "id": 22, "name": "address", "nodeType": "ElementaryTypeName", - "src": "343:7:0", + "src": "351:7:0", + "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -556,12 +579,12 @@ }, { "constant": false, - "id": 24, + "id": 25, "indexed": true, "name": "_spender", "nodeType": "VariableDeclaration", - "scope": 28, - "src": "375:24:0", + "scope": 29, + "src": "383:24:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -569,10 +592,11 @@ "typeString": "address" }, "typeName": { - "id": 23, + "id": 24, "name": "address", "nodeType": "ElementaryTypeName", - "src": "375:7:0", + "src": "383:7:0", + "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -583,12 +607,12 @@ }, { "constant": false, - "id": 26, + "id": 27, "indexed": false, "name": "_value", "nodeType": "VariableDeclaration", - "scope": 28, - "src": "409:14:0", + "scope": 29, + "src": "417:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -596,10 +620,10 @@ "typeString": "uint256" }, "typeName": { - "id": 25, + "id": 26, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "409:7:0", + "src": "417:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -609,17 +633,17 @@ "visibility": "internal" } ], - "src": "333:96:0" + "src": "341:96:0" }, - "src": "319:111:0" + "src": "327:111:0" }, { "constant": false, - "id": 32, + "id": 33, "name": "balanceOf", "nodeType": "VariableDeclaration", - "scope": 185, - "src": "436:44:0", + "scope": 189, + "src": "444:44:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -627,28 +651,28 @@ "typeString": "mapping(address => uint256)" }, "typeName": { - "id": 31, + "id": 32, "keyType": { - "id": 29, + "id": 30, "name": "address", "nodeType": "ElementaryTypeName", - "src": "444:7:0", + "src": "452:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", - "src": "436:27:0", + "src": "444:27:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "valueType": { - "id": 30, + "id": 31, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "455:7:0", + "src": "463:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -660,11 +684,11 @@ }, { "constant": false, - "id": 38, + "id": 39, "name": "allowance", "nodeType": "VariableDeclaration", - "scope": 185, - "src": "486:64:0", + "scope": 189, + "src": "494:64:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -672,46 +696,46 @@ "typeString": "mapping(address => mapping(address => uint256))" }, "typeName": { - "id": 37, + "id": 38, "keyType": { - "id": 33, + "id": 34, "name": "address", "nodeType": "ElementaryTypeName", - "src": "494:7:0", + "src": "502:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", - "src": "486:47:0", + "src": "494:47:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", "typeString": "mapping(address => mapping(address => uint256))" }, "valueType": { - "id": 36, + "id": 37, "keyType": { - "id": 34, + "id": 35, "name": "address", "nodeType": "ElementaryTypeName", - "src": "513:7:0", + "src": "521:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", - "src": "505:27:0", + "src": "513:27:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "valueType": { - "id": 35, + "id": 36, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "524:7:0", + "src": "532:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -724,14 +748,14 @@ }, { "body": { - "id": 54, + "id": 55, "nodeType": "Block", - "src": "608:93:0", + "src": "609:93:0", "statements": [ { "expression": { "argumentTypes": null, - "id": 48, + "id": 49, "isConstant": false, "isLValue": false, "isPure": false, @@ -740,34 +764,34 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 43, + "id": 44, "name": "balanceOf", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 32, - "src": "618:9:0", + "referencedDeclaration": 33, + "src": "619:9:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, - "id": 46, + "id": 47, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 44, + "id": 45, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 338, - "src": "628:3:0", + "referencedDeclaration": 417, + "src": "629:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 45, + "id": 46, "isConstant": false, "isLValue": false, "isPure": false, @@ -775,10 +799,10 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "628:10:0", + "src": "629:10:0", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" } }, "isConstant": false, @@ -786,7 +810,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "618:21:0", + "src": "619:21:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -796,43 +820,43 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 47, + "id": 48, "name": "_initialSupply", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 40, - "src": "642:14:0", + "referencedDeclaration": 41, + "src": "643:14:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "618:38:0", + "src": "619:38:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 49, + "id": 50, "nodeType": "ExpressionStatement", - "src": "618:38:0" + "src": "619:38:0" }, { "expression": { "argumentTypes": null, - "id": 52, + "id": 53, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 50, + "id": 51, "name": "totalSupply", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 12, - "src": "666:11:0", + "referencedDeclaration": 13, + "src": "667:11:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -842,47 +866,47 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 51, + "id": 52, "name": "_initialSupply", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 40, - "src": "680:14:0", + "referencedDeclaration": 41, + "src": "681:14:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "666:28:0", + "src": "667:28:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 53, + "id": 54, "nodeType": "ExpressionStatement", - "src": "666:28:0" + "src": "667:28:0" } ] }, - "id": 55, + "documentation": null, + "id": 56, "implemented": true, - "isConstructor": true, - "isDeclaredConst": false, + "kind": "constructor", "modifiers": [], - "name": "DappToken", + "name": "", "nodeType": "FunctionDefinition", "parameters": { - "id": 41, + "id": 42, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 40, + "id": 41, "name": "_initialSupply", "nodeType": "VariableDeclaration", - "scope": 55, - "src": "577:22:0", + "scope": 56, + "src": "578:22:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -890,10 +914,10 @@ "typeString": "uint256" }, "typeName": { - "id": 39, + "id": 40, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "577:7:0", + "src": "578:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -903,26 +927,25 @@ "visibility": "internal" } ], - "src": "576:24:0" + "src": "577:24:0" }, - "payable": false, "returnParameters": { - "id": 42, + "id": 43, "nodeType": "ParameterList", "parameters": [], - "src": "608:0:0" + "src": "609:0:0" }, - "scope": 185, - "src": "557:144:0", + "scope": 189, + "src": "565:137:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { - "id": 95, + "id": 97, "nodeType": "Block", - "src": "784:199:0", + "src": "785:235:0", "statements": [ { "expression": { @@ -934,7 +957,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 70, + "id": 71, "isConstant": false, "isLValue": false, "isPure": false, @@ -943,34 +966,34 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 65, + "id": 66, "name": "balanceOf", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 32, - "src": "802:9:0", + "referencedDeclaration": 33, + "src": "803:9:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, - "id": 68, + "id": 69, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 66, + "id": 67, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 338, - "src": "812:3:0", + "referencedDeclaration": 417, + "src": "813:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 67, + "id": 68, "isConstant": false, "isLValue": false, "isPure": false, @@ -978,10 +1001,10 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "812:10:0", + "src": "813:10:0", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" } }, "isConstant": false, @@ -989,7 +1012,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "802:21:0", + "src": "803:21:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -999,22 +1022,40 @@ "operator": ">=", "rightExpression": { "argumentTypes": null, - "id": 69, + "id": 70, "name": "_value", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 59, - "src": "827:6:0", + "referencedDeclaration": 60, + "src": "828:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "802:31:0", + "src": "803:31:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } + }, + { + "argumentTypes": null, + "hexValue": "496e73756666696369656e742073656e6465722062616c616e6365", + "id": 72, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "836:29:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_1ccddadcbe58aa190041ac0bb26346fba1c48c4516a1033345ea31ec16cb1d95", + "typeString": "literal_string \"Insufficient sender balance\"" + }, + "value": "Insufficient sender balance" } ], "expression": { @@ -1022,20 +1063,27 @@ { "typeIdentifier": "t_bool", "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_1ccddadcbe58aa190041ac0bb26346fba1c48c4516a1033345ea31ec16cb1d95", + "typeString": "literal_string \"Insufficient sender balance\"" } ], - "id": 64, + "id": 65, "name": "require", "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 341, - "src": "794:7:0", + "overloadedDeclarations": [ + 420, + 421 + ], + "referencedDeclaration": 421, + "src": "795:7:0", "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" } }, - "id": 71, + "id": 73, "isConstant": false, "isLValue": false, "isPure": false, @@ -1043,20 +1091,20 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "794:40:0", + "src": "795:71:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 72, + "id": 74, "nodeType": "ExpressionStatement", - "src": "794:40:0" + "src": "795:71:0" }, { "expression": { "argumentTypes": null, - "id": 78, + "id": 80, "isConstant": false, "isLValue": false, "isPure": false, @@ -1065,34 +1113,34 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 73, + "id": 75, "name": "balanceOf", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 32, - "src": "845:9:0", + "referencedDeclaration": 33, + "src": "877:9:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, - "id": 76, + "id": 78, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 74, + "id": 76, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 338, - "src": "855:3:0", + "referencedDeclaration": 417, + "src": "887:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 75, + "id": 77, "isConstant": false, "isLValue": false, "isPure": false, @@ -1100,10 +1148,10 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "855:10:0", + "src": "887:10:0", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" } }, "isConstant": false, @@ -1111,7 +1159,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "845:21:0", + "src": "877:21:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1121,31 +1169,31 @@ "operator": "-=", "rightHandSide": { "argumentTypes": null, - "id": 77, + "id": 79, "name": "_value", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 59, - "src": "870:6:0", + "referencedDeclaration": 60, + "src": "902:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "845:31:0", + "src": "877:31:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 79, + "id": 81, "nodeType": "ExpressionStatement", - "src": "845:31:0" + "src": "877:31:0" }, { "expression": { "argumentTypes": null, - "id": 84, + "id": 86, "isConstant": false, "isLValue": false, "isPure": false, @@ -1154,26 +1202,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 80, + "id": 82, "name": "balanceOf", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 32, - "src": "886:9:0", + "referencedDeclaration": 33, + "src": "918:9:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, - "id": 82, + "id": 84, "indexExpression": { "argumentTypes": null, - "id": 81, + "id": 83, "name": "_to", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 57, - "src": "896:3:0", + "referencedDeclaration": 58, + "src": "928:3:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1184,7 +1232,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "886:14:0", + "src": "918:14:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1194,47 +1242,47 @@ "operator": "+=", "rightHandSide": { "argumentTypes": null, - "id": 83, + "id": 85, "name": "_value", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 59, - "src": "904:6:0", + "referencedDeclaration": 60, + "src": "936:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "886:24:0", + "src": "918:24:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 85, + "id": 87, "nodeType": "ExpressionStatement", - "src": "886:24:0" + "src": "918:24:0" }, { - "expression": { + "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 87, + "id": 89, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 338, - "src": "930:3:0", + "referencedDeclaration": 417, + "src": "967:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 88, + "id": 90, "isConstant": false, "isLValue": false, "isPure": false, @@ -1242,20 +1290,20 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "930:10:0", + "src": "967:10:0", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" } }, { "argumentTypes": null, - "id": 89, + "id": 91, "name": "_to", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 57, - "src": "942:3:0", + "referencedDeclaration": 58, + "src": "979:3:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1263,12 +1311,12 @@ }, { "argumentTypes": null, - "id": 90, + "id": 92, "name": "_value", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 59, - "src": "947:6:0", + "referencedDeclaration": 60, + "src": "984:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1278,8 +1326,8 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" }, { "typeIdentifier": "t_address", @@ -1290,18 +1338,18 @@ "typeString": "uint256" } ], - "id": 86, + "id": 88, "name": "Transfer", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "921:8:0", + "referencedDeclaration": 21, + "src": "958:8:0", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256)" } }, - "id": 91, + "id": 93, "isConstant": false, "isLValue": false, "isPure": false, @@ -1309,28 +1357,28 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "921:33:0", + "src": "958:33:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 92, - "nodeType": "ExpressionStatement", - "src": "921:33:0" + "id": 94, + "nodeType": "EmitStatement", + "src": "953:38:0" }, { "expression": { "argumentTypes": null, "hexValue": "74727565", - "id": 93, + "id": 95, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "972:4:0", + "src": "1009:4:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -1338,31 +1386,31 @@ }, "value": "true" }, - "functionReturnParameters": 63, - "id": 94, + "functionReturnParameters": 64, + "id": 96, "nodeType": "Return", - "src": "965:11:0" + "src": "1002:11:0" } ] }, - "id": 96, + "documentation": null, + "id": 98, "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, + "kind": "function", "modifiers": [], "name": "transfer", "nodeType": "FunctionDefinition", "parameters": { - "id": 60, + "id": 61, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 57, + "id": 58, "name": "_to", "nodeType": "VariableDeclaration", - "scope": 96, - "src": "725:11:0", + "scope": 98, + "src": "726:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1370,10 +1418,11 @@ "typeString": "address" }, "typeName": { - "id": 56, + "id": 57, "name": "address", "nodeType": "ElementaryTypeName", - "src": "725:7:0", + "src": "726:7:0", + "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1384,11 +1433,11 @@ }, { "constant": false, - "id": 59, + "id": 60, "name": "_value", "nodeType": "VariableDeclaration", - "scope": 96, - "src": "738:14:0", + "scope": 98, + "src": "739:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1396,10 +1445,10 @@ "typeString": "uint256" }, "typeName": { - "id": 58, + "id": 59, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "738:7:0", + "src": "739:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1409,20 +1458,19 @@ "visibility": "internal" } ], - "src": "724:29:0" + "src": "725:29:0" }, - "payable": false, "returnParameters": { - "id": 63, + "id": 64, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 62, + "id": 63, "name": "success", "nodeType": "VariableDeclaration", - "scope": 96, - "src": "770:12:0", + "scope": 98, + "src": "771:12:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1430,10 +1478,10 @@ "typeString": "bool" }, "typeName": { - "id": 61, + "id": 62, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "770:4:0", + "src": "771:4:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1443,24 +1491,24 @@ "visibility": "internal" } ], - "src": "769:14:0" + "src": "770:14:0" }, - "scope": 185, - "src": "707:276:0", + "scope": 189, + "src": "708:312:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { - "id": 123, + "id": 125, "nodeType": "Block", - "src": "1070:128:0", + "src": "1107:133:0", "statements": [ { "expression": { "argumentTypes": null, - "id": 112, + "id": 114, "isConstant": false, "isLValue": false, "isPure": false, @@ -1471,34 +1519,34 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 105, + "id": 107, "name": "allowance", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 38, - "src": "1080:9:0", + "referencedDeclaration": 39, + "src": "1117:9:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", "typeString": "mapping(address => mapping(address => uint256))" } }, - "id": 109, + "id": 111, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 106, + "id": 108, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 338, - "src": "1090:3:0", + "referencedDeclaration": 417, + "src": "1127:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 107, + "id": 109, "isConstant": false, "isLValue": false, "isPure": false, @@ -1506,10 +1554,10 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "1090:10:0", + "src": "1127:10:0", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" } }, "isConstant": false, @@ -1517,21 +1565,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "1080:21:0", + "src": "1117:21:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, - "id": 110, + "id": 112, "indexExpression": { "argumentTypes": null, - "id": 108, + "id": 110, "name": "_spender", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 98, - "src": "1102:8:0", + "referencedDeclaration": 100, + "src": "1139:8:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1542,7 +1590,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "1080:31:0", + "src": "1117:31:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1552,47 +1600,47 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 111, + "id": 113, "name": "_value", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 100, - "src": "1114:6:0", + "referencedDeclaration": 102, + "src": "1151:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "1080:40:0", + "src": "1117:40:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 113, + "id": 115, "nodeType": "ExpressionStatement", - "src": "1080:40:0" + "src": "1117:40:0" }, { - "expression": { + "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 115, + "id": 117, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 338, - "src": "1140:3:0", + "referencedDeclaration": 417, + "src": "1182:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 116, + "id": 118, "isConstant": false, "isLValue": false, "isPure": false, @@ -1600,20 +1648,20 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "1140:10:0", + "src": "1182:10:0", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" } }, { "argumentTypes": null, - "id": 117, + "id": 119, "name": "_spender", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 98, - "src": "1152:8:0", + "referencedDeclaration": 100, + "src": "1194:8:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1621,12 +1669,12 @@ }, { "argumentTypes": null, - "id": 118, + "id": 120, "name": "_value", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 100, - "src": "1162:6:0", + "referencedDeclaration": 102, + "src": "1204:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1636,8 +1684,8 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" }, { "typeIdentifier": "t_address", @@ -1648,18 +1696,18 @@ "typeString": "uint256" } ], - "id": 114, + "id": 116, "name": "Approval", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 28, - "src": "1131:8:0", + "referencedDeclaration": 29, + "src": "1173:8:0", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256)" } }, - "id": 119, + "id": 121, "isConstant": false, "isLValue": false, "isPure": false, @@ -1667,28 +1715,28 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1131:38:0", + "src": "1173:38:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 120, - "nodeType": "ExpressionStatement", - "src": "1131:38:0" + "id": 122, + "nodeType": "EmitStatement", + "src": "1168:43:0" }, { "expression": { "argumentTypes": null, "hexValue": "74727565", - "id": 121, + "id": 123, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "1187:4:0", + "src": "1229:4:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -1696,31 +1744,31 @@ }, "value": "true" }, - "functionReturnParameters": 104, - "id": 122, + "functionReturnParameters": 106, + "id": 124, "nodeType": "Return", - "src": "1180:11:0" + "src": "1222:11:0" } ] }, - "id": 124, + "documentation": null, + "id": 126, "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, + "kind": "function", "modifiers": [], "name": "approve", "nodeType": "FunctionDefinition", "parameters": { - "id": 101, + "id": 103, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 98, + "id": 100, "name": "_spender", "nodeType": "VariableDeclaration", - "scope": 124, - "src": "1006:16:0", + "scope": 126, + "src": "1043:16:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1728,10 +1776,11 @@ "typeString": "address" }, "typeName": { - "id": 97, + "id": 99, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1006:7:0", + "src": "1043:7:0", + "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1742,11 +1791,11 @@ }, { "constant": false, - "id": 100, + "id": 102, "name": "_value", "nodeType": "VariableDeclaration", - "scope": 124, - "src": "1024:14:0", + "scope": 126, + "src": "1061:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1754,10 +1803,10 @@ "typeString": "uint256" }, "typeName": { - "id": 99, + "id": 101, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1024:7:0", + "src": "1061:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1767,20 +1816,19 @@ "visibility": "internal" } ], - "src": "1005:34:0" + "src": "1042:34:0" }, - "payable": false, "returnParameters": { - "id": 104, + "id": 106, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 103, + "id": 105, "name": "success", "nodeType": "VariableDeclaration", - "scope": 124, - "src": "1056:12:0", + "scope": 126, + "src": "1093:12:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1788,10 +1836,10 @@ "typeString": "bool" }, "typeName": { - "id": 102, + "id": 104, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "1056:4:0", + "src": "1093:4:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1801,19 +1849,19 @@ "visibility": "internal" } ], - "src": "1055:14:0" + "src": "1092:14:0" }, - "scope": 185, - "src": "989:209:0", + "scope": 189, + "src": "1026:214:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { - "id": 183, + "id": 187, "nodeType": "Block", - "src": "1300:290:0", + "src": "1342:369:0", "statements": [ { "expression": { @@ -1825,19 +1873,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 140, + "id": 142, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 136, + "id": 138, "name": "_value", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 130, - "src": "1318:6:0", + "referencedDeclaration": 132, + "src": "1360:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1849,26 +1897,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 137, + "id": 139, "name": "balanceOf", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 32, - "src": "1328:9:0", + "referencedDeclaration": 33, + "src": "1370:9:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, - "id": 139, + "id": 141, "indexExpression": { "argumentTypes": null, - "id": 138, + "id": 140, "name": "_from", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "1338:5:0", + "referencedDeclaration": 128, + "src": "1380:5:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1879,17 +1927,35 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "1328:16:0", + "src": "1370:16:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "1318:26:0", + "src": "1360:26:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } + }, + { + "argumentTypes": null, + "hexValue": "416d6f756e742073686f756c64206e6f74206578636565642062616c616e6365", + "id": 143, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1388:34:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_bd9fa506568f5d4f11200d1bdf8a45f2b89b5395fe0187334c36ea4234ab9e23", + "typeString": "literal_string \"Amount should not exceed balance\"" + }, + "value": "Amount should not exceed balance" } ], "expression": { @@ -1897,20 +1963,27 @@ { "typeIdentifier": "t_bool", "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_bd9fa506568f5d4f11200d1bdf8a45f2b89b5395fe0187334c36ea4234ab9e23", + "typeString": "literal_string \"Amount should not exceed balance\"" } ], - "id": 135, + "id": 137, "name": "require", "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 341, - "src": "1310:7:0", + "overloadedDeclarations": [ + 420, + 421 + ], + "referencedDeclaration": 421, + "src": "1352:7:0", "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" } }, - "id": 141, + "id": 144, "isConstant": false, "isLValue": false, "isPure": false, @@ -1918,15 +1991,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1310:35:0", + "src": "1352:71:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 142, + "id": 145, "nodeType": "ExpressionStatement", - "src": "1310:35:0" + "src": "1352:71:0" }, { "expression": { @@ -1938,19 +2011,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 151, + "id": 154, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 144, + "id": 147, "name": "_value", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 130, - "src": "1363:6:0", + "referencedDeclaration": 132, + "src": "1441:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1964,26 +2037,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 145, + "id": 148, "name": "allowance", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 38, - "src": "1373:9:0", + "referencedDeclaration": 39, + "src": "1451:9:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", "typeString": "mapping(address => mapping(address => uint256))" } }, - "id": 147, + "id": 150, "indexExpression": { "argumentTypes": null, - "id": 146, + "id": 149, "name": "_from", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "1383:5:0", + "referencedDeclaration": 128, + "src": "1461:5:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -1994,29 +2067,29 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "1373:16:0", + "src": "1451:16:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, - "id": 150, + "id": 153, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 148, + "id": 151, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 338, - "src": "1390:3:0", + "referencedDeclaration": 417, + "src": "1468:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 149, + "id": 152, "isConstant": false, "isLValue": false, "isPure": false, @@ -2024,10 +2097,10 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "1390:10:0", + "src": "1468:10:0", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" } }, "isConstant": false, @@ -2035,17 +2108,35 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "1373:28:0", + "src": "1451:28:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "1363:38:0", + "src": "1441:38:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } + }, + { + "argumentTypes": null, + "hexValue": "416d6f756e742073686f756c64206e6f742065786365656420616c6c6f77616e6365", + "id": 155, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1481:36:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_889d018defc5657dbf72d972831fcaf8cc8e8c7064f2597d639163ef61329f1a", + "typeString": "literal_string \"Amount should not exceed allowance\"" + }, + "value": "Amount should not exceed allowance" } ], "expression": { @@ -2053,20 +2144,27 @@ { "typeIdentifier": "t_bool", "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_889d018defc5657dbf72d972831fcaf8cc8e8c7064f2597d639163ef61329f1a", + "typeString": "literal_string \"Amount should not exceed allowance\"" } ], - "id": 143, + "id": 146, "name": "require", "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 341, - "src": "1355:7:0", + "overloadedDeclarations": [ + 420, + 421 + ], + "referencedDeclaration": 421, + "src": "1433:7:0", "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" } }, - "id": 152, + "id": 156, "isConstant": false, "isLValue": false, "isPure": false, @@ -2074,20 +2172,20 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1355:47:0", + "src": "1433:85:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 153, + "id": 157, "nodeType": "ExpressionStatement", - "src": "1355:47:0" + "src": "1433:85:0" }, { "expression": { "argumentTypes": null, - "id": 158, + "id": 162, "isConstant": false, "isLValue": false, "isPure": false, @@ -2096,26 +2194,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 154, + "id": 158, "name": "balanceOf", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 32, - "src": "1413:9:0", + "referencedDeclaration": 33, + "src": "1529:9:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, - "id": 156, + "id": 160, "indexExpression": { "argumentTypes": null, - "id": 155, + "id": 159, "name": "_from", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "1423:5:0", + "referencedDeclaration": 128, + "src": "1539:5:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2126,7 +2224,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "1413:16:0", + "src": "1529:16:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2136,31 +2234,31 @@ "operator": "-=", "rightHandSide": { "argumentTypes": null, - "id": 157, + "id": 161, "name": "_value", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 130, - "src": "1433:6:0", + "referencedDeclaration": 132, + "src": "1549:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "1413:26:0", + "src": "1529:26:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 159, + "id": 163, "nodeType": "ExpressionStatement", - "src": "1413:26:0" + "src": "1529:26:0" }, { "expression": { "argumentTypes": null, - "id": 164, + "id": 168, "isConstant": false, "isLValue": false, "isPure": false, @@ -2169,26 +2267,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 160, + "id": 164, "name": "balanceOf", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 32, - "src": "1449:9:0", + "referencedDeclaration": 33, + "src": "1565:9:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, - "id": 162, + "id": 166, "indexExpression": { "argumentTypes": null, - "id": 161, + "id": 165, "name": "_to", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 128, - "src": "1459:3:0", + "referencedDeclaration": 130, + "src": "1575:3:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2199,7 +2297,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "1449:14:0", + "src": "1565:14:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2209,31 +2307,31 @@ "operator": "+=", "rightHandSide": { "argumentTypes": null, - "id": 163, + "id": 167, "name": "_value", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 130, - "src": "1467:6:0", + "referencedDeclaration": 132, + "src": "1583:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "1449:24:0", + "src": "1565:24:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 165, + "id": 169, "nodeType": "ExpressionStatement", - "src": "1449:24:0" + "src": "1565:24:0" }, { "expression": { "argumentTypes": null, - "id": 173, + "id": 177, "isConstant": false, "isLValue": false, "isPure": false, @@ -2244,26 +2342,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 166, + "id": 170, "name": "allowance", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 38, - "src": "1484:9:0", + "referencedDeclaration": 39, + "src": "1600:9:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", "typeString": "mapping(address => mapping(address => uint256))" } }, - "id": 170, + "id": 174, "indexExpression": { "argumentTypes": null, - "id": 167, + "id": 171, "name": "_from", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "1494:5:0", + "referencedDeclaration": 128, + "src": "1610:5:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2274,29 +2372,29 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "1484:16:0", + "src": "1600:16:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, - "id": 171, + "id": 175, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 168, + "id": 172, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 338, - "src": "1501:3:0", + "referencedDeclaration": 417, + "src": "1617:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 169, + "id": 173, "isConstant": false, "isLValue": false, "isPure": false, @@ -2304,10 +2402,10 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "1501:10:0", + "src": "1617:10:0", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" } }, "isConstant": false, @@ -2315,7 +2413,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "1484:28:0", + "src": "1600:28:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2325,39 +2423,39 @@ "operator": "-=", "rightHandSide": { "argumentTypes": null, - "id": 172, + "id": 176, "name": "_value", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 130, - "src": "1516:6:0", + "referencedDeclaration": 132, + "src": "1632:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "1484:38:0", + "src": "1600:38:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 174, + "id": 178, "nodeType": "ExpressionStatement", - "src": "1484:38:0" + "src": "1600:38:0" }, { - "expression": { + "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, - "id": 176, + "id": 180, "name": "_from", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "1542:5:0", + "referencedDeclaration": 128, + "src": "1663:5:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2365,12 +2463,12 @@ }, { "argumentTypes": null, - "id": 177, + "id": 181, "name": "_to", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 128, - "src": "1549:3:0", + "referencedDeclaration": 130, + "src": "1670:3:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2378,12 +2476,12 @@ }, { "argumentTypes": null, - "id": 178, + "id": 182, "name": "_value", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 130, - "src": "1554:6:0", + "referencedDeclaration": 132, + "src": "1675:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2405,18 +2503,18 @@ "typeString": "uint256" } ], - "id": 175, + "id": 179, "name": "Transfer", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "1533:8:0", + "referencedDeclaration": 21, + "src": "1654:8:0", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256)" } }, - "id": 179, + "id": 183, "isConstant": false, "isLValue": false, "isPure": false, @@ -2424,28 +2522,28 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1533:28:0", + "src": "1654:28:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 180, - "nodeType": "ExpressionStatement", - "src": "1533:28:0" + "id": 184, + "nodeType": "EmitStatement", + "src": "1649:33:0" }, { "expression": { "argumentTypes": null, "hexValue": "74727565", - "id": 181, + "id": 185, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "1579:4:0", + "src": "1700:4:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -2453,31 +2551,31 @@ }, "value": "true" }, - "functionReturnParameters": 134, - "id": 182, + "functionReturnParameters": 136, + "id": 186, "nodeType": "Return", - "src": "1572:11:0" + "src": "1693:11:0" } ] }, - "id": 184, + "documentation": null, + "id": 188, "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, + "kind": "function", "modifiers": [], "name": "transferFrom", "nodeType": "FunctionDefinition", "parameters": { - "id": 131, + "id": 133, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 126, + "id": 128, "name": "_from", "nodeType": "VariableDeclaration", - "scope": 184, - "src": "1226:13:0", + "scope": 188, + "src": "1268:13:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2485,10 +2583,11 @@ "typeString": "address" }, "typeName": { - "id": 125, + "id": 127, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1226:7:0", + "src": "1268:7:0", + "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2499,11 +2598,11 @@ }, { "constant": false, - "id": 128, + "id": 130, "name": "_to", "nodeType": "VariableDeclaration", - "scope": 184, - "src": "1241:11:0", + "scope": 188, + "src": "1283:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2511,10 +2610,11 @@ "typeString": "address" }, "typeName": { - "id": 127, + "id": 129, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1241:7:0", + "src": "1283:7:0", + "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2525,11 +2625,11 @@ }, { "constant": false, - "id": 130, + "id": 132, "name": "_value", "nodeType": "VariableDeclaration", - "scope": 184, - "src": "1254:14:0", + "scope": 188, + "src": "1296:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2537,10 +2637,10 @@ "typeString": "uint256" }, "typeName": { - "id": 129, + "id": 131, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1254:7:0", + "src": "1296:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2550,20 +2650,19 @@ "visibility": "internal" } ], - "src": "1225:44:0" + "src": "1267:44:0" }, - "payable": false, "returnParameters": { - "id": 134, + "id": 136, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 133, + "id": 135, "name": "success", "nodeType": "VariableDeclaration", - "scope": 184, - "src": "1286:12:0", + "scope": 188, + "src": "1328:12:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2571,10 +2670,10 @@ "typeString": "bool" }, "typeName": { - "id": 132, + "id": 134, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "1286:4:0", + "src": "1328:4:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -2584,29 +2683,29 @@ "visibility": "internal" } ], - "src": "1285:14:0" + "src": "1327:14:0" }, - "scope": 185, - "src": "1204:386:0", + "scope": 189, + "src": "1246:465:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" } ], - "scope": 186, - "src": "25:1567:0" + "scope": 190, + "src": "25:1688:0" } ], - "src": "0:1593:0" + "src": "0:1714:0" }, "legacyAST": { - "absolutePath": "/Users/gregory/code/token_sale/contracts/DappToken.sol", + "absolutePath": "/Users/shayanja/projects/blockchain/token_sale/contracts/DappToken.sol", "exportedSymbols": { "DappToken": [ - 185 + 189 ] }, - "id": 186, + "id": 190, "nodeType": "SourceUnit", "nodes": [ { @@ -2614,8 +2713,8 @@ "literals": [ "solidity", "^", - "0.4", - ".2" + "0.5", + ".0" ], "nodeType": "PragmaDirective", "src": "0:23:0" @@ -2626,9 +2725,9 @@ "contractKind": "contract", "documentation": null, "fullyImplemented": true, - "id": 185, + "id": 189, "linearizedBaseContracts": [ - 185 + 189 ], "name": "DappToken", "nodeType": "ContractDefinition", @@ -2638,13 +2737,13 @@ "id": 4, "name": "name", "nodeType": "VariableDeclaration", - "scope": 185, + "scope": 189, "src": "50:34:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" + "typeString": "string" }, "typeName": { "id": 2, @@ -2653,7 +2752,7 @@ "src": "50:6:0", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", - "typeString": "string storage pointer" + "typeString": "string" } }, "value": { @@ -2681,13 +2780,13 @@ "id": 7, "name": "symbol", "nodeType": "VariableDeclaration", - "scope": 185, + "scope": 189, "src": "90:30:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" + "typeString": "string" }, "typeName": { "id": 5, @@ -2696,7 +2795,7 @@ "src": "90:6:0", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", - "typeString": "string storage pointer" + "typeString": "string" } }, "value": { @@ -2724,13 +2823,13 @@ "id": 10, "name": "standard", "nodeType": "VariableDeclaration", - "scope": 185, + "scope": 189, "src": "126:43:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" + "typeString": "string" }, "typeName": { "id": 8, @@ -2739,7 +2838,7 @@ "src": "126:6:0", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", - "typeString": "string storage pointer" + "typeString": "string" } }, "value": { @@ -2764,11 +2863,11 @@ }, { "constant": false, - "id": 12, + "id": 13, "name": "totalSupply", "nodeType": "VariableDeclaration", - "scope": 185, - "src": "175:26:0", + "scope": 189, + "src": "175:34:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -2785,26 +2884,44 @@ "typeString": "uint256" } }, - "value": null, + "value": { + "argumentTypes": null, + "hexValue": "3735303030", + "id": 12, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "204:5:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_75000_by_1", + "typeString": "int_const 75000" + }, + "value": "75000" + }, "visibility": "public" }, { "anonymous": false, - "id": 20, + "documentation": null, + "id": 21, "name": "Transfer", "nodeType": "EventDefinition", "parameters": { - "id": 19, + "id": 20, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 14, + "id": 15, "indexed": true, "name": "_from", "nodeType": "VariableDeclaration", - "scope": 20, - "src": "232:21:0", + "scope": 21, + "src": "240:21:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2812,10 +2929,11 @@ "typeString": "address" }, "typeName": { - "id": 13, + "id": 14, "name": "address", "nodeType": "ElementaryTypeName", - "src": "232:7:0", + "src": "240:7:0", + "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2826,12 +2944,12 @@ }, { "constant": false, - "id": 16, + "id": 17, "indexed": true, "name": "_to", "nodeType": "VariableDeclaration", - "scope": 20, - "src": "263:19:0", + "scope": 21, + "src": "271:19:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2839,10 +2957,11 @@ "typeString": "address" }, "typeName": { - "id": 15, + "id": 16, "name": "address", "nodeType": "ElementaryTypeName", - "src": "263:7:0", + "src": "271:7:0", + "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2853,12 +2972,12 @@ }, { "constant": false, - "id": 18, + "id": 19, "indexed": false, "name": "_value", "nodeType": "VariableDeclaration", - "scope": 20, - "src": "292:14:0", + "scope": 21, + "src": "300:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2866,10 +2985,10 @@ "typeString": "uint256" }, "typeName": { - "id": 17, + "id": 18, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "292:7:0", + "src": "300:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2879,27 +2998,28 @@ "visibility": "internal" } ], - "src": "222:90:0" + "src": "230:90:0" }, - "src": "208:105:0" + "src": "216:105:0" }, { "anonymous": false, - "id": 28, + "documentation": null, + "id": 29, "name": "Approval", "nodeType": "EventDefinition", "parameters": { - "id": 27, + "id": 28, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 22, + "id": 23, "indexed": true, "name": "_owner", "nodeType": "VariableDeclaration", - "scope": 28, - "src": "343:22:0", + "scope": 29, + "src": "351:22:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2907,10 +3027,11 @@ "typeString": "address" }, "typeName": { - "id": 21, + "id": 22, "name": "address", "nodeType": "ElementaryTypeName", - "src": "343:7:0", + "src": "351:7:0", + "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2921,12 +3042,12 @@ }, { "constant": false, - "id": 24, + "id": 25, "indexed": true, "name": "_spender", "nodeType": "VariableDeclaration", - "scope": 28, - "src": "375:24:0", + "scope": 29, + "src": "383:24:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2934,10 +3055,11 @@ "typeString": "address" }, "typeName": { - "id": 23, + "id": 24, "name": "address", "nodeType": "ElementaryTypeName", - "src": "375:7:0", + "src": "383:7:0", + "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2948,12 +3070,12 @@ }, { "constant": false, - "id": 26, + "id": 27, "indexed": false, "name": "_value", "nodeType": "VariableDeclaration", - "scope": 28, - "src": "409:14:0", + "scope": 29, + "src": "417:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2961,10 +3083,10 @@ "typeString": "uint256" }, "typeName": { - "id": 25, + "id": 26, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "409:7:0", + "src": "417:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2974,17 +3096,17 @@ "visibility": "internal" } ], - "src": "333:96:0" + "src": "341:96:0" }, - "src": "319:111:0" + "src": "327:111:0" }, { "constant": false, - "id": 32, + "id": 33, "name": "balanceOf", "nodeType": "VariableDeclaration", - "scope": 185, - "src": "436:44:0", + "scope": 189, + "src": "444:44:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -2992,28 +3114,28 @@ "typeString": "mapping(address => uint256)" }, "typeName": { - "id": 31, + "id": 32, "keyType": { - "id": 29, + "id": 30, "name": "address", "nodeType": "ElementaryTypeName", - "src": "444:7:0", + "src": "452:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", - "src": "436:27:0", + "src": "444:27:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "valueType": { - "id": 30, + "id": 31, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "455:7:0", + "src": "463:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3025,11 +3147,11 @@ }, { "constant": false, - "id": 38, + "id": 39, "name": "allowance", "nodeType": "VariableDeclaration", - "scope": 185, - "src": "486:64:0", + "scope": 189, + "src": "494:64:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -3037,46 +3159,46 @@ "typeString": "mapping(address => mapping(address => uint256))" }, "typeName": { - "id": 37, + "id": 38, "keyType": { - "id": 33, + "id": 34, "name": "address", "nodeType": "ElementaryTypeName", - "src": "494:7:0", + "src": "502:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", - "src": "486:47:0", + "src": "494:47:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", "typeString": "mapping(address => mapping(address => uint256))" }, "valueType": { - "id": 36, + "id": 37, "keyType": { - "id": 34, + "id": 35, "name": "address", "nodeType": "ElementaryTypeName", - "src": "513:7:0", + "src": "521:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", - "src": "505:27:0", + "src": "513:27:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "valueType": { - "id": 35, + "id": 36, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "524:7:0", + "src": "532:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3089,14 +3211,14 @@ }, { "body": { - "id": 54, + "id": 55, "nodeType": "Block", - "src": "608:93:0", + "src": "609:93:0", "statements": [ { "expression": { "argumentTypes": null, - "id": 48, + "id": 49, "isConstant": false, "isLValue": false, "isPure": false, @@ -3105,34 +3227,34 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 43, + "id": 44, "name": "balanceOf", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 32, - "src": "618:9:0", + "referencedDeclaration": 33, + "src": "619:9:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, - "id": 46, + "id": 47, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 44, + "id": 45, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 338, - "src": "628:3:0", + "referencedDeclaration": 417, + "src": "629:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 45, + "id": 46, "isConstant": false, "isLValue": false, "isPure": false, @@ -3140,10 +3262,10 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "628:10:0", + "src": "629:10:0", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" } }, "isConstant": false, @@ -3151,7 +3273,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "618:21:0", + "src": "619:21:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3161,43 +3283,43 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 47, + "id": 48, "name": "_initialSupply", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 40, - "src": "642:14:0", + "referencedDeclaration": 41, + "src": "643:14:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "618:38:0", + "src": "619:38:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 49, + "id": 50, "nodeType": "ExpressionStatement", - "src": "618:38:0" + "src": "619:38:0" }, { "expression": { "argumentTypes": null, - "id": 52, + "id": 53, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 50, + "id": 51, "name": "totalSupply", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 12, - "src": "666:11:0", + "referencedDeclaration": 13, + "src": "667:11:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3207,47 +3329,47 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 51, + "id": 52, "name": "_initialSupply", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 40, - "src": "680:14:0", + "referencedDeclaration": 41, + "src": "681:14:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "666:28:0", + "src": "667:28:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 53, + "id": 54, "nodeType": "ExpressionStatement", - "src": "666:28:0" + "src": "667:28:0" } ] }, - "id": 55, + "documentation": null, + "id": 56, "implemented": true, - "isConstructor": true, - "isDeclaredConst": false, + "kind": "constructor", "modifiers": [], - "name": "DappToken", + "name": "", "nodeType": "FunctionDefinition", "parameters": { - "id": 41, + "id": 42, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 40, + "id": 41, "name": "_initialSupply", "nodeType": "VariableDeclaration", - "scope": 55, - "src": "577:22:0", + "scope": 56, + "src": "578:22:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3255,10 +3377,10 @@ "typeString": "uint256" }, "typeName": { - "id": 39, + "id": 40, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "577:7:0", + "src": "578:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3268,26 +3390,25 @@ "visibility": "internal" } ], - "src": "576:24:0" + "src": "577:24:0" }, - "payable": false, "returnParameters": { - "id": 42, + "id": 43, "nodeType": "ParameterList", "parameters": [], - "src": "608:0:0" + "src": "609:0:0" }, - "scope": 185, - "src": "557:144:0", + "scope": 189, + "src": "565:137:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { - "id": 95, + "id": 97, "nodeType": "Block", - "src": "784:199:0", + "src": "785:235:0", "statements": [ { "expression": { @@ -3299,7 +3420,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 70, + "id": 71, "isConstant": false, "isLValue": false, "isPure": false, @@ -3308,34 +3429,34 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 65, + "id": 66, "name": "balanceOf", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 32, - "src": "802:9:0", + "referencedDeclaration": 33, + "src": "803:9:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, - "id": 68, + "id": 69, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 66, + "id": 67, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 338, - "src": "812:3:0", + "referencedDeclaration": 417, + "src": "813:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 67, + "id": 68, "isConstant": false, "isLValue": false, "isPure": false, @@ -3343,10 +3464,10 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "812:10:0", + "src": "813:10:0", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" } }, "isConstant": false, @@ -3354,7 +3475,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "802:21:0", + "src": "803:21:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3364,22 +3485,40 @@ "operator": ">=", "rightExpression": { "argumentTypes": null, - "id": 69, + "id": 70, "name": "_value", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 59, - "src": "827:6:0", + "referencedDeclaration": 60, + "src": "828:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "802:31:0", + "src": "803:31:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } + }, + { + "argumentTypes": null, + "hexValue": "496e73756666696369656e742073656e6465722062616c616e6365", + "id": 72, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "836:29:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_1ccddadcbe58aa190041ac0bb26346fba1c48c4516a1033345ea31ec16cb1d95", + "typeString": "literal_string \"Insufficient sender balance\"" + }, + "value": "Insufficient sender balance" } ], "expression": { @@ -3387,20 +3526,27 @@ { "typeIdentifier": "t_bool", "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_1ccddadcbe58aa190041ac0bb26346fba1c48c4516a1033345ea31ec16cb1d95", + "typeString": "literal_string \"Insufficient sender balance\"" } ], - "id": 64, + "id": 65, "name": "require", "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 341, - "src": "794:7:0", + "overloadedDeclarations": [ + 420, + 421 + ], + "referencedDeclaration": 421, + "src": "795:7:0", "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" } }, - "id": 71, + "id": 73, "isConstant": false, "isLValue": false, "isPure": false, @@ -3408,20 +3554,20 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "794:40:0", + "src": "795:71:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 72, + "id": 74, "nodeType": "ExpressionStatement", - "src": "794:40:0" + "src": "795:71:0" }, { "expression": { "argumentTypes": null, - "id": 78, + "id": 80, "isConstant": false, "isLValue": false, "isPure": false, @@ -3430,34 +3576,34 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 73, + "id": 75, "name": "balanceOf", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 32, - "src": "845:9:0", + "referencedDeclaration": 33, + "src": "877:9:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, - "id": 76, + "id": 78, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 74, + "id": 76, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 338, - "src": "855:3:0", + "referencedDeclaration": 417, + "src": "887:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 75, + "id": 77, "isConstant": false, "isLValue": false, "isPure": false, @@ -3465,10 +3611,10 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "855:10:0", + "src": "887:10:0", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" } }, "isConstant": false, @@ -3476,7 +3622,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "845:21:0", + "src": "877:21:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3486,31 +3632,31 @@ "operator": "-=", "rightHandSide": { "argumentTypes": null, - "id": 77, + "id": 79, "name": "_value", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 59, - "src": "870:6:0", + "referencedDeclaration": 60, + "src": "902:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "845:31:0", + "src": "877:31:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 79, + "id": 81, "nodeType": "ExpressionStatement", - "src": "845:31:0" + "src": "877:31:0" }, { "expression": { "argumentTypes": null, - "id": 84, + "id": 86, "isConstant": false, "isLValue": false, "isPure": false, @@ -3519,26 +3665,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 80, + "id": 82, "name": "balanceOf", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 32, - "src": "886:9:0", + "referencedDeclaration": 33, + "src": "918:9:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, - "id": 82, + "id": 84, "indexExpression": { "argumentTypes": null, - "id": 81, + "id": 83, "name": "_to", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 57, - "src": "896:3:0", + "referencedDeclaration": 58, + "src": "928:3:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -3549,7 +3695,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "886:14:0", + "src": "918:14:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3559,47 +3705,47 @@ "operator": "+=", "rightHandSide": { "argumentTypes": null, - "id": 83, + "id": 85, "name": "_value", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 59, - "src": "904:6:0", + "referencedDeclaration": 60, + "src": "936:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "886:24:0", + "src": "918:24:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 85, + "id": 87, "nodeType": "ExpressionStatement", - "src": "886:24:0" + "src": "918:24:0" }, { - "expression": { + "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 87, + "id": 89, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 338, - "src": "930:3:0", + "referencedDeclaration": 417, + "src": "967:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 88, + "id": 90, "isConstant": false, "isLValue": false, "isPure": false, @@ -3607,20 +3753,20 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "930:10:0", + "src": "967:10:0", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" } }, { "argumentTypes": null, - "id": 89, + "id": 91, "name": "_to", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 57, - "src": "942:3:0", + "referencedDeclaration": 58, + "src": "979:3:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -3628,12 +3774,12 @@ }, { "argumentTypes": null, - "id": 90, + "id": 92, "name": "_value", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 59, - "src": "947:6:0", + "referencedDeclaration": 60, + "src": "984:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3643,8 +3789,8 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" }, { "typeIdentifier": "t_address", @@ -3655,18 +3801,18 @@ "typeString": "uint256" } ], - "id": 86, + "id": 88, "name": "Transfer", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "921:8:0", + "referencedDeclaration": 21, + "src": "958:8:0", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256)" } }, - "id": 91, + "id": 93, "isConstant": false, "isLValue": false, "isPure": false, @@ -3674,28 +3820,28 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "921:33:0", + "src": "958:33:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 92, - "nodeType": "ExpressionStatement", - "src": "921:33:0" + "id": 94, + "nodeType": "EmitStatement", + "src": "953:38:0" }, { "expression": { "argumentTypes": null, "hexValue": "74727565", - "id": 93, + "id": 95, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "972:4:0", + "src": "1009:4:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -3703,31 +3849,31 @@ }, "value": "true" }, - "functionReturnParameters": 63, - "id": 94, + "functionReturnParameters": 64, + "id": 96, "nodeType": "Return", - "src": "965:11:0" + "src": "1002:11:0" } ] }, - "id": 96, + "documentation": null, + "id": 98, "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, + "kind": "function", "modifiers": [], "name": "transfer", "nodeType": "FunctionDefinition", "parameters": { - "id": 60, + "id": 61, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 57, + "id": 58, "name": "_to", "nodeType": "VariableDeclaration", - "scope": 96, - "src": "725:11:0", + "scope": 98, + "src": "726:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3735,10 +3881,11 @@ "typeString": "address" }, "typeName": { - "id": 56, + "id": 57, "name": "address", "nodeType": "ElementaryTypeName", - "src": "725:7:0", + "src": "726:7:0", + "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -3749,11 +3896,11 @@ }, { "constant": false, - "id": 59, + "id": 60, "name": "_value", "nodeType": "VariableDeclaration", - "scope": 96, - "src": "738:14:0", + "scope": 98, + "src": "739:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3761,10 +3908,10 @@ "typeString": "uint256" }, "typeName": { - "id": 58, + "id": 59, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "738:7:0", + "src": "739:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3774,20 +3921,19 @@ "visibility": "internal" } ], - "src": "724:29:0" + "src": "725:29:0" }, - "payable": false, "returnParameters": { - "id": 63, + "id": 64, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 62, + "id": 63, "name": "success", "nodeType": "VariableDeclaration", - "scope": 96, - "src": "770:12:0", + "scope": 98, + "src": "771:12:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3795,10 +3941,10 @@ "typeString": "bool" }, "typeName": { - "id": 61, + "id": 62, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "770:4:0", + "src": "771:4:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -3808,24 +3954,24 @@ "visibility": "internal" } ], - "src": "769:14:0" + "src": "770:14:0" }, - "scope": 185, - "src": "707:276:0", + "scope": 189, + "src": "708:312:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { - "id": 123, + "id": 125, "nodeType": "Block", - "src": "1070:128:0", + "src": "1107:133:0", "statements": [ { "expression": { "argumentTypes": null, - "id": 112, + "id": 114, "isConstant": false, "isLValue": false, "isPure": false, @@ -3836,34 +3982,34 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 105, + "id": 107, "name": "allowance", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 38, - "src": "1080:9:0", + "referencedDeclaration": 39, + "src": "1117:9:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", "typeString": "mapping(address => mapping(address => uint256))" } }, - "id": 109, + "id": 111, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 106, + "id": 108, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 338, - "src": "1090:3:0", + "referencedDeclaration": 417, + "src": "1127:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 107, + "id": 109, "isConstant": false, "isLValue": false, "isPure": false, @@ -3871,10 +4017,10 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "1090:10:0", + "src": "1127:10:0", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" } }, "isConstant": false, @@ -3882,21 +4028,21 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "1080:21:0", + "src": "1117:21:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, - "id": 110, + "id": 112, "indexExpression": { "argumentTypes": null, - "id": 108, + "id": 110, "name": "_spender", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 98, - "src": "1102:8:0", + "referencedDeclaration": 100, + "src": "1139:8:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -3907,7 +4053,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "1080:31:0", + "src": "1117:31:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3917,47 +4063,47 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 111, + "id": 113, "name": "_value", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 100, - "src": "1114:6:0", + "referencedDeclaration": 102, + "src": "1151:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "1080:40:0", + "src": "1117:40:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 113, + "id": 115, "nodeType": "ExpressionStatement", - "src": "1080:40:0" + "src": "1117:40:0" }, { - "expression": { + "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 115, + "id": 117, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 338, - "src": "1140:3:0", + "referencedDeclaration": 417, + "src": "1182:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 116, + "id": 118, "isConstant": false, "isLValue": false, "isPure": false, @@ -3965,20 +4111,20 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "1140:10:0", + "src": "1182:10:0", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" } }, { "argumentTypes": null, - "id": 117, + "id": 119, "name": "_spender", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 98, - "src": "1152:8:0", + "referencedDeclaration": 100, + "src": "1194:8:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -3986,12 +4132,12 @@ }, { "argumentTypes": null, - "id": 118, + "id": 120, "name": "_value", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 100, - "src": "1162:6:0", + "referencedDeclaration": 102, + "src": "1204:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4001,8 +4147,8 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" }, { "typeIdentifier": "t_address", @@ -4013,18 +4159,18 @@ "typeString": "uint256" } ], - "id": 114, + "id": 116, "name": "Approval", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 28, - "src": "1131:8:0", + "referencedDeclaration": 29, + "src": "1173:8:0", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256)" } }, - "id": 119, + "id": 121, "isConstant": false, "isLValue": false, "isPure": false, @@ -4032,28 +4178,28 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1131:38:0", + "src": "1173:38:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 120, - "nodeType": "ExpressionStatement", - "src": "1131:38:0" + "id": 122, + "nodeType": "EmitStatement", + "src": "1168:43:0" }, { "expression": { "argumentTypes": null, "hexValue": "74727565", - "id": 121, + "id": 123, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "1187:4:0", + "src": "1229:4:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -4061,31 +4207,31 @@ }, "value": "true" }, - "functionReturnParameters": 104, - "id": 122, + "functionReturnParameters": 106, + "id": 124, "nodeType": "Return", - "src": "1180:11:0" + "src": "1222:11:0" } ] }, - "id": 124, + "documentation": null, + "id": 126, "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, + "kind": "function", "modifiers": [], "name": "approve", "nodeType": "FunctionDefinition", "parameters": { - "id": 101, + "id": 103, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 98, + "id": 100, "name": "_spender", "nodeType": "VariableDeclaration", - "scope": 124, - "src": "1006:16:0", + "scope": 126, + "src": "1043:16:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4093,10 +4239,11 @@ "typeString": "address" }, "typeName": { - "id": 97, + "id": 99, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1006:7:0", + "src": "1043:7:0", + "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -4107,11 +4254,11 @@ }, { "constant": false, - "id": 100, + "id": 102, "name": "_value", "nodeType": "VariableDeclaration", - "scope": 124, - "src": "1024:14:0", + "scope": 126, + "src": "1061:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4119,10 +4266,10 @@ "typeString": "uint256" }, "typeName": { - "id": 99, + "id": 101, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1024:7:0", + "src": "1061:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4132,20 +4279,19 @@ "visibility": "internal" } ], - "src": "1005:34:0" + "src": "1042:34:0" }, - "payable": false, "returnParameters": { - "id": 104, + "id": 106, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 103, + "id": 105, "name": "success", "nodeType": "VariableDeclaration", - "scope": 124, - "src": "1056:12:0", + "scope": 126, + "src": "1093:12:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4153,10 +4299,10 @@ "typeString": "bool" }, "typeName": { - "id": 102, + "id": 104, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "1056:4:0", + "src": "1093:4:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -4166,19 +4312,19 @@ "visibility": "internal" } ], - "src": "1055:14:0" + "src": "1092:14:0" }, - "scope": 185, - "src": "989:209:0", + "scope": 189, + "src": "1026:214:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { - "id": 183, + "id": 187, "nodeType": "Block", - "src": "1300:290:0", + "src": "1342:369:0", "statements": [ { "expression": { @@ -4190,19 +4336,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 140, + "id": 142, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 136, + "id": 138, "name": "_value", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 130, - "src": "1318:6:0", + "referencedDeclaration": 132, + "src": "1360:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4214,26 +4360,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 137, + "id": 139, "name": "balanceOf", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 32, - "src": "1328:9:0", + "referencedDeclaration": 33, + "src": "1370:9:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, - "id": 139, + "id": 141, "indexExpression": { "argumentTypes": null, - "id": 138, + "id": 140, "name": "_from", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "1338:5:0", + "referencedDeclaration": 128, + "src": "1380:5:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -4244,17 +4390,35 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "1328:16:0", + "src": "1370:16:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "1318:26:0", + "src": "1360:26:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } + }, + { + "argumentTypes": null, + "hexValue": "416d6f756e742073686f756c64206e6f74206578636565642062616c616e6365", + "id": 143, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1388:34:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_bd9fa506568f5d4f11200d1bdf8a45f2b89b5395fe0187334c36ea4234ab9e23", + "typeString": "literal_string \"Amount should not exceed balance\"" + }, + "value": "Amount should not exceed balance" } ], "expression": { @@ -4262,20 +4426,27 @@ { "typeIdentifier": "t_bool", "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_bd9fa506568f5d4f11200d1bdf8a45f2b89b5395fe0187334c36ea4234ab9e23", + "typeString": "literal_string \"Amount should not exceed balance\"" } ], - "id": 135, + "id": 137, "name": "require", "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 341, - "src": "1310:7:0", + "overloadedDeclarations": [ + 420, + 421 + ], + "referencedDeclaration": 421, + "src": "1352:7:0", "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" } }, - "id": 141, + "id": 144, "isConstant": false, "isLValue": false, "isPure": false, @@ -4283,15 +4454,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1310:35:0", + "src": "1352:71:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 142, + "id": 145, "nodeType": "ExpressionStatement", - "src": "1310:35:0" + "src": "1352:71:0" }, { "expression": { @@ -4303,19 +4474,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 151, + "id": 154, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 144, + "id": 147, "name": "_value", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 130, - "src": "1363:6:0", + "referencedDeclaration": 132, + "src": "1441:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4329,26 +4500,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 145, + "id": 148, "name": "allowance", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 38, - "src": "1373:9:0", + "referencedDeclaration": 39, + "src": "1451:9:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", "typeString": "mapping(address => mapping(address => uint256))" } }, - "id": 147, + "id": 150, "indexExpression": { "argumentTypes": null, - "id": 146, + "id": 149, "name": "_from", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "1383:5:0", + "referencedDeclaration": 128, + "src": "1461:5:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -4359,29 +4530,29 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "1373:16:0", + "src": "1451:16:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, - "id": 150, + "id": 153, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 148, + "id": 151, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 338, - "src": "1390:3:0", + "referencedDeclaration": 417, + "src": "1468:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 149, + "id": 152, "isConstant": false, "isLValue": false, "isPure": false, @@ -4389,10 +4560,10 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "1390:10:0", + "src": "1468:10:0", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" } }, "isConstant": false, @@ -4400,17 +4571,35 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "1373:28:0", + "src": "1451:28:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "1363:38:0", + "src": "1441:38:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } + }, + { + "argumentTypes": null, + "hexValue": "416d6f756e742073686f756c64206e6f742065786365656420616c6c6f77616e6365", + "id": 155, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1481:36:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_889d018defc5657dbf72d972831fcaf8cc8e8c7064f2597d639163ef61329f1a", + "typeString": "literal_string \"Amount should not exceed allowance\"" + }, + "value": "Amount should not exceed allowance" } ], "expression": { @@ -4418,20 +4607,27 @@ { "typeIdentifier": "t_bool", "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_889d018defc5657dbf72d972831fcaf8cc8e8c7064f2597d639163ef61329f1a", + "typeString": "literal_string \"Amount should not exceed allowance\"" } ], - "id": 143, + "id": 146, "name": "require", "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 341, - "src": "1355:7:0", + "overloadedDeclarations": [ + 420, + 421 + ], + "referencedDeclaration": 421, + "src": "1433:7:0", "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" } }, - "id": 152, + "id": 156, "isConstant": false, "isLValue": false, "isPure": false, @@ -4439,20 +4635,20 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1355:47:0", + "src": "1433:85:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 153, + "id": 157, "nodeType": "ExpressionStatement", - "src": "1355:47:0" + "src": "1433:85:0" }, { "expression": { "argumentTypes": null, - "id": 158, + "id": 162, "isConstant": false, "isLValue": false, "isPure": false, @@ -4461,26 +4657,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 154, + "id": 158, "name": "balanceOf", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 32, - "src": "1413:9:0", + "referencedDeclaration": 33, + "src": "1529:9:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, - "id": 156, + "id": 160, "indexExpression": { "argumentTypes": null, - "id": 155, + "id": 159, "name": "_from", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "1423:5:0", + "referencedDeclaration": 128, + "src": "1539:5:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -4491,7 +4687,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "1413:16:0", + "src": "1529:16:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4501,31 +4697,31 @@ "operator": "-=", "rightHandSide": { "argumentTypes": null, - "id": 157, + "id": 161, "name": "_value", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 130, - "src": "1433:6:0", + "referencedDeclaration": 132, + "src": "1549:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "1413:26:0", + "src": "1529:26:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 159, + "id": 163, "nodeType": "ExpressionStatement", - "src": "1413:26:0" + "src": "1529:26:0" }, { "expression": { "argumentTypes": null, - "id": 164, + "id": 168, "isConstant": false, "isLValue": false, "isPure": false, @@ -4534,26 +4730,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 160, + "id": 164, "name": "balanceOf", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 32, - "src": "1449:9:0", + "referencedDeclaration": 33, + "src": "1565:9:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, - "id": 162, + "id": 166, "indexExpression": { "argumentTypes": null, - "id": 161, + "id": 165, "name": "_to", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 128, - "src": "1459:3:0", + "referencedDeclaration": 130, + "src": "1575:3:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -4564,7 +4760,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "1449:14:0", + "src": "1565:14:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4574,31 +4770,31 @@ "operator": "+=", "rightHandSide": { "argumentTypes": null, - "id": 163, + "id": 167, "name": "_value", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 130, - "src": "1467:6:0", + "referencedDeclaration": 132, + "src": "1583:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "1449:24:0", + "src": "1565:24:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 165, + "id": 169, "nodeType": "ExpressionStatement", - "src": "1449:24:0" + "src": "1565:24:0" }, { "expression": { "argumentTypes": null, - "id": 173, + "id": 177, "isConstant": false, "isLValue": false, "isPure": false, @@ -4609,26 +4805,26 @@ "argumentTypes": null, "baseExpression": { "argumentTypes": null, - "id": 166, + "id": 170, "name": "allowance", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 38, - "src": "1484:9:0", + "referencedDeclaration": 39, + "src": "1600:9:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", "typeString": "mapping(address => mapping(address => uint256))" } }, - "id": 170, + "id": 174, "indexExpression": { "argumentTypes": null, - "id": 167, + "id": 171, "name": "_from", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "1494:5:0", + "referencedDeclaration": 128, + "src": "1610:5:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -4639,29 +4835,29 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "1484:16:0", + "src": "1600:16:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, - "id": 171, + "id": 175, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 168, + "id": 172, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 338, - "src": "1501:3:0", + "referencedDeclaration": 417, + "src": "1617:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 169, + "id": 173, "isConstant": false, "isLValue": false, "isPure": false, @@ -4669,10 +4865,10 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "1501:10:0", + "src": "1617:10:0", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" } }, "isConstant": false, @@ -4680,7 +4876,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "1484:28:0", + "src": "1600:28:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4690,39 +4886,39 @@ "operator": "-=", "rightHandSide": { "argumentTypes": null, - "id": 172, + "id": 176, "name": "_value", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 130, - "src": "1516:6:0", + "referencedDeclaration": 132, + "src": "1632:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "1484:38:0", + "src": "1600:38:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 174, + "id": 178, "nodeType": "ExpressionStatement", - "src": "1484:38:0" + "src": "1600:38:0" }, { - "expression": { + "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, - "id": 176, + "id": 180, "name": "_from", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 126, - "src": "1542:5:0", + "referencedDeclaration": 128, + "src": "1663:5:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -4730,12 +4926,12 @@ }, { "argumentTypes": null, - "id": 177, + "id": 181, "name": "_to", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 128, - "src": "1549:3:0", + "referencedDeclaration": 130, + "src": "1670:3:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -4743,12 +4939,12 @@ }, { "argumentTypes": null, - "id": 178, + "id": 182, "name": "_value", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 130, - "src": "1554:6:0", + "referencedDeclaration": 132, + "src": "1675:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4770,18 +4966,18 @@ "typeString": "uint256" } ], - "id": 175, + "id": 179, "name": "Transfer", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "1533:8:0", + "referencedDeclaration": 21, + "src": "1654:8:0", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256)" } }, - "id": 179, + "id": 183, "isConstant": false, "isLValue": false, "isPure": false, @@ -4789,28 +4985,28 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1533:28:0", + "src": "1654:28:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 180, - "nodeType": "ExpressionStatement", - "src": "1533:28:0" + "id": 184, + "nodeType": "EmitStatement", + "src": "1649:33:0" }, { "expression": { "argumentTypes": null, "hexValue": "74727565", - "id": 181, + "id": 185, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "1579:4:0", + "src": "1700:4:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -4818,31 +5014,31 @@ }, "value": "true" }, - "functionReturnParameters": 134, - "id": 182, + "functionReturnParameters": 136, + "id": 186, "nodeType": "Return", - "src": "1572:11:0" + "src": "1693:11:0" } ] }, - "id": 184, + "documentation": null, + "id": 188, "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, + "kind": "function", "modifiers": [], "name": "transferFrom", "nodeType": "FunctionDefinition", "parameters": { - "id": 131, + "id": 133, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 126, + "id": 128, "name": "_from", "nodeType": "VariableDeclaration", - "scope": 184, - "src": "1226:13:0", + "scope": 188, + "src": "1268:13:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4850,10 +5046,11 @@ "typeString": "address" }, "typeName": { - "id": 125, + "id": 127, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1226:7:0", + "src": "1268:7:0", + "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -4864,11 +5061,11 @@ }, { "constant": false, - "id": 128, + "id": 130, "name": "_to", "nodeType": "VariableDeclaration", - "scope": 184, - "src": "1241:11:0", + "scope": 188, + "src": "1283:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4876,10 +5073,11 @@ "typeString": "address" }, "typeName": { - "id": 127, + "id": 129, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1241:7:0", + "src": "1283:7:0", + "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -4890,11 +5088,11 @@ }, { "constant": false, - "id": 130, + "id": 132, "name": "_value", "nodeType": "VariableDeclaration", - "scope": 184, - "src": "1254:14:0", + "scope": 188, + "src": "1296:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4902,10 +5100,10 @@ "typeString": "uint256" }, "typeName": { - "id": 129, + "id": 131, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1254:7:0", + "src": "1296:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4915,20 +5113,19 @@ "visibility": "internal" } ], - "src": "1225:44:0" + "src": "1267:44:0" }, - "payable": false, "returnParameters": { - "id": 134, + "id": 136, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 133, + "id": 135, "name": "success", "nodeType": "VariableDeclaration", - "scope": 184, - "src": "1286:12:0", + "scope": 188, + "src": "1328:12:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4936,10 +5133,10 @@ "typeString": "bool" }, "typeName": { - "id": 132, + "id": 134, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "1286:4:0", + "src": "1328:4:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -4949,24 +5146,24 @@ "visibility": "internal" } ], - "src": "1285:14:0" + "src": "1327:14:0" }, - "scope": 185, - "src": "1204:386:0", + "scope": 189, + "src": "1246:465:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" } ], - "scope": 186, - "src": "25:1567:0" + "scope": 190, + "src": "25:1688:0" } ], - "src": "0:1593:0" + "src": "0:1714:0" }, "compiler": { "name": "solc", - "version": "0.4.19+commit.c4cbbb05.Emscripten.clang" + "version": "0.5.0+commit.1d4f565a.Emscripten.clang" }, "networks": { "4": { @@ -4985,8 +5182,62 @@ "links": {}, "address": "0x98d9c94d4fb96201704b2de0a5a65cd9c98eea04", "transactionHash": "0x3da01c66fa3105e6e941bedbf46b79fdee4ac87089d3f85ac4a763e2e83e4348" + }, + "1557694405500": { + "events": {}, + "links": {}, + "address": "0xc3073d1eB4E084234477713cE6214DAB94094529", + "transactionHash": "0x96368ed186a7842cbfef784c909fc72fcc60500479eb6bc7458883ede0620fea" + }, + "1557708358626": { + "events": {}, + "links": {}, + "address": "0x691c81C8FEf62B9F541bD2ABD538616A9f0c3F91", + "transactionHash": "0xff3883d5dd4c77536ffbfe095f022b38f60cbdb75179469b45aed7f2d74e5c60" + }, + "1557709240444": { + "events": {}, + "links": {}, + "address": "0x0245268F16784C17065C1AF8198b4722A6616d1a", + "transactionHash": "0x722f79c74b99ff6d2d40fb09f33ea16cea6bd184fe49af562ce9260b863ffa80" + }, + "1557709597422": { + "events": {}, + "links": {}, + "address": "0x96A8F1675558fC803933F7E1c981F3BeD6574109", + "transactionHash": "0xd221e8d5548356693176cf112e16088001bb987985e955fc94f1312880a09dc9" + }, + "1557710076986": { + "events": {}, + "links": {}, + "address": "0xEf51c0d582388c9E9F409FDd7007b540DFE81416", + "transactionHash": "0x6e456afdb1698c61626be4b6432b86a67d526d8508fa3780405b4f019d485bd5" + }, + "1557716539833": { + "events": {}, + "links": {}, + "address": "0xEe6Cd83E88CA71fF682aad37BDAEfD004fc5Dce3", + "transactionHash": "0x0f5c3bc8485c0f2532d1782af86d2d74e91e82a0255668a9080f84dfae847c90" + }, + "1557717234947": { + "events": {}, + "links": {}, + "address": "0xd0Cb50b55301B32B67A60391B59D9b970b9fA5F6", + "transactionHash": "0xa228aacf5cacc14c26c3229cfb1739a1765a5960e7e946bceb45f2fa82ee65cd" + }, + "1557719154648": { + "events": {}, + "links": {}, + "address": "0x56903715894c14DF115a5Ced8f2CABf9A3f15d3A", + "transactionHash": "0x0fa9c659124404572db84bbce0c9d115e86caa4a80ddbc13899c666b66570711" } }, - "schemaVersion": "2.0.0", - "updatedAt": "2018-05-23T03:26:45.857Z" + "schemaVersion": "3.0.6", + "updatedAt": "2019-05-13T04:58:55.094Z", + "devdoc": { + "methods": {} + }, + "userdoc": { + "methods": {} + } } \ No newline at end of file diff --git a/build/contracts/DappTokenSale.json b/build/contracts/DappTokenSale.json index 3aea37fc6..62438c036 100644 --- a/build/contracts/DappTokenSale.json +++ b/build/contracts/DappTokenSale.json @@ -75,6 +75,18 @@ "name": "Sell", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "_totalAmountSold", + "type": "uint256" + } + ], + "name": "EndSale", + "type": "event" + }, { "constant": false, "inputs": [ @@ -99,40 +111,41 @@ "type": "function" } ], - "bytecode": "0x6060604052341561000f57600080fd5b6040516040806107e183398101604052808051906020019091908051906020019091905050336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550806002819055505050610714806100cd6000396000f30060606040526004361061006d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680633610724e14610072578063380d831b1461008a578063518ab2a81461009f57806355a373d6146100c85780637ff9b5961461011d575b600080fd5b6100886004808035906020019091905050610146565b005b341561009557600080fd5b61009d6103be565b005b34156100aa57600080fd5b6100b2610686565b6040518082815260200191505060405180910390f35b34156100d357600080fd5b6100db61068c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561012857600080fd5b6101306106b2565b6040518082815260200191505060405180910390f35b610152816002546106b8565b3414151561015f57600080fd5b80600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b151561022557600080fd5b6102c65a03f1151561023657600080fd5b505050604051805190501015151561024d57600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b151561031a57600080fd5b6102c65a03f1151561032b57600080fd5b50505060405180519050151561034057600080fd5b806003600082825401925050819055507f5e5e995ce3133561afceaa51a9a154d5db228cd7525d34df5185582c18d3df093382604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a150565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561041957600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b151561053e57600080fd5b6102c65a03f1151561054f57600080fd5b505050604051805190506000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15156105e657600080fd5b6102c65a03f115156105f757600080fd5b50505060405180519050151561060c57600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f19350505050151561068457600080fd5b565b60035481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60025481565b6000808214806106d7575082828385029250828115156106d457fe5b04145b15156106e257600080fd5b929150505600a165627a7a72305820a3f9763a4bc356779f7b3121c750f15f14e758e6e91cca9ec2fd2a9a47ce9ef40029", - "deployedBytecode": "0x60606040526004361061006d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680633610724e14610072578063380d831b1461008a578063518ab2a81461009f57806355a373d6146100c85780637ff9b5961461011d575b600080fd5b6100886004808035906020019091905050610146565b005b341561009557600080fd5b61009d6103be565b005b34156100aa57600080fd5b6100b2610686565b6040518082815260200191505060405180910390f35b34156100d357600080fd5b6100db61068c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561012857600080fd5b6101306106b2565b6040518082815260200191505060405180910390f35b610152816002546106b8565b3414151561015f57600080fd5b80600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b151561022557600080fd5b6102c65a03f1151561023657600080fd5b505050604051805190501015151561024d57600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b151561031a57600080fd5b6102c65a03f1151561032b57600080fd5b50505060405180519050151561034057600080fd5b806003600082825401925050819055507f5e5e995ce3133561afceaa51a9a154d5db228cd7525d34df5185582c18d3df093382604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a150565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561041957600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b151561053e57600080fd5b6102c65a03f1151561054f57600080fd5b505050604051805190506000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15156105e657600080fd5b6102c65a03f115156105f757600080fd5b50505060405180519050151561060c57600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f19350505050151561068457600080fd5b565b60035481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60025481565b6000808214806106d7575082828385029250828115156106d457fe5b04145b15156106e257600080fd5b929150505600a165627a7a72305820a3f9763a4bc356779f7b3121c750f15f14e758e6e91cca9ec2fd2a9a47ce9ef40029", - "sourceMap": "52:1183:1:-;;;249:186;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;344:10;336:5;;:18;;;;;;;;;;;;;;;;;;380:14;364:13;;:30;;;;;;;;;;;;;;;;;;417:11;404:10;:24;;;;249:186;;52:1183;;;;;;", - "deployedSourceMap": "52:1183:1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;568:356;;;;;;;;;;;;;;;;;;930:303;;;;;;;;;;;;;;167:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;100:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;136:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;568:356;658:37;667:15;684:10;;658:8;:37::i;:::-;645:9;:50;637:59;;;;;;;;747:15;714:13;;;;;;;;;;;:23;;;738:4;714:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:48;;706:57;;;;;;;;781:13;;;;;;;;;;;:22;;;804:10;816:15;781:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;773:60;;;;;;;;858:15;844:10;;:29;;;;;;;;;;;884:33;889:10;901:15;884:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;568:356;:::o;930:303::-;988:5;;;;;;;;;;;974:19;;:10;:19;;;966:28;;;;;;;;1012:13;;;;;;;;;;;:22;;;1035:5;;;;;;;;;;;1042:13;;;;;;;;;;;:23;;;1066:4;1042:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1012:60;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1004:69;;;;;;;;1189:5;;;;;;;;;;;:14;;:37;1212:4;1204:21;;;1189:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;930:303::o;167:25::-;;;;:::o;100:30::-;;;;;;;;;;;;;:::o;136:25::-;;;;:::o;441:121::-;498:6;529:1;524;:6;:30;;;;553:1;548;543;539;:5;535:9;;;534:15;;;;;;;;:20;524:30;516:39;;;;;;;;441:121;;;;:::o", - "source": "pragma solidity ^0.4.2;\n\nimport \"./DappToken.sol\";\n\ncontract DappTokenSale {\n address admin;\n DappToken public tokenContract;\n uint256 public tokenPrice;\n uint256 public tokensSold;\n\n event Sell(address _buyer, uint256 _amount);\n\n function DappTokenSale(DappToken _tokenContract, uint256 _tokenPrice) public {\n admin = msg.sender;\n tokenContract = _tokenContract;\n tokenPrice = _tokenPrice;\n }\n\n function multiply(uint x, uint y) internal pure returns (uint z) {\n require(y == 0 || (z = x * y) / y == x);\n }\n\n function buyTokens(uint256 _numberOfTokens) public payable {\n require(msg.value == multiply(_numberOfTokens, tokenPrice));\n require(tokenContract.balanceOf(this) >= _numberOfTokens);\n require(tokenContract.transfer(msg.sender, _numberOfTokens));\n\n tokensSold += _numberOfTokens;\n\n Sell(msg.sender, _numberOfTokens);\n }\n\n function endSale() public {\n require(msg.sender == admin);\n require(tokenContract.transfer(admin, tokenContract.balanceOf(this)));\n\n // UPDATE: Let's not destroy the contract here\n // Just transfer the balance to the admin\n admin.transfer(address(this).balance);\n }\n}\n", - "sourcePath": "/Users/gregory/code/token_sale/contracts/DappTokenSale.sol", + "metadata": "{\"compiler\":{\"version\":\"0.5.0+commit.1d4f565a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":false,\"inputs\":[{\"name\":\"_numberOfTokens\",\"type\":\"uint256\"}],\"name\":\"buyTokens\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"endSale\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"tokensSold\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"tokenContract\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"tokenPrice\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"_tokenContract\",\"type\":\"address\"},{\"name\":\"_tokenPrice\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_buyer\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"Sell\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"_totalAmountSold\",\"type\":\"uint256\"}],\"name\":\"EndSale\",\"type\":\"event\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/shayanja/projects/blockchain/token_sale/contracts/DappTokenSale.sol\":\"DappTokenSale\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/shayanja/projects/blockchain/token_sale/contracts/DappToken.sol\":{\"keccak256\":\"0x6ea42b0ee91837bc6ed4f7e5a4783a36fc97fd489c8a6ccda012d87138d5752c\",\"urls\":[\"bzzr://42fa621ea27be530632f98f9a1fb9574a56f61c100f5dfd18ef3329111f20d8e\"]},\"/Users/shayanja/projects/blockchain/token_sale/contracts/DappTokenSale.sol\":{\"keccak256\":\"0xb4d4a731bf8e87dca64d4ce1db191624fd37abfee62ce376cb305f90ade635de\",\"urls\":[\"bzzr://05ed6cddc38616cb63ca1eaf04c7522a25bfba4dd54b82a90a99ea80a7c7166e\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50604051604080610a398339810180604052604081101561003057600080fd5b810190808051906020019092919080519060200190929190505050336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550806002819055505050610955806100e46000396000f3fe60806040526004361061006d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680633610724e14610072578063380d831b146100a0578063518ab2a8146100b757806355a373d6146100e25780637ff9b59614610139575b600080fd5b61009e6004803603602081101561008857600080fd5b8101908080359060200190929190505050610164565b005b3480156100ac57600080fd5b506100b5610591565b005b3480156100c357600080fd5b506100cc6108c7565b6040518082815260200191505060405180910390f35b3480156100ee57600080fd5b506100f76108cd565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561014557600080fd5b5061014e6108f3565b6040518082815260200191505060405180910390f35b610170816002546108f9565b3414151561020c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c8152602001807f6d73672e76616c7565206d75737420657175616c206e756d626572206f66207481526020017f6f6b656e7320696e20776569000000000000000000000000000000000000000081525060400191505060405180910390fd5b80600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156102c857600080fd5b505afa1580156102dc573d6000803e3d6000fd5b505050506040513d60208110156102f257600080fd5b81019080805190602001909291905050501015151561039f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001807f63616e6e6f74207075726368617365206d6f726520746f6b656e73207468616e81526020017f20617661696c61626c650000000000000000000000000000000000000000000081525060400191505060405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561046457600080fd5b505af1158015610478573d6000803e3d6000fd5b505050506040513d602081101561048e57600080fd5b81019080805190602001909291905050501515610513576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f556e61626c6520746f2073656e6420746f6b656e73000000000000000000000081525060200191505060405180910390fd5b806003600082825401925050819055507f5e5e995ce3133561afceaa51a9a154d5db228cd7525d34df5185582c18d3df093382604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a150565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156105ec57600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561070757600080fd5b505afa15801561071b573d6000803e3d6000fd5b505050506040513d602081101561073157600080fd5b81019080805190602001909291905050506040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156107c757600080fd5b505af11580156107db573d6000803e3d6000fd5b505050506040513d60208110156107f157600080fd5b8101908080519060200190929190505050151561080d57600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f1935050505015801561088b573d6000803e3d6000fd5b507f94173af9e1cd5351395663e6a7838552ea54f5233d0c38bc46de5f4915b302bf6003546040518082815260200191505060405180910390a1565b60035481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60025481565b6000808214806109185750828283850292508281151561091557fe5b04145b151561092357600080fd5b9291505056fea165627a7a723058207d7aa9c25fab16b55d9e8b0ccb28fa2bab133c9b35dfa72954bce1938110eef60029", + "deployedBytecode": "0x60806040526004361061006d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680633610724e14610072578063380d831b146100a0578063518ab2a8146100b757806355a373d6146100e25780637ff9b59614610139575b600080fd5b61009e6004803603602081101561008857600080fd5b8101908080359060200190929190505050610164565b005b3480156100ac57600080fd5b506100b5610591565b005b3480156100c357600080fd5b506100cc6108c7565b6040518082815260200191505060405180910390f35b3480156100ee57600080fd5b506100f76108cd565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561014557600080fd5b5061014e6108f3565b6040518082815260200191505060405180910390f35b610170816002546108f9565b3414151561020c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c8152602001807f6d73672e76616c7565206d75737420657175616c206e756d626572206f66207481526020017f6f6b656e7320696e20776569000000000000000000000000000000000000000081525060400191505060405180910390fd5b80600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156102c857600080fd5b505afa1580156102dc573d6000803e3d6000fd5b505050506040513d60208110156102f257600080fd5b81019080805190602001909291905050501015151561039f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001807f63616e6e6f74207075726368617365206d6f726520746f6b656e73207468616e81526020017f20617661696c61626c650000000000000000000000000000000000000000000081525060400191505060405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561046457600080fd5b505af1158015610478573d6000803e3d6000fd5b505050506040513d602081101561048e57600080fd5b81019080805190602001909291905050501515610513576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f556e61626c6520746f2073656e6420746f6b656e73000000000000000000000081525060200191505060405180910390fd5b806003600082825401925050819055507f5e5e995ce3133561afceaa51a9a154d5db228cd7525d34df5185582c18d3df093382604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a150565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156105ec57600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561070757600080fd5b505afa15801561071b573d6000803e3d6000fd5b505050506040513d602081101561073157600080fd5b81019080805190602001909291905050506040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156107c757600080fd5b505af11580156107db573d6000803e3d6000fd5b505050506040513d60208110156107f157600080fd5b8101908080519060200190929190505050151561080d57600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f1935050505015801561088b573d6000803e3d6000fd5b507f94173af9e1cd5351395663e6a7838552ea54f5233d0c38bc46de5f4915b302bf6003546040518082815260200191505060405180910390a1565b60035481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60025481565b6000808214806109185750828283850292508281151561091557fe5b04145b151561092357600080fd5b9291505056fea165627a7a723058207d7aa9c25fab16b55d9e8b0ccb28fa2bab133c9b35dfa72954bce1938110eef60029", + "sourceMap": "52:1549:1:-;;;302:175;8:9:-1;5:2;;;30:1;27;20:12;5:2;302:175:1;;;;;;;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;302:175:1;;;;;;;;;;;;;;;;;;;;;;;;;386:10;378:5;;:18;;;;;;;;;;;;;;;;;;422:14;406:13;;:30;;;;;;;;;;;;;;;;;;459:11;446:10;:24;;;;302:175;;52:1549;;;;;;", + "deployedSourceMap": "52:1549:1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;610:546;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;610:546:1;;;;;;;;;;;;;;;;;;;;1162:437;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1162:437:1;;;;;;175:25;;8:9:-1;5:2;;;30:1;27;20:12;5:2;175:25:1;;;;;;;;;;;;;;;;;;;;;;;108:30;;8:9:-1;5:2;;;30:1;27;20:12;5:2;108:30:1;;;;;;;;;;;;;;;;;;;;;;;;;;;144:25;;8:9:-1;5:2;;;30:1;27;20:12;5:2;144:25:1;;;;;;;;;;;;;;;;;;;;;;;610:546;700:37;709:15;726:10;;700:8;:37::i;:::-;687:9;:50;679:107;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;846:15;804:13;;;;;;;;;;;:23;;;836:4;804:38;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;804:38:1;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;804:38:1;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;804:38:1;;;;;;;;;;;;;;;;:57;;796:112;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;926:13;;;;;;;;;;;:22;;;949:10;961:15;926:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;926:51:1;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;926:51:1;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;926:51:1;;;;;;;;;;;;;;;;918:85;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1085:15;1071:10;;:29;;;;;;;;;;;1116:33;1121:10;1133:15;1116:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;610:546;:::o;1162:437::-;1220:5;;;;;;;;;;;1206:19;;:10;:19;;;1198:28;;;;;;;;1244:13;;;;;;;;;;;:22;;;1267:5;;;;;;;;;;;1274:13;;;;;;;;;;;:23;;;1306:4;1274:38;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1274:38:1;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1274:38:1;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1274:38:1;;;;;;;;;;;;;;;;1244:69;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1244:69:1;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1244:69:1;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1244:69:1;;;;;;;;;;;;;;;;1236:78;;;;;;;;1520:5;;;;;;;;;;;:14;;:37;1543:4;1535:21;;;1520:37;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1520:37:1;1573:19;1581:10;;1573:19;;;;;;;;;;;;;;;;;;1162:437::o;175:25::-;;;;:::o;108:30::-;;;;;;;;;;;;;:::o;144:25::-;;;;:::o;483:121::-;540:6;571:1;566;:6;:30;;;;595:1;590;585;581;:5;577:9;;;576:15;;;;;;;;:20;566:30;558:39;;;;;;;;483:121;;;;:::o", + "source": "pragma solidity ^0.5.0;\n\nimport \"./DappToken.sol\";\n\ncontract DappTokenSale {\n address payable admin;\n DappToken public tokenContract;\n uint256 public tokenPrice;\n uint256 public tokensSold;\n\n event Sell(address _buyer, uint256 _amount);\n event EndSale(uint256 _totalAmountSold);\n\n constructor(DappToken _tokenContract, uint256 _tokenPrice) public {\n admin = msg.sender;\n tokenContract = _tokenContract;\n tokenPrice = _tokenPrice;\n }\n\n function multiply(uint x, uint y) internal pure returns (uint z) {\n require(y == 0 || (z = x * y) / y == x);\n }\n\n function buyTokens(uint256 _numberOfTokens) public payable {\n require(msg.value == multiply(_numberOfTokens, tokenPrice), 'msg.value must equal number of tokens in wei');\n require(tokenContract.balanceOf(address(this)) >= _numberOfTokens, 'cannot purchase more tokens than available');\n require(tokenContract.transfer(msg.sender, _numberOfTokens), 'Unable to send tokens');\n // emit Balance(address(this), _numberOfTokens);\n\n tokensSold += _numberOfTokens;\n\n emit Sell(msg.sender, _numberOfTokens);\n }\n\n function endSale() public {\n require(msg.sender == admin);\n require(tokenContract.transfer(admin, tokenContract.balanceOf(address(this))));\n // require(tokenContract.transfer(admin, tokenContract.balanceOf(address(this))));\n // UPDATE: Let's not destroy the contract here\n // Just transfer the balance to the admin\n admin.transfer(address(this).balance);\n\n emit EndSale(tokensSold);\n }\n}\n", + "sourcePath": "/Users/shayanja/projects/blockchain/token_sale/contracts/DappTokenSale.sol", "ast": { - "absolutePath": "/Users/gregory/code/token_sale/contracts/DappTokenSale.sol", + "absolutePath": "/Users/shayanja/projects/blockchain/token_sale/contracts/DappTokenSale.sol", "exportedSymbols": { "DappTokenSale": [ - 326 + 345 ] }, - "id": 327, + "id": 346, "nodeType": "SourceUnit", "nodes": [ { - "id": 187, + "id": 191, "literals": [ "solidity", "^", - "0.4", - ".2" + "0.5", + ".0" ], "nodeType": "PragmaDirective", "src": "0:23:1" }, { - "absolutePath": "/Users/gregory/code/token_sale/contracts/DappToken.sol", + "absolutePath": "/Users/shayanja/projects/blockchain/token_sale/contracts/DappToken.sol", "file": "./DappToken.sol", - "id": 188, + "id": 192, "nodeType": "ImportDirective", - "scope": 327, - "sourceUnit": 186, + "scope": 346, + "sourceUnit": 190, "src": "25:25:1", "symbolAliases": [], "unitAlias": "" @@ -143,34 +156,35 @@ "contractKind": "contract", "documentation": null, "fullyImplemented": true, - "id": 326, + "id": 345, "linearizedBaseContracts": [ - 326 + 345 ], "name": "DappTokenSale", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, - "id": 190, + "id": 194, "name": "admin", "nodeType": "VariableDeclaration", - "scope": 326, - "src": "81:13:1", + "scope": 345, + "src": "81:21:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" }, "typeName": { - "id": 189, + "id": 193, "name": "address", "nodeType": "ElementaryTypeName", - "src": "81:7:1", + "src": "81:15:1", + "stateMutability": "payable", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" } }, "value": null, @@ -178,26 +192,26 @@ }, { "constant": false, - "id": 192, + "id": 196, "name": "tokenContract", "nodeType": "VariableDeclaration", - "scope": 326, - "src": "100:30:1", + "scope": 345, + "src": "108:30:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_DappToken_$185", + "typeIdentifier": "t_contract$_DappToken_$189", "typeString": "contract DappToken" }, "typeName": { "contractScope": null, - "id": 191, + "id": 195, "name": "DappToken", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 185, - "src": "100:9:1", + "referencedDeclaration": 189, + "src": "108:9:1", "typeDescriptions": { - "typeIdentifier": "t_contract$_DappToken_$185", + "typeIdentifier": "t_contract$_DappToken_$189", "typeString": "contract DappToken" } }, @@ -206,11 +220,11 @@ }, { "constant": false, - "id": 194, + "id": 198, "name": "tokenPrice", "nodeType": "VariableDeclaration", - "scope": 326, - "src": "136:25:1", + "scope": 345, + "src": "144:25:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -218,10 +232,10 @@ "typeString": "uint256" }, "typeName": { - "id": 193, + "id": 197, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "136:7:1", + "src": "144:7:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -232,11 +246,11 @@ }, { "constant": false, - "id": 196, + "id": 200, "name": "tokensSold", "nodeType": "VariableDeclaration", - "scope": 326, - "src": "167:25:1", + "scope": 345, + "src": "175:25:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -244,10 +258,10 @@ "typeString": "uint256" }, "typeName": { - "id": 195, + "id": 199, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "167:7:1", + "src": "175:7:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -258,21 +272,22 @@ }, { "anonymous": false, - "id": 202, + "documentation": null, + "id": 206, "name": "Sell", "nodeType": "EventDefinition", "parameters": { - "id": 201, + "id": 205, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 198, + "id": 202, "indexed": false, "name": "_buyer", "nodeType": "VariableDeclaration", - "scope": 202, - "src": "210:14:1", + "scope": 206, + "src": "218:14:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -280,10 +295,11 @@ "typeString": "address" }, "typeName": { - "id": 197, + "id": 201, "name": "address", "nodeType": "ElementaryTypeName", - "src": "210:7:1", + "src": "218:7:1", + "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -294,12 +310,54 @@ }, { "constant": false, - "id": 200, + "id": 204, "indexed": false, "name": "_amount", "nodeType": "VariableDeclaration", - "scope": 202, - "src": "226:15:1", + "scope": 206, + "src": "234:15:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 203, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "234:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "217:33:1" + }, + "src": "207:44:1" + }, + { + "anonymous": false, + "documentation": null, + "id": 210, + "name": "EndSale", + "nodeType": "EventDefinition", + "parameters": { + "id": 209, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 208, + "indexed": false, + "name": "_totalAmountSold", + "nodeType": "VariableDeclaration", + "scope": 210, + "src": "270:24:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -307,10 +365,10 @@ "typeString": "uint256" }, "typeName": { - "id": 199, + "id": 207, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "226:7:1", + "src": "270:7:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -320,35 +378,35 @@ "visibility": "internal" } ], - "src": "209:33:1" + "src": "269:26:1" }, - "src": "199:44:1" + "src": "256:40:1" }, { "body": { - "id": 222, + "id": 230, "nodeType": "Block", - "src": "326:109:1", + "src": "368:109:1", "statements": [ { "expression": { "argumentTypes": null, - "id": 212, + "id": 220, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 209, + "id": 217, "name": "admin", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 190, - "src": "336:5:1", + "referencedDeclaration": 194, + "src": "378:5:1", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" } }, "nodeType": "Assignment", @@ -357,18 +415,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 210, + "id": 218, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 338, - "src": "344:3:1", + "referencedDeclaration": 417, + "src": "386:3:1", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 211, + "id": 219, "isConstant": false, "isLValue": false, "isPure": false, @@ -376,40 +434,40 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "344:10:1", + "src": "386:10:1", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" } }, - "src": "336:18:1", + "src": "378:18:1", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" } }, - "id": 213, + "id": 221, "nodeType": "ExpressionStatement", - "src": "336:18:1" + "src": "378:18:1" }, { "expression": { "argumentTypes": null, - "id": 216, + "id": 224, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 214, + "id": 222, "name": "tokenContract", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 192, - "src": "364:13:1", + "referencedDeclaration": 196, + "src": "406:13:1", "typeDescriptions": { - "typeIdentifier": "t_contract$_DappToken_$185", + "typeIdentifier": "t_contract$_DappToken_$189", "typeString": "contract DappToken" } }, @@ -417,43 +475,43 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 215, + "id": 223, "name": "_tokenContract", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 204, - "src": "380:14:1", + "referencedDeclaration": 212, + "src": "422:14:1", "typeDescriptions": { - "typeIdentifier": "t_contract$_DappToken_$185", + "typeIdentifier": "t_contract$_DappToken_$189", "typeString": "contract DappToken" } }, - "src": "364:30:1", + "src": "406:30:1", "typeDescriptions": { - "typeIdentifier": "t_contract$_DappToken_$185", + "typeIdentifier": "t_contract$_DappToken_$189", "typeString": "contract DappToken" } }, - "id": 217, + "id": 225, "nodeType": "ExpressionStatement", - "src": "364:30:1" + "src": "406:30:1" }, { "expression": { "argumentTypes": null, - "id": 220, + "id": 228, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 218, + "id": 226, "name": "tokenPrice", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 194, - "src": "404:10:1", + "referencedDeclaration": 198, + "src": "446:10:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -463,62 +521,62 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 219, + "id": 227, "name": "_tokenPrice", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 206, - "src": "417:11:1", + "referencedDeclaration": 214, + "src": "459:11:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "404:24:1", + "src": "446:24:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 221, + "id": 229, "nodeType": "ExpressionStatement", - "src": "404:24:1" + "src": "446:24:1" } ] }, - "id": 223, + "documentation": null, + "id": 231, "implemented": true, - "isConstructor": true, - "isDeclaredConst": false, + "kind": "constructor", "modifiers": [], - "name": "DappTokenSale", + "name": "", "nodeType": "FunctionDefinition", "parameters": { - "id": 207, + "id": 215, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 204, + "id": 212, "name": "_tokenContract", "nodeType": "VariableDeclaration", - "scope": 223, - "src": "272:24:1", + "scope": 231, + "src": "314:24:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_DappToken_$185", + "typeIdentifier": "t_contract$_DappToken_$189", "typeString": "contract DappToken" }, "typeName": { "contractScope": null, - "id": 203, + "id": 211, "name": "DappToken", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 185, - "src": "272:9:1", + "referencedDeclaration": 189, + "src": "314:9:1", "typeDescriptions": { - "typeIdentifier": "t_contract$_DappToken_$185", + "typeIdentifier": "t_contract$_DappToken_$189", "typeString": "contract DappToken" } }, @@ -527,11 +585,11 @@ }, { "constant": false, - "id": 206, + "id": 214, "name": "_tokenPrice", "nodeType": "VariableDeclaration", - "scope": 223, - "src": "298:19:1", + "scope": 231, + "src": "340:19:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -539,10 +597,10 @@ "typeString": "uint256" }, "typeName": { - "id": 205, + "id": 213, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "298:7:1", + "src": "340:7:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -552,26 +610,25 @@ "visibility": "internal" } ], - "src": "271:47:1" + "src": "313:47:1" }, - "payable": false, "returnParameters": { - "id": 208, + "id": 216, "nodeType": "ParameterList", "parameters": [], - "src": "326:0:1" + "src": "368:0:1" }, - "scope": 326, - "src": "249:186:1", + "scope": 345, + "src": "302:175:1", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { - "id": 249, + "id": 257, "nodeType": "Block", - "src": "506:56:1", + "src": "548:56:1", "statements": [ { "expression": { @@ -583,7 +640,7 @@ "typeIdentifier": "t_bool", "typeString": "bool" }, - "id": 246, + "id": 254, "isConstant": false, "isLValue": false, "isPure": false, @@ -594,19 +651,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 235, + "id": 243, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 233, + "id": 241, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 227, - "src": "524:1:1", + "referencedDeclaration": 235, + "src": "566:1:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -617,14 +674,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 234, + "id": 242, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "529:1:1", + "src": "571:1:1", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -632,7 +689,7 @@ }, "value": "0" }, - "src": "524:6:1", + "src": "566:6:1", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -646,7 +703,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 245, + "id": 253, "isConstant": false, "isLValue": false, "isPure": false, @@ -657,7 +714,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 243, + "id": 251, "isConstant": false, "isLValue": false, "isPure": false, @@ -667,19 +724,19 @@ "components": [ { "argumentTypes": null, - "id": 240, + "id": 248, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 236, + "id": 244, "name": "z", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 230, - "src": "535:1:1", + "referencedDeclaration": 238, + "src": "577:1:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -693,19 +750,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 239, + "id": 247, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 237, + "id": 245, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 225, - "src": "539:1:1", + "referencedDeclaration": 233, + "src": "581:1:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -715,38 +772,38 @@ "operator": "*", "rightExpression": { "argumentTypes": null, - "id": 238, + "id": 246, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 227, - "src": "543:1:1", + "referencedDeclaration": 235, + "src": "585:1:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "539:5:1", + "src": "581:5:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "535:9:1", + "src": "577:9:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], - "id": 241, + "id": 249, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", - "src": "534:11:1", + "src": "576:11:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -756,18 +813,18 @@ "operator": "/", "rightExpression": { "argumentTypes": null, - "id": 242, + "id": 250, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 227, - "src": "548:1:1", + "referencedDeclaration": 235, + "src": "590:1:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "534:15:1", + "src": "576:15:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -777,24 +834,24 @@ "operator": "==", "rightExpression": { "argumentTypes": null, - "id": 244, + "id": 252, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 225, - "src": "553:1:1", + "referencedDeclaration": 233, + "src": "595:1:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "534:20:1", + "src": "576:20:1", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "src": "524:30:1", + "src": "566:30:1", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -808,18 +865,21 @@ "typeString": "bool" } ], - "id": 232, + "id": 240, "name": "require", "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 341, - "src": "516:7:1", + "overloadedDeclarations": [ + 420, + 421 + ], + "referencedDeclaration": 420, + "src": "558:7:1", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, - "id": 247, + "id": 255, "isConstant": false, "isLValue": false, "isPure": false, @@ -827,36 +887,36 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "516:39:1", + "src": "558:39:1", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 248, + "id": 256, "nodeType": "ExpressionStatement", - "src": "516:39:1" + "src": "558:39:1" } ] }, - "id": 250, + "documentation": null, + "id": 258, "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, + "kind": "function", "modifiers": [], "name": "multiply", "nodeType": "FunctionDefinition", "parameters": { - "id": 228, + "id": 236, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 225, + "id": 233, "name": "x", "nodeType": "VariableDeclaration", - "scope": 250, - "src": "459:6:1", + "scope": 258, + "src": "501:6:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -864,10 +924,10 @@ "typeString": "uint256" }, "typeName": { - "id": 224, + "id": 232, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "459:4:1", + "src": "501:4:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -878,11 +938,11 @@ }, { "constant": false, - "id": 227, + "id": 235, "name": "y", "nodeType": "VariableDeclaration", - "scope": 250, - "src": "467:6:1", + "scope": 258, + "src": "509:6:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -890,10 +950,10 @@ "typeString": "uint256" }, "typeName": { - "id": 226, + "id": 234, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "467:4:1", + "src": "509:4:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -903,20 +963,19 @@ "visibility": "internal" } ], - "src": "458:16:1" + "src": "500:16:1" }, - "payable": false, "returnParameters": { - "id": 231, + "id": 239, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 230, + "id": 238, "name": "z", "nodeType": "VariableDeclaration", - "scope": 250, - "src": "498:6:1", + "scope": 258, + "src": "540:6:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -924,10 +983,10 @@ "typeString": "uint256" }, "typeName": { - "id": 229, + "id": 237, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "498:4:1", + "src": "540:4:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -937,19 +996,19 @@ "visibility": "internal" } ], - "src": "497:8:1" + "src": "539:8:1" }, - "scope": 326, - "src": "441:121:1", + "scope": 345, + "src": "483:121:1", "stateMutability": "pure", "superFunction": null, "visibility": "internal" }, { "body": { - "id": 293, + "id": 306, "nodeType": "Block", - "src": "627:297:1", + "src": "669:487:1", "statements": [ { "expression": { @@ -961,7 +1020,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 262, + "id": 270, "isConstant": false, "isLValue": false, "isPure": false, @@ -970,18 +1029,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 256, + "id": 264, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 338, - "src": "645:3:1", + "referencedDeclaration": 417, + "src": "687:3:1", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 257, + "id": 265, "isConstant": false, "isLValue": false, "isPure": false, @@ -989,7 +1048,7 @@ "memberName": "value", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "645:9:1", + "src": "687:9:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1002,12 +1061,12 @@ "arguments": [ { "argumentTypes": null, - "id": 259, + "id": 267, "name": "_numberOfTokens", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 252, - "src": "667:15:1", + "referencedDeclaration": 260, + "src": "709:15:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1015,12 +1074,12 @@ }, { "argumentTypes": null, - "id": 260, + "id": 268, "name": "tokenPrice", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 194, - "src": "684:10:1", + "referencedDeclaration": 198, + "src": "726:10:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1038,18 +1097,18 @@ "typeString": "uint256" } ], - "id": 258, + "id": 266, "name": "multiply", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 250, - "src": "658:8:1", + "referencedDeclaration": 258, + "src": "700:8:1", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, - "id": 261, + "id": 269, "isConstant": false, "isLValue": false, "isPure": false, @@ -1057,17 +1116,35 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "658:37:1", + "src": "700:37:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "645:50:1", + "src": "687:50:1", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } + }, + { + "argumentTypes": null, + "hexValue": "6d73672e76616c7565206d75737420657175616c206e756d626572206f6620746f6b656e7320696e20776569", + "id": 271, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "739:46:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3e890bbf6b250083798fac03580b24b5d898dec1b35ade861549ab798052d89f", + "typeString": "literal_string \"msg.value must equal number of tokens in wei\"" + }, + "value": "msg.value must equal number of tokens in wei" } ], "expression": { @@ -1075,20 +1152,27 @@ { "typeIdentifier": "t_bool", "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3e890bbf6b250083798fac03580b24b5d898dec1b35ade861549ab798052d89f", + "typeString": "literal_string \"msg.value must equal number of tokens in wei\"" } ], - "id": 255, + "id": 263, "name": "require", "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 341, - "src": "637:7:1", + "overloadedDeclarations": [ + 420, + 421 + ], + "referencedDeclaration": 421, + "src": "679:7:1", "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" } }, - "id": 263, + "id": 272, "isConstant": false, "isLValue": false, "isPure": false, @@ -1096,15 +1180,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "637:59:1", + "src": "679:107:1", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 264, + "id": 273, "nodeType": "ExpressionStatement", - "src": "637:59:1" + "src": "679:107:1" }, { "expression": { @@ -1116,7 +1200,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 271, + "id": 282, "isConstant": false, "isLValue": false, "isPure": false, @@ -1126,53 +1210,91 @@ "arguments": [ { "argumentTypes": null, - "id": 268, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 351, - "src": "738:4:1", + "arguments": [ + { + "argumentTypes": null, + "id": 278, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 432, + "src": "836:4:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DappTokenSale_$345", + "typeString": "contract DappTokenSale" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_DappTokenSale_$345", + "typeString": "contract DappTokenSale" + } + ], + "id": 277, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "828:7:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 279, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "828:13:1", "typeDescriptions": { - "typeIdentifier": "t_contract$_DappTokenSale_$326", - "typeString": "contract DappTokenSale" + "typeIdentifier": "t_address", + "typeString": "address" } } ], "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_DappTokenSale_$326", - "typeString": "contract DappTokenSale" + "typeIdentifier": "t_address", + "typeString": "address" } ], "expression": { "argumentTypes": null, - "id": 266, + "id": 275, "name": "tokenContract", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 192, - "src": "714:13:1", + "referencedDeclaration": 196, + "src": "804:13:1", "typeDescriptions": { - "typeIdentifier": "t_contract$_DappToken_$185", + "typeIdentifier": "t_contract$_DappToken_$189", "typeString": "contract DappToken" } }, - "id": 267, + "id": 276, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "balanceOf", "nodeType": "MemberAccess", - "referencedDeclaration": 32, - "src": "714:23:1", + "referencedDeclaration": 33, + "src": "804:23:1", "typeDescriptions": { "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)" } }, - "id": 269, + "id": 280, "isConstant": false, "isLValue": false, "isPure": false, @@ -1180,7 +1302,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "714:29:1", + "src": "804:38:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1190,22 +1312,40 @@ "operator": ">=", "rightExpression": { "argumentTypes": null, - "id": 270, + "id": 281, "name": "_numberOfTokens", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 252, - "src": "747:15:1", + "referencedDeclaration": 260, + "src": "846:15:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "714:48:1", + "src": "804:57:1", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } + }, + { + "argumentTypes": null, + "hexValue": "63616e6e6f74207075726368617365206d6f726520746f6b656e73207468616e20617661696c61626c65", + "id": 283, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "863:44:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_2f9daa56102f7e7cd6a947b5b1ca8ddd83e33f3dfc0cfa5ca2ae1b75443575a2", + "typeString": "literal_string \"cannot purchase more tokens than available\"" + }, + "value": "cannot purchase more tokens than available" } ], "expression": { @@ -1213,20 +1353,27 @@ { "typeIdentifier": "t_bool", "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_2f9daa56102f7e7cd6a947b5b1ca8ddd83e33f3dfc0cfa5ca2ae1b75443575a2", + "typeString": "literal_string \"cannot purchase more tokens than available\"" } ], - "id": 265, + "id": 274, "name": "require", "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 341, - "src": "706:7:1", + "overloadedDeclarations": [ + 420, + 421 + ], + "referencedDeclaration": 421, + "src": "796:7:1", "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" } }, - "id": 272, + "id": 284, "isConstant": false, "isLValue": false, "isPure": false, @@ -1234,15 +1381,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "706:57:1", + "src": "796:112:1", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 273, + "id": 285, "nodeType": "ExpressionStatement", - "src": "706:57:1" + "src": "796:112:1" }, { "expression": { @@ -1255,18 +1402,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 277, + "id": 289, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 338, - "src": "804:3:1", + "referencedDeclaration": 417, + "src": "949:3:1", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 278, + "id": 290, "isConstant": false, "isLValue": false, "isPure": false, @@ -1274,20 +1421,20 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "804:10:1", + "src": "949:10:1", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" } }, { "argumentTypes": null, - "id": 279, + "id": 291, "name": "_numberOfTokens", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 252, - "src": "816:15:1", + "referencedDeclaration": 260, + "src": "961:15:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1297,8 +1444,8 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" }, { "typeIdentifier": "t_uint256", @@ -1307,32 +1454,32 @@ ], "expression": { "argumentTypes": null, - "id": 275, + "id": 287, "name": "tokenContract", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 192, - "src": "781:13:1", + "referencedDeclaration": 196, + "src": "926:13:1", "typeDescriptions": { - "typeIdentifier": "t_contract$_DappToken_$185", + "typeIdentifier": "t_contract$_DappToken_$189", "typeString": "contract DappToken" } }, - "id": 276, + "id": 288, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "transfer", "nodeType": "MemberAccess", - "referencedDeclaration": 96, - "src": "781:22:1", + "referencedDeclaration": 98, + "src": "926:22:1", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,uint256) external returns (bool)" } }, - "id": 280, + "id": 292, "isConstant": false, "isLValue": false, "isPure": false, @@ -1340,11 +1487,29 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "781:51:1", + "src": "926:51:1", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } + }, + { + "argumentTypes": null, + "hexValue": "556e61626c6520746f2073656e6420746f6b656e73", + "id": 293, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "979:23:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4901131e3f0597c432f86daa7cb489a9fb75a20e0cb3683ed14a711a25ff8320", + "typeString": "literal_string \"Unable to send tokens\"" + }, + "value": "Unable to send tokens" } ], "expression": { @@ -1352,20 +1517,27 @@ { "typeIdentifier": "t_bool", "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4901131e3f0597c432f86daa7cb489a9fb75a20e0cb3683ed14a711a25ff8320", + "typeString": "literal_string \"Unable to send tokens\"" } ], - "id": 274, + "id": 286, "name": "require", "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 341, - "src": "773:7:1", + "overloadedDeclarations": [ + 420, + 421 + ], + "referencedDeclaration": 421, + "src": "918:7:1", "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" } }, - "id": 281, + "id": 294, "isConstant": false, "isLValue": false, "isPure": false, @@ -1373,32 +1545,32 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "773:60:1", + "src": "918:85:1", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 282, + "id": 295, "nodeType": "ExpressionStatement", - "src": "773:60:1" + "src": "918:85:1" }, { "expression": { "argumentTypes": null, - "id": 285, + "id": 298, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 283, + "id": 296, "name": "tokensSold", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 196, - "src": "844:10:1", + "referencedDeclaration": 200, + "src": "1071:10:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1408,47 +1580,47 @@ "operator": "+=", "rightHandSide": { "argumentTypes": null, - "id": 284, + "id": 297, "name": "_numberOfTokens", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 252, - "src": "858:15:1", + "referencedDeclaration": 260, + "src": "1085:15:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "844:29:1", + "src": "1071:29:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 286, + "id": 299, "nodeType": "ExpressionStatement", - "src": "844:29:1" + "src": "1071:29:1" }, { - "expression": { + "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 288, + "id": 301, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 338, - "src": "889:3:1", + "referencedDeclaration": 417, + "src": "1121:3:1", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 289, + "id": 302, "isConstant": false, "isLValue": false, "isPure": false, @@ -1456,20 +1628,20 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "889:10:1", + "src": "1121:10:1", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" } }, { "argumentTypes": null, - "id": 290, + "id": 303, "name": "_numberOfTokens", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 252, - "src": "901:15:1", + "referencedDeclaration": 260, + "src": "1133:15:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1479,26 +1651,26 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], - "id": 287, + "id": 300, "name": "Sell", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 202, - "src": "884:4:1", + "referencedDeclaration": 206, + "src": "1116:4:1", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, - "id": 291, + "id": 304, "isConstant": false, "isLValue": false, "isPure": false, @@ -1506,36 +1678,36 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "884:33:1", + "src": "1116:33:1", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 292, - "nodeType": "ExpressionStatement", - "src": "884:33:1" + "id": 305, + "nodeType": "EmitStatement", + "src": "1111:38:1" } ] }, - "id": 294, + "documentation": null, + "id": 307, "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, + "kind": "function", "modifiers": [], "name": "buyTokens", "nodeType": "FunctionDefinition", "parameters": { - "id": 253, + "id": 261, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 252, + "id": 260, "name": "_numberOfTokens", "nodeType": "VariableDeclaration", - "scope": 294, - "src": "587:23:1", + "scope": 307, + "src": "629:23:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -1543,10 +1715,10 @@ "typeString": "uint256" }, "typeName": { - "id": 251, + "id": 259, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "587:7:1", + "src": "629:7:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1556,26 +1728,25 @@ "visibility": "internal" } ], - "src": "586:25:1" + "src": "628:25:1" }, - "payable": true, "returnParameters": { - "id": 254, + "id": 262, "nodeType": "ParameterList", "parameters": [], - "src": "627:0:1" + "src": "669:0:1" }, - "scope": 326, - "src": "568:356:1", + "scope": 345, + "src": "610:546:1", "stateMutability": "payable", "superFunction": null, "visibility": "public" }, { "body": { - "id": 324, + "id": 343, "nodeType": "Block", - "src": "956:277:1", + "src": "1188:411:1", "statements": [ { "expression": { @@ -1584,10 +1755,10 @@ { "argumentTypes": null, "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" }, - "id": 301, + "id": 314, "isConstant": false, "isLValue": false, "isPure": false, @@ -1596,18 +1767,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 298, + "id": 311, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 338, - "src": "974:3:1", + "referencedDeclaration": 417, + "src": "1206:3:1", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 299, + "id": 312, "isConstant": false, "isLValue": false, "isPure": false, @@ -1615,28 +1786,28 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "974:10:1", + "src": "1206:10:1", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, - "id": 300, + "id": 313, "name": "admin", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 190, - "src": "988:5:1", + "referencedDeclaration": 194, + "src": "1220:5:1", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" } }, - "src": "974:19:1", + "src": "1206:19:1", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1650,18 +1821,21 @@ "typeString": "bool" } ], - "id": 297, + "id": 310, "name": "require", "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 341, - "src": "966:7:1", + "overloadedDeclarations": [ + 420, + 421 + ], + "referencedDeclaration": 420, + "src": "1198:7:1", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, - "id": 302, + "id": 315, "isConstant": false, "isLValue": false, "isPure": false, @@ -1669,15 +1843,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "966:28:1", + "src": "1198:28:1", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 303, + "id": 316, "nodeType": "ExpressionStatement", - "src": "966:28:1" + "src": "1198:28:1" }, { "expression": { @@ -1688,15 +1862,15 @@ "arguments": [ { "argumentTypes": null, - "id": 307, + "id": 320, "name": "admin", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 190, - "src": "1035:5:1", + "referencedDeclaration": 194, + "src": "1267:5:1", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" } }, { @@ -1704,53 +1878,91 @@ "arguments": [ { "argumentTypes": null, - "id": 310, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 351, - "src": "1066:4:1", + "arguments": [ + { + "argumentTypes": null, + "id": 324, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 432, + "src": "1306:4:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DappTokenSale_$345", + "typeString": "contract DappTokenSale" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_DappTokenSale_$345", + "typeString": "contract DappTokenSale" + } + ], + "id": 323, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1298:7:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 325, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1298:13:1", "typeDescriptions": { - "typeIdentifier": "t_contract$_DappTokenSale_$326", - "typeString": "contract DappTokenSale" + "typeIdentifier": "t_address", + "typeString": "address" } } ], "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_DappTokenSale_$326", - "typeString": "contract DappTokenSale" + "typeIdentifier": "t_address", + "typeString": "address" } ], "expression": { "argumentTypes": null, - "id": 308, + "id": 321, "name": "tokenContract", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 192, - "src": "1042:13:1", + "referencedDeclaration": 196, + "src": "1274:13:1", "typeDescriptions": { - "typeIdentifier": "t_contract$_DappToken_$185", + "typeIdentifier": "t_contract$_DappToken_$189", "typeString": "contract DappToken" } }, - "id": 309, + "id": 322, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "balanceOf", "nodeType": "MemberAccess", - "referencedDeclaration": 32, - "src": "1042:23:1", + "referencedDeclaration": 33, + "src": "1274:23:1", "typeDescriptions": { "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)" } }, - "id": 311, + "id": 326, "isConstant": false, "isLValue": false, "isPure": false, @@ -1758,7 +1970,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1042:29:1", + "src": "1274:38:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1768,8 +1980,8 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" }, { "typeIdentifier": "t_uint256", @@ -1778,32 +1990,32 @@ ], "expression": { "argumentTypes": null, - "id": 305, + "id": 318, "name": "tokenContract", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 192, - "src": "1012:13:1", + "referencedDeclaration": 196, + "src": "1244:13:1", "typeDescriptions": { - "typeIdentifier": "t_contract$_DappToken_$185", + "typeIdentifier": "t_contract$_DappToken_$189", "typeString": "contract DappToken" } }, - "id": 306, + "id": 319, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "transfer", "nodeType": "MemberAccess", - "referencedDeclaration": 96, - "src": "1012:22:1", + "referencedDeclaration": 98, + "src": "1244:22:1", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,uint256) external returns (bool)" } }, - "id": 312, + "id": 327, "isConstant": false, "isLValue": false, "isPure": false, @@ -1811,7 +2023,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1012:60:1", + "src": "1244:69:1", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -1825,18 +2037,21 @@ "typeString": "bool" } ], - "id": 304, + "id": 317, "name": "require", "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 341, - "src": "1004:7:1", + "overloadedDeclarations": [ + 420, + 421 + ], + "referencedDeclaration": 420, + "src": "1236:7:1", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, - "id": 313, + "id": 328, "isConstant": false, "isLValue": false, "isPure": false, @@ -1844,15 +2059,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1004:69:1", + "src": "1236:78:1", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 314, + "id": 329, "nodeType": "ExpressionStatement", - "src": "1004:69:1" + "src": "1236:78:1" }, { "expression": { @@ -1865,14 +2080,14 @@ "arguments": [ { "argumentTypes": null, - "id": 319, + "id": 334, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 351, - "src": "1212:4:1", + "referencedDeclaration": 432, + "src": "1543:4:1", "typeDescriptions": { - "typeIdentifier": "t_contract$_DappTokenSale_$326", + "typeIdentifier": "t_contract$_DappTokenSale_$345", "typeString": "contract DappTokenSale" } } @@ -1880,24 +2095,24 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_DappTokenSale_$326", + "typeIdentifier": "t_contract$_DappTokenSale_$345", "typeString": "contract DappTokenSale" } ], - "id": 318, + "id": 333, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "1204:7:1", + "src": "1535:7:1", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": "address" }, - "id": 320, + "id": 335, "isConstant": false, "isLValue": false, "isPure": false, @@ -1905,13 +2120,13 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1204:13:1", + "src": "1535:13:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 321, + "id": 336, "isConstant": false, "isLValue": false, "isPure": false, @@ -1919,7 +2134,7 @@ "memberName": "balance", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "1204:21:1", + "src": "1535:21:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -1935,18 +2150,18 @@ ], "expression": { "argumentTypes": null, - "id": 315, + "id": 330, "name": "admin", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 190, - "src": "1189:5:1", + "referencedDeclaration": 194, + "src": "1520:5:1", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" } }, - "id": 317, + "id": 332, "isConstant": false, "isLValue": false, "isPure": false, @@ -1954,13 +2169,13 @@ "memberName": "transfer", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "1189:14:1", + "src": "1520:14:1", "typeDescriptions": { "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256)" } }, - "id": 322, + "id": 337, "isConstant": false, "isLValue": false, "isPure": false, @@ -1968,79 +2183,132 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1189:37:1", + "src": "1520:37:1", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 323, + "id": 338, "nodeType": "ExpressionStatement", - "src": "1189:37:1" + "src": "1520:37:1" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 340, + "name": "tokensSold", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 200, + "src": "1581:10:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 339, + "name": "EndSale", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 210, + "src": "1573:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 341, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1573:19:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 342, + "nodeType": "EmitStatement", + "src": "1568:24:1" } ] }, - "id": 325, + "documentation": null, + "id": 344, "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, + "kind": "function", "modifiers": [], "name": "endSale", "nodeType": "FunctionDefinition", "parameters": { - "id": 295, + "id": 308, "nodeType": "ParameterList", "parameters": [], - "src": "946:2:1" + "src": "1178:2:1" }, - "payable": false, "returnParameters": { - "id": 296, + "id": 309, "nodeType": "ParameterList", "parameters": [], - "src": "956:0:1" + "src": "1188:0:1" }, - "scope": 326, - "src": "930:303:1", + "scope": 345, + "src": "1162:437:1", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" } ], - "scope": 327, - "src": "52:1183:1" + "scope": 346, + "src": "52:1549:1" } ], - "src": "0:1236:1" + "src": "0:1602:1" }, "legacyAST": { - "absolutePath": "/Users/gregory/code/token_sale/contracts/DappTokenSale.sol", + "absolutePath": "/Users/shayanja/projects/blockchain/token_sale/contracts/DappTokenSale.sol", "exportedSymbols": { "DappTokenSale": [ - 326 + 345 ] }, - "id": 327, + "id": 346, "nodeType": "SourceUnit", "nodes": [ { - "id": 187, + "id": 191, "literals": [ "solidity", "^", - "0.4", - ".2" + "0.5", + ".0" ], "nodeType": "PragmaDirective", "src": "0:23:1" }, { - "absolutePath": "/Users/gregory/code/token_sale/contracts/DappToken.sol", + "absolutePath": "/Users/shayanja/projects/blockchain/token_sale/contracts/DappToken.sol", "file": "./DappToken.sol", - "id": 188, + "id": 192, "nodeType": "ImportDirective", - "scope": 327, - "sourceUnit": 186, + "scope": 346, + "sourceUnit": 190, "src": "25:25:1", "symbolAliases": [], "unitAlias": "" @@ -2051,34 +2319,35 @@ "contractKind": "contract", "documentation": null, "fullyImplemented": true, - "id": 326, + "id": 345, "linearizedBaseContracts": [ - 326 + 345 ], "name": "DappTokenSale", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, - "id": 190, + "id": 194, "name": "admin", "nodeType": "VariableDeclaration", - "scope": 326, - "src": "81:13:1", + "scope": 345, + "src": "81:21:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" }, "typeName": { - "id": 189, + "id": 193, "name": "address", "nodeType": "ElementaryTypeName", - "src": "81:7:1", + "src": "81:15:1", + "stateMutability": "payable", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" } }, "value": null, @@ -2086,26 +2355,26 @@ }, { "constant": false, - "id": 192, + "id": 196, "name": "tokenContract", "nodeType": "VariableDeclaration", - "scope": 326, - "src": "100:30:1", + "scope": 345, + "src": "108:30:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_DappToken_$185", + "typeIdentifier": "t_contract$_DappToken_$189", "typeString": "contract DappToken" }, "typeName": { "contractScope": null, - "id": 191, + "id": 195, "name": "DappToken", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 185, - "src": "100:9:1", + "referencedDeclaration": 189, + "src": "108:9:1", "typeDescriptions": { - "typeIdentifier": "t_contract$_DappToken_$185", + "typeIdentifier": "t_contract$_DappToken_$189", "typeString": "contract DappToken" } }, @@ -2114,11 +2383,11 @@ }, { "constant": false, - "id": 194, + "id": 198, "name": "tokenPrice", "nodeType": "VariableDeclaration", - "scope": 326, - "src": "136:25:1", + "scope": 345, + "src": "144:25:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -2126,10 +2395,10 @@ "typeString": "uint256" }, "typeName": { - "id": 193, + "id": 197, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "136:7:1", + "src": "144:7:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2140,11 +2409,11 @@ }, { "constant": false, - "id": 196, + "id": 200, "name": "tokensSold", "nodeType": "VariableDeclaration", - "scope": 326, - "src": "167:25:1", + "scope": 345, + "src": "175:25:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { @@ -2152,10 +2421,10 @@ "typeString": "uint256" }, "typeName": { - "id": 195, + "id": 199, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "167:7:1", + "src": "175:7:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2166,21 +2435,22 @@ }, { "anonymous": false, - "id": 202, + "documentation": null, + "id": 206, "name": "Sell", "nodeType": "EventDefinition", "parameters": { - "id": 201, + "id": 205, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 198, + "id": 202, "indexed": false, "name": "_buyer", "nodeType": "VariableDeclaration", - "scope": 202, - "src": "210:14:1", + "scope": 206, + "src": "218:14:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2188,10 +2458,11 @@ "typeString": "address" }, "typeName": { - "id": 197, + "id": 201, "name": "address", "nodeType": "ElementaryTypeName", - "src": "210:7:1", + "src": "218:7:1", + "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -2202,12 +2473,54 @@ }, { "constant": false, - "id": 200, + "id": 204, "indexed": false, "name": "_amount", "nodeType": "VariableDeclaration", - "scope": 202, - "src": "226:15:1", + "scope": 206, + "src": "234:15:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 203, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "234:7:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "217:33:1" + }, + "src": "207:44:1" + }, + { + "anonymous": false, + "documentation": null, + "id": 210, + "name": "EndSale", + "nodeType": "EventDefinition", + "parameters": { + "id": 209, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 208, + "indexed": false, + "name": "_totalAmountSold", + "nodeType": "VariableDeclaration", + "scope": 210, + "src": "270:24:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2215,10 +2528,10 @@ "typeString": "uint256" }, "typeName": { - "id": 199, + "id": 207, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "226:7:1", + "src": "270:7:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2228,35 +2541,35 @@ "visibility": "internal" } ], - "src": "209:33:1" + "src": "269:26:1" }, - "src": "199:44:1" + "src": "256:40:1" }, { "body": { - "id": 222, + "id": 230, "nodeType": "Block", - "src": "326:109:1", + "src": "368:109:1", "statements": [ { "expression": { "argumentTypes": null, - "id": 212, + "id": 220, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 209, + "id": 217, "name": "admin", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 190, - "src": "336:5:1", + "referencedDeclaration": 194, + "src": "378:5:1", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" } }, "nodeType": "Assignment", @@ -2265,18 +2578,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 210, + "id": 218, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 338, - "src": "344:3:1", + "referencedDeclaration": 417, + "src": "386:3:1", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 211, + "id": 219, "isConstant": false, "isLValue": false, "isPure": false, @@ -2284,40 +2597,40 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "344:10:1", + "src": "386:10:1", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" } }, - "src": "336:18:1", + "src": "378:18:1", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" } }, - "id": 213, + "id": 221, "nodeType": "ExpressionStatement", - "src": "336:18:1" + "src": "378:18:1" }, { "expression": { "argumentTypes": null, - "id": 216, + "id": 224, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 214, + "id": 222, "name": "tokenContract", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 192, - "src": "364:13:1", + "referencedDeclaration": 196, + "src": "406:13:1", "typeDescriptions": { - "typeIdentifier": "t_contract$_DappToken_$185", + "typeIdentifier": "t_contract$_DappToken_$189", "typeString": "contract DappToken" } }, @@ -2325,43 +2638,43 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 215, + "id": 223, "name": "_tokenContract", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 204, - "src": "380:14:1", + "referencedDeclaration": 212, + "src": "422:14:1", "typeDescriptions": { - "typeIdentifier": "t_contract$_DappToken_$185", + "typeIdentifier": "t_contract$_DappToken_$189", "typeString": "contract DappToken" } }, - "src": "364:30:1", + "src": "406:30:1", "typeDescriptions": { - "typeIdentifier": "t_contract$_DappToken_$185", + "typeIdentifier": "t_contract$_DappToken_$189", "typeString": "contract DappToken" } }, - "id": 217, + "id": 225, "nodeType": "ExpressionStatement", - "src": "364:30:1" + "src": "406:30:1" }, { "expression": { "argumentTypes": null, - "id": 220, + "id": 228, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 218, + "id": 226, "name": "tokenPrice", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 194, - "src": "404:10:1", + "referencedDeclaration": 198, + "src": "446:10:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2371,62 +2684,62 @@ "operator": "=", "rightHandSide": { "argumentTypes": null, - "id": 219, + "id": 227, "name": "_tokenPrice", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 206, - "src": "417:11:1", + "referencedDeclaration": 214, + "src": "459:11:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "404:24:1", + "src": "446:24:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 221, + "id": 229, "nodeType": "ExpressionStatement", - "src": "404:24:1" + "src": "446:24:1" } ] }, - "id": 223, + "documentation": null, + "id": 231, "implemented": true, - "isConstructor": true, - "isDeclaredConst": false, + "kind": "constructor", "modifiers": [], - "name": "DappTokenSale", + "name": "", "nodeType": "FunctionDefinition", "parameters": { - "id": 207, + "id": 215, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 204, + "id": 212, "name": "_tokenContract", "nodeType": "VariableDeclaration", - "scope": 223, - "src": "272:24:1", + "scope": 231, + "src": "314:24:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_DappToken_$185", + "typeIdentifier": "t_contract$_DappToken_$189", "typeString": "contract DappToken" }, "typeName": { "contractScope": null, - "id": 203, + "id": 211, "name": "DappToken", "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 185, - "src": "272:9:1", + "referencedDeclaration": 189, + "src": "314:9:1", "typeDescriptions": { - "typeIdentifier": "t_contract$_DappToken_$185", + "typeIdentifier": "t_contract$_DappToken_$189", "typeString": "contract DappToken" } }, @@ -2435,11 +2748,11 @@ }, { "constant": false, - "id": 206, + "id": 214, "name": "_tokenPrice", "nodeType": "VariableDeclaration", - "scope": 223, - "src": "298:19:1", + "scope": 231, + "src": "340:19:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2447,10 +2760,10 @@ "typeString": "uint256" }, "typeName": { - "id": 205, + "id": 213, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "298:7:1", + "src": "340:7:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2460,26 +2773,25 @@ "visibility": "internal" } ], - "src": "271:47:1" + "src": "313:47:1" }, - "payable": false, "returnParameters": { - "id": 208, + "id": 216, "nodeType": "ParameterList", "parameters": [], - "src": "326:0:1" + "src": "368:0:1" }, - "scope": 326, - "src": "249:186:1", + "scope": 345, + "src": "302:175:1", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { - "id": 249, + "id": 257, "nodeType": "Block", - "src": "506:56:1", + "src": "548:56:1", "statements": [ { "expression": { @@ -2491,7 +2803,7 @@ "typeIdentifier": "t_bool", "typeString": "bool" }, - "id": 246, + "id": 254, "isConstant": false, "isLValue": false, "isPure": false, @@ -2502,19 +2814,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 235, + "id": 243, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 233, + "id": 241, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 227, - "src": "524:1:1", + "referencedDeclaration": 235, + "src": "566:1:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2525,14 +2837,14 @@ "rightExpression": { "argumentTypes": null, "hexValue": "30", - "id": 234, + "id": 242, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "529:1:1", + "src": "571:1:1", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -2540,7 +2852,7 @@ }, "value": "0" }, - "src": "524:6:1", + "src": "566:6:1", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -2554,7 +2866,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 245, + "id": 253, "isConstant": false, "isLValue": false, "isPure": false, @@ -2565,7 +2877,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 243, + "id": 251, "isConstant": false, "isLValue": false, "isPure": false, @@ -2575,19 +2887,19 @@ "components": [ { "argumentTypes": null, - "id": 240, + "id": 248, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 236, + "id": 244, "name": "z", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 230, - "src": "535:1:1", + "referencedDeclaration": 238, + "src": "577:1:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2601,19 +2913,19 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 239, + "id": 247, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, - "id": 237, + "id": 245, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 225, - "src": "539:1:1", + "referencedDeclaration": 233, + "src": "581:1:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2623,38 +2935,38 @@ "operator": "*", "rightExpression": { "argumentTypes": null, - "id": 238, + "id": 246, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 227, - "src": "543:1:1", + "referencedDeclaration": 235, + "src": "585:1:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "539:5:1", + "src": "581:5:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "535:9:1", + "src": "577:9:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], - "id": 241, + "id": 249, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", - "src": "534:11:1", + "src": "576:11:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2664,18 +2976,18 @@ "operator": "/", "rightExpression": { "argumentTypes": null, - "id": 242, + "id": 250, "name": "y", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 227, - "src": "548:1:1", + "referencedDeclaration": 235, + "src": "590:1:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "534:15:1", + "src": "576:15:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2685,24 +2997,24 @@ "operator": "==", "rightExpression": { "argumentTypes": null, - "id": 244, + "id": 252, "name": "x", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 225, - "src": "553:1:1", + "referencedDeclaration": 233, + "src": "595:1:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "534:20:1", + "src": "576:20:1", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, - "src": "524:30:1", + "src": "566:30:1", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -2716,18 +3028,21 @@ "typeString": "bool" } ], - "id": 232, + "id": 240, "name": "require", "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 341, - "src": "516:7:1", + "overloadedDeclarations": [ + 420, + 421 + ], + "referencedDeclaration": 420, + "src": "558:7:1", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, - "id": 247, + "id": 255, "isConstant": false, "isLValue": false, "isPure": false, @@ -2735,36 +3050,36 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "516:39:1", + "src": "558:39:1", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 248, + "id": 256, "nodeType": "ExpressionStatement", - "src": "516:39:1" + "src": "558:39:1" } ] }, - "id": 250, + "documentation": null, + "id": 258, "implemented": true, - "isConstructor": false, - "isDeclaredConst": true, + "kind": "function", "modifiers": [], "name": "multiply", "nodeType": "FunctionDefinition", "parameters": { - "id": 228, + "id": 236, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 225, + "id": 233, "name": "x", "nodeType": "VariableDeclaration", - "scope": 250, - "src": "459:6:1", + "scope": 258, + "src": "501:6:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2772,10 +3087,10 @@ "typeString": "uint256" }, "typeName": { - "id": 224, + "id": 232, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "459:4:1", + "src": "501:4:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2786,11 +3101,11 @@ }, { "constant": false, - "id": 227, + "id": 235, "name": "y", "nodeType": "VariableDeclaration", - "scope": 250, - "src": "467:6:1", + "scope": 258, + "src": "509:6:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2798,10 +3113,10 @@ "typeString": "uint256" }, "typeName": { - "id": 226, + "id": 234, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "467:4:1", + "src": "509:4:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2811,20 +3126,19 @@ "visibility": "internal" } ], - "src": "458:16:1" + "src": "500:16:1" }, - "payable": false, "returnParameters": { - "id": 231, + "id": 239, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 230, + "id": 238, "name": "z", "nodeType": "VariableDeclaration", - "scope": 250, - "src": "498:6:1", + "scope": 258, + "src": "540:6:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -2832,10 +3146,10 @@ "typeString": "uint256" }, "typeName": { - "id": 229, + "id": 237, "name": "uint", "nodeType": "ElementaryTypeName", - "src": "498:4:1", + "src": "540:4:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2845,19 +3159,19 @@ "visibility": "internal" } ], - "src": "497:8:1" + "src": "539:8:1" }, - "scope": 326, - "src": "441:121:1", + "scope": 345, + "src": "483:121:1", "stateMutability": "pure", "superFunction": null, "visibility": "internal" }, { "body": { - "id": 293, + "id": 306, "nodeType": "Block", - "src": "627:297:1", + "src": "669:487:1", "statements": [ { "expression": { @@ -2869,7 +3183,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 262, + "id": 270, "isConstant": false, "isLValue": false, "isPure": false, @@ -2878,18 +3192,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 256, + "id": 264, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 338, - "src": "645:3:1", + "referencedDeclaration": 417, + "src": "687:3:1", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 257, + "id": 265, "isConstant": false, "isLValue": false, "isPure": false, @@ -2897,7 +3211,7 @@ "memberName": "value", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "645:9:1", + "src": "687:9:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2910,12 +3224,12 @@ "arguments": [ { "argumentTypes": null, - "id": 259, + "id": 267, "name": "_numberOfTokens", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 252, - "src": "667:15:1", + "referencedDeclaration": 260, + "src": "709:15:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2923,12 +3237,12 @@ }, { "argumentTypes": null, - "id": 260, + "id": 268, "name": "tokenPrice", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 194, - "src": "684:10:1", + "referencedDeclaration": 198, + "src": "726:10:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -2946,18 +3260,18 @@ "typeString": "uint256" } ], - "id": 258, + "id": 266, "name": "multiply", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 250, - "src": "658:8:1", + "referencedDeclaration": 258, + "src": "700:8:1", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, - "id": 261, + "id": 269, "isConstant": false, "isLValue": false, "isPure": false, @@ -2965,17 +3279,35 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "658:37:1", + "src": "700:37:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "645:50:1", + "src": "687:50:1", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } + }, + { + "argumentTypes": null, + "hexValue": "6d73672e76616c7565206d75737420657175616c206e756d626572206f6620746f6b656e7320696e20776569", + "id": 271, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "739:46:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_3e890bbf6b250083798fac03580b24b5d898dec1b35ade861549ab798052d89f", + "typeString": "literal_string \"msg.value must equal number of tokens in wei\"" + }, + "value": "msg.value must equal number of tokens in wei" } ], "expression": { @@ -2983,20 +3315,27 @@ { "typeIdentifier": "t_bool", "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_3e890bbf6b250083798fac03580b24b5d898dec1b35ade861549ab798052d89f", + "typeString": "literal_string \"msg.value must equal number of tokens in wei\"" } ], - "id": 255, + "id": 263, "name": "require", "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 341, - "src": "637:7:1", + "overloadedDeclarations": [ + 420, + 421 + ], + "referencedDeclaration": 421, + "src": "679:7:1", "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" } }, - "id": 263, + "id": 272, "isConstant": false, "isLValue": false, "isPure": false, @@ -3004,15 +3343,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "637:59:1", + "src": "679:107:1", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 264, + "id": 273, "nodeType": "ExpressionStatement", - "src": "637:59:1" + "src": "679:107:1" }, { "expression": { @@ -3024,7 +3363,7 @@ "typeIdentifier": "t_uint256", "typeString": "uint256" }, - "id": 271, + "id": 282, "isConstant": false, "isLValue": false, "isPure": false, @@ -3034,53 +3373,91 @@ "arguments": [ { "argumentTypes": null, - "id": 268, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 351, - "src": "738:4:1", + "arguments": [ + { + "argumentTypes": null, + "id": 278, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 432, + "src": "836:4:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DappTokenSale_$345", + "typeString": "contract DappTokenSale" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_DappTokenSale_$345", + "typeString": "contract DappTokenSale" + } + ], + "id": 277, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "828:7:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 279, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "828:13:1", "typeDescriptions": { - "typeIdentifier": "t_contract$_DappTokenSale_$326", - "typeString": "contract DappTokenSale" + "typeIdentifier": "t_address", + "typeString": "address" } } ], "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_DappTokenSale_$326", - "typeString": "contract DappTokenSale" + "typeIdentifier": "t_address", + "typeString": "address" } ], "expression": { "argumentTypes": null, - "id": 266, + "id": 275, "name": "tokenContract", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 192, - "src": "714:13:1", + "referencedDeclaration": 196, + "src": "804:13:1", "typeDescriptions": { - "typeIdentifier": "t_contract$_DappToken_$185", + "typeIdentifier": "t_contract$_DappToken_$189", "typeString": "contract DappToken" } }, - "id": 267, + "id": 276, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "balanceOf", "nodeType": "MemberAccess", - "referencedDeclaration": 32, - "src": "714:23:1", + "referencedDeclaration": 33, + "src": "804:23:1", "typeDescriptions": { "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)" } }, - "id": 269, + "id": 280, "isConstant": false, "isLValue": false, "isPure": false, @@ -3088,7 +3465,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "714:29:1", + "src": "804:38:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3098,22 +3475,40 @@ "operator": ">=", "rightExpression": { "argumentTypes": null, - "id": 270, + "id": 281, "name": "_numberOfTokens", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 252, - "src": "747:15:1", + "referencedDeclaration": 260, + "src": "846:15:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "714:48:1", + "src": "804:57:1", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } + }, + { + "argumentTypes": null, + "hexValue": "63616e6e6f74207075726368617365206d6f726520746f6b656e73207468616e20617661696c61626c65", + "id": 283, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "863:44:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_2f9daa56102f7e7cd6a947b5b1ca8ddd83e33f3dfc0cfa5ca2ae1b75443575a2", + "typeString": "literal_string \"cannot purchase more tokens than available\"" + }, + "value": "cannot purchase more tokens than available" } ], "expression": { @@ -3121,20 +3516,27 @@ { "typeIdentifier": "t_bool", "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_2f9daa56102f7e7cd6a947b5b1ca8ddd83e33f3dfc0cfa5ca2ae1b75443575a2", + "typeString": "literal_string \"cannot purchase more tokens than available\"" } ], - "id": 265, + "id": 274, "name": "require", "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 341, - "src": "706:7:1", + "overloadedDeclarations": [ + 420, + 421 + ], + "referencedDeclaration": 421, + "src": "796:7:1", "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" } }, - "id": 272, + "id": 284, "isConstant": false, "isLValue": false, "isPure": false, @@ -3142,15 +3544,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "706:57:1", + "src": "796:112:1", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 273, + "id": 285, "nodeType": "ExpressionStatement", - "src": "706:57:1" + "src": "796:112:1" }, { "expression": { @@ -3163,18 +3565,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 277, + "id": 289, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 338, - "src": "804:3:1", + "referencedDeclaration": 417, + "src": "949:3:1", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 278, + "id": 290, "isConstant": false, "isLValue": false, "isPure": false, @@ -3182,20 +3584,20 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "804:10:1", + "src": "949:10:1", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" } }, { "argumentTypes": null, - "id": 279, + "id": 291, "name": "_numberOfTokens", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 252, - "src": "816:15:1", + "referencedDeclaration": 260, + "src": "961:15:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3205,8 +3607,8 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" }, { "typeIdentifier": "t_uint256", @@ -3215,32 +3617,32 @@ ], "expression": { "argumentTypes": null, - "id": 275, + "id": 287, "name": "tokenContract", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 192, - "src": "781:13:1", + "referencedDeclaration": 196, + "src": "926:13:1", "typeDescriptions": { - "typeIdentifier": "t_contract$_DappToken_$185", + "typeIdentifier": "t_contract$_DappToken_$189", "typeString": "contract DappToken" } }, - "id": 276, + "id": 288, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "transfer", "nodeType": "MemberAccess", - "referencedDeclaration": 96, - "src": "781:22:1", + "referencedDeclaration": 98, + "src": "926:22:1", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,uint256) external returns (bool)" } }, - "id": 280, + "id": 292, "isConstant": false, "isLValue": false, "isPure": false, @@ -3248,11 +3650,29 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "781:51:1", + "src": "926:51:1", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } + }, + { + "argumentTypes": null, + "hexValue": "556e61626c6520746f2073656e6420746f6b656e73", + "id": 293, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "979:23:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4901131e3f0597c432f86daa7cb489a9fb75a20e0cb3683ed14a711a25ff8320", + "typeString": "literal_string \"Unable to send tokens\"" + }, + "value": "Unable to send tokens" } ], "expression": { @@ -3260,20 +3680,27 @@ { "typeIdentifier": "t_bool", "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_4901131e3f0597c432f86daa7cb489a9fb75a20e0cb3683ed14a711a25ff8320", + "typeString": "literal_string \"Unable to send tokens\"" } ], - "id": 274, + "id": 286, "name": "require", "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 341, - "src": "773:7:1", + "overloadedDeclarations": [ + 420, + 421 + ], + "referencedDeclaration": 421, + "src": "918:7:1", "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" } }, - "id": 281, + "id": 294, "isConstant": false, "isLValue": false, "isPure": false, @@ -3281,32 +3708,32 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "773:60:1", + "src": "918:85:1", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 282, + "id": 295, "nodeType": "ExpressionStatement", - "src": "773:60:1" + "src": "918:85:1" }, { "expression": { "argumentTypes": null, - "id": 285, + "id": 298, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, - "id": 283, + "id": 296, "name": "tokensSold", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 196, - "src": "844:10:1", + "referencedDeclaration": 200, + "src": "1071:10:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3316,47 +3743,47 @@ "operator": "+=", "rightHandSide": { "argumentTypes": null, - "id": 284, + "id": 297, "name": "_numberOfTokens", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 252, - "src": "858:15:1", + "referencedDeclaration": 260, + "src": "1085:15:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "844:29:1", + "src": "1071:29:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "id": 286, + "id": 299, "nodeType": "ExpressionStatement", - "src": "844:29:1" + "src": "1071:29:1" }, { - "expression": { + "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 288, + "id": 301, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 338, - "src": "889:3:1", + "referencedDeclaration": 417, + "src": "1121:3:1", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 289, + "id": 302, "isConstant": false, "isLValue": false, "isPure": false, @@ -3364,20 +3791,20 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "889:10:1", + "src": "1121:10:1", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" } }, { "argumentTypes": null, - "id": 290, + "id": 303, "name": "_numberOfTokens", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 252, - "src": "901:15:1", + "referencedDeclaration": 260, + "src": "1133:15:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3387,26 +3814,26 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], - "id": 287, + "id": 300, "name": "Sell", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 202, - "src": "884:4:1", + "referencedDeclaration": 206, + "src": "1116:4:1", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, - "id": 291, + "id": 304, "isConstant": false, "isLValue": false, "isPure": false, @@ -3414,36 +3841,36 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "884:33:1", + "src": "1116:33:1", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 292, - "nodeType": "ExpressionStatement", - "src": "884:33:1" + "id": 305, + "nodeType": "EmitStatement", + "src": "1111:38:1" } ] }, - "id": 294, + "documentation": null, + "id": 307, "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, + "kind": "function", "modifiers": [], "name": "buyTokens", "nodeType": "FunctionDefinition", "parameters": { - "id": 253, + "id": 261, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 252, + "id": 260, "name": "_numberOfTokens", "nodeType": "VariableDeclaration", - "scope": 294, - "src": "587:23:1", + "scope": 307, + "src": "629:23:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3451,10 +3878,10 @@ "typeString": "uint256" }, "typeName": { - "id": 251, + "id": 259, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "587:7:1", + "src": "629:7:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3464,26 +3891,25 @@ "visibility": "internal" } ], - "src": "586:25:1" + "src": "628:25:1" }, - "payable": true, "returnParameters": { - "id": 254, + "id": 262, "nodeType": "ParameterList", "parameters": [], - "src": "627:0:1" + "src": "669:0:1" }, - "scope": 326, - "src": "568:356:1", + "scope": 345, + "src": "610:546:1", "stateMutability": "payable", "superFunction": null, "visibility": "public" }, { "body": { - "id": 324, + "id": 343, "nodeType": "Block", - "src": "956:277:1", + "src": "1188:411:1", "statements": [ { "expression": { @@ -3492,10 +3918,10 @@ { "argumentTypes": null, "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" }, - "id": 301, + "id": 314, "isConstant": false, "isLValue": false, "isPure": false, @@ -3504,18 +3930,18 @@ "argumentTypes": null, "expression": { "argumentTypes": null, - "id": 298, + "id": 311, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 338, - "src": "974:3:1", + "referencedDeclaration": 417, + "src": "1206:3:1", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, - "id": 299, + "id": 312, "isConstant": false, "isLValue": false, "isPure": false, @@ -3523,28 +3949,28 @@ "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "974:10:1", + "src": "1206:10:1", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, - "id": 300, + "id": 313, "name": "admin", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 190, - "src": "988:5:1", + "referencedDeclaration": 194, + "src": "1220:5:1", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" } }, - "src": "974:19:1", + "src": "1206:19:1", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -3558,18 +3984,21 @@ "typeString": "bool" } ], - "id": 297, + "id": 310, "name": "require", "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 341, - "src": "966:7:1", + "overloadedDeclarations": [ + 420, + 421 + ], + "referencedDeclaration": 420, + "src": "1198:7:1", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, - "id": 302, + "id": 315, "isConstant": false, "isLValue": false, "isPure": false, @@ -3577,15 +4006,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "966:28:1", + "src": "1198:28:1", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 303, + "id": 316, "nodeType": "ExpressionStatement", - "src": "966:28:1" + "src": "1198:28:1" }, { "expression": { @@ -3596,15 +4025,15 @@ "arguments": [ { "argumentTypes": null, - "id": 307, + "id": 320, "name": "admin", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 190, - "src": "1035:5:1", + "referencedDeclaration": 194, + "src": "1267:5:1", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" } }, { @@ -3612,53 +4041,91 @@ "arguments": [ { "argumentTypes": null, - "id": 310, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 351, - "src": "1066:4:1", + "arguments": [ + { + "argumentTypes": null, + "id": 324, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 432, + "src": "1306:4:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DappTokenSale_$345", + "typeString": "contract DappTokenSale" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_DappTokenSale_$345", + "typeString": "contract DappTokenSale" + } + ], + "id": 323, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1298:7:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 325, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1298:13:1", "typeDescriptions": { - "typeIdentifier": "t_contract$_DappTokenSale_$326", - "typeString": "contract DappTokenSale" + "typeIdentifier": "t_address", + "typeString": "address" } } ], "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_DappTokenSale_$326", - "typeString": "contract DappTokenSale" + "typeIdentifier": "t_address", + "typeString": "address" } ], "expression": { "argumentTypes": null, - "id": 308, + "id": 321, "name": "tokenContract", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 192, - "src": "1042:13:1", + "referencedDeclaration": 196, + "src": "1274:13:1", "typeDescriptions": { - "typeIdentifier": "t_contract$_DappToken_$185", + "typeIdentifier": "t_contract$_DappToken_$189", "typeString": "contract DappToken" } }, - "id": 309, + "id": 322, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "balanceOf", "nodeType": "MemberAccess", - "referencedDeclaration": 32, - "src": "1042:23:1", + "referencedDeclaration": 33, + "src": "1274:23:1", "typeDescriptions": { "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", "typeString": "function (address) view external returns (uint256)" } }, - "id": 311, + "id": 326, "isConstant": false, "isLValue": false, "isPure": false, @@ -3666,7 +4133,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1042:29:1", + "src": "1274:38:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3676,8 +4143,8 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" }, { "typeIdentifier": "t_uint256", @@ -3686,32 +4153,32 @@ ], "expression": { "argumentTypes": null, - "id": 305, + "id": 318, "name": "tokenContract", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 192, - "src": "1012:13:1", + "referencedDeclaration": 196, + "src": "1244:13:1", "typeDescriptions": { - "typeIdentifier": "t_contract$_DappToken_$185", + "typeIdentifier": "t_contract$_DappToken_$189", "typeString": "contract DappToken" } }, - "id": 306, + "id": 319, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "transfer", "nodeType": "MemberAccess", - "referencedDeclaration": 96, - "src": "1012:22:1", + "referencedDeclaration": 98, + "src": "1244:22:1", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", "typeString": "function (address,uint256) external returns (bool)" } }, - "id": 312, + "id": 327, "isConstant": false, "isLValue": false, "isPure": false, @@ -3719,7 +4186,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1012:60:1", + "src": "1244:69:1", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -3733,18 +4200,21 @@ "typeString": "bool" } ], - "id": 304, + "id": 317, "name": "require", "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 341, - "src": "1004:7:1", + "overloadedDeclarations": [ + 420, + 421 + ], + "referencedDeclaration": 420, + "src": "1236:7:1", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, - "id": 313, + "id": 328, "isConstant": false, "isLValue": false, "isPure": false, @@ -3752,15 +4222,15 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1004:69:1", + "src": "1236:78:1", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 314, + "id": 329, "nodeType": "ExpressionStatement", - "src": "1004:69:1" + "src": "1236:78:1" }, { "expression": { @@ -3773,14 +4243,14 @@ "arguments": [ { "argumentTypes": null, - "id": 319, + "id": 334, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 351, - "src": "1212:4:1", + "referencedDeclaration": 432, + "src": "1543:4:1", "typeDescriptions": { - "typeIdentifier": "t_contract$_DappTokenSale_$326", + "typeIdentifier": "t_contract$_DappTokenSale_$345", "typeString": "contract DappTokenSale" } } @@ -3788,24 +4258,24 @@ "expression": { "argumentTypes": [ { - "typeIdentifier": "t_contract$_DappTokenSale_$326", + "typeIdentifier": "t_contract$_DappTokenSale_$345", "typeString": "contract DappTokenSale" } ], - "id": 318, + "id": 333, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "1204:7:1", + "src": "1535:7:1", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": "address" }, - "id": 320, + "id": 335, "isConstant": false, "isLValue": false, "isPure": false, @@ -3813,13 +4283,13 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1204:13:1", + "src": "1535:13:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, - "id": 321, + "id": 336, "isConstant": false, "isLValue": false, "isPure": false, @@ -3827,7 +4297,7 @@ "memberName": "balance", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "1204:21:1", + "src": "1535:21:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3843,18 +4313,18 @@ ], "expression": { "argumentTypes": null, - "id": 315, + "id": 330, "name": "admin", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 190, - "src": "1189:5:1", + "referencedDeclaration": 194, + "src": "1520:5:1", "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" + "typeIdentifier": "t_address_payable", + "typeString": "address payable" } }, - "id": 317, + "id": 332, "isConstant": false, "isLValue": false, "isPure": false, @@ -3862,13 +4332,13 @@ "memberName": "transfer", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "1189:14:1", + "src": "1520:14:1", "typeDescriptions": { "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256)" } }, - "id": 322, + "id": 337, "isConstant": false, "isLValue": false, "isPure": false, @@ -3876,54 +4346,107 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "1189:37:1", + "src": "1520:37:1", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, - "id": 323, + "id": 338, "nodeType": "ExpressionStatement", - "src": "1189:37:1" + "src": "1520:37:1" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 340, + "name": "tokensSold", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 200, + "src": "1581:10:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 339, + "name": "EndSale", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 210, + "src": "1573:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 341, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1573:19:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 342, + "nodeType": "EmitStatement", + "src": "1568:24:1" } ] }, - "id": 325, + "documentation": null, + "id": 344, "implemented": true, - "isConstructor": false, - "isDeclaredConst": false, + "kind": "function", "modifiers": [], "name": "endSale", "nodeType": "FunctionDefinition", "parameters": { - "id": 295, + "id": 308, "nodeType": "ParameterList", "parameters": [], - "src": "946:2:1" + "src": "1178:2:1" }, - "payable": false, "returnParameters": { - "id": 296, + "id": 309, "nodeType": "ParameterList", "parameters": [], - "src": "956:0:1" + "src": "1188:0:1" }, - "scope": 326, - "src": "930:303:1", + "scope": 345, + "src": "1162:437:1", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" } ], - "scope": 327, - "src": "52:1183:1" + "scope": 346, + "src": "52:1549:1" } ], - "src": "0:1236:1" + "src": "0:1602:1" }, "compiler": { "name": "solc", - "version": "0.4.19+commit.c4cbbb05.Emscripten.clang" + "version": "0.5.0+commit.1d4f565a.Emscripten.clang" }, "networks": { "4": { @@ -3942,8 +4465,50 @@ "links": {}, "address": "0x506ab6bcdd3323cb8dfe16da0febc53f32b6f393", "transactionHash": "0xeea490fa6a3e2bc63ee81989417d7594a546f73cfb321c9552b8297ad4e532c5" + }, + "1557694405500": { + "events": {}, + "links": {}, + "address": "0xfc8693E5C949FC80266d1Fca51fD3B84AaD95964", + "transactionHash": "0x694b6c3ad0cfde2178565f2c054c116c52018ee3efbbd0d6fc67a6856708cb05" + }, + "1557708358626": { + "events": {}, + "links": {}, + "address": "0x1fF8FCAea502085f6bc0B629Fd324CEc4CDf4B28", + "transactionHash": "0x99888e3f706dc990ef012777353b19b2c6f7a280f33b2cad149cdc294505981e" + }, + "1557709240444": { + "events": {}, + "links": {}, + "address": "0x043AA4687C324D5162E4411A8a9e31fD2AcB99E4", + "transactionHash": "0xdc8f6edecdf3d681d927d2dce7f746d82c229e071ac1390a39830424912ad813" + }, + "1557709597422": { + "events": {}, + "links": {}, + "address": "0xC434e2e2c75d52a97c9e50366A4fED3F3d24Cc0F", + "transactionHash": "0x952a6d5fe2f8735387be268c9439ec6a706460a7d8b1ab8fd1ee1bae012f5a5d" + }, + "1557710076986": { + "events": {}, + "links": {}, + "address": "0x3cbc2CDd0504759c037C8647070c320A588ad35d", + "transactionHash": "0x0842fde60c8431c5e2959c0f463f707b22b11a520bf8009e0c07c2c9865d4a84" + }, + "1557716539833": { + "events": {}, + "links": {}, + "address": "0x988694e7C1898Dc4018d54d0a671B3Ab3b4F67A9", + "transactionHash": "0x9f6ff74cdd90ebf99af3d1634e6b6d667e11084710cf75a0ec89e1d38178607a" } }, - "schemaVersion": "2.0.0", - "updatedAt": "2018-05-23T03:26:45.860Z" + "schemaVersion": "3.0.6", + "updatedAt": "2019-05-13T04:58:55.091Z", + "devdoc": { + "methods": {} + }, + "userdoc": { + "methods": {} + } } \ No newline at end of file diff --git a/build/contracts/Migrations.json b/build/contracts/Migrations.json index 06aeb9461..a94ce40a7 100644 --- a/build/contracts/Migrations.json +++ b/build/contracts/Migrations.json @@ -1,20 +1,6 @@ { "contractName": "Migrations", "abi": [ - { - "constant": false, - "inputs": [ - { - "name": "new_address", - "type": "address" - } - ], - "name": "upgrade", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -27,7 +13,8 @@ ], "payable": false, "stateMutability": "view", - "type": "function" + "type": "function", + "signature": "0x445df0ac" }, { "constant": true, @@ -41,7 +28,15 @@ ], "payable": false, "stateMutability": "view", - "type": "function" + "type": "function", + "signature": "0x8da5cb5b" + }, + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor", + "signature": "constructor" }, { "constant": false, @@ -55,1506 +50,1327 @@ "outputs": [], "payable": false, "stateMutability": "nonpayable", - "type": "function" + "type": "function", + "signature": "0xfdacd576" }, { - "inputs": [], + "constant": false, + "inputs": [ + { + "name": "new_address", + "type": "address" + } + ], + "name": "upgrade", + "outputs": [], "payable": false, "stateMutability": "nonpayable", - "type": "constructor" + "type": "function", + "signature": "0x0900f010" } ], - "bytecode": "0x6060604052341561000f57600080fd5b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506102db8061005e6000396000f300606060405260043610610062576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630900f01014610067578063445df0ac146100a05780638da5cb5b146100c9578063fdacd5761461011e575b600080fd5b341561007257600080fd5b61009e600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610141565b005b34156100ab57600080fd5b6100b3610224565b6040518082815260200191505060405180910390f35b34156100d457600080fd5b6100dc61022a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561012957600080fd5b61013f600480803590602001909190505061024f565b005b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610220578190508073ffffffffffffffffffffffffffffffffffffffff1663fdacd5766001546040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b151561020b57600080fd5b6102c65a03f1151561021c57600080fd5b5050505b5050565b60015481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156102ac57806001819055505b505600a165627a7a723058207514b6a06a0ee0d32c99d98c5264b96988cf2b13c24b45c431df92ecc40e2bd40029", - "deployedBytecode": "0x606060405260043610610062576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630900f01014610067578063445df0ac146100a05780638da5cb5b146100c9578063fdacd5761461011e575b600080fd5b341561007257600080fd5b61009e600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610141565b005b34156100ab57600080fd5b6100b3610224565b6040518082815260200191505060405180910390f35b34156100d457600080fd5b6100dc61022a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561012957600080fd5b61013f600480803590602001909190505061024f565b005b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610220578190508073ffffffffffffffffffffffffffffffffffffffff1663fdacd5766001546040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b151561020b57600080fd5b6102c65a03f1151561021c57600080fd5b5050505b5050565b60015481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156102ac57806001819055505b505600a165627a7a723058207514b6a06a0ee0d32c99d98c5264b96988cf2b13c24b45c431df92ecc40e2bd40029", - "sourceMap": "26:488:2:-;;;178:58;;;;;;;;221:10;213:5;;:18;;;;;;;;;;;;;;;;;;26:488;;;;;;", - "deployedSourceMap": "26:488:2:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;347:165;;;;;;;;;;;;;;;;;;;;;;;;;;;;74:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;50:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;240:103;;;;;;;;;;;;;;;;;;;;;;;;;;347:165;409:19;161:5;;;;;;;;;;;147:19;;:10;:19;;;143:26;;;442:11;409:45;;460:8;:21;;;482:24;;460:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;143:26;347:165;;:::o;74:36::-;;;;:::o;50:20::-;;;;;;;;;;;;;:::o;240:103::-;161:5;;;;;;;;;;;147:19;;:10;:19;;;143:26;;;329:9;302:24;:36;;;;143:26;240:103;:::o", - "source": "pragma solidity ^0.4.17;\n\ncontract Migrations {\n address public owner;\n uint public last_completed_migration;\n\n modifier restricted() {\n if (msg.sender == owner) _;\n }\n\n function Migrations() public {\n owner = msg.sender;\n }\n\n function setCompleted(uint completed) public restricted {\n last_completed_migration = completed;\n }\n\n function upgrade(address new_address) public restricted {\n Migrations upgraded = Migrations(new_address);\n upgraded.setCompleted(last_completed_migration);\n }\n}\n", - "sourcePath": "/Users/gregory/code/token_sale/contracts/Migrations.sol", + "metadata": "{\"compiler\":{\"version\":\"0.5.0+commit.1d4f565a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":false,\"inputs\":[{\"name\":\"new_address\",\"type\":\"address\"}],\"name\":\"upgrade\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"last_completed_migration\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"completed\",\"type\":\"uint256\"}],\"name\":\"setCompleted\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/shayanja/projects/blockchain/token_sale/contracts/Migrations.sol\":\"Migrations\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/shayanja/projects/blockchain/token_sale/contracts/Migrations.sol\":{\"keccak256\":\"0xf65fcb01f4b8ef6909f55bccf7f05ab483d953e671e205d9ce8ea6a9adc3c653\",\"urls\":[\"bzzr://ea0687984a75ca6b8aa89a3ba439fa3123a53421a5b5474320c74ad1174583fc\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610314806100606000396000f3fe608060405260043610610062576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630900f01014610067578063445df0ac146100b85780638da5cb5b146100e3578063fdacd5761461013a575b600080fd5b34801561007357600080fd5b506100b66004803603602081101561008a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610175565b005b3480156100c457600080fd5b506100cd61025d565b6040518082815260200191505060405180910390f35b3480156100ef57600080fd5b506100f8610263565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561014657600080fd5b506101736004803603602081101561015d57600080fd5b8101908080359060200190929190505050610288565b005b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561025a5760008190508073ffffffffffffffffffffffffffffffffffffffff1663fdacd5766001546040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b15801561024057600080fd5b505af1158015610254573d6000803e3d6000fd5b50505050505b50565b60015481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156102e557806001819055505b5056fea165627a7a7230582011cd53fe3b04cb13e94bb674c75b2d0051e058d88456db3d3f529029c9e9b26e0029", + "deployedBytecode": "0x608060405260043610610062576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630900f01014610067578063445df0ac146100b85780638da5cb5b146100e3578063fdacd5761461013a575b600080fd5b34801561007357600080fd5b506100b66004803603602081101561008a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610175565b005b3480156100c457600080fd5b506100cd61025d565b6040518082815260200191505060405180910390f35b3480156100ef57600080fd5b506100f8610263565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561014657600080fd5b506101736004803603602081101561015d57600080fd5b8101908080359060200190929190505050610288565b005b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561025a5760008190508073ffffffffffffffffffffffffffffffffffffffff1663fdacd5766001546040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b15801561024057600080fd5b505af1158015610254573d6000803e3d6000fd5b50505050505b50565b60015481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156102e557806001819055505b5056fea165627a7a7230582011cd53fe3b04cb13e94bb674c75b2d0051e058d88456db3d3f529029c9e9b26e0029", + "sourceMap": "25:480:2:-;;;177:50;8:9:-1;5:2;;;30:1;27;20:12;5:2;177:50:2;212:10;204:5;;:18;;;;;;;;;;;;;;;;;;25:480;;;;;;", + "deployedSourceMap": "25:480:2:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;338:165;;8:9:-1;5:2;;;30:1;27;20:12;5:2;338:165:2;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;338:165:2;;;;;;;;;;;;;;;;;;;;;;73:36;;8:9:-1;5:2;;;30:1;27;20:12;5:2;73:36:2;;;;;;;;;;;;;;;;;;;;;;;49:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;49:20:2;;;;;;;;;;;;;;;;;;;;;;;;;;;231:103;;8:9:-1;5:2;;;30:1;27;20:12;5:2;231:103:2;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;231:103:2;;;;;;;;;;;;;;;;;;;;338:165;160:5;;;;;;;;;;;146:19;;:10;:19;;;142:26;;;400:19;433:11;400:45;;451:8;:21;;;473:24;;451:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;451:47:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;451:47:2;;;;167:1;142:26;338:165;:::o;73:36::-;;;;:::o;49:20::-;;;;;;;;;;;;;:::o;231:103::-;160:5;;;;;;;;;;;146:19;;:10;:19;;;142:26;;;320:9;293:24;:36;;;;142:26;231:103;:::o", + "source": "pragma solidity ^0.5.0;\n\ncontract Migrations {\n address public owner;\n uint public last_completed_migration;\n\n modifier restricted() {\n if (msg.sender == owner) _;\n }\n\n constructor() public {\n owner = msg.sender;\n }\n\n function setCompleted(uint completed) public restricted {\n last_completed_migration = completed;\n }\n\n function upgrade(address new_address) public restricted {\n Migrations upgraded = Migrations(new_address);\n upgraded.setCompleted(last_completed_migration);\n }\n}\n", + "sourcePath": "/Users/shayanja/projects/blockchain/token_sale/contracts/Migrations.sol", "ast": { - "attributes": { - "absolutePath": "/Users/gregory/code/token_sale/contracts/Migrations.sol", - "exportedSymbols": { - "Migrations": [ - 378 - ] - } + "absolutePath": "/Users/shayanja/projects/blockchain/token_sale/contracts/Migrations.sol", + "exportedSymbols": { + "Migrations": [ + 384 + ] }, - "children": [ + "id": 385, + "nodeType": "SourceUnit", + "nodes": [ { - "attributes": { - "literals": [ - "solidity", - "^", - "0.4", - ".17" - ] - }, - "id": 323, - "name": "PragmaDirective", - "src": "0:24:2" + "id": 329, + "literals": [ + "solidity", + "^", + "0.5", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "0:23:2" }, { - "attributes": { - "baseContracts": [ - null - ], - "contractDependencies": [ - null - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "linearizedBaseContracts": [ - 378 - ], - "name": "Migrations", - "scope": 379 - }, - "children": [ + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 384, + "linearizedBaseContracts": [ + 384 + ], + "name": "Migrations", + "nodeType": "ContractDefinition", + "nodes": [ { - "attributes": { - "constant": false, - "name": "owner", - "scope": 378, - "stateVariable": true, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "public" + "constant": false, + "id": 331, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 384, + "src": "49:20:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" }, - "children": [ - { - "attributes": { - "name": "address", - "type": "address" - }, - "id": 324, - "name": "ElementaryTypeName", - "src": "50:7:2" + "typeName": { + "id": 330, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "49:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" } - ], - "id": 325, - "name": "VariableDeclaration", - "src": "50:20:2" + }, + "value": null, + "visibility": "public" }, { - "attributes": { - "constant": false, - "name": "last_completed_migration", - "scope": 378, - "stateVariable": true, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "public" + "constant": false, + "id": 333, + "name": "last_completed_migration", + "nodeType": "VariableDeclaration", + "scope": 384, + "src": "73:36:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, - "children": [ - { - "attributes": { - "name": "uint", - "type": "uint256" - }, - "id": 326, - "name": "ElementaryTypeName", - "src": "74:4:2" + "typeName": { + "id": 332, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "73:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } - ], - "id": 327, - "name": "VariableDeclaration", - "src": "74:36:2" + }, + "value": null, + "visibility": "public" }, { - "attributes": { - "name": "restricted", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "parameters": [ - null - ] - }, - "children": [], - "id": 328, - "name": "ParameterList", - "src": "134:2:2" - }, - { - "children": [ - { - "attributes": { - "falseBody": null + "body": { + "id": 341, + "nodeType": "Block", + "src": "136:37:2", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "==", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "sender", - "referencedDeclaration": null, - "type": "address" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 390, - "type": "msg", - "value": "msg" - }, - "id": 329, - "name": "Identifier", - "src": "147:3:2" - } - ], - "id": 330, - "name": "MemberAccess", - "src": "147:10:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 325, - "type": "address", - "value": "owner" - }, - "id": 331, - "name": "Identifier", - "src": "161:5:2" - } - ], - "id": 332, - "name": "BinaryOperation", - "src": "147:19:2" + "id": 338, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 335, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 399, + "src": "146:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } }, - { - "id": 333, - "name": "PlaceholderStatement", - "src": "168:1:2" + "id": 336, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "146:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" } - ], - "id": 334, - "name": "IfStatement", - "src": "143:26:2" - } - ], - "id": 335, - "name": "Block", - "src": "137:37:2" - } - ], - "id": 336, - "name": "ModifierDefinition", - "src": "115:59:2" - }, - { - "attributes": { - "constant": false, - "implemented": true, - "isConstructor": true, - "modifiers": [ - null - ], - "name": "Migrations", - "payable": false, - "scope": 378, - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "parameters": [ - null - ] - }, - "children": [], - "id": 337, - "name": "ParameterList", - "src": "197:2:2" - }, - { - "attributes": { - "parameters": [ - null - ] - }, - "children": [], - "id": 338, - "name": "ParameterList", - "src": "207:0:2" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "address" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 325, - "type": "address", - "value": "owner" - }, - "id": 339, - "name": "Identifier", - "src": "213:5:2" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "sender", - "referencedDeclaration": null, - "type": "address" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 390, - "type": "msg", - "value": "msg" - }, - "id": 340, - "name": "Identifier", - "src": "221:3:2" - } - ], - "id": 341, - "name": "MemberAccess", - "src": "221:10:2" - } - ], - "id": 342, - "name": "Assignment", - "src": "213:18:2" + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 337, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 331, + "src": "160:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" } - ], - "id": 343, - "name": "ExpressionStatement", - "src": "213:18:2" + }, + "src": "146:19:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 340, + "nodeType": "IfStatement", + "src": "142:26:2", + "trueBody": { + "id": 339, + "nodeType": "PlaceholderStatement", + "src": "167:1:2" } - ], - "id": 344, - "name": "Block", - "src": "207:29:2" - } - ], - "id": 345, - "name": "FunctionDefinition", - "src": "178:58:2" + } + ] + }, + "documentation": null, + "id": 342, + "name": "restricted", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 334, + "nodeType": "ParameterList", + "parameters": [], + "src": "133:2:2" + }, + "src": "114:59:2", + "visibility": "internal" }, { - "attributes": { - "constant": false, - "implemented": true, - "isConstructor": false, - "name": "setCompleted", - "payable": false, - "scope": 378, - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "name": "completed", - "scope": 357, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" + "body": { + "id": 350, + "nodeType": "Block", + "src": "198:29:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 348, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 345, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 331, + "src": "204:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } }, - "children": [ - { - "attributes": { - "name": "uint", - "type": "uint256" - }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, "id": 346, - "name": "ElementaryTypeName", - "src": "262:4:2" + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 399, + "src": "212:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 347, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "212:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" } - ], - "id": 347, - "name": "VariableDeclaration", - "src": "262:14:2" - } - ], - "id": 348, - "name": "ParameterList", - "src": "261:16:2" - }, - { - "attributes": { - "parameters": [ - null - ] - }, - "children": [], - "id": 351, - "name": "ParameterList", - "src": "296:0:2" - }, - { - "attributes": { - "arguments": [ - null - ] - }, - "children": [ - { - "attributes": { + }, + "src": "204:18:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 349, + "nodeType": "ExpressionStatement", + "src": "204:18:2" + } + ] + }, + "documentation": null, + "id": 351, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 343, + "nodeType": "ParameterList", + "parameters": [], + "src": "188:2:2" + }, + "returnParameters": { + "id": 344, + "nodeType": "ParameterList", + "parameters": [], + "src": "198:0:2" + }, + "scope": 384, + "src": "177:50:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 362, + "nodeType": "Block", + "src": "287:47:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 336, - "type": "modifier ()", - "value": "restricted" + "id": 358, + "name": "last_completed_migration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 333, + "src": "293:24:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } }, - "id": 349, - "name": "Identifier", - "src": "285:10:2" - } - ], - "id": 350, - "name": "ModifierInvocation", - "src": "285:10:2" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 327, - "type": "uint256", - "value": "last_completed_migration" - }, - "id": 352, - "name": "Identifier", - "src": "302:24:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 347, - "type": "uint256", - "value": "completed" - }, - "id": 353, - "name": "Identifier", - "src": "329:9:2" - } - ], - "id": 354, - "name": "Assignment", - "src": "302:36:2" + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 359, + "name": "completed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 353, + "src": "320:9:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } - ], - "id": 355, - "name": "ExpressionStatement", - "src": "302:36:2" - } - ], + }, + "src": "293:36:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 361, + "nodeType": "ExpressionStatement", + "src": "293:36:2" + } + ] + }, + "documentation": null, + "id": 363, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, "id": 356, - "name": "Block", - "src": "296:47:2" + "modifierName": { + "argumentTypes": null, + "id": 355, + "name": "restricted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 342, + "src": "276:10:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "276:10:2" } ], - "id": 357, - "name": "FunctionDefinition", - "src": "240:103:2" + "name": "setCompleted", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 354, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 353, + "name": "completed", + "nodeType": "VariableDeclaration", + "scope": 363, + "src": "253:14:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 352, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "253:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "252:16:2" + }, + "returnParameters": { + "id": 357, + "nodeType": "ParameterList", + "parameters": [], + "src": "287:0:2" + }, + "scope": 384, + "src": "231:103:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" }, { - "attributes": { - "constant": false, - "implemented": true, - "isConstructor": false, - "name": "upgrade", - "payable": false, - "scope": 378, - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - "children": [ - { - "children": [ - { - "attributes": { + "body": { + "id": 382, + "nodeType": "Block", + "src": "394:109:2", + "statements": [ + { + "assignments": [ + 371 + ], + "declarations": [ + { "constant": false, - "name": "new_address", - "scope": 377, + "id": 371, + "name": "upgraded", + "nodeType": "VariableDeclaration", + "scope": 382, + "src": "400:19:2", "stateVariable": false, "storageLocation": "default", - "type": "address", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Migrations_$384", + "typeString": "contract Migrations" + }, + "typeName": { + "contractScope": null, + "id": 370, + "name": "Migrations", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 384, + "src": "400:10:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Migrations_$384", + "typeString": "contract Migrations" + } + }, "value": null, "visibility": "internal" - }, - "children": [ + } + ], + "id": 375, + "initialValue": { + "argumentTypes": null, + "arguments": [ { - "attributes": { - "name": "address", - "type": "address" - }, - "id": 358, - "name": "ElementaryTypeName", - "src": "364:7:2" + "argumentTypes": null, + "id": 373, + "name": "new_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 365, + "src": "433:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } } ], - "id": 359, - "name": "VariableDeclaration", - "src": "364:19:2" - } - ], - "id": 360, - "name": "ParameterList", - "src": "363:21:2" - }, - { - "attributes": { - "parameters": [ - null - ] - }, - "children": [], - "id": 363, - "name": "ParameterList", - "src": "403:0:2" - }, - { - "attributes": { - "arguments": [ - null - ] - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } ], - "referencedDeclaration": 336, - "type": "modifier ()", - "value": "restricted" - }, - "id": 361, - "name": "Identifier", - "src": "392:10:2" - } - ], - "id": 362, - "name": "ModifierInvocation", - "src": "392:10:2" - }, - { - "children": [ - { - "attributes": { - "assignments": [ - 365 - ] - }, - "children": [ - { - "attributes": { - "constant": false, - "name": "upgraded", - "scope": 377, - "stateVariable": false, - "storageLocation": "default", - "type": "contract Migrations", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "contractScope": null, - "name": "Migrations", - "referencedDeclaration": 378, - "type": "contract Migrations" - }, - "id": 364, - "name": "UserDefinedTypeName", - "src": "409:10:2" - } - ], - "id": 365, - "name": "VariableDeclaration", - "src": "409:19:2" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "type": "contract Migrations", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 378, - "type": "type(contract Migrations)", - "value": "Migrations" - }, - "id": 366, - "name": "Identifier", - "src": "431:10:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 359, - "type": "address", - "value": "new_address" - }, - "id": 367, - "name": "Identifier", - "src": "442:11:2" - } - ], - "id": 368, - "name": "FunctionCall", - "src": "431:23:2" + "id": 372, + "name": "Migrations", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 384, + "src": "422:10:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Migrations_$384_$", + "typeString": "type(contract Migrations)" } - ], - "id": 369, - "name": "VariableDeclarationStatement", - "src": "409:45:2" + }, + "id": 374, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "422:23:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Migrations_$384", + "typeString": "contract Migrations" + } }, - { - "children": [ + "nodeType": "VariableDeclarationStatement", + "src": "400:45:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ { - "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_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "setCompleted", - "referencedDeclaration": 357, - "type": "function (uint256) external" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 365, - "type": "contract Migrations", - "value": "upgraded" - }, - "id": 370, - "name": "Identifier", - "src": "460:8:2" - } - ], - "id": 372, - "name": "MemberAccess", - "src": "460:21:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 327, - "type": "uint256", - "value": "last_completed_migration" - }, - "id": 373, - "name": "Identifier", - "src": "482:24:2" - } - ], - "id": 374, - "name": "FunctionCall", - "src": "460:47:2" + "argumentTypes": null, + "id": 379, + "name": "last_completed_migration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 333, + "src": "473:24:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } } ], - "id": 375, - "name": "ExpressionStatement", - "src": "460:47:2" + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 376, + "name": "upgraded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 371, + "src": "451:8:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Migrations_$384", + "typeString": "contract Migrations" + } + }, + "id": 378, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setCompleted", + "nodeType": "MemberAccess", + "referencedDeclaration": 363, + "src": "451:21:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256) external" + } + }, + "id": 380, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "451:47:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 381, + "nodeType": "ExpressionStatement", + "src": "451:47:2" + } + ] + }, + "documentation": null, + "id": 383, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 368, + "modifierName": { + "argumentTypes": null, + "id": 367, + "name": "restricted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 342, + "src": "383:10:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" } - ], - "id": 376, - "name": "Block", - "src": "403:109:2" + }, + "nodeType": "ModifierInvocation", + "src": "383:10:2" } ], - "id": 377, - "name": "FunctionDefinition", - "src": "347:165:2" + "name": "upgrade", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 366, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 365, + "name": "new_address", + "nodeType": "VariableDeclaration", + "scope": 383, + "src": "355:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 364, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "355:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "354:21:2" + }, + "returnParameters": { + "id": 369, + "nodeType": "ParameterList", + "parameters": [], + "src": "394:0:2" + }, + "scope": 384, + "src": "338:165:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" } ], - "id": 378, - "name": "ContractDefinition", - "src": "26:488:2" + "scope": 385, + "src": "25:480:2" } ], - "id": 379, - "name": "SourceUnit", - "src": "0:515:2" + "src": "0:506:2" }, "legacyAST": { - "attributes": { - "absolutePath": "/Users/gregory/code/token_sale/contracts/Migrations.sol", - "exportedSymbols": { - "Migrations": [ - 378 - ] - } + "absolutePath": "/Users/shayanja/projects/blockchain/token_sale/contracts/Migrations.sol", + "exportedSymbols": { + "Migrations": [ + 384 + ] }, - "children": [ + "id": 385, + "nodeType": "SourceUnit", + "nodes": [ { - "attributes": { - "literals": [ - "solidity", - "^", - "0.4", - ".17" - ] - }, - "id": 323, - "name": "PragmaDirective", - "src": "0:24:2" + "id": 329, + "literals": [ + "solidity", + "^", + "0.5", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "0:23:2" }, { - "attributes": { - "baseContracts": [ - null - ], - "contractDependencies": [ - null - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "linearizedBaseContracts": [ - 378 - ], - "name": "Migrations", - "scope": 379 - }, - "children": [ + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 384, + "linearizedBaseContracts": [ + 384 + ], + "name": "Migrations", + "nodeType": "ContractDefinition", + "nodes": [ { - "attributes": { - "constant": false, - "name": "owner", - "scope": 378, - "stateVariable": true, - "storageLocation": "default", - "type": "address", - "value": null, - "visibility": "public" + "constant": false, + "id": 331, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 384, + "src": "49:20:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" }, - "children": [ - { - "attributes": { - "name": "address", - "type": "address" - }, - "id": 324, - "name": "ElementaryTypeName", - "src": "50:7:2" + "typeName": { + "id": 330, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "49:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" } - ], - "id": 325, - "name": "VariableDeclaration", - "src": "50:20:2" + }, + "value": null, + "visibility": "public" }, { - "attributes": { - "constant": false, - "name": "last_completed_migration", - "scope": 378, - "stateVariable": true, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "public" + "constant": false, + "id": 333, + "name": "last_completed_migration", + "nodeType": "VariableDeclaration", + "scope": 384, + "src": "73:36:2", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" }, - "children": [ - { - "attributes": { - "name": "uint", - "type": "uint256" - }, - "id": 326, - "name": "ElementaryTypeName", - "src": "74:4:2" + "typeName": { + "id": 332, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "73:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } - ], - "id": 327, - "name": "VariableDeclaration", - "src": "74:36:2" + }, + "value": null, + "visibility": "public" }, { - "attributes": { - "name": "restricted", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "parameters": [ - null - ] - }, - "children": [], - "id": 328, - "name": "ParameterList", - "src": "134:2:2" - }, - { - "children": [ - { - "attributes": { - "falseBody": null + "body": { + "id": 341, + "nodeType": "Block", + "src": "136:37:2", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "==", - "type": "bool" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "sender", - "referencedDeclaration": null, - "type": "address" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 390, - "type": "msg", - "value": "msg" - }, - "id": 329, - "name": "Identifier", - "src": "147:3:2" - } - ], - "id": 330, - "name": "MemberAccess", - "src": "147:10:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 325, - "type": "address", - "value": "owner" - }, - "id": 331, - "name": "Identifier", - "src": "161:5:2" - } - ], - "id": 332, - "name": "BinaryOperation", - "src": "147:19:2" + "id": 338, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 335, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 399, + "src": "146:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } }, - { - "id": 333, - "name": "PlaceholderStatement", - "src": "168:1:2" + "id": 336, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "146:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" } - ], - "id": 334, - "name": "IfStatement", - "src": "143:26:2" - } - ], - "id": 335, - "name": "Block", - "src": "137:37:2" - } - ], - "id": 336, - "name": "ModifierDefinition", - "src": "115:59:2" - }, - { - "attributes": { - "constant": false, - "implemented": true, - "isConstructor": true, - "modifiers": [ - null - ], - "name": "Migrations", - "payable": false, - "scope": 378, - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - "children": [ - { - "attributes": { - "parameters": [ - null - ] - }, - "children": [], - "id": 337, - "name": "ParameterList", - "src": "197:2:2" - }, - { - "attributes": { - "parameters": [ - null - ] - }, - "children": [], - "id": 338, - "name": "ParameterList", - "src": "207:0:2" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "address" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 325, - "type": "address", - "value": "owner" - }, - "id": 339, - "name": "Identifier", - "src": "213:5:2" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "sender", - "referencedDeclaration": null, - "type": "address" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 390, - "type": "msg", - "value": "msg" - }, - "id": 340, - "name": "Identifier", - "src": "221:3:2" - } - ], - "id": 341, - "name": "MemberAccess", - "src": "221:10:2" - } - ], - "id": 342, - "name": "Assignment", - "src": "213:18:2" + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 337, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 331, + "src": "160:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" } - ], - "id": 343, - "name": "ExpressionStatement", - "src": "213:18:2" + }, + "src": "146:19:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 340, + "nodeType": "IfStatement", + "src": "142:26:2", + "trueBody": { + "id": 339, + "nodeType": "PlaceholderStatement", + "src": "167:1:2" } - ], - "id": 344, - "name": "Block", - "src": "207:29:2" - } - ], - "id": 345, - "name": "FunctionDefinition", - "src": "178:58:2" + } + ] + }, + "documentation": null, + "id": 342, + "name": "restricted", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 334, + "nodeType": "ParameterList", + "parameters": [], + "src": "133:2:2" + }, + "src": "114:59:2", + "visibility": "internal" }, { - "attributes": { - "constant": false, - "implemented": true, - "isConstructor": false, - "name": "setCompleted", - "payable": false, - "scope": 378, - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "name": "completed", - "scope": 357, - "stateVariable": false, - "storageLocation": "default", - "type": "uint256", - "value": null, - "visibility": "internal" + "body": { + "id": 350, + "nodeType": "Block", + "src": "198:29:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 348, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 345, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 331, + "src": "204:5:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } }, - "children": [ - { - "attributes": { - "name": "uint", - "type": "uint256" - }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, "id": 346, - "name": "ElementaryTypeName", - "src": "262:4:2" + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 399, + "src": "212:3:2", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 347, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "212:10:2", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" } - ], - "id": 347, - "name": "VariableDeclaration", - "src": "262:14:2" - } - ], - "id": 348, - "name": "ParameterList", - "src": "261:16:2" - }, - { - "attributes": { - "parameters": [ - null - ] - }, - "children": [], - "id": 351, - "name": "ParameterList", - "src": "296:0:2" - }, - { - "attributes": { - "arguments": [ - null - ] - }, - "children": [ - { - "attributes": { + }, + "src": "204:18:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 349, + "nodeType": "ExpressionStatement", + "src": "204:18:2" + } + ] + }, + "documentation": null, + "id": 351, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 343, + "nodeType": "ParameterList", + "parameters": [], + "src": "188:2:2" + }, + "returnParameters": { + "id": 344, + "nodeType": "ParameterList", + "parameters": [], + "src": "198:0:2" + }, + "scope": 384, + "src": "177:50:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 362, + "nodeType": "Block", + "src": "287:47:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 336, - "type": "modifier ()", - "value": "restricted" + "id": 358, + "name": "last_completed_migration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 333, + "src": "293:24:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } }, - "id": 349, - "name": "Identifier", - "src": "285:10:2" - } - ], - "id": 350, - "name": "ModifierInvocation", - "src": "285:10:2" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "operator": "=", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 327, - "type": "uint256", - "value": "last_completed_migration" - }, - "id": 352, - "name": "Identifier", - "src": "302:24:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 347, - "type": "uint256", - "value": "completed" - }, - "id": 353, - "name": "Identifier", - "src": "329:9:2" - } - ], - "id": 354, - "name": "Assignment", - "src": "302:36:2" + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 359, + "name": "completed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 353, + "src": "320:9:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" } - ], - "id": 355, - "name": "ExpressionStatement", - "src": "302:36:2" - } - ], + }, + "src": "293:36:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 361, + "nodeType": "ExpressionStatement", + "src": "293:36:2" + } + ] + }, + "documentation": null, + "id": 363, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, "id": 356, - "name": "Block", - "src": "296:47:2" + "modifierName": { + "argumentTypes": null, + "id": 355, + "name": "restricted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 342, + "src": "276:10:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "276:10:2" } ], - "id": 357, - "name": "FunctionDefinition", - "src": "240:103:2" + "name": "setCompleted", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 354, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 353, + "name": "completed", + "nodeType": "VariableDeclaration", + "scope": 363, + "src": "253:14:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 352, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "253:4:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "252:16:2" + }, + "returnParameters": { + "id": 357, + "nodeType": "ParameterList", + "parameters": [], + "src": "287:0:2" + }, + "scope": 384, + "src": "231:103:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" }, { - "attributes": { - "constant": false, - "implemented": true, - "isConstructor": false, - "name": "upgrade", - "payable": false, - "scope": 378, - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - "children": [ - { - "children": [ - { - "attributes": { + "body": { + "id": 382, + "nodeType": "Block", + "src": "394:109:2", + "statements": [ + { + "assignments": [ + 371 + ], + "declarations": [ + { "constant": false, - "name": "new_address", - "scope": 377, + "id": 371, + "name": "upgraded", + "nodeType": "VariableDeclaration", + "scope": 382, + "src": "400:19:2", "stateVariable": false, "storageLocation": "default", - "type": "address", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Migrations_$384", + "typeString": "contract Migrations" + }, + "typeName": { + "contractScope": null, + "id": 370, + "name": "Migrations", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 384, + "src": "400:10:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Migrations_$384", + "typeString": "contract Migrations" + } + }, "value": null, "visibility": "internal" - }, - "children": [ + } + ], + "id": 375, + "initialValue": { + "argumentTypes": null, + "arguments": [ { - "attributes": { - "name": "address", - "type": "address" - }, - "id": 358, - "name": "ElementaryTypeName", - "src": "364:7:2" + "argumentTypes": null, + "id": 373, + "name": "new_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 365, + "src": "433:11:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } } ], - "id": 359, - "name": "VariableDeclaration", - "src": "364:19:2" - } - ], - "id": 360, - "name": "ParameterList", - "src": "363:21:2" - }, - { - "attributes": { - "parameters": [ - null - ] - }, - "children": [], - "id": 363, - "name": "ParameterList", - "src": "403:0:2" - }, - { - "attributes": { - "arguments": [ - null - ] - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } ], - "referencedDeclaration": 336, - "type": "modifier ()", - "value": "restricted" - }, - "id": 361, - "name": "Identifier", - "src": "392:10:2" - } - ], - "id": 362, - "name": "ModifierInvocation", - "src": "392:10:2" - }, - { - "children": [ - { - "attributes": { - "assignments": [ - 365 - ] - }, - "children": [ - { - "attributes": { - "constant": false, - "name": "upgraded", - "scope": 377, - "stateVariable": false, - "storageLocation": "default", - "type": "contract Migrations", - "value": null, - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "contractScope": null, - "name": "Migrations", - "referencedDeclaration": 378, - "type": "contract Migrations" - }, - "id": 364, - "name": "UserDefinedTypeName", - "src": "409:10:2" - } - ], - "id": 365, - "name": "VariableDeclaration", - "src": "409:19:2" - }, - { - "attributes": { - "argumentTypes": null, - "isConstant": false, - "isLValue": false, - "isPure": false, - "isStructConstructorCall": false, - "lValueRequested": false, - "names": [ - null - ], - "type": "contract Migrations", - "type_conversion": true - }, - "children": [ - { - "attributes": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 378, - "type": "type(contract Migrations)", - "value": "Migrations" - }, - "id": 366, - "name": "Identifier", - "src": "431:10:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 359, - "type": "address", - "value": "new_address" - }, - "id": 367, - "name": "Identifier", - "src": "442:11:2" - } - ], - "id": 368, - "name": "FunctionCall", - "src": "431:23:2" + "id": 372, + "name": "Migrations", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 384, + "src": "422:10:2", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Migrations_$384_$", + "typeString": "type(contract Migrations)" } - ], - "id": 369, - "name": "VariableDeclarationStatement", - "src": "409:45:2" + }, + "id": 374, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "422:23:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Migrations_$384", + "typeString": "contract Migrations" + } }, - { - "children": [ + "nodeType": "VariableDeclarationStatement", + "src": "400:45:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ { - "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_uint256", - "typeString": "uint256" - } - ], - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "member_name": "setCompleted", - "referencedDeclaration": 357, - "type": "function (uint256) external" - }, - "children": [ - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 365, - "type": "contract Migrations", - "value": "upgraded" - }, - "id": 370, - "name": "Identifier", - "src": "460:8:2" - } - ], - "id": 372, - "name": "MemberAccess", - "src": "460:21:2" - }, - { - "attributes": { - "argumentTypes": null, - "overloadedDeclarations": [ - null - ], - "referencedDeclaration": 327, - "type": "uint256", - "value": "last_completed_migration" - }, - "id": 373, - "name": "Identifier", - "src": "482:24:2" - } - ], - "id": 374, - "name": "FunctionCall", - "src": "460:47:2" + "argumentTypes": null, + "id": 379, + "name": "last_completed_migration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 333, + "src": "473:24:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } } ], - "id": 375, - "name": "ExpressionStatement", - "src": "460:47:2" + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 376, + "name": "upgraded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 371, + "src": "451:8:2", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Migrations_$384", + "typeString": "contract Migrations" + } + }, + "id": 378, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setCompleted", + "nodeType": "MemberAccess", + "referencedDeclaration": 363, + "src": "451:21:2", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256) external" + } + }, + "id": 380, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "451:47:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 381, + "nodeType": "ExpressionStatement", + "src": "451:47:2" + } + ] + }, + "documentation": null, + "id": 383, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 368, + "modifierName": { + "argumentTypes": null, + "id": 367, + "name": "restricted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 342, + "src": "383:10:2", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" } - ], - "id": 376, - "name": "Block", - "src": "403:109:2" + }, + "nodeType": "ModifierInvocation", + "src": "383:10:2" } ], - "id": 377, - "name": "FunctionDefinition", - "src": "347:165:2" + "name": "upgrade", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 366, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 365, + "name": "new_address", + "nodeType": "VariableDeclaration", + "scope": 383, + "src": "355:19:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 364, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "355:7:2", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "354:21:2" + }, + "returnParameters": { + "id": 369, + "nodeType": "ParameterList", + "parameters": [], + "src": "394:0:2" + }, + "scope": 384, + "src": "338:165:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" } ], - "id": 378, - "name": "ContractDefinition", - "src": "26:488:2" + "scope": 385, + "src": "25:480:2" } ], - "id": 379, - "name": "SourceUnit", - "src": "0:515:2" + "src": "0:506:2" }, "compiler": { "name": "solc", - "version": "0.4.18+commit.9cf6e910.Emscripten.clang" + "version": "0.5.0+commit.1d4f565a.Emscripten.clang" }, "networks": { "4": { @@ -1573,8 +1389,62 @@ "links": {}, "address": "0x459882cb62b6ca50469e625f270fd44da3479b60", "transactionHash": "0x433c5bd28814b7bce15a5cb302f521c16aaa3902a676f77f313d2d3171bcda85" + }, + "1557694405500": { + "events": {}, + "links": {}, + "address": "0x92513ea98acDACdB0e66B59ABDe751fB143d4f50", + "transactionHash": "0xc469983bfd6491b951790a5de94500a3c595d17b5970cd8abaefeb476019def0" + }, + "1557708358626": { + "events": {}, + "links": {}, + "address": "0x540AdEe58f5A45e4817fcf60C0698FBc6260E3dF", + "transactionHash": "0x0aa57eeefb45735b5cca0a5d0cf7b90c2caf68b487dfbf970dbb3a10acb1d264" + }, + "1557709240444": { + "events": {}, + "links": {}, + "address": "0xb1C3136cafB2C1a2D18B8C7D479167F6F9080127", + "transactionHash": "0x833ac6e086dd4337c28bf97b977cec52eeb7bf400ad633bd37f475755dd8358e" + }, + "1557709597422": { + "events": {}, + "links": {}, + "address": "0xa574F62003B6247397d80D10cCE1AfEC3b808245", + "transactionHash": "0x4b57d60496638ffbcd7458fbcf5d98738f280cf516dff692df78153b88bc2212" + }, + "1557710076986": { + "events": {}, + "links": {}, + "address": "0xa9D3d7F6Ab2De0F5332bF389f4cE9dADA420a02B", + "transactionHash": "0xbff657642f1f9656a2cd147333a5f9d3dc32e03a35d4ec0d33a2a9547bb16e2c" + }, + "1557716539833": { + "events": {}, + "links": {}, + "address": "0x7e4474B8e43cf05a933b2f86dd839f20a2A014C1", + "transactionHash": "0xd9bd41888d2481f1df57eacb518748d5d70c371db915ac5e9d9fc9bb91ce4d7f" + }, + "1557717234947": { + "events": {}, + "links": {}, + "address": "0x2f719e30Af04eaC560Af9776DeDA3EbEe6792092", + "transactionHash": "0x09533f60cb2470e7518482b1da8a5dee919e0634afe83ab2a8d0dfbe4ba27293" + }, + "1557719154648": { + "events": {}, + "links": {}, + "address": "0xB5C195d0309dd38cE7A981fBE32E1C03505eD967", + "transactionHash": "0xc463ed0d7c087edb3fe5ac0d49b48d3a1f1f210e056dbd2319329b82a18b494e" } }, - "schemaVersion": "2.0.0", - "updatedAt": "2018-05-23T03:26:45.858Z" + "schemaVersion": "3.0.6", + "updatedAt": "2019-05-13T03:46:10.145Z", + "devdoc": { + "methods": {} + }, + "userdoc": { + "methods": {} + } } \ No newline at end of file diff --git a/contracts/DappToken.sol b/contracts/DappToken.sol index 6f0b88bb3..1497cb805 100644 --- a/contracts/DappToken.sol +++ b/contracts/DappToken.sol @@ -1,10 +1,10 @@ -pragma solidity ^0.4.2; +pragma solidity ^0.5.0; contract DappToken { string public name = "DApp Token"; string public symbol = "DAPP"; string public standard = "DApp Token v1.0"; - uint256 public totalSupply; + uint256 public totalSupply = 75000; event Transfer( address indexed _from, @@ -21,18 +21,18 @@ contract DappToken { mapping(address => uint256) public balanceOf; mapping(address => mapping(address => uint256)) public allowance; - function DappToken (uint256 _initialSupply) public { + constructor (uint256 _initialSupply) public { balanceOf[msg.sender] = _initialSupply; totalSupply = _initialSupply; } function transfer(address _to, uint256 _value) public returns (bool success) { - require(balanceOf[msg.sender] >= _value); + require(balanceOf[msg.sender] >= _value, "Insufficient sender balance"); balanceOf[msg.sender] -= _value; balanceOf[_to] += _value; - Transfer(msg.sender, _to, _value); + emit Transfer(msg.sender, _to, _value); return true; } @@ -40,21 +40,21 @@ contract DappToken { function approve(address _spender, uint256 _value) public returns (bool success) { allowance[msg.sender][_spender] = _value; - Approval(msg.sender, _spender, _value); + emit Approval(msg.sender, _spender, _value); return true; } function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { - require(_value <= balanceOf[_from]); - require(_value <= allowance[_from][msg.sender]); + require(_value <= balanceOf[_from], 'Amount should not exceed balance'); + require(_value <= allowance[_from][msg.sender], 'Amount should not exceed allowance'); balanceOf[_from] -= _value; balanceOf[_to] += _value; allowance[_from][msg.sender] -= _value; - Transfer(_from, _to, _value); + emit Transfer(_from, _to, _value); return true; } diff --git a/contracts/DappTokenSale.sol b/contracts/DappTokenSale.sol index 24cca39c9..b0019d621 100644 --- a/contracts/DappTokenSale.sol +++ b/contracts/DappTokenSale.sol @@ -1,16 +1,17 @@ -pragma solidity ^0.4.2; +pragma solidity ^0.5.0; import "./DappToken.sol"; contract DappTokenSale { - address admin; + address payable admin; DappToken public tokenContract; uint256 public tokenPrice; uint256 public tokensSold; event Sell(address _buyer, uint256 _amount); + event EndSale(uint256 _totalAmountSold); - function DappTokenSale(DappToken _tokenContract, uint256 _tokenPrice) public { + constructor(DappToken _tokenContract, uint256 _tokenPrice) public { admin = msg.sender; tokenContract = _tokenContract; tokenPrice = _tokenPrice; @@ -21,21 +22,24 @@ contract DappTokenSale { } function buyTokens(uint256 _numberOfTokens) public payable { - require(msg.value == multiply(_numberOfTokens, tokenPrice)); - require(tokenContract.balanceOf(this) >= _numberOfTokens); - require(tokenContract.transfer(msg.sender, _numberOfTokens)); + require(msg.value == multiply(_numberOfTokens, tokenPrice), 'msg.value must equal number of tokens in wei'); + require(tokenContract.balanceOf(address(this)) >= _numberOfTokens, 'cannot purchase more tokens than available'); + require(tokenContract.transfer(msg.sender, _numberOfTokens), 'Unable to send tokens'); + // emit Balance(address(this), _numberOfTokens); tokensSold += _numberOfTokens; - Sell(msg.sender, _numberOfTokens); + emit Sell(msg.sender, _numberOfTokens); } function endSale() public { require(msg.sender == admin); - require(tokenContract.transfer(admin, tokenContract.balanceOf(this))); - + require(tokenContract.transfer(admin, tokenContract.balanceOf(address(this)))); + // require(tokenContract.transfer(admin, tokenContract.balanceOf(address(this)))); // UPDATE: Let's not destroy the contract here // Just transfer the balance to the admin admin.transfer(address(this).balance); + + emit EndSale(tokensSold); } } diff --git a/contracts/Migrations.sol b/contracts/Migrations.sol index f170cb4fa..89b4d5c78 100644 --- a/contracts/Migrations.sol +++ b/contracts/Migrations.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.17; +pragma solidity ^0.5.0; contract Migrations { address public owner; @@ -8,7 +8,7 @@ contract Migrations { if (msg.sender == owner) _; } - function Migrations() public { + constructor() public { owner = msg.sender; } diff --git a/package-lock.json b/package-lock.json index 607186279..6016eb0ad 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=", "dev": true, "requires": { - "mime-types": "2.1.18", + "mime-types": "~2.1.18", "negotiator": "0.6.1" } }, @@ -26,8 +26,8 @@ "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", "dev": true, "requires": { - "co": "4.6.0", - "json-stable-stringify": "1.0.1" + "co": "^4.6.0", + "json-stable-stringify": "^1.0.1" } }, "ansi-regex": { @@ -48,8 +48,8 @@ "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", "dev": true, "requires": { - "micromatch": "2.3.11", - "normalize-path": "2.1.1" + "micromatch": "^2.1.5", + "normalize-path": "^2.0.0" } }, "arr-diff": { @@ -58,7 +58,7 @@ "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", "dev": true, "requires": { - "arr-flatten": "1.1.0" + "arr-flatten": "^1.0.1" } }, "arr-flatten": { @@ -170,7 +170,7 @@ "dev": true, "optional": true, "requires": { - "tweetnacl": "0.14.5" + "tweetnacl": "^0.14.3" } }, "better-assert": { @@ -200,7 +200,7 @@ "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", "dev": true, "requires": { - "hoek": "2.16.3" + "hoek": "2.x.x" } }, "brace-expansion": { @@ -209,7 +209,7 @@ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "requires": { - "balanced-match": "1.0.0", + "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, @@ -219,9 +219,9 @@ "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", "dev": true, "requires": { - "expand-range": "1.8.2", - "preserve": "0.2.0", - "repeat-element": "1.1.2" + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" } }, "browser-sync": { @@ -230,17 +230,17 @@ "integrity": "sha512-loCO5NQKZXfBJrEvmLwF1TPSECCsPopNd29qduoysLmpw8op2lgolGMjz3oI/MjG4duzB9TfDs7k58djRSwPwg==", "dev": true, "requires": { - "browser-sync-ui": "1.0.1", + "browser-sync-ui": "v1.0.1", "bs-recipes": "1.3.4", "chokidar": "1.7.0", "connect": "3.5.0", - "connect-history-api-fallback": "1.5.0", - "dev-ip": "1.0.1", + "connect-history-api-fallback": "^1.5.0", + "dev-ip": "^1.0.1", "easy-extender": "2.3.2", "eazy-logger": "3.0.2", - "emitter-steward": "1.0.0", - "etag": "1.8.1", - "fresh": "0.5.2", + "emitter-steward": "^1.0.0", + "etag": "^1.8.1", + "fresh": "^0.5.2", "fs-extra": "3.0.1", "http-proxy": "1.15.2", "immutable": "3.8.2", @@ -266,11 +266,11 @@ "dev": true, "requires": { "async-each-series": "0.1.1", - "connect-history-api-fallback": "1.5.0", - "immutable": "3.8.2", + "connect-history-api-fallback": "^1.1.0", + "immutable": "^3.7.6", "server-destroy": "1.0.1", "socket.io-client": "2.0.4", - "stream-throttle": "0.1.3" + "stream-throttle": "^0.1.3" } }, "bs-recipes": { @@ -309,11 +309,11 @@ "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" } }, "chokidar": { @@ -322,15 +322,15 @@ "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", "dev": true, "requires": { - "anymatch": "1.3.2", - "async-each": "1.0.1", - "fsevents": "1.1.3", - "glob-parent": "2.0.0", - "inherits": "2.0.3", - "is-binary-path": "1.0.1", - "is-glob": "2.0.1", - "path-is-absolute": "1.0.1", - "readdirp": "2.1.0" + "anymatch": "^1.3.0", + "async-each": "^1.0.0", + "fsevents": "^1.0.0", + "glob-parent": "^2.0.0", + "inherits": "^2.0.1", + "is-binary-path": "^1.0.0", + "is-glob": "^2.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.0.0" } }, "cliui": { @@ -339,9 +339,9 @@ "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", "dev": true, "requires": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wrap-ansi": "2.1.0" + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" } }, "co": { @@ -362,7 +362,7 @@ "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", "dev": true, "requires": { - "delayed-stream": "1.0.0" + "delayed-stream": "~1.0.0" } }, "commander": { @@ -401,9 +401,9 @@ "integrity": "sha1-s1dSWgtMH1BZnNmD4dnv7qlncZg=", "dev": true, "requires": { - "debug": "2.2.0", + "debug": "~2.2.0", "finalhandler": "0.5.0", - "parseurl": "1.3.2", + "parseurl": "~1.3.1", "utils-merge": "1.0.0" }, "dependencies": { @@ -436,7 +436,7 @@ "integrity": "sha1-TZmZeKHSC7RgjnzUNNdBZSJVF0s=", "dev": true, "requires": { - "moment": "2.21.0" + "moment": "*" } }, "cookie": { @@ -457,7 +457,7 @@ "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", "dev": true, "requires": { - "boom": "2.10.1" + "boom": "2.x.x" } }, "dashdash": { @@ -466,7 +466,7 @@ "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", "dev": true, "requires": { - "assert-plus": "1.0.0" + "assert-plus": "^1.0.0" }, "dependencies": { "assert-plus": { @@ -522,7 +522,7 @@ "integrity": "sha1-PTJI/r4rFZYHMW2PnPSRwWZIIh0=", "dev": true, "requires": { - "lodash": "3.10.1" + "lodash": "^3.10.1" }, "dependencies": { "lodash": { @@ -539,7 +539,7 @@ "integrity": "sha1-oyWqXlPROiIliJsqxBE7K5Y29Pw=", "dev": true, "requires": { - "tfunk": "3.1.0" + "tfunk": "^3.0.1" } }, "ecc-jsbn": { @@ -549,7 +549,7 @@ "dev": true, "optional": true, "requires": { - "jsbn": "0.1.1" + "jsbn": "~0.1.0" } }, "ee-first": { @@ -576,13 +576,13 @@ "integrity": "sha512-D06ivJkYxyRrcEe0bTpNnBQNgP9d3xog+qZlLbui8EsMr/DouQpf5o9FzJnWYHEYE0YsFHllUv2R1dkgYZXHcA==", "dev": true, "requires": { - "accepts": "1.3.5", + "accepts": "~1.3.4", "base64id": "1.0.0", "cookie": "0.3.1", - "debug": "3.1.0", - "engine.io-parser": "2.1.2", - "uws": "9.14.0", - "ws": "3.3.3" + "debug": "~3.1.0", + "engine.io-parser": "~2.1.0", + "uws": "~9.14.0", + "ws": "~3.3.1" }, "dependencies": { "debug": { @@ -604,14 +604,14 @@ "requires": { "component-emitter": "1.2.1", "component-inherit": "0.0.3", - "debug": "3.1.0", - "engine.io-parser": "2.1.2", + "debug": "~3.1.0", + "engine.io-parser": "~2.1.1", "has-cors": "1.1.0", "indexof": "0.0.1", "parseqs": "0.0.5", "parseuri": "0.0.5", - "ws": "3.3.3", - "xmlhttprequest-ssl": "1.5.5", + "ws": "~3.3.1", + "xmlhttprequest-ssl": "~1.5.4", "yeast": "0.1.2" }, "dependencies": { @@ -633,10 +633,10 @@ "dev": true, "requires": { "after": "0.8.2", - "arraybuffer.slice": "0.0.7", + "arraybuffer.slice": "~0.0.7", "base64-arraybuffer": "0.1.5", "blob": "0.0.4", - "has-binary2": "1.0.2" + "has-binary2": "~1.0.2" } }, "error-ex": { @@ -645,7 +645,7 @@ "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", "dev": true, "requires": { - "is-arrayish": "0.2.1" + "is-arrayish": "^0.2.1" } }, "escape-html": { @@ -678,7 +678,7 @@ "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", "dev": true, "requires": { - "is-posix-bracket": "0.1.1" + "is-posix-bracket": "^0.1.0" } }, "expand-range": { @@ -687,7 +687,7 @@ "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", "dev": true, "requires": { - "fill-range": "2.2.3" + "fill-range": "^2.1.0" } }, "extend": { @@ -702,7 +702,7 @@ "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", "dev": true, "requires": { - "is-extglob": "1.0.0" + "is-extglob": "^1.0.0" } }, "extsprintf": { @@ -723,11 +723,11 @@ "integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=", "dev": true, "requires": { - "is-number": "2.1.0", - "isobject": "2.1.0", - "randomatic": "1.1.7", - "repeat-element": "1.1.2", - "repeat-string": "1.6.1" + "is-number": "^2.1.0", + "isobject": "^2.0.0", + "randomatic": "^1.1.3", + "repeat-element": "^1.1.2", + "repeat-string": "^1.5.2" } }, "finalhandler": { @@ -736,11 +736,11 @@ "integrity": "sha1-6VCKvs6bbbqHGmlCodeRG5GRGsc=", "dev": true, "requires": { - "debug": "2.2.0", - "escape-html": "1.0.3", - "on-finished": "2.3.0", - "statuses": "1.3.1", - "unpipe": "1.0.0" + "debug": "~2.2.0", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "statuses": "~1.3.0", + "unpipe": "~1.0.0" }, "dependencies": { "debug": { @@ -766,8 +766,8 @@ "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", "dev": true, "requires": { - "path-exists": "2.1.0", - "pinkie-promise": "2.0.1" + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" } }, "for-in": { @@ -782,7 +782,7 @@ "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", "dev": true, "requires": { - "for-in": "1.0.2" + "for-in": "^1.0.1" } }, "forever-agent": { @@ -797,9 +797,9 @@ "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", "dev": true, "requires": { - "asynckit": "0.4.0", - "combined-stream": "1.0.6", - "mime-types": "2.1.18" + "asynckit": "^0.4.0", + "combined-stream": "^1.0.5", + "mime-types": "^2.1.12" } }, "fresh": { @@ -814,9 +814,9 @@ "integrity": "sha1-N5TzeMWLNC6n27sjCVEJxLO2IpE=", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "jsonfile": "3.0.1", - "universalify": "0.1.1" + "graceful-fs": "^4.1.2", + "jsonfile": "^3.0.0", + "universalify": "^0.1.0" } }, "fsevents": { @@ -826,8 +826,8 @@ "dev": true, "optional": true, "requires": { - "nan": "2.10.0", - "node-pre-gyp": "0.6.39" + "nan": "^2.3.0", + "node-pre-gyp": "^0.6.39" }, "dependencies": { "abbrev": { @@ -842,14 +842,15 @@ "dev": true, "optional": true, "requires": { - "co": "4.6.0", - "json-stable-stringify": "1.0.1" + "co": "^4.6.0", + "json-stable-stringify": "^1.0.1" } }, "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.1.1", @@ -863,8 +864,8 @@ "dev": true, "optional": true, "requires": { - "delegates": "1.0.0", - "readable-stream": "2.2.9" + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" } }, "asn1": { @@ -900,7 +901,8 @@ "balanced-match": { "version": "0.4.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "bcrypt-pbkdf": { "version": "1.0.1", @@ -908,38 +910,42 @@ "dev": true, "optional": true, "requires": { - "tweetnacl": "0.14.5" + "tweetnacl": "^0.14.3" } }, "block-stream": { "version": "0.0.9", "bundled": true, "dev": true, + "optional": true, "requires": { - "inherits": "2.0.3" + "inherits": "~2.0.0" } }, "boom": { "version": "2.10.1", "bundled": true, "dev": true, + "optional": true, "requires": { - "hoek": "2.16.3" + "hoek": "2.x.x" } }, "brace-expansion": { "version": "1.1.7", "bundled": true, "dev": true, + "optional": true, "requires": { - "balanced-match": "0.4.2", + "balanced-match": "^0.4.1", "concat-map": "0.0.1" } }, "buffer-shims": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "caseless": { "version": "0.12.0", @@ -956,37 +962,43 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "combined-stream": { "version": "1.0.5", "bundled": true, "dev": true, + "optional": true, "requires": { - "delayed-stream": "1.0.0" + "delayed-stream": "~1.0.0" } }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "cryptiles": { "version": "2.0.5", "bundled": true, "dev": true, + "optional": true, "requires": { - "boom": "2.10.1" + "boom": "2.x.x" } }, "dashdash": { @@ -995,7 +1007,7 @@ "dev": true, "optional": true, "requires": { - "assert-plus": "1.0.0" + "assert-plus": "^1.0.0" }, "dependencies": { "assert-plus": { @@ -1024,7 +1036,8 @@ "delayed-stream": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "delegates": { "version": "1.0.0", @@ -1044,7 +1057,7 @@ "dev": true, "optional": true, "requires": { - "jsbn": "0.1.1" + "jsbn": "~0.1.0" } }, "extend": { @@ -1056,7 +1069,8 @@ "extsprintf": { "version": "1.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "forever-agent": { "version": "0.6.1", @@ -1070,25 +1084,27 @@ "dev": true, "optional": true, "requires": { - "asynckit": "0.4.0", - "combined-stream": "1.0.5", - "mime-types": "2.1.15" + "asynckit": "^0.4.0", + "combined-stream": "^1.0.5", + "mime-types": "^2.1.12" } }, "fs.realpath": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "fstream": { "version": "1.0.11", "bundled": true, "dev": true, + "optional": true, "requires": { - "graceful-fs": "4.1.11", - "inherits": "2.0.3", - "mkdirp": "0.5.1", - "rimraf": "2.6.1" + "graceful-fs": "^4.1.2", + "inherits": "~2.0.0", + "mkdirp": ">=0.5 0", + "rimraf": "2" } }, "fstream-ignore": { @@ -1097,9 +1113,9 @@ "dev": true, "optional": true, "requires": { - "fstream": "1.0.11", - "inherits": "2.0.3", - "minimatch": "3.0.4" + "fstream": "^1.0.0", + "inherits": "2", + "minimatch": "^3.0.0" } }, "gauge": { @@ -1108,14 +1124,14 @@ "dev": true, "optional": true, "requires": { - "aproba": "1.1.1", - "console-control-strings": "1.1.0", - "has-unicode": "2.0.1", - "object-assign": "4.1.1", - "signal-exit": "3.0.2", - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wide-align": "1.1.2" + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" } }, "getpass": { @@ -1124,7 +1140,7 @@ "dev": true, "optional": true, "requires": { - "assert-plus": "1.0.0" + "assert-plus": "^1.0.0" }, "dependencies": { "assert-plus": { @@ -1139,19 +1155,21 @@ "version": "7.1.2", "bundled": true, "dev": true, + "optional": true, "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } }, "graceful-fs": { "version": "4.1.11", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "har-schema": { "version": "1.0.5", @@ -1165,8 +1183,8 @@ "dev": true, "optional": true, "requires": { - "ajv": "4.11.8", - "har-schema": "1.0.5" + "ajv": "^4.9.1", + "har-schema": "^1.0.5" } }, "has-unicode": { @@ -1179,17 +1197,19 @@ "version": "3.1.3", "bundled": true, "dev": true, + "optional": true, "requires": { - "boom": "2.10.1", - "cryptiles": "2.0.5", - "hoek": "2.16.3", - "sntp": "1.0.9" + "boom": "2.x.x", + "cryptiles": "2.x.x", + "hoek": "2.x.x", + "sntp": "1.x.x" } }, "hoek": { "version": "2.16.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "http-signature": { "version": "1.1.1", @@ -1197,24 +1217,26 @@ "dev": true, "optional": true, "requires": { - "assert-plus": "0.2.0", - "jsprim": "1.4.0", - "sshpk": "1.13.0" + "assert-plus": "^0.2.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" } }, "inflight": { "version": "1.0.6", "bundled": true, "dev": true, + "optional": true, "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" + "once": "^1.3.0", + "wrappy": "1" } }, "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.4", @@ -1226,8 +1248,9 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { - "number-is-nan": "1.0.1" + "number-is-nan": "^1.0.0" } }, "is-typedarray": { @@ -1239,7 +1262,8 @@ "isarray": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "isstream": { "version": "0.1.2", @@ -1253,7 +1277,7 @@ "dev": true, "optional": true, "requires": { - "jsbn": "0.1.1" + "jsbn": "~0.1.0" } }, "jsbn": { @@ -1274,7 +1298,7 @@ "dev": true, "optional": true, "requires": { - "jsonify": "0.0.0" + "jsonify": "~0.0.0" } }, "json-stringify-safe": { @@ -1312,33 +1336,38 @@ "mime-db": { "version": "1.27.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "mime-types": { "version": "2.1.15", "bundled": true, "dev": true, + "optional": true, "requires": { - "mime-db": "1.27.0" + "mime-db": "~1.27.0" } }, "minimatch": { "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { - "brace-expansion": "1.1.7" + "brace-expansion": "^1.1.7" } }, "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "mkdirp": { "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -1355,17 +1384,17 @@ "dev": true, "optional": true, "requires": { - "detect-libc": "1.0.2", + "detect-libc": "^1.0.2", "hawk": "3.1.3", - "mkdirp": "0.5.1", - "nopt": "4.0.1", - "npmlog": "4.1.0", - "rc": "1.2.1", + "mkdirp": "^0.5.1", + "nopt": "^4.0.1", + "npmlog": "^4.0.2", + "rc": "^1.1.7", "request": "2.81.0", - "rimraf": "2.6.1", - "semver": "5.3.0", - "tar": "2.2.1", - "tar-pack": "3.4.0" + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^2.2.1", + "tar-pack": "^3.4.0" } }, "nopt": { @@ -1374,8 +1403,8 @@ "dev": true, "optional": true, "requires": { - "abbrev": "1.1.0", - "osenv": "0.1.4" + "abbrev": "1", + "osenv": "^0.1.4" } }, "npmlog": { @@ -1384,16 +1413,17 @@ "dev": true, "optional": true, "requires": { - "are-we-there-yet": "1.1.4", - "console-control-strings": "1.1.0", - "gauge": "2.7.4", - "set-blocking": "2.0.0" + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" } }, "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "oauth-sign": { "version": "0.8.2", @@ -1411,8 +1441,9 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { - "wrappy": "1.0.2" + "wrappy": "1" } }, "os-homedir": { @@ -1433,14 +1464,15 @@ "dev": true, "optional": true, "requires": { - "os-homedir": "1.0.2", - "os-tmpdir": "1.0.2" + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" } }, "path-is-absolute": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "performance-now": { "version": "0.2.0", @@ -1451,7 +1483,8 @@ "process-nextick-args": { "version": "1.0.7", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "punycode": { "version": "1.4.1", @@ -1471,10 +1504,10 @@ "dev": true, "optional": true, "requires": { - "deep-extend": "0.4.2", - "ini": "1.3.4", - "minimist": "1.2.0", - "strip-json-comments": "2.0.1" + "deep-extend": "~0.4.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" }, "dependencies": { "minimist": { @@ -1489,14 +1522,15 @@ "version": "2.2.9", "bundled": true, "dev": true, + "optional": true, "requires": { - "buffer-shims": "1.0.0", - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "1.0.7", - "string_decoder": "1.0.1", - "util-deprecate": "1.0.2" + "buffer-shims": "~1.0.0", + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "~1.0.0", + "process-nextick-args": "~1.0.6", + "string_decoder": "~1.0.0", + "util-deprecate": "~1.0.1" } }, "request": { @@ -1505,42 +1539,44 @@ "dev": true, "optional": true, "requires": { - "aws-sign2": "0.6.0", - "aws4": "1.6.0", - "caseless": "0.12.0", - "combined-stream": "1.0.5", - "extend": "3.0.1", - "forever-agent": "0.6.1", - "form-data": "2.1.4", - "har-validator": "4.2.1", - "hawk": "3.1.3", - "http-signature": "1.1.1", - "is-typedarray": "1.0.0", - "isstream": "0.1.2", - "json-stringify-safe": "5.0.1", - "mime-types": "2.1.15", - "oauth-sign": "0.8.2", - "performance-now": "0.2.0", - "qs": "6.4.0", - "safe-buffer": "5.0.1", - "stringstream": "0.0.5", - "tough-cookie": "2.3.2", - "tunnel-agent": "0.6.0", - "uuid": "3.0.1" + "aws-sign2": "~0.6.0", + "aws4": "^1.2.1", + "caseless": "~0.12.0", + "combined-stream": "~1.0.5", + "extend": "~3.0.0", + "forever-agent": "~0.6.1", + "form-data": "~2.1.1", + "har-validator": "~4.2.1", + "hawk": "~3.1.3", + "http-signature": "~1.1.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.7", + "oauth-sign": "~0.8.1", + "performance-now": "^0.2.0", + "qs": "~6.4.0", + "safe-buffer": "^5.0.1", + "stringstream": "~0.0.4", + "tough-cookie": "~2.3.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.0.0" } }, "rimraf": { "version": "2.6.1", "bundled": true, "dev": true, + "optional": true, "requires": { - "glob": "7.1.2" + "glob": "^7.0.5" } }, "safe-buffer": { "version": "5.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "semver": { "version": "5.3.0", @@ -1564,8 +1600,9 @@ "version": "1.0.9", "bundled": true, "dev": true, + "optional": true, "requires": { - "hoek": "2.16.3" + "hoek": "2.x.x" } }, "sshpk": { @@ -1574,15 +1611,15 @@ "dev": true, "optional": true, "requires": { - "asn1": "0.2.3", - "assert-plus": "1.0.0", - "bcrypt-pbkdf": "1.0.1", - "dashdash": "1.14.1", - "ecc-jsbn": "0.1.1", - "getpass": "0.1.7", - "jodid25519": "1.0.2", - "jsbn": "0.1.1", - "tweetnacl": "0.14.5" + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jodid25519": "^1.0.0", + "jsbn": "~0.1.0", + "tweetnacl": "~0.14.0" }, "dependencies": { "assert-plus": { @@ -1597,18 +1634,20 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" } }, "string_decoder": { "version": "1.0.1", "bundled": true, "dev": true, + "optional": true, "requires": { - "safe-buffer": "5.0.1" + "safe-buffer": "^5.0.1" } }, "stringstream": { @@ -1621,8 +1660,9 @@ "version": "3.0.1", "bundled": true, "dev": true, + "optional": true, "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } }, "strip-json-comments": { @@ -1635,10 +1675,11 @@ "version": "2.2.1", "bundled": true, "dev": true, + "optional": true, "requires": { - "block-stream": "0.0.9", - "fstream": "1.0.11", - "inherits": "2.0.3" + "block-stream": "*", + "fstream": "^1.0.2", + "inherits": "2" } }, "tar-pack": { @@ -1647,14 +1688,14 @@ "dev": true, "optional": true, "requires": { - "debug": "2.6.8", - "fstream": "1.0.11", - "fstream-ignore": "1.0.5", - "once": "1.4.0", - "readable-stream": "2.2.9", - "rimraf": "2.6.1", - "tar": "2.2.1", - "uid-number": "0.0.6" + "debug": "^2.2.0", + "fstream": "^1.0.10", + "fstream-ignore": "^1.0.5", + "once": "^1.3.3", + "readable-stream": "^2.1.4", + "rimraf": "^2.5.1", + "tar": "^2.2.1", + "uid-number": "^0.0.6" } }, "tough-cookie": { @@ -1663,7 +1704,7 @@ "dev": true, "optional": true, "requires": { - "punycode": "1.4.1" + "punycode": "^1.4.1" } }, "tunnel-agent": { @@ -1672,7 +1713,7 @@ "dev": true, "optional": true, "requires": { - "safe-buffer": "5.0.1" + "safe-buffer": "^5.0.1" } }, "tweetnacl": { @@ -1690,7 +1731,8 @@ "util-deprecate": { "version": "1.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "uuid": { "version": "3.0.1", @@ -1713,13 +1755,14 @@ "dev": true, "optional": true, "requires": { - "string-width": "1.0.2" + "string-width": "^1.0.2" } }, "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true } } }, @@ -1735,7 +1778,7 @@ "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", "dev": true, "requires": { - "assert-plus": "1.0.0" + "assert-plus": "^1.0.0" }, "dependencies": { "assert-plus": { @@ -1752,8 +1795,8 @@ "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", "dev": true, "requires": { - "glob-parent": "2.0.0", - "is-glob": "2.0.1" + "glob-parent": "^2.0.0", + "is-glob": "^2.0.0" } }, "glob-parent": { @@ -1762,7 +1805,7 @@ "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", "dev": true, "requires": { - "is-glob": "2.0.1" + "is-glob": "^2.0.0" } }, "graceful-fs": { @@ -1783,8 +1826,8 @@ "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=", "dev": true, "requires": { - "ajv": "4.11.8", - "har-schema": "1.0.5" + "ajv": "^4.9.1", + "har-schema": "^1.0.5" } }, "has-ansi": { @@ -1793,7 +1836,7 @@ "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", "dev": true, "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } }, "has-binary2": { @@ -1817,10 +1860,10 @@ "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", "dev": true, "requires": { - "boom": "2.10.1", - "cryptiles": "2.0.5", - "hoek": "2.16.3", - "sntp": "1.0.9" + "boom": "2.x.x", + "cryptiles": "2.x.x", + "hoek": "2.x.x", + "sntp": "1.x.x" } }, "hoek": { @@ -1843,7 +1886,7 @@ "requires": { "inherits": "2.0.3", "setprototypeof": "1.0.2", - "statuses": "1.3.1" + "statuses": ">= 1.3.1 < 2" } }, "http-proxy": { @@ -1852,8 +1895,8 @@ "integrity": "sha1-ZC/cr/5S00SNK9o7AHnpQJBk2jE=", "dev": true, "requires": { - "eventemitter3": "1.2.0", - "requires-port": "1.0.0" + "eventemitter3": "1.x.x", + "requires-port": "1.x.x" } }, "http-signature": { @@ -1862,9 +1905,9 @@ "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", "dev": true, "requires": { - "assert-plus": "0.2.0", - "jsprim": "1.4.1", - "sshpk": "1.14.1" + "assert-plus": "^0.2.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" } }, "immutable": { @@ -1903,7 +1946,7 @@ "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", "dev": true, "requires": { - "binary-extensions": "1.11.0" + "binary-extensions": "^1.0.0" } }, "is-buffer": { @@ -1918,7 +1961,7 @@ "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", "dev": true, "requires": { - "builtin-modules": "1.1.1" + "builtin-modules": "^1.0.0" } }, "is-dotfile": { @@ -1933,7 +1976,7 @@ "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", "dev": true, "requires": { - "is-primitive": "2.0.0" + "is-primitive": "^2.0.0" } }, "is-extendable": { @@ -1954,7 +1997,7 @@ "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "dev": true, "requires": { - "number-is-nan": "1.0.1" + "number-is-nan": "^1.0.0" } }, "is-glob": { @@ -1963,7 +2006,7 @@ "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", "dev": true, "requires": { - "is-extglob": "1.0.0" + "is-extglob": "^1.0.0" } }, "is-number": { @@ -1972,7 +2015,7 @@ "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", "dev": true, "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" } }, "is-number-like": { @@ -1981,7 +2024,7 @@ "integrity": "sha512-6rZi3ezCyFcn5L71ywzz2bS5b2Igl1En3eTlZlvKjpz1n3IZLAYMbKYAIQgFmEu0GENg92ziU/faEOA/aixjbA==", "dev": true, "requires": { - "lodash.isfinite": "3.3.2" + "lodash.isfinite": "^3.3.2" } }, "is-posix-bracket": { @@ -2056,7 +2099,7 @@ "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", "dev": true, "requires": { - "jsonify": "0.0.0" + "jsonify": "~0.0.0" } }, "json-stringify-safe": { @@ -2071,7 +2114,7 @@ "integrity": "sha1-pezG9l9T9mLEQVx2daAzHQmS7GY=", "dev": true, "requires": { - "graceful-fs": "4.1.11" + "graceful-fs": "^4.1.6" } }, "jsonify": { @@ -2106,7 +2149,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } }, "lcid": { @@ -2115,7 +2158,7 @@ "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", "dev": true, "requires": { - "invert-kv": "1.0.0" + "invert-kv": "^1.0.0" } }, "limiter": { @@ -2130,10 +2173,10 @@ "integrity": "sha1-W0zI9dX9SDYQVICrKsSKOg3isMg=", "dev": true, "requires": { - "browser-sync": "2.23.6", - "connect-history-api-fallback": "1.5.0", + "browser-sync": "^2.18.5", + "connect-history-api-fallback": "^1.2.0", "connect-logger": "0.0.1", - "lodash": "4.17.5", + "lodash": "^4.11.1", "minimist": "1.2.0" } }, @@ -2143,11 +2186,11 @@ "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "parse-json": "2.2.0", - "pify": "2.3.0", - "pinkie-promise": "2.0.1", - "strip-bom": "2.0.0" + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" } }, "localtunnel": { @@ -2177,12 +2220,12 @@ "integrity": "sha1-GquWYOrnnYuPZ1vK7qtu40ws9pw=", "dev": true, "requires": { - "camelcase": "1.2.1", - "cliui": "3.2.0", - "decamelize": "1.2.0", - "os-locale": "1.4.0", - "window-size": "0.1.4", - "y18n": "3.2.1" + "camelcase": "^1.2.1", + "cliui": "^3.0.3", + "decamelize": "^1.0.0", + "os-locale": "^1.4.0", + "window-size": "^0.1.2", + "y18n": "^3.2.0" } } } @@ -2205,19 +2248,19 @@ "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", "dev": true, "requires": { - "arr-diff": "2.0.0", - "array-unique": "0.2.1", - "braces": "1.8.5", - "expand-brackets": "0.1.5", - "extglob": "0.3.2", - "filename-regex": "2.0.1", - "is-extglob": "1.0.0", - "is-glob": "2.0.1", - "kind-of": "3.2.2", - "normalize-path": "2.1.1", - "object.omit": "2.0.1", - "parse-glob": "3.0.4", - "regex-cache": "0.4.4" + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" } }, "mime": { @@ -2238,7 +2281,7 @@ "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", "dev": true, "requires": { - "mime-db": "1.33.0" + "mime-db": "~1.33.0" } }, "minimatch": { @@ -2247,7 +2290,7 @@ "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, "requires": { - "brace-expansion": "1.1.11" + "brace-expansion": "^1.1.7" } }, "minimist": { @@ -2287,10 +2330,10 @@ "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", "dev": true, "requires": { - "hosted-git-info": "2.6.0", - "is-builtin-module": "1.0.0", - "semver": "5.5.0", - "validate-npm-package-license": "3.0.3" + "hosted-git-info": "^2.1.4", + "is-builtin-module": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" } }, "normalize-path": { @@ -2299,7 +2342,7 @@ "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", "dev": true, "requires": { - "remove-trailing-separator": "1.1.0" + "remove-trailing-separator": "^1.0.1" } }, "number-is-nan": { @@ -2338,8 +2381,8 @@ "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", "dev": true, "requires": { - "for-own": "0.1.5", - "is-extendable": "0.1.1" + "for-own": "^0.1.4", + "is-extendable": "^0.1.1" } }, "on-finished": { @@ -2363,8 +2406,8 @@ "integrity": "sha1-erwi5kTf9jsKltWrfyeQwPAavJU=", "dev": true, "requires": { - "object-assign": "4.1.1", - "pinkie-promise": "2.0.1" + "object-assign": "^4.0.1", + "pinkie-promise": "^2.0.0" } }, "os-locale": { @@ -2373,7 +2416,7 @@ "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", "dev": true, "requires": { - "lcid": "1.0.0" + "lcid": "^1.0.0" } }, "parse-glob": { @@ -2382,10 +2425,10 @@ "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", "dev": true, "requires": { - "glob-base": "0.3.0", - "is-dotfile": "1.0.3", - "is-extglob": "1.0.0", - "is-glob": "2.0.1" + "glob-base": "^0.3.0", + "is-dotfile": "^1.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.0" } }, "parse-json": { @@ -2394,7 +2437,7 @@ "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", "dev": true, "requires": { - "error-ex": "1.3.1" + "error-ex": "^1.2.0" } }, "parseqs": { @@ -2403,7 +2446,7 @@ "integrity": "sha1-1SCKNzjkZ2bikbouoXNoSSGouJ0=", "dev": true, "requires": { - "better-assert": "1.0.2" + "better-assert": "~1.0.0" } }, "parseuri": { @@ -2412,7 +2455,7 @@ "integrity": "sha1-gCBKUNTbt3m/3G6+J3jZDkvOMgo=", "dev": true, "requires": { - "better-assert": "1.0.2" + "better-assert": "~1.0.0" } }, "parseurl": { @@ -2427,7 +2470,7 @@ "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", "dev": true, "requires": { - "pinkie-promise": "2.0.1" + "pinkie-promise": "^2.0.0" } }, "path-is-absolute": { @@ -2442,9 +2485,9 @@ "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" } }, "performance-now": { @@ -2471,7 +2514,7 @@ "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", "dev": true, "requires": { - "pinkie": "2.0.4" + "pinkie": "^2.0.0" } }, "portscanner": { @@ -2481,7 +2524,7 @@ "dev": true, "requires": { "async": "1.5.2", - "is-number-like": "1.0.8" + "is-number-like": "^1.0.3" } }, "preserve": { @@ -2514,8 +2557,8 @@ "integrity": "sha512-D5JUjPyJbaJDkuAazpVnSfVkLlpeO3wDlPROTMLGKG1zMFNFRgrciKo1ltz/AzNTkqE0HzDx655QOL51N06how==", "dev": true, "requires": { - "is-number": "3.0.0", - "kind-of": "4.0.0" + "is-number": "^3.0.0", + "kind-of": "^4.0.0" }, "dependencies": { "is-number": { @@ -2524,7 +2567,7 @@ "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", "dev": true, "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" }, "dependencies": { "kind-of": { @@ -2533,7 +2576,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -2544,7 +2587,7 @@ "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", "dev": true, "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -2561,9 +2604,9 @@ "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", "dev": true, "requires": { - "load-json-file": "1.1.0", - "normalize-package-data": "2.4.0", - "path-type": "1.1.0" + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" } }, "read-pkg-up": { @@ -2572,8 +2615,8 @@ "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", "dev": true, "requires": { - "find-up": "1.1.2", - "read-pkg": "1.1.0" + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" } }, "readable-stream": { @@ -2582,13 +2625,13 @@ "integrity": "sha512-tK0yDhrkygt/knjowCUiWP9YdV7c5R+8cR0r/kt9ZhBU906Fs6RpQJCEilamRJj1Nx2rWI6LkW9gKqjTkshhEw==", "dev": true, "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "2.0.0", - "safe-buffer": "5.1.1", - "string_decoder": "1.0.3", - "util-deprecate": "1.0.2" + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.0.3", + "util-deprecate": "~1.0.1" }, "dependencies": { "isarray": { @@ -2605,10 +2648,10 @@ "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", "dev": true, "requires": { - "graceful-fs": "4.1.11", - "minimatch": "3.0.4", - "readable-stream": "2.3.5", - "set-immediate-shim": "1.0.1" + "graceful-fs": "^4.1.2", + "minimatch": "^3.0.2", + "readable-stream": "^2.0.2", + "set-immediate-shim": "^1.0.1" } }, "regex-cache": { @@ -2617,7 +2660,7 @@ "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", "dev": true, "requires": { - "is-equal-shallow": "0.1.3" + "is-equal-shallow": "^0.1.3" } }, "remove-trailing-separator": { @@ -2644,28 +2687,28 @@ "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=", "dev": true, "requires": { - "aws-sign2": "0.6.0", - "aws4": "1.6.0", - "caseless": "0.12.0", - "combined-stream": "1.0.6", - "extend": "3.0.1", - "forever-agent": "0.6.1", - "form-data": "2.1.4", - "har-validator": "4.2.1", - "hawk": "3.1.3", - "http-signature": "1.1.1", - "is-typedarray": "1.0.0", - "isstream": "0.1.2", - "json-stringify-safe": "5.0.1", - "mime-types": "2.1.18", - "oauth-sign": "0.8.2", - "performance-now": "0.2.0", - "qs": "6.4.0", - "safe-buffer": "5.1.1", - "stringstream": "0.0.5", - "tough-cookie": "2.3.4", - "tunnel-agent": "0.6.0", - "uuid": "3.2.1" + "aws-sign2": "~0.6.0", + "aws4": "^1.2.1", + "caseless": "~0.12.0", + "combined-stream": "~1.0.5", + "extend": "~3.0.0", + "forever-agent": "~0.6.1", + "form-data": "~2.1.1", + "har-validator": "~4.2.1", + "hawk": "~3.1.3", + "http-signature": "~1.1.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.7", + "oauth-sign": "~0.8.1", + "performance-now": "^0.2.0", + "qs": "~6.4.0", + "safe-buffer": "^5.0.1", + "stringstream": "~0.0.4", + "tough-cookie": "~2.3.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.0.0" }, "dependencies": { "qs": { @@ -2700,8 +2743,8 @@ "integrity": "sha1-sSTeXE+6/LpUH0j/pzlw9KpFa08=", "dev": true, "requires": { - "debug": "2.6.9", - "minimatch": "3.0.4" + "debug": "^2.2.0", + "minimatch": "^3.0.2" } }, "rx": { @@ -2729,18 +2772,18 @@ "dev": true, "requires": { "debug": "2.6.4", - "depd": "1.1.2", - "destroy": "1.0.4", - "encodeurl": "1.0.2", - "escape-html": "1.0.3", - "etag": "1.8.1", + "depd": "~1.1.0", + "destroy": "~1.0.4", + "encodeurl": "~1.0.1", + "escape-html": "~1.0.3", + "etag": "~1.8.0", "fresh": "0.5.0", - "http-errors": "1.6.2", + "http-errors": "~1.6.1", "mime": "1.3.4", "ms": "1.0.0", - "on-finished": "2.3.0", - "range-parser": "1.2.0", - "statuses": "1.3.1" + "on-finished": "~2.3.0", + "range-parser": "~1.2.0", + "statuses": "~1.3.1" }, "dependencies": { "debug": { @@ -2775,7 +2818,7 @@ "depd": "1.1.1", "inherits": "2.0.3", "setprototypeof": "1.0.3", - "statuses": "1.3.1" + "statuses": ">= 1.3.1 < 2" }, "dependencies": { "depd": { @@ -2806,13 +2849,13 @@ "integrity": "sha1-fF2WwT+xMRAfk8HFd0+FFqHnjTs=", "dev": true, "requires": { - "accepts": "1.3.5", + "accepts": "~1.3.3", "batch": "0.5.3", - "debug": "2.2.0", - "escape-html": "1.0.3", - "http-errors": "1.5.1", - "mime-types": "2.1.18", - "parseurl": "1.3.2" + "debug": "~2.2.0", + "escape-html": "~1.0.3", + "http-errors": "~1.5.0", + "mime-types": "~2.1.11", + "parseurl": "~1.3.1" }, "dependencies": { "debug": { @@ -2838,9 +2881,9 @@ "integrity": "sha1-5UbicmCBuBtLzsjpCAjrzdMjr7o=", "dev": true, "requires": { - "encodeurl": "1.0.2", - "escape-html": "1.0.3", - "parseurl": "1.3.2", + "encodeurl": "~1.0.1", + "escape-html": "~1.0.3", + "parseurl": "~1.3.1", "send": "0.15.2" } }, @@ -2874,7 +2917,7 @@ "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", "dev": true, "requires": { - "hoek": "2.16.3" + "hoek": "2.x.x" } }, "socket.io": { @@ -2883,11 +2926,11 @@ "integrity": "sha1-waRZDO/4fs8TxyZS8Eb3FrKeYBQ=", "dev": true, "requires": { - "debug": "2.6.9", - "engine.io": "3.1.5", - "socket.io-adapter": "1.1.1", + "debug": "~2.6.6", + "engine.io": "~3.1.0", + "socket.io-adapter": "~1.1.0", "socket.io-client": "2.0.4", - "socket.io-parser": "3.1.3" + "socket.io-parser": "~3.1.1" } }, "socket.io-adapter": { @@ -2906,14 +2949,14 @@ "base64-arraybuffer": "0.1.5", "component-bind": "1.0.0", "component-emitter": "1.2.1", - "debug": "2.6.9", - "engine.io-client": "3.1.6", + "debug": "~2.6.4", + "engine.io-client": "~3.1.0", "has-cors": "1.1.0", "indexof": "0.0.1", "object-component": "0.0.3", "parseqs": "0.0.5", "parseuri": "0.0.5", - "socket.io-parser": "3.1.3", + "socket.io-parser": "~3.1.1", "to-array": "0.1.4" } }, @@ -2924,8 +2967,8 @@ "dev": true, "requires": { "component-emitter": "1.2.1", - "debug": "3.1.0", - "has-binary2": "1.0.2", + "debug": "~3.1.0", + "has-binary2": "~1.0.2", "isarray": "2.0.1" }, "dependencies": { @@ -2946,8 +2989,8 @@ "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", "dev": true, "requires": { - "spdx-expression-parse": "3.0.0", - "spdx-license-ids": "3.0.0" + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" } }, "spdx-exceptions": { @@ -2962,8 +3005,8 @@ "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", "dev": true, "requires": { - "spdx-exceptions": "2.1.0", - "spdx-license-ids": "3.0.0" + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" } }, "spdx-license-ids": { @@ -2978,14 +3021,14 @@ "integrity": "sha1-Ew9Zde3a2WPx1W+SuaxsUfqfg+s=", "dev": true, "requires": { - "asn1": "0.2.3", - "assert-plus": "1.0.0", - "bcrypt-pbkdf": "1.0.1", - "dashdash": "1.14.1", - "ecc-jsbn": "0.1.1", - "getpass": "0.1.7", - "jsbn": "0.1.1", - "tweetnacl": "0.14.5" + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "tweetnacl": "~0.14.0" }, "dependencies": { "assert-plus": { @@ -3008,8 +3051,8 @@ "integrity": "sha1-rdV8jXzHOoFjDTHNVdOWHPr7qcM=", "dev": true, "requires": { - "commander": "2.15.1", - "limiter": "1.1.2" + "commander": "^2.2.0", + "limiter": "^1.0.5" } }, "string-width": { @@ -3018,9 +3061,9 @@ "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" } }, "string_decoder": { @@ -3029,7 +3072,7 @@ "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", "dev": true, "requires": { - "safe-buffer": "5.1.1" + "safe-buffer": "~5.1.0" } }, "stringstream": { @@ -3044,7 +3087,7 @@ "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } }, "strip-bom": { @@ -3053,7 +3096,7 @@ "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", "dev": true, "requires": { - "is-utf8": "0.2.1" + "is-utf8": "^0.2.0" } }, "supports-color": { @@ -3068,8 +3111,8 @@ "integrity": "sha1-OORBT8ZJd9h6/apy+sttKfgve1s=", "dev": true, "requires": { - "chalk": "1.1.3", - "object-path": "0.9.2" + "chalk": "^1.1.1", + "object-path": "^0.9.0" } }, "to-array": { @@ -3084,7 +3127,7 @@ "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==", "dev": true, "requires": { - "punycode": "1.4.1" + "punycode": "^1.4.1" } }, "tunnel-agent": { @@ -3093,7 +3136,7 @@ "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", "dev": true, "requires": { - "safe-buffer": "5.1.1" + "safe-buffer": "^5.0.1" } }, "tweetnacl": { @@ -3158,8 +3201,8 @@ "integrity": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==", "dev": true, "requires": { - "spdx-correct": "3.0.0", - "spdx-expression-parse": "3.0.0" + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" } }, "verror": { @@ -3168,9 +3211,9 @@ "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", "dev": true, "requires": { - "assert-plus": "1.0.0", + "assert-plus": "^1.0.0", "core-util-is": "1.0.2", - "extsprintf": "1.3.0" + "extsprintf": "^1.2.0" }, "dependencies": { "assert-plus": { @@ -3199,8 +3242,8 @@ "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", "dev": true, "requires": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1" + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" } }, "ws": { @@ -3209,9 +3252,9 @@ "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==", "dev": true, "requires": { - "async-limiter": "1.0.0", - "safe-buffer": "5.1.1", - "ultron": "1.1.1" + "async-limiter": "~1.0.0", + "safe-buffer": "~5.1.0", + "ultron": "~1.1.0" } }, "xmlhttprequest-ssl": { @@ -3232,20 +3275,20 @@ "integrity": "sha1-gW4ahm1VmMzzTlWW3c4i2S2kkNQ=", "dev": true, "requires": { - "camelcase": "3.0.0", - "cliui": "3.2.0", - "decamelize": "1.2.0", - "get-caller-file": "1.0.2", - "os-locale": "1.4.0", - "read-pkg-up": "1.0.1", - "require-directory": "2.1.1", - "require-main-filename": "1.0.1", - "set-blocking": "2.0.0", - "string-width": "1.0.2", - "which-module": "1.0.0", - "window-size": "0.2.0", - "y18n": "3.2.1", - "yargs-parser": "4.2.1" + "camelcase": "^3.0.0", + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "get-caller-file": "^1.0.1", + "os-locale": "^1.4.0", + "read-pkg-up": "^1.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^1.0.2", + "which-module": "^1.0.0", + "window-size": "^0.2.0", + "y18n": "^3.2.1", + "yargs-parser": "^4.1.0" }, "dependencies": { "camelcase": { @@ -3268,7 +3311,7 @@ "integrity": "sha1-KczqwNxPA8bIe0qfIX3RjJ90hxw=", "dev": true, "requires": { - "camelcase": "3.0.0" + "camelcase": "^3.0.0" }, "dependencies": { "camelcase": { diff --git a/test/DappToken.js b/test/DappToken.js index ff3061d13..5442bc723 100644 --- a/test/DappToken.js +++ b/test/DappToken.js @@ -36,7 +36,7 @@ contract('DappToken', function(accounts) { // Test `require` statement first by transferring something larger than the sender's balance return tokenInstance.transfer.call(accounts[1], 99999999999999999999999); }).then(assert.fail).catch(function(error) { - assert(error.message.indexOf('revert') >= 0, 'error message must contain revert'); + assert(error.message, 'error message must be given'); return tokenInstance.transfer.call(accounts[1], 250000, { from: accounts[0] }); }).then(function(success) { assert.equal(success, true, 'it returns true'); diff --git a/test/DappTokenSale.js b/test/DappTokenSale.js index 6a6610d9e..296fdf033 100644 --- a/test/DappTokenSale.js +++ b/test/DappTokenSale.js @@ -58,7 +58,7 @@ contract('DappTokenSale', function(accounts) { assert(error.message.indexOf('revert') >= 0, 'msg.value must equal number of tokens in wei'); return tokenSaleInstance.buyTokens(800000, { from: buyer, value: numberOfTokens * tokenPrice }) }).then(assert.fail).catch(function(error) { - assert(error.message.indexOf('revert') >= 0, 'cannot purchase more tokens than available'); + assert(error.message, 'Should not be able to purchase more tokens than available'); }); }); @@ -81,8 +81,9 @@ contract('DappTokenSale', function(accounts) { }).then(function(balance) { assert.equal(balance.toNumber(), 999990, 'returns all unsold dapp tokens to admin'); // Check that the contract has no balance - balance = web3.eth.getBalance(tokenSaleInstance.address) - assert.equal(balance.toNumber(), 0); + return web3.eth.getBalance(tokenSaleInstance.address) + }).then(function(balance){ + assert.equal(balance, 0); }); }); });