Address Contract Partially Verified
Address
0xf5054CB3723eF0811b535209343bC88e07F26dA9
Balance
0 ETH
Nonce
1
Code Size
5833 bytes
Creator
0x0490cb08...2B26 at tx 0x5160027f...b3e9c0
Indexed Transactions
0
Contract Bytecode
5833 bytes
0x608060405234801561001057600080fd5b50600436106102325760003560e01c806370a0823111610130578063983b2d56116100b8578063aa271e1a1161007c578063aa271e1a146104a0578063ac8a584a146104b3578063ce617de2146104c6578063dd62ed3e146104d9578063f2fde38b146104ec57600080fd5b8063983b2d561461044c578063986502751461045f5780639870d7fe146104675780639b19251a1461047a578063a9059cbb1461048d57600080fd5b80638456cb59116100ff5780638456cb59146103fb57806388d695b2146104035780638da5cb5b146104165780638f32d59b1461043157806395d89b411461044457600080fd5b806370a08231146103a4578063715018a6146103cd57806379cc6790146103d557806382dc1ec4146103e857600080fd5b80633af32abf116101be5780635c975abb116101825780635c975abb146103585780636b2c0f55146103635780636d70f7ae146103765780636e932270146103895780636ef8d66d1461039c57600080fd5b80633af32abf146102eb5780633f4ba83a1461031757806340c10f191461031f57806342966c681461033257806346fbf68e1461034557600080fd5b80632ab6f8db116102055780632ab6f8db1461029d5780633092afd5146102a7578063313ce567146102ba578063355274ea146102cf57806339ee0661146102d857600080fd5b806306fdde0314610237578063095ea7b31461025557806318160ddd1461027857806323b872dd1461028a575b600080fd5b61023f6104ff565b60405161024c91906112ea565b60405180910390f35b610268610263366004611354565b610591565b604051901515815260200161024c565b600a545b60405190815260200161024c565b61026861029836600461137e565b61061c565b6102a56106f0565b005b6102a56102b53660046113ba565b6106fb565b60085460405160ff909116815260200161024c565b61027c60095481565b6102a56102e63660046114b2565b61071e565b6102686102f93660046113ba565b6001600160a01b031660009081526003602052604090205460ff1690565b6102a561077a565b61026861032d366004611354565b6107db565b6102a56103403660046114e7565b610883565b6102686103533660046113ba565b61089d565b60055460ff16610268565b6102a56103713660046113ba565b6108aa565b6102686103843660046113ba565b6108ca565b6102a56103973660046113ba565b6108d7565b6102a56108f2565b61027c6103b23660046113ba565b6001600160a01b03166000908152600b602052604090205490565b6102a56108fb565b6102a56103e3366004611354565b61095c565b6102a56103f63660046113ba565b610976565b6102a5610996565b6102a5610411366004611500565b6109f5565b6000546040516001600160a01b03909116815260200161024c565b6000546001600160a01b03163314610268565b61023f610a84565b6102a561045a3660046113ba565b610a93565b6102a5610ab3565b6102a56104753660046113ba565b610abc565b6102a56104883660046113ba565b610adc565b61026861049b366004611354565b610af7565b6102686104ae3660046113ba565b610b15565b6102a56104c13660046113ba565b610b22565b6102a56104d43660046114b2565b610b42565b61027c6104e73660046115bb565b610b9a565b6102a56104fa3660046113ba565b610bd9565b60606006805461050e906115ee565b80601f016020809104026020016040519081016040528092919081815260200182805461053a906115ee565b80156105875780601f1061055c57610100808354040283529160200191610587565b820191906000526020600020905b81548152906001019060200180831161056a57829003601f168201915b5050505050905090565b60055460009060ff16156105a457600080fd5b6001600160a01b0383166105b757600080fd5b336000818152600c602090815260408083206001600160a01b03881680855290835292819020869055518581529192917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a35060015b92915050565b60055460009060ff161561062f57600080fd5b6001600160a01b0384166000908152600c6020908152604080832033845290915290205461065d9083610bf9565b6001600160a01b0385166000908152600c6020908152604080832033845290915290205561068c848484610c1c565b6001600160a01b0384166000818152600c6020908152604080832033808552908352928190205490519081529192917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a35060019392505050565b6106f933610d63565b565b6000546001600160a01b0316331461071257600080fd5b61071b81610da5565b50565b610727336108ca565b61073057600080fd5b60005b815181101561077657600082828151811061075057610750611628565b6020026020010151905061076381610de7565b508061076e81611654565b915050610733565b5050565b6107833361089d565b61078c57600080fd5b60055460ff1661079b57600080fd5b6005805460ff191690556040513381527f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa906020015b60405180910390a1565b60006107e633610b15565b6107ef57600080fd5b60055460ff16156107ff57600080fd5b600954156108705760095461081d83610817600a5490565b90610e57565b11156108705760405162461bcd60e51b815260206004820152601c60248201527f43616e206e6f74206d696e7420746f2076616c7565203c3d206361700000000060448201526064015b60405180910390fd5b61087a8383610e7a565b50600192915050565b60055460ff161561089357600080fd5b61071b3382610f1d565b6000610616600483610fb1565b6000546001600160a01b031633146108c157600080fd5b61071b81610fe6565b6000610616600283610fb1565b6108e0336108ca565b6108e957600080fd5b61071b81611028565b6106f933610fe6565b6000546001600160a01b0316331461091257600080fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60055460ff161561096c57600080fd5b610776828261106f565b6000546001600160a01b0316331461098d57600080fd5b61071b81611122565b61099f3361089d565b6109a857600080fd5b60055460ff16156109b857600080fd5b6005805460ff191660011790556040513381527f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258906020016107d1565b60055460ff1615610a0557600080fd5b610a0e336108ca565b610a1757600080fd5b60005b8251811015610a7f576000838281518110610a3757610a37611628565b602002602001015190506000838381518110610a5557610a55611628565b60200260200101519050610a6a338383610c1c565b50508080610a7790611654565b915050610a1a565b505050565b60606007805461050e906115ee565b6000546001600160a01b03163314610aaa57600080fd5b61071b81611164565b6106f933610da5565b6000546001600160a01b03163314610ad357600080fd5b61071b816111a6565b610ae5336108ca565b610aee57600080fd5b61071b81610de7565b60055460009060ff1615610b0a57600080fd5b61087a338484610c1c565b6000610616600183610fb1565b6000546001600160a01b03163314610b3957600080fd5b61071b81610d63565b610b4b336108ca565b610b5457600080fd5b60005b8151811015610776576000828281518110610b7457610b74611628565b60200260200101519050610b8781611028565b5080610b9281611654565b915050610b57565b60055460009060ff1615610bad57600080fd5b506001600160a01b039182166000908152600c6020908152604080832093909416825291909152205490565b6000546001600160a01b03163314610bf057600080fd5b61071b816111e8565b600082821115610c0857600080fd5b6000610c14838561166d565b949350505050565b6001600160a01b038216600090815260036020526040902054829060ff16610c9c5760405162461bcd60e51b815260206004820152602d60248201527f54686520726563656976696e672077616c6c6574206e6565647320746f20626560448201526c103bb434ba32b634b9ba32b21760991b6064820152608401610867565b6001600160a01b038316610caf57600080fd5b6001600160a01b0384166000908152600b6020526040902054610cd29083610bf9565b6001600160a01b038086166000908152600b60205260408082209390935590851681522054610d019083610e57565b6001600160a01b038085166000818152600b602052604090819020939093559151908616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610d559086815260200190565b60405180910390a350505050565b610d6e600282611256565b6040516001600160a01b038216907f80c0b871b97b595b16a7741c1b06fed0c6f6f558639f18ccbce50724325dc40d90600090a250565b610db0600182611256565b6040516001600160a01b038216907fe94479a9f7e1952cc78f2d6baab678adc1b772d936c6583def489e524cb6669290600090a250565b6001600160a01b0381166000908152600360205260409020805460ff191660011790557f906860d9809a36db24f3421dab36d6b1a8e89b547cff229d2fc958b13959cd0b610e323390565b604080516001600160a01b03928316815291841660208301520160405180910390a150565b600080610e648385611680565b905083811015610e7357600080fd5b9392505050565b6001600160a01b038216610e8d57600080fd5b600a54610e9a9082610e57565b600a556001600160a01b0382166000908152600b6020526040902054610ec09082610e57565b6001600160a01b0383166000818152600b60205260408082209390935591519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610f119085815260200190565b60405180910390a35050565b6001600160a01b038216610f3057600080fd5b600a54610f3d9082610bf9565b600a556001600160a01b0382166000908152600b6020526040902054610f639082610bf9565b6001600160a01b0383166000818152600b60205260408082209390935591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610f119085815260200190565b60006001600160a01b038216610fc657600080fd5b506001600160a01b03166000908152602091909152604090205460ff1690565b610ff1600482611256565b6040516001600160a01b038216907fcd265ebaf09df2871cc7bd4133404a235ba12eff2041bb89d9c714a2621c7c7e90600090a250565b6001600160a01b0381166000908152600360205260409020805460ff191690557f51bc47211ee5514bb8c859fa29736c47a2536928a22775044ed181e245ddee4333610e32565b6001600160a01b0382166000908152600c6020908152604080832033845290915290205461109d9082610bf9565b6001600160a01b0383166000908152600c602090815260408083203384529091529020556110cb8282610f1d565b6001600160a01b0382166000818152600c6020908152604080832033808552908352928190205490519081529192917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259101610f11565b61112d60048261129e565b6040516001600160a01b038216907f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f890600090a250565b61116f60018261129e565b6040516001600160a01b038216907f6ae172837ea30b801fbfcdd4108aa1d5bf8ff775444fd70256b44e6bf3dfc3f690600090a250565b6111b160028261129e565b6040516001600160a01b038216907fac6fa858e9350a46cec16539926e0fde25b7629f84b5a72bffaae4df888ae86d90600090a250565b6001600160a01b0381166111fb57600080fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03811661126957600080fd5b6112738282610fb1565b61127c57600080fd5b6001600160a01b0316600090815260209190915260409020805460ff19169055565b6001600160a01b0381166112b157600080fd5b6112bb8282610fb1565b156112c557600080fd5b6001600160a01b0316600090815260209190915260409020805460ff19166001179055565b600060208083528351808285015260005b81811015611317578581018301518582016040015282016112fb565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461134f57600080fd5b919050565b6000806040838503121561136757600080fd5b61137083611338565b946020939093013593505050565b60008060006060848603121561139357600080fd5b61139c84611338565b92506113aa60208501611338565b9150604084013590509250925092565b6000602082840312156113cc57600080fd5b610e7382611338565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611414576114146113d5565b604052919050565b600067ffffffffffffffff821115611436576114366113d5565b5060051b60200190565b600082601f83011261145157600080fd5b813560206114666114618361141c565b6113eb565b82815260059290921b8401810191818101908684111561148557600080fd5b8286015b848110156114a75761149a81611338565b8352918301918301611489565b509695505050505050565b6000602082840312156114c457600080fd5b813567ffffffffffffffff8111156114db57600080fd5b610c1484828501611440565b6000602082840312156114f957600080fd5b5035919050565b6000806040838503121561151357600080fd5b823567ffffffffffffffff8082111561152b57600080fd5b61153786838701611440565b935060209150818501358181111561154e57600080fd5b85019050601f8101861361156157600080fd5b803561156f6114618261141c565b81815260059190911b8201830190838101908883111561158e57600080fd5b928401925b828410156115ac57833582529284019290840190611593565b80955050505050509250929050565b600080604083850312156115ce57600080fd5b6115d783611338565b91506115e560208401611338565b90509250929050565b600181811c9082168061160257607f821691505b60208210810361162257634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016116665761166661163e565b5060010190565b818103818111156106165761061661163e565b808201808211156106165761061661163e56fea2646970667358221220ca38724fe3bc85915edb453d3c11d46ee91dc7374bd63e82d5f244ead482c9ef64736f6c63430008130033
Verified Source Code Partial Match
Compiler: v0.8.19+commit.7dd6d404
EVM: paris
Optimization: Yes (200 runs)
cctToken.sol 622 lines
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.7;
interface IERC20 {
function name() external view returns (string memory);
function symbol() external view returns(string memory);
function decimals() external view returns(uint8);
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256 remaining);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
interface IWhitelistable {
// add to whitelist
function whitelist(address target) external;
function batchWhitelist(address[] memory targets) external;
function dewhitelist(address target) external;
// remove from whitelist
function batchDehitelist(address[] memory targets) external;
function isWhitelisted(address target) external view returns (bool);
event Whitelist(address sender, address target);
event Dewhitelist(address sender, address target);
}
/**
* @title SafeMath
* @dev Unsigned math operations with safety checks that revert on error
*/
library SafeMath {
/**
* @dev Multiplies two unsigned integers, reverts on 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-solidity/pull/522
if (a == 0) {
return 0;
}
uint256 c = a * b;
require(c / a == b);
return c;
}
/**
* @dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
// Solidity only automatically asserts when dividing by 0
require(b > 0);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
/**
* @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
require(b <= a);
uint256 c = a - b;
return c;
}
/**
* @dev Adds two unsigned integers, reverts on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a);
return c;
}
/**
* @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo),
* reverts when dividing by zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
require(b != 0);
return a % b;
}
}
/**
* @title Roles
* @dev Library for managing addresses assigned to a Role.
*/
library Roles {
struct Role {
mapping (address => bool) bearer;
}
/**
* @dev give an account access to this role
*/
function add(Role storage role, address account) internal {
require(account != address(0));
require(!has(role, account));
role.bearer[account] = true;
}
/**
* @dev remove an account's access to this role
*/
function remove(Role storage role, address account) internal {
require(account != address(0));
require(has(role, account));
role.bearer[account] = false;
}
/**
* @dev check if an account has this role
* @return bool
*/
function has(Role storage role, address account) internal view returns (bool) {
require(account != address(0));
return role.bearer[account];
}
}
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
this;
return msg.data;
}
}
abstract contract Ownable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor () {
_owner = msg.sender;
emit OwnershipTransferred(address(0), _owner);
}
/**
* @return the address of the owner.
*/
function owner() public view returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(isOwner());
_;
}
/**
* @return true if `msg.sender` is the owner of the contract.
*/
function isOwner() public view returns (bool) {
return msg.sender == _owner;
}
/**
* @dev Allows the current owner to relinquish control of the contract.
* @notice Renouncing to ownership will leave the contract without an owner.
* It will not be possible to call the functions with the `onlyOwner`
* modifier anymore.
*/
function renounceOwnership() public onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
_transferOwnership(newOwner);
}
/**
* @dev Transfers control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function _transferOwnership(address newOwner) internal {
require(newOwner != address(0));
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
}
abstract contract MinterRole is Ownable {
using Roles for Roles.Role;
event MinterAdded(address indexed account);
event MinterRemoved(address indexed account);
Roles.Role private _minters;
constructor () {
_addMinter(msg.sender);
}
modifier onlyMinter() {
require(isMinter(msg.sender));
_;
}
function isMinter(address account) public view returns (bool) {
return _minters.has(account);
}
function addMinter(address account) public onlyOwner {
_addMinter(account);
}
function removeMinter(address account) public onlyOwner {
_removeMinter(account);
}
function renounceMinter() public {
_removeMinter(msg.sender);
}
function _addMinter(address account) internal {
_minters.add(account);
emit MinterAdded(account);
}
function _removeMinter(address account) internal {
_minters.remove(account);
emit MinterRemoved(account);
}
}
abstract contract PauserRole is Ownable {
using Roles for Roles.Role;
event PauserAdded(address indexed account);
event PauserRemoved(address indexed account);
Roles.Role private _pausers;
constructor () {
_addPauser(msg.sender);
}
modifier onlyPauser() {
require(isPauser(msg.sender));
_;
}
function isPauser(address account) public view returns (bool) {
return _pausers.has(account);
}
function addPauser(address account) public onlyOwner {
_addPauser(account);
}
function removePauser(address account) public onlyOwner {
_removePauser(account);
}
function renouncePauser() public {
_removePauser(msg.sender);
}
function _addPauser(address account) internal {
_pausers.add(account);
emit PauserAdded(account);
}
function _removePauser(address account) internal {
_pausers.remove(account);
emit PauserRemoved(account);
}
}
/**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/
abstract contract Pausable is PauserRole {
event Paused(address account);
event Unpaused(address account);
bool private _paused;
constructor () {
_paused = false;
}
/**
* @return true if the contract is paused, false otherwise.
*/
function paused() public view returns (bool) {
return _paused;
}
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
require(!_paused);
_;
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*/
modifier whenPaused() {
require(_paused);
_;
}
/**
* @dev called by the owner to pause, triggers stopped state
*/
function pause() public onlyPauser whenNotPaused {
_paused = true;
emit Paused(msg.sender);
}
/**
* @dev called by the owner to unpause, returns to normal state
*/
function unpause() public onlyPauser whenPaused {
_paused = false;
emit Unpaused(msg.sender);
}
}
abstract contract OperatorRole is Ownable {
using Roles for Roles.Role;
event OperatorAdded(address indexed account);
event OperatorRemoved(address indexed account);
Roles.Role private _operators;
constructor () {
_addOperator(msg.sender);
}
modifier onlyOperator() {
require(isOperator(msg.sender));
_;
}
function isOperator(address account) public view returns (bool) {
return _operators.has(account);
}
function addOperator(address account) public onlyOwner {
_addOperator(account);
}
function removeOperator(address account) public onlyOwner {
_removeOperator(account);
}
function renounceOperator() public {
_removeOperator(msg.sender);
}
function _addOperator(address account) internal {
_operators.add(account);
emit OperatorAdded(account);
}
function _removeOperator(address account) internal {
_operators.remove(account);
emit OperatorRemoved(account);
}
}
contract Whitelistable is IWhitelistable,OperatorRole,Context {
mapping (address => bool) internal whitelistedWallets;
modifier onlyWhitelisted(address to) {
require(whitelistedWallets[to], "The receiving wallet needs to be whitelisted.");
_;
}
function _whitelist(address target) internal {
whitelistedWallets[target] = true;
emit Whitelist(_msgSender(), target);
}
function _dewhitelist(address target) internal {
whitelistedWallets[target] = false;
emit Dewhitelist(_msgSender(), target);
}
function whitelist(address target) external override onlyOperator {
_whitelist(target);
}
function batchWhitelist(address[] memory targets) external override onlyOperator {
for (uint256 i = 0; i < targets.length; i++) {
address target = targets[i];
_whitelist(target);
}
}
function dewhitelist(address target) external override onlyOperator {
_dewhitelist(target);
}
function batchDehitelist(address[] memory targets) external override onlyOperator {
for (uint256 i = 0; i < targets.length; i++) {
address target = targets[i];
_dewhitelist(target);
}
}
function isWhitelisted(address target) external view override returns (bool) {
return whitelistedWallets[target];
}
}
contract cctToken is IERC20, MinterRole, Whitelistable, Pausable{
using SafeMath for uint256;
string _name;
string _symbol;
uint8 _decimals;
uint256 public cap;
uint256 _totalSupply;
mapping(address=>uint256) _balances;
mapping(address=>mapping(address=>uint256)) _allowed;
constructor(string memory name_,string memory symbol_,uint8 decimals_, uint256 cap_){
_name = name_;
_symbol = symbol_;
_decimals = decimals_;
cap = cap_;
}
/**
* @return the name of the token.
*/
function name() public view returns (string memory) {
return _name;
}
/**
* @return the symbol of the token.
*/
function symbol() public view returns (string memory) {
return _symbol;
}
/**
* @return the number of decimals of the token.
*/
function decimals() public view returns (uint8) {
return _decimals;
}
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view override returns (uint256) {
return _totalSupply;
}
/**
* @dev Gets the balance of the specified address.
* @param owner The address to query the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address owner) public view override returns (uint256) {
return _balances[owner];
}
/**
* @dev Transfer token for a specified addresses
* @param from The address to transfer from.
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/
function _transfer(address from, address to, uint256 value) internal virtual onlyWhitelisted(to) {
require(to != address(0));
_balances[from] = _balances[from].sub(value);
_balances[to] = _balances[to].add(value);
emit Transfer(from, to, value);
}
/**
* @dev Transfer token for a specified address
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/
function transfer(address to, uint256 value) public virtual override whenNotPaused returns (bool) {
_transfer(msg.sender, to, value);
return true;
}
function batchTransfer(address[] memory targets, uint256[] memory values) public virtual whenNotPaused onlyOperator {
for (uint256 i = 0; i < targets.length; i++) {
address target = targets[i];
uint256 value = values[i];
_transfer(msg.sender, target, value);
}
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param owner address The address which owns the funds.
* @param spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(address owner, address spender) public view override whenNotPaused returns (uint256) {
return _allowed[owner][spender];
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param spender The address which will spend the funds.
* @param value The amount of tokens to be spent.
*/
function approve(address spender, uint256 value) public virtual override whenNotPaused returns (bool) {
require(spender != address(0));
_allowed[msg.sender][spender] = value;
emit Approval(msg.sender, spender, value);
return true;
}
/**
* @dev Transfer tokens from one address to another.
* Note that while this function emits an Approval event, this is not required as per the specification,
* and other compliant implementations may not emit the event.
* @param from address The address which you want to send tokens from
* @param to address The address which you want to transfer to
* @param value uint256 the amount of tokens to be transferred
*/
function transferFrom(address from, address to, uint256 value) public virtual override whenNotPaused returns (bool) {
_allowed[from][msg.sender] = _allowed[from][msg.sender].sub(value);
_transfer(from, to, value);
emit Approval(from, msg.sender, _allowed[from][msg.sender]);
return true;
}
/**
* @dev Internal function that mints an amount of the token and assigns it to
* an account. This encapsulates the modification of balances such that the
* proper events are emitted.
* @param account The account that will receive the created tokens.
* @param value The amount that will be created.
*/
function _mint(address account, uint256 value) internal {
require(account != address(0));
_totalSupply = _totalSupply.add(value);
_balances[account] = _balances[account].add(value);
emit Transfer(address(0), account, value);
}
/**
* @dev Internal function that burns an amount of the token of a given
* account.
* @param account The account whose tokens will be burnt.
* @param value The amount that will be burnt.
*/
function _burn(address account, uint256 value) internal {
require(account != address(0));
_totalSupply = _totalSupply.sub(value);
_balances[account] = _balances[account].sub(value);
emit Transfer(account, address(0), value);
}
/**
* @dev Internal function that burns an amount of the token of a given
* account, deducting from the sender's allowance for said account. Uses the
* internal burn function.
* Emits an Approval event (reflecting the reduced allowance).
* @param account The account whose tokens will be burnt.
* @param value The amount that will be burnt.
*/
function _burnFrom(address account, uint256 value) internal {
_allowed[account][msg.sender] = _allowed[account][msg.sender].sub(value);
_burn(account, value);
emit Approval(account, msg.sender, _allowed[account][msg.sender]);
}
/**
* @dev Function to mint tokens
* @param to The address that will receive the minted tokens.
* @param value The amount of tokens to mint.
* @return A boolean that indicates if the operation was successful.
*/
function mint(address to, uint256 value) public virtual onlyMinter whenNotPaused returns (bool) {
if (cap > 0) {
require(totalSupply().add(value) <= cap, "Can not mint to value <= cap");
}
_mint(to, value);
return true;
}
/**
* @dev Burns a specific amount of tokens.
* @param value The amount of token to be burned.
*/
function burn(uint256 value) public whenNotPaused {
_burn(msg.sender, value);
}
/**
* @dev Burns a specific amount of tokens from the target address and decrements allowance
* @param from address The address which you want to send tokens from
* @param value uint256 The amount of token to be burned
*/
function burnFrom(address from, uint256 value) public whenNotPaused {
_burnFrom(from, value);
}
}
Read Contract
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
cap 0x355274ea → uint256
decimals 0x313ce567 → uint8
isMinter 0xaa271e1a → bool
isOperator 0x6d70f7ae → bool
isOwner 0x8f32d59b → bool
isPauser 0x46fbf68e → bool
isWhitelisted 0x3af32abf → bool
name 0x06fdde03 → string
owner 0x8da5cb5b → address
paused 0x5c975abb → bool
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256
Write Contract 24 functions
These functions modify contract state and require a wallet transaction to execute.
addMinter 0x983b2d56
address account
addOperator 0x9870d7fe
address account
addPauser 0x82dc1ec4
address account
approve 0x095ea7b3
address spender
uint256 value
returns: bool
batchDehitelist 0xce617de2
address[] targets
batchTransfer 0x88d695b2
address[] targets
uint256[] values
batchWhitelist 0x39ee0661
address[] targets
burn 0x42966c68
uint256 value
burnFrom 0x79cc6790
address from
uint256 value
dewhitelist 0x6e932270
address target
mint 0x40c10f19
address to
uint256 value
returns: bool
pause 0x8456cb59
No parameters
removeMinter 0x3092afd5
address account
removeOperator 0xac8a584a
address account
removePauser 0x6b2c0f55
address account
renounceMinter 0x98650275
No parameters
renounceOperator 0x2ab6f8db
No parameters
renounceOwnership 0x715018a6
No parameters
renouncePauser 0x6ef8d66d
No parameters
transfer 0xa9059cbb
address to
uint256 value
returns: bool
transferFrom 0x23b872dd
address from
address to
uint256 value
returns: bool
transferOwnership 0xf2fde38b
address newOwner
unpause 0x3f4ba83a
No parameters
whitelist 0x9b19251a
address target
Recent Transactions
No transactions found for this address