BezantToken
ERC20
This contract is an ERC20 token.
Name
BezantToken
Symbol
BZNT
Decimals
18
Total Supply
999,999,820 BZNT
About link description
Bezant (BZNT) is a cryptocurrency and operates on the Ethereum platform. Bezant has a current supply of 999,999,820 with 878,398,685 in circulation. The last known price of Bezant is 0.0023607 USD and is up 53.07 over the last 24 hours. It is currently trading on 5 active market(s) with $7,425.80 traded over the last 24 hours. More information can be found at https://bezant.io/.
Stats
Public Functions
10
Event Types
4
Code Size
9,471 bytes
Events (4) keyboard_arrow_up
State Variables (10) keyboard_arrow_up
Functions
transfer keyboard_arrow_up
Requirements help
Source Code
function transfer(address _to, uint256 _value) public {
_transfer(msg.sender, _to, _value);
}
transferFrom keyboard_arrow_up
Requirements help
Source Code
function transferFrom(
address _from,
address _to,
uint256 _value
) public returns (bool success) {
require(_value <= allowance[_from][msg.sender]); // Check allowance
allowance[_from][msg.sender] = allowance[_from][msg.sender].sub(_value);
_transfer(_from, _to, _value);
return true;
}
approve keyboard_arrow_up
approveAndCall keyboard_arrow_up
Source Code
function approveAndCall(
address _spender,
uint256 _value,
bytes _extraData
) public returns (bool success) {
tokenRecipient spender = tokenRecipient(_spender);
if (approve(_spender, _value)) {
spender.receiveApproval(msg.sender, _value, this, _extraData);
return true;
}
}
burn keyboard_arrow_up
Requirements help
Source Code
function burn(uint256 _value) public returns (bool success) {
require(balanceOf[msg.sender] >= _value); // Check if the sender has enough
balanceOf[msg.sender] = balanceOf[msg.sender].sub(_value); // Subtract from the sender
totalSupply = totalSupply.sub(_value); // Updates totalSupply
emit Burn(msg.sender, _value);
return true;
}
burnFrom keyboard_arrow_up
Requirements help
Source Code
function burnFrom(address _from, uint256 _value) public returns (bool success) {
require(balanceOf[_from] >= _value); // Check if the targeted balance is enough
require(_value <= allowance[_from][msg.sender]); // Check allowance
balanceOf[_from] = balanceOf[_from].sub(_value); // Subtract from the targeted balance
allowance[_from][msg.sender] = allowance[_from][msg.sender].sub(_value); // Subtract from the sender's allowance
totalSupply = totalSupply.sub(_value); // Update totalSupply
emit Burn(_from, _value);
return true;
}
transferOwnership keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function transferOwnership(address _new) public onlyOwner {
address oldaddr = owner;
owner = _new;
emit TransferOwnership(oldaddr, owner);
}
freezeAccountForOwner keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function freezeAccountForOwner(address target, bool freeze) public onlyOwner {
frozenAccount[target] = freeze;
emit FrozenFunds(target, freeze);
}
setManagementContractAddress keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function setManagementContractAddress(bool _isUse, address _from)
public
onlyOwner
{
isUseContractFreeze = _isUse;
managementContractAddress = _from;
}
freezeAccountForContract keyboard_arrow_up
Requirements help
isUseContractFreeze must be true
Source Code
function freezeAccountForContract(address target, bool freeze) public {
require(isUseContractFreeze);
require(managementContractAddress == msg.sender);
frozenAccount[target] = freeze;
emit FrozenFunds(target, freeze);
}
Internal Functions
Internal functions are parts of the contract that can't be used directly, but instead are used by the public functions listed above.
internal BezantToken._transfer keyboard_arrow_up
Requirements help
Source Code
function _transfer(
address _from,
address _to,
uint256 _value
) internal {
require(_to != 0x0);
require(balanceOf[_from] >= _value);
require(balanceOf[_to].add(_value) > balanceOf[_to]);
require(!frozenAccount[_from]);
require(!frozenAccount[_to]);
balanceOf[_from] = balanceOf[_from].sub(_value);
balanceOf[_to] = balanceOf[_to].add(_value);
emit Transfer(_from, _to, _value);
}
internal BezantERC20Base._transfer keyboard_arrow_up
Requirements help
Source Code
function _transfer(
address _from,
address _to,
uint256 _value
) internal {
// Prevent transfer to 0x0 address. Use burn() instead
require(_to != 0x0);
// Check if the sender has enough
require(balanceOf[_from] >= _value);
// Check for overflows
require(balanceOf[_to].add(_value) > balanceOf[_to]);
// Save this for an assertion in the future
uint256 previousBalances = balanceOf[_from].add(balanceOf[_to]);
// Subtract from the sender
balanceOf[_from] = balanceOf[_from].sub(_value);
// Add the same to the recipient
balanceOf[_to] = balanceOf[_to].add(_value);
emit Transfer(_from, _to, _value);
// Asserts are used to use static analysis to find bugs in your code. They should never fail
assert(balanceOf[_from].add(balanceOf[_to]) == previousBalances);
}