Skip to content

Instantly share code, notes, and snippets.

View ankit-trakinvest's full-sized avatar

ankit-trakinvest

View GitHub Profile
@ankit-trakinvest
ankit-trakinvest / CrowdSale.sol
Created December 17, 2017 17:03
CrowdSale Smart Contract for TrakInvest
pragma solidity ^0.4.18;
/* taking ideas from Zeppelin solidity module */
contract SafeMath {
// it is recommended to define functions which can neither read the state of blockchain nor write in it as pure instead of constant
function safeAdd(uint256 x, uint256 y) internal pure returns(uint256) {
uint256 z = x + y;
assert((z >= x));
@ankit-trakinvest
ankit-trakinvest / TrakToken
Created December 17, 2017 17:30
Trak Token Smart contract code
pragma solidity ^0.4.18;
/* taking ideas from Zeppelin solidity module */
contract SafeMath {
// it is recommended to define functions which can neither read the state of blockchain nor write in it as pure instead of constant
function safeAdd(uint256 x, uint256 y) internal pure returns(uint256) {
uint256 z = x + y;
assert((z >= x));