Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

vivek i-am-vivek

🎯
Focusing
Block or report user

Report or block i-am-vivek

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@i-am-vivek
i-am-vivek / BasicToken.sol
Created Mar 6, 2019
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.5.5+commit.47a71e8f.js&optimize=false&gist=
View BasicToken.sol
pragma solidity ^0.5.5;
contract SafeMath {
function safeMul(uint a, uint b) internal returns (uint) {
uint c = a * b;
assert(a == 0 || c / a == b);
return c;
}
function safeSub(uint a, uint b) internal returns (uint) {
@i-am-vivek
i-am-vivek / BasicToken.sol
Created Feb 27, 2019
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.25+commit.59dbf8f1.js&optimize=false&gist=
View BasicToken.sol
pragma solidity ^0.4.25;
// ----------------------------------------------------------------------------
// Safe maths
// ----------------------------------------------------------------------------
contract SafeMath {
function safeAdd(uint a, uint b) public pure returns (uint c) {
c = a + b;
require(c >= a, "Error");
}
@i-am-vivek
i-am-vivek / BasicToken.sol
Created Feb 27, 2019
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.25+commit.59dbf8f1.js&optimize=false&gist=
View BasicToken.sol
pragma solidity ^0.4.25;
// ----------------------------------------------------------------------------
// Safe maths
// ----------------------------------------------------------------------------
contract SafeMath {
function safeAdd(uint a, uint b) public pure returns (uint c) {
c = a + b;
require(c >= a, "Error");
}
You can’t perform that action at this time.