ERC-20
Source Code
Overview
Max Total Supply
165 With ☕️
Holders
44
Transfers
-
0
Market
Onchain Market Cap
-
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Loading...
Loading
Loading...
Loading
Loading...
Loading
| # | Exchange | Pair | Price | 24H Volume | % Volume |
|---|
Contract Name:
WithCoffeeToken
Compiler Version
v0.5.11+commit.c082d0b4
Contract Source Code (Solidity)
/**
*Submitted for verification at Etherscan.io on 2020-03-09
*/
// File: contracts/Library/IERC20.sol
pragma solidity ^0.5.11;
interface IERC20 {
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
function transfer(address to, uint256 value) external returns (bool);
function transferFrom(address from, address to, uint256 value)
external
returns (bool);
function approve(address spender, uint256 value) external returns (bool);
function balanceOf(address target) external view returns (uint256);
function allowance(address target, address spender)
external
view
returns (uint256);
}
// File: contracts/Library/SafeMath.sol
pragma solidity ^0.5.11;
/**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming languages.
* `SafeMath` restores this intuition by reverting the transaction when an
* operation overflows.
*
* Using this library instead of the unchecked operations eliminates an entire
* class of bugs, so it's recommended to use it always.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*
* _Available since v2.4.0._
*/
function sub(uint256 a, uint256 b, string memory errorMessage)
internal
pure
returns (uint256)
{
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return 0;
}
uint256 c = a * b;
require(c / a == b, "SafeMath: multiplication overflow");
return c;
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*
* _Available since v2.4.0._
*/
function div(uint256 a, uint256 b, string memory errorMessage)
internal
pure
returns (uint256)
{
// Solidity only automatically asserts when dividing by 0
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*
* _Available since v2.4.0._
*/
function mod(uint256 a, uint256 b, string memory errorMessage)
internal
pure
returns (uint256)
{
require(b != 0, errorMessage);
return a % b;
}
}
// File: contracts/WithCoffeeToken.sol
pragma solidity ^0.5.11;
contract WithCoffeeToken is IERC20 {
using SafeMath for uint256;
mapping(address => uint256) private balances;
mapping(address => mapping(address => uint256)) allowances;
string public constant name = "With ☕️";
string public constant symbol = "With ☕️";
uint8 public constant decimals = 18;
uint256 public constant totalSupply = 165e18;
constructor() public {
balances[msg.sender] = totalSupply;
}
function transfer(address to, uint256 value) external returns (bool) {
balances[msg.sender] = balances[msg.sender].sub(
value,
"With ☕️/Not-Enough-Balance"
);
balances[to] = balances[to].add(value);
emit Transfer(msg.sender, to, value);
return true;
}
function transferFrom(address from, address to, uint256 value)
external
returns (bool)
{
allowances[from][msg.sender] = allowances[from][msg.sender].sub(
value,
"With ☕️/Not-Enough-Allowance"
);
balances[from] = balances[from].sub(
value,
"With ☕️/Not-Enough-Balance"
);
balances[to] = balances[to].add(value);
emit Transfer(from, to, value);
return true;
}
function approve(address spender, uint256 value) external returns (bool) {
allowances[msg.sender][spender] = value;
emit Approval(msg.sender, spender, value);
return true;
}
function balanceOf(address target) external view returns (uint256) {
return balances[target];
}
function allowance(address target, address spender)
external
view
returns (uint256)
{
return allowances[target][spender];
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"constant":true,"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"}]Contract Creation Code
608060405234801561001057600080fd5b503360009081526020819052604090206808f1d5c1cae374000090556106c68061003b6000396000f3fe608060405234801561001057600080fd5b50600436106100a35760003560e01c8063313ce5671161007657806395d89b411161005b57806395d89b41146100a8578063a9059cbb146101f9578063dd62ed3e14610225576100a3565b8063313ce567146101b557806370a08231146101d3576100a3565b806306fdde03146100a8578063095ea7b31461012557806318160ddd1461016557806323b872dd1461017f575b600080fd5b6100b0610253565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100ea5781810151838201526020016100d2565b50505050905090810190601f1680156101175780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101516004803603604081101561013b57600080fd5b506001600160a01b03813516906020013561028c565b604080519115158252519081900360200190f35b61016d6102f2565b60408051918252519081900360200190f35b6101516004803603606081101561019557600080fd5b506001600160a01b038135811691602081013590911690604001356102ff565b6101bd61046a565b6040805160ff9092168252519081900360200190f35b61016d600480360360208110156101e957600080fd5b50356001600160a01b031661046f565b6101516004803603604081101561020f57600080fd5b506001600160a01b03813516906020013561048a565b61016d6004803603604081101561023b57600080fd5b506001600160a01b038135811691602001351661056e565b6040518060400160405280600b81526020017f5769746820e29895efb88f00000000000000000000000000000000000000000081525081565b3360008181526001602090815260408083206001600160a01b038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b6808f1d5c1cae374000081565b60408051808201825260208082527f5769746820e29895efb88f2f4e6f742d456e6f7567682d416c6c6f77616e6365818301526001600160a01b0386166000908152600182528381203382529091529182205461036391849063ffffffff61059916565b6001600160a01b038516600081815260016020908152604080832033845282528083209490945583518085018552601e81527f5769746820e29895efb88f2f4e6f742d456e6f7567682d42616c616e636500008183015292825281905291909120546103d691849063ffffffff61059916565b6001600160a01b03808616600090815260208190526040808220939093559085168152205461040b908363ffffffff61063016565b6001600160a01b038085166000818152602081815260409182902094909455805186815290519193928816927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a35060019392505050565b601281565b6001600160a01b031660009081526020819052604090205490565b604080518082018252601e81527f5769746820e29895efb88f2f4e6f742d456e6f7567682d42616c616e6365000060208083019190915233600090815290819052918220546104e091849063ffffffff61059916565b33600090815260208190526040808220929092556001600160a01b03851681522054610512908363ffffffff61063016565b6001600160a01b038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b600081848411156106285760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156105ed5781810151838201526020016105d5565b50505050905090810190601f16801561061a5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008282018381101561068a576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b939250505056fea265627a7a72315820a156b42ab0d5ed7af86e748a9e95ab5ceb7a50c73ae92269a9cbe6e3eb6c007f64736f6c634300050b0032
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100a35760003560e01c8063313ce5671161007657806395d89b411161005b57806395d89b41146100a8578063a9059cbb146101f9578063dd62ed3e14610225576100a3565b8063313ce567146101b557806370a08231146101d3576100a3565b806306fdde03146100a8578063095ea7b31461012557806318160ddd1461016557806323b872dd1461017f575b600080fd5b6100b0610253565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100ea5781810151838201526020016100d2565b50505050905090810190601f1680156101175780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101516004803603604081101561013b57600080fd5b506001600160a01b03813516906020013561028c565b604080519115158252519081900360200190f35b61016d6102f2565b60408051918252519081900360200190f35b6101516004803603606081101561019557600080fd5b506001600160a01b038135811691602081013590911690604001356102ff565b6101bd61046a565b6040805160ff9092168252519081900360200190f35b61016d600480360360208110156101e957600080fd5b50356001600160a01b031661046f565b6101516004803603604081101561020f57600080fd5b506001600160a01b03813516906020013561048a565b61016d6004803603604081101561023b57600080fd5b506001600160a01b038135811691602001351661056e565b6040518060400160405280600b81526020017f5769746820e29895efb88f00000000000000000000000000000000000000000081525081565b3360008181526001602090815260408083206001600160a01b038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b6808f1d5c1cae374000081565b60408051808201825260208082527f5769746820e29895efb88f2f4e6f742d456e6f7567682d416c6c6f77616e6365818301526001600160a01b0386166000908152600182528381203382529091529182205461036391849063ffffffff61059916565b6001600160a01b038516600081815260016020908152604080832033845282528083209490945583518085018552601e81527f5769746820e29895efb88f2f4e6f742d456e6f7567682d42616c616e636500008183015292825281905291909120546103d691849063ffffffff61059916565b6001600160a01b03808616600090815260208190526040808220939093559085168152205461040b908363ffffffff61063016565b6001600160a01b038085166000818152602081815260409182902094909455805186815290519193928816927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a35060019392505050565b601281565b6001600160a01b031660009081526020819052604090205490565b604080518082018252601e81527f5769746820e29895efb88f2f4e6f742d456e6f7567682d42616c616e6365000060208083019190915233600090815290819052918220546104e091849063ffffffff61059916565b33600090815260208190526040808220929092556001600160a01b03851681522054610512908363ffffffff61063016565b6001600160a01b038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b600081848411156106285760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156105ed5781810151838201526020016105d5565b50505050905090810190601f16801561061a5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008282018381101561068a576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b939250505056fea265627a7a72315820a156b42ab0d5ed7af86e748a9e95ab5ceb7a50c73ae92269a9cbe6e3eb6c007f64736f6c634300050b0032
Deployed Bytecode Sourcemap
6429:1835:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6429:1835:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6622:43;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;6622:43:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7760:207;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;7760:207:0;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;6766:44;;;:::i;:::-;;;;;;;;;;;;;;;;7242:510;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;7242:510:0;;;;;;;;;;;;;;;;;:::i;6724:35::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;7975:109;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;7975:109:0;-1:-1:-1;;;;;7975:109:0;;:::i;6901:333::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;6901:333:0;;;;;;;;:::i;8092:169::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;8092:169:0;;;;;;;;;;:::i;6622:43::-;;;;;;;;;;;;;;;;;;;:::o;7760:207::-;7855:10;7827:4;7844:22;;;:10;:22;;;;;;;;-1:-1:-1;;;;;7844:31:0;;;;;;;;;;;:39;;;7901:36;;;;;;;7827:4;;7844:31;;7855:10;;7901:36;;;;;;;;-1:-1:-1;7955:4:0;7760:207;;;;:::o;6766:44::-;6804:6;6766:44;:::o;7242:510::-;7394:112;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;7394:16:0;;7341:4;7394:16;;;:10;:16;;;;;7411:10;7394:28;;;;;;;;;:112;;7441:5;;7394:112;:32;:112;:::i;:::-;-1:-1:-1;;;;;7363:16:0;;;;;;:10;:16;;;;;;;;7380:10;7363:28;;;;;;;:143;;;;7534:96;;;;;;;;;;;;;;;:14;;;;;;;;;;;:96;;7567:5;;7534:96;:18;:96;:::i;:::-;-1:-1:-1;;;;;7517:14:0;;;:8;:14;;;;;;;;;;;:113;;;;7656:12;;;;;;;:23;;7673:5;7656:23;:16;:23;:::i;:::-;-1:-1:-1;;;;;7641:12:0;;;:8;:12;;;;;;;;;;;;:38;;;;7697:25;;;;;;;7641:12;;7697:25;;;;;;;;;;;;;-1:-1:-1;7740:4:0;7242:510;;;;;:::o;6724:35::-;6757:2;6724:35;:::o;7975:109::-;-1:-1:-1;;;;;8060:16:0;8033:7;8060:16;;;;;;;;;;;;7975:109::o;6901:333::-;7004:102;;;;;;;;;;;;;;;;;;;;7013:10;6964:4;7004:20;;;;;;;;;;;:102;;7043:5;;7004:102;:24;:102;:::i;:::-;6990:10;6981:8;:20;;;;;;;;;;;:125;;;;-1:-1:-1;;;;;7132:12:0;;;;;;:23;;7149:5;7132:23;:16;:23;:::i;:::-;-1:-1:-1;;;;;7117:12:0;;:8;:12;;;;;;;;;;;;:38;;;;7173:31;;;;;;;7117:12;;7182:10;;7173:31;;;;;;;;;;-1:-1:-1;7222:4:0;6901:333;;;;:::o;8092:169::-;-1:-1:-1;;;;;8226:18:0;;;8194:7;8226:18;;;:10;:18;;;;;;;;:27;;;;;;;;;;;;;8092:169::o;2589:224::-;2702:7;2743:12;2735:6;;;;2727:29;;;;-1:-1:-1;;;2727:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;2727:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2779:5:0;;;2589:224::o;1660:181::-;1718:7;1750:5;;;1774:6;;;;1766:46;;;;;-1:-1:-1;;;1766:46:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;1832:1;1660:181;-1:-1:-1;;;1660:181:0:o
Swarm Source
bzzr://a156b42ab0d5ed7af86e748a9e95ab5ceb7a50c73ae92269a9cbe6e3eb6c007f
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.
Add Token to MetaMask (Web3)