Skip to content

Instantly share code, notes, and snippets.

@oneleo
oneleo / ChunghwaTelecomToken.sol
Last active December 9, 2018 08:47
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.1+commit.c8a2cb62.js&optimize=true&gist=
pragma solidity >0.3.99 <0.6.0;
/**
* @title SafeMath
* @dev Math operations with safety checks that revert on error
*/
library SafeMath {
/**
* @dev Multiplies two numbers, reverts on overflow.
*/
@oneleo
oneleo / Bank.sol
Created November 13, 2018 16:11
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=true&gist=
pragma solidity ^0.4.25;
contract Bank {
// 此合約的擁有者。
address private _owner;
// 儲存所有會員的 ether 餘額。
mapping (address => uint256) private _balance;
// 儲存所有會員的 bank coin 餘額。