Address Contract Verified
Address
0x36E9D6C0DDE9D27F8Fa7eb7967953541D0b97078
Balance
0 ETH
Nonce
1
Code Size
7269 bytes
Creator
0xCEF158D2...E4e7 at tx 0x1c0ecebd...98c1b7
Indexed Transactions
0
Contract Bytecode
7269 bytes
0x608060405234801561000f575f80fd5b5060043610610114575f3560e01c80638a8c523c116100a0578063a457c2d71161006f578063a457c2d7146102ce578063a9059cbb146102fe578063dd62ed3e1461032e578063ec44acf21461035e578063f2fde38b1461037c57610114565b80638a8c523c146102585780638da5cb5b1461026257806395d89b41146102805780639b19251a1461029e57610114565b8063313ce567116100e7578063313ce567146101b457806339509351146101d257806353d6fd591461020257806370a082311461021e578063715018a61461024e57610114565b806306fdde0314610118578063095ea7b31461013657806318160ddd1461016657806323b872dd14610184575b5f80fd5b610120610398565b60405161012d91906113b4565b60405180910390f35b610150600480360381019061014b9190611465565b610428565b60405161015d91906114bd565b60405180910390f35b61016e610445565b60405161017b91906114e5565b60405180910390f35b61019e600480360381019061019991906114fe565b61044e565b6040516101ab91906114bd565b60405180910390f35b6101bc610501565b6040516101c99190611569565b60405180910390f35b6101ec60048036038101906101e79190611465565b610516565b6040516101f991906114bd565b60405180910390f35b61021c600480360381019061021791906115ac565b6105bd565b005b610238600480360381019061023391906115ea565b6106df565b60405161024591906114e5565b60405180910390f35b610256610725565b005b61026061085b565b005b61026a610942565b6040516102779190611624565b60405180910390f35b610288610969565b60405161029591906113b4565b60405180910390f35b6102b860048036038101906102b391906115ea565b6109f9565b6040516102c591906114bd565b60405180910390f35b6102e860048036038101906102e39190611465565b610a16565b6040516102f591906114bd565b60405180910390f35b61031860048036038101906103139190611465565b610b7f565b60405161032591906114bd565b60405180910390f35b6103486004803603810190610343919061163d565b610b9c565b60405161035591906114e5565b60405180910390f35b610366610c1e565b60405161037391906114bd565b60405180910390f35b610396600480360381019061039191906115ea565b610c30565b005b6060600480546103a7906116a8565b80601f01602080910402602001604051908101604052809291908181526020018280546103d3906116a8565b801561041e5780601f106103f55761010080835404028352916020019161041e565b820191905f5260205f20905b81548152906001019060200180831161040157829003601f168201915b5050505050905090565b5f61043b610434610dd5565b8484610ddc565b6001905092915050565b5f600754905090565b5f61045a848484610f9f565b6104f684610466610dd5565b8460025f8973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6104ad610dd5565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20546104f19190611705565b610ddc565b600190509392505050565b5f60065f9054906101000a900460ff16905090565b5f6105b3610522610dd5565b848460025f61052f610dd5565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20546105ae9190611738565b610ddc565b6001905092915050565b6105c5610dd5565b73ffffffffffffffffffffffffffffffffffffffff166105e3610942565b73ffffffffffffffffffffffffffffffffffffffff1614610639576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610630906117b5565b60405180910390fd5b8060035f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff167ff93f9a76c1bf3444d22400a00cb9fe990e6abe9dbb333fda48859cfee864543d826040516106d391906114bd565b60405180910390a25050565b5f60015f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b61072d610dd5565b73ffffffffffffffffffffffffffffffffffffffff1661074b610942565b73ffffffffffffffffffffffffffffffffffffffff16146107a1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610798906117b5565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff165f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35f805f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610863610dd5565b73ffffffffffffffffffffffffffffffffffffffff16610881610942565b73ffffffffffffffffffffffffffffffffffffffff16146108d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108ce906117b5565b60405180910390fd5b60085f9054906101000a900460ff1615610926576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161091d9061181d565b60405180910390fd5b600160085f6101000a81548160ff021916908315150217905550565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060058054610978906116a8565b80601f01602080910402602001604051908101604052809291908181526020018280546109a4906116a8565b80156109ef5780601f106109c6576101008083540402835291602001916109ef565b820191905f5260205f20905b8154815290600101906020018083116109d257829003601f168201915b5050505050905090565b6003602052805f5260405f205f915054906101000a900460ff1681565b5f8160025f610a23610dd5565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20541015610ad9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ad0906118ab565b60405180910390fd5b610b75610ae4610dd5565b848460025f610af1610dd5565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054610b709190611705565b610ddc565b6001905092915050565b5f610b92610b8b610dd5565b8484610f9f565b6001905092915050565b5f60025f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905092915050565b60085f9054906101000a900460ff1681565b610c38610dd5565b73ffffffffffffffffffffffffffffffffffffffff16610c56610942565b73ffffffffffffffffffffffffffffffffffffffff1614610cac576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ca3906117b5565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610d1a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d1190611913565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff165f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3805f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b5f33905090565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610e4a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e419061197b565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610eb8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610eaf906119e3565b60405180910390fd5b8060025f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051610f9291906114e5565b60405180910390a3505050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361100d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161100490611a4b565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361107b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161107290611ab3565b60405180910390fd5b5f81116110bd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110b490611b41565b60405180910390fd5b60035f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff1615801561115b575060035f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16155b156111af5760085f9054906101000a900460ff166111ae576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111a590611ba9565b60405180910390fd5b5b5f60015f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905081811015611233576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161122a90611c11565b60405180910390fd5b8160015f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825461127f9190611705565b925050819055508160015f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546112d29190611738565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161133691906114e5565b60405180910390a350505050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61138682611344565b611390818561134e565b93506113a081856020860161135e565b6113a98161136c565b840191505092915050565b5f6020820190508181035f8301526113cc818461137c565b905092915050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f611401826113d8565b9050919050565b611411816113f7565b811461141b575f80fd5b50565b5f8135905061142c81611408565b92915050565b5f819050919050565b61144481611432565b811461144e575f80fd5b50565b5f8135905061145f8161143b565b92915050565b5f806040838503121561147b5761147a6113d4565b5b5f6114888582860161141e565b925050602061149985828601611451565b9150509250929050565b5f8115159050919050565b6114b7816114a3565b82525050565b5f6020820190506114d05f8301846114ae565b92915050565b6114df81611432565b82525050565b5f6020820190506114f85f8301846114d6565b92915050565b5f805f60608486031215611515576115146113d4565b5b5f6115228682870161141e565b93505060206115338682870161141e565b925050604061154486828701611451565b9150509250925092565b5f60ff82169050919050565b6115638161154e565b82525050565b5f60208201905061157c5f83018461155a565b92915050565b61158b816114a3565b8114611595575f80fd5b50565b5f813590506115a681611582565b92915050565b5f80604083850312156115c2576115c16113d4565b5b5f6115cf8582860161141e565b92505060206115e085828601611598565b9150509250929050565b5f602082840312156115ff576115fe6113d4565b5b5f61160c8482850161141e565b91505092915050565b61161e816113f7565b82525050565b5f6020820190506116375f830184611615565b92915050565b5f8060408385031215611653576116526113d4565b5b5f6116608582860161141e565b92505060206116718582860161141e565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806116bf57607f821691505b6020821081036116d2576116d161167b565b5b50919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61170f82611432565b915061171a83611432565b9250828203905081811115611732576117316116d8565b5b92915050565b5f61174282611432565b915061174d83611432565b9250828201905080821115611765576117646116d8565b5b92915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f61179f60208361134e565b91506117aa8261176b565b602082019050919050565b5f6020820190508181035f8301526117cc81611793565b9050919050565b7f436546693a2054726164696e6720697320616c726561647920656e61626c65645f82015250565b5f61180760208361134e565b9150611812826117d3565b602082019050919050565b5f6020820190508181035f830152611834816117fb565b9050919050565b7f436546693a2064656372656173656420616c6c6f77616e63652062656c6f77205f8201527f7a65726f00000000000000000000000000000000000000000000000000000000602082015250565b5f61189560248361134e565b91506118a08261183b565b604082019050919050565b5f6020820190508181035f8301526118c281611889565b9050919050565b7f4f776e61626c653a20496e76616c6964206f776e6572206164647265737300005f82015250565b5f6118fd601e8361134e565b9150611908826118c9565b602082019050919050565b5f6020820190508181035f83015261192a816118f1565b9050919050565b7f436546693a20417070726f76652066726f6d207a65726f2061646472657373005f82015250565b5f611965601f8361134e565b915061197082611931565b602082019050919050565b5f6020820190508181035f83015261199281611959565b9050919050565b7f436546693a20417070726f766520746f207a65726f20616464726573730000005f82015250565b5f6119cd601d8361134e565b91506119d882611999565b602082019050919050565b5f6020820190508181035f8301526119fa816119c1565b9050919050565b7f436546693a205472616e736665722066726f6d207a65726f20616464726573735f82015250565b5f611a3560208361134e565b9150611a4082611a01565b602082019050919050565b5f6020820190508181035f830152611a6281611a29565b9050919050565b7f436546693a205472616e7366657220746f207a65726f206164647265737300005f82015250565b5f611a9d601e8361134e565b9150611aa882611a69565b602082019050919050565b5f6020820190508181035f830152611aca81611a91565b9050919050565b7f436546693a205472616e7366657220616d6f756e74206d7573742062652067725f8201527f6561746572207468616e207a65726f0000000000000000000000000000000000602082015250565b5f611b2b602f8361134e565b9150611b3682611ad1565b604082019050919050565b5f6020820190508181035f830152611b5881611b1f565b9050919050565b7f436546693a2054726164696e672069732064697361626c6564000000000000005f82015250565b5f611b9360198361134e565b9150611b9e82611b5f565b602082019050919050565b5f6020820190508181035f830152611bc081611b87565b9050919050565b7f436546693a20496e73756666696369656e742062616c616e63650000000000005f82015250565b5f611bfb601a8361134e565b9150611c0682611bc7565b602082019050919050565b5f6020820190508181035f830152611c2881611bef565b905091905056fea2646970667358221220f1a8428ab505195ff617c598f2996cf013be9633c1d50c85616c9bf9455ea08764736f6c634300081a0033
Verified Source Code Full Match
Compiler: v0.8.26+commit.8a97fa7a
EVM: cancun
Optimization: No
CeFi-Token.sol 322 lines
// SPDX-License-Identifier:MIT
pragma solidity ^0.8.20;
// +========================================================+
// | ██╗ ██████╗███████╗ ███████╗██╗ ██╗ |
// |██╔╝ ██╔════╝██╔════╝ ██╔════╝██║ ╚██╗|
// |██║█████╗ ██║ █████╗ █████╗ ██║ █████╗██║|
// |██║╚════╝ ██║ ██╔══╝ ██╔══╝ ██║ ╚════╝██║|
// |╚██╗ ╚██████╗███████╗██╗██║ ██║ ██╔╝|
// | ╚═╝ ╚═════╝╚══════╝╚═╝╚═╝ ╚═╝ ╚═╝ |
// +========================================================+
//Visit https://CE.FI
//CE.FI: Decentralized AI-Driven Finance for Real-World Assets
/**
* @dev Interface of the ERC-20 standard as defined in the ERC.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the value of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the value of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves a `value` amount of tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 value) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets a `value` amount of tokens as the allowance of `spender` over the
* caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: 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
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the
* allowance mechanism. `value` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 value) external returns (bool);
}
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* The initial owner is set to the address provided by the deployer. This can
* later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor(address initialOwner) {
require(initialOwner != address(0), "Ownable: Invalid owner address");
_owner = initialOwner;
emit OwnershipTransferred(address(0), initialOwner);
}
modifier onlyOwner() {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
_;
}
function owner() public view returns (address) {
return _owner;
}
function transferOwnership(address newOwner) public onlyOwner {
require(newOwner != address(0), "Ownable: Invalid owner address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
function renounceOwnership() public onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
}
contract CeFiToken is Context, IERC20, Ownable {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
mapping(address => bool) public whitelist;
string private _name = "CEFI";
string private _symbol = "CEFI";
uint8 private _decimals = 18;
uint256 private _totalSupply = 21_000_000 * 1e18; // Max Total Supply
bool public trading; // once this is enabled, it cannot be disabled.
event WhitelistUpdated(address indexed user, bool status);
constructor(address initialOwner) Ownable(initialOwner) {
whitelist[msg.sender] = true;
_balances[owner()] = _totalSupply;
emit Transfer(address(0), owner(), _totalSupply);
}
function name() public view returns (string memory) {
return _name;
}
function symbol() public view returns (string memory) {
return _symbol;
}
function decimals() public view returns (uint8) {
return _decimals;
}
function totalSupply() public view override returns (uint256) {
return _totalSupply;
}
function balanceOf(address account) public view override returns (uint256) {
return _balances[account];
}
function transfer(
address recipient,
uint256 amount
) public override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
function allowance(
address owner,
address spender
) public view override returns (uint256) {
return _allowances[owner][spender];
}
function approve(
address spender,
uint256 amount
) public override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public override returns (bool) {
_transfer(sender, recipient, amount);
_approve(
sender,
_msgSender(),
_allowances[sender][_msgSender()] - amount
);
return true;
}
function increaseAllowance(
address spender,
uint256 addedValue
) public returns (bool) {
_approve(
_msgSender(),
spender,
_allowances[_msgSender()][spender] + addedValue
);
return true;
}
function decreaseAllowance(
address spender,
uint256 subtractedValue
) public returns (bool) {
require(
_allowances[_msgSender()][spender] >= subtractedValue,
"CeFi: decreased allowance below zero"
);
_approve(
_msgSender(),
spender,
_allowances[_msgSender()][spender] - subtractedValue
);
return true;
}
function enableTrading() external onlyOwner {
require(!trading, "CeFi: Trading is already enabled");
trading = true;
}
/**
* @dev Allows the owner to add or remove an address from the whitelist.
* The whitelist is used to exempt certain addresses from trading restrictions.
*
* Important Notes:
* - Once trading is enabled, it cannot be disabled again.
* - After trading is enabled, the whitelist will no longer affect transfer behavior.
*
* @param _user The address to be added to or removed from the whitelist.
* @param _status A boolean indicating whether the address should be added (`true`) or removed (`false`) from the whitelist.
*/
function setWhitelist(address _user, bool _status) external onlyOwner {
whitelist[_user] = _status;
emit WhitelistUpdated(_user, _status);
}
function _approve(address owner, address spender, uint256 amount) private {
require(owner != address(0), "CeFi: Approve from zero address");
require(spender != address(0), "CeFi: Approve to zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
/**
* @dev Internal function to handle the transfer of tokens between two addresses.
* This function is private and is called internally by other public functions like `transfer` and `transferFrom`.
*
* The function ensures:
* - Neither the sender (`from`) nor the recipient (`to`) is the zero address.
* - The transfer amount is greater than zero.
* - Trading is enabled for non-whitelisted addresses.
* - The sender has a sufficient balance to complete the transfer.
*
* @param from The address sending the tokens.
* @param to The address receiving the tokens.
* @param amount The number of tokens to transfer.
*/
function _transfer(address from, address to, uint256 amount) private {
require(from != address(0), "CeFi: Transfer from zero address");
require(to != address(0), "CeFi: Transfer to zero address");
require(amount > 0, "CeFi: Transfer amount must be greater than zero");
if (!whitelist[from] && !whitelist[to]) {
require(trading, "CeFi: Trading is disabled");
}
uint256 senderBalance = _balances[from];
require(senderBalance >= amount, "CeFi: Insufficient balance");
_balances[from] -= amount;
_balances[to] += amount;
emit Transfer(from, to, amount);
}
}
Read Contract
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
decimals 0x313ce567 → uint8
name 0x06fdde03 → string
owner 0x8da5cb5b → address
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256
trading 0xec44acf2 → bool
whitelist 0x9b19251a → bool
Write Contract 9 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address spender
uint256 amount
returns: bool
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
enableTrading 0x8a8c523c
No parameters
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
renounceOwnership 0x715018a6
No parameters
setWhitelist 0x53d6fd59
address _user
bool _status
transfer 0xa9059cbb
address recipient
uint256 amount
returns: bool
transferFrom 0x23b872dd
address sender
address recipient
uint256 amount
returns: bool
transferOwnership 0xf2fde38b
address newOwner
Recent Transactions
No transactions found for this address