Skip to content

Instantly share code, notes, and snippets.

View destwofe's full-sized avatar

Napat Yimjan destwofe

  • Thai Bond Market Association
  • Bangkok, Thailand
View GitHub Profile
pragma solidity ^0.4.17;
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
@destwofe
destwofe / zmine.sol
Last active December 4, 2017 08:55
pragma solidity 0.4.18;
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;