Pundi X Token
ERC20
This contract is an ERC20 token.
About link description
Stats
Events (7) keyboard_arrow_up
Constants (3) keyboard_arrow_up
State Variables (22) keyboard_arrow_up
Functions
name keyboard_arrow_up
symbol keyboard_arrow_up
decimals keyboard_arrow_up
totalSupply keyboard_arrow_up
balanceOf keyboard_arrow_up
transfer keyboard_arrow_up
Requirements help
Source Code
function transfer(address recipient, uint256 amount)
public
virtual
override
returns (bool)
{
_transfer(_msgSender(), recipient, amount);
return true;
}
allowance keyboard_arrow_up
approve keyboard_arrow_up
Requirements help
Source Code
function approve(address spender, uint256 amount)
public
virtual
override
returns (bool)
{
_approve(_msgSender(), spender, amount);
return true;
}
transferFrom keyboard_arrow_up
Requirements help
Source Code
function transferFrom(
address sender,
address recipient,
uint256 amount
) public virtual override returns (bool) {
_transfer(sender, recipient, amount);
_approve(
sender,
_msgSender(),
_allowances[sender][_msgSender()].sub(
amount,
"ERC20: transfer amount exceeds allowance"
)
);
return true;
}
increaseAllowance keyboard_arrow_up
Requirements help
Source Code
function increaseAllowance(address spender, uint256 addedValue)
public
virtual
returns (bool)
{
_approve(
_msgSender(),
spender,
_allowances[_msgSender()][spender].add(addedValue)
);
return true;
}
decreaseAllowance keyboard_arrow_up
Requirements help
Source Code
function decreaseAllowance(address spender, uint256 subtractedValue)
public
virtual
returns (bool)
{
_approve(
_msgSender(),
spender,
_allowances[_msgSender()][spender].sub(
subtractedValue,
"ERC20: decreased allowance below zero"
)
);
return true;
}
permit keyboard_arrow_up
Parameters help
Requirements help
Source Code
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) public virtual override {
// solhint-disable-next-line not-rely-on-time
require(block.timestamp <= deadline, "ERC20Permit: expired deadline");
bytes32 structHash = keccak256(
abi.encode(
_PERMIT_TYPEHASH,
owner,
spender,
value,
_nonces[owner].current(),
deadline
)
);
bytes32 hash = _hashTypedDataV4(structHash);
address signer = ECDSAUpgradeable.recover(hash, v, r, s);
require(signer == owner, "ERC20Permit: invalid signature");
_nonces[owner].increment();
_approve(owner, spender, value);
}
nonces keyboard_arrow_up
DOMAIN_SEPARATOR keyboard_arrow_up
paused keyboard_arrow_up
burn keyboard_arrow_up
burnFrom keyboard_arrow_up
Requirements help
Source Code
function burnFrom(address account, uint256 amount) public virtual {
uint256 decreasedAllowance = allowance(account, _msgSender()).sub(
amount,
"ERC20: burn amount exceeds allowance"
);
_approve(account, _msgSender(), decreasedAllowance);
_burn(account, amount);
}
hasRole keyboard_arrow_up
getRoleMemberCount keyboard_arrow_up
getRoleMember keyboard_arrow_up
getRoleAdmin keyboard_arrow_up
grantRole keyboard_arrow_up
Requirements help
Source Code
function grantRole(bytes32 role, address account) public virtual {
require(
hasRole(_roles[role].adminRole, _msgSender()),
"AccessControl: sender must be an admin to grant"
);
_grantRole(role, account);
}
revokeRole keyboard_arrow_up
Requirements help
Source Code
function revokeRole(bytes32 role, address account) public virtual {
require(
hasRole(_roles[role].adminRole, _msgSender()),
"AccessControl: sender must be an admin to revoke"
);
_revokeRole(role, account);
}
renounceRole keyboard_arrow_up
Requirements help
Source Code
function renounceRole(bytes32 role, address account) public virtual {
require(
account == _msgSender(),
"AccessControl: can only renounce roles for self"
);
_revokeRole(role, account);
}
initialize keyboard_arrow_up
Modifiers help
initializer checks for the following:
Source Code
function initialize(address to) public virtual initializer {
__Context_init_unchained();
__AccessControl_init_unchained();
__ERC20_init_unchained("Pundi X Token", "PUNDIX");
__ERC20Burnable_init_unchained();
__Pausable_init_unchained();
__ERC20Pausable_init_unchained();
__ERC20Permit_init("PUNDIX");
_setupRole(DEFAULT_ADMIN_ROLE, _msgSender());
_setupRole(ADMIN_ROLE, _msgSender());
_mint(to, 258498693019069996455928086);
}
pause keyboard_arrow_up
unpause keyboard_arrow_up
transferERCToken keyboard_arrow_up
Requirements help
Source Code
function transferERCToken(
address tokenContractAddress,
address to,
uint256 amount
) public {
require(
hasRole(ADMIN_ROLE, _msgSender()),
"must have admin role to transfer other ERC20"
);
require(IERC20Upgradeable(tokenContractAddress).transfer(to, amount));
}
transferAndCall keyboard_arrow_up
Requirements help
Source Code
function transferAndCall(
address recipient,
uint256 amount,
bytes memory data
) public {
require(recipient != address(0), "transfer to the zero address");
require(amount <= balanceOf(recipient), "insufficient balance");
transfer(recipient, amount);
require(TokenRecipient(recipient).tokenFallback(msg.sender, amount, data));
}
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 PUNDIXToken._beforeTokenTransfer keyboard_arrow_up
Source Code
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual override(ERC20Upgradeable, ERC20PausableUpgradeable) {
super._beforeTokenTransfer(from, to, amount);
}
internal Initializable._isConstructor keyboard_arrow_up
Parameters help
This function has no parameters.
Source Code
function _isConstructor() private view returns (bool) {
// extcodesize checks the size of the code stored in an address, and
// address returns the current address. Since the code is still not
// deployed when running a constructor, any checks on its code size will
// yield zero, making it an effective way to detect if a contract is
// under construction or not.
address self = address(this);
uint256 cs;
// solhint-disable-next-line no-inline-assembly
assembly {
cs := extcodesize(self)
}
return cs == 0;
}
internal ContextUpgradeable.__Context_init keyboard_arrow_up
Parameters help
This function has no parameters.
Modifiers help
initializer checks for the following:
Source Code
function __Context_init() internal initializer {
__Context_init_unchained();
}
internal ContextUpgradeable.__Context_init_unchained keyboard_arrow_up
Parameters help
This function has no parameters.
Modifiers help
initializer checks for the following:
Source Code
function __Context_init_unchained() internal initializer {}
internal ContextUpgradeable._msgSender keyboard_arrow_up
internal ContextUpgradeable._msgData keyboard_arrow_up
Parameters help
This function has no parameters.
Source Code
function _msgData() internal view virtual returns (bytes memory) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
return msg.data;
}
internal Initializable._isConstructor keyboard_arrow_up
Parameters help
This function has no parameters.
Source Code
function _isConstructor() private view returns (bool) {
// extcodesize checks the size of the code stored in an address, and
// address returns the current address. Since the code is still not
// deployed when running a constructor, any checks on its code size will
// yield zero, making it an effective way to detect if a contract is
// under construction or not.
address self = address(this);
uint256 cs;
// solhint-disable-next-line no-inline-assembly
assembly {
cs := extcodesize(self)
}
return cs == 0;
}
internal AccessControlUpgradeable.__AccessControl_init keyboard_arrow_up
Parameters help
This function has no parameters.
Modifiers help
initializer checks for the following:
Source Code
function __AccessControl_init() internal initializer {
__Context_init_unchained();
__AccessControl_init_unchained();
}
internal AccessControlUpgradeable.__AccessControl_init_unchained keyboard_arrow_up
Parameters help
This function has no parameters.
Modifiers help
initializer checks for the following:
Source Code
function __AccessControl_init_unchained() internal initializer {}
internal AccessControlUpgradeable._setupRole keyboard_arrow_up
internal AccessControlUpgradeable._setRoleAdmin keyboard_arrow_up
Source Code
function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
emit RoleAdminChanged(role, _roles[role].adminRole, adminRole);
_roles[role].adminRole = adminRole;
}
internal AccessControlUpgradeable._grantRole keyboard_arrow_up
internal AccessControlUpgradeable._revokeRole keyboard_arrow_up
internal Initializable._isConstructor keyboard_arrow_up
Parameters help
This function has no parameters.
Source Code
function _isConstructor() private view returns (bool) {
// extcodesize checks the size of the code stored in an address, and
// address returns the current address. Since the code is still not
// deployed when running a constructor, any checks on its code size will
// yield zero, making it an effective way to detect if a contract is
// under construction or not.
address self = address(this);
uint256 cs;
// solhint-disable-next-line no-inline-assembly
assembly {
cs := extcodesize(self)
}
return cs == 0;
}
internal ContextUpgradeable.__Context_init keyboard_arrow_up
Parameters help
This function has no parameters.
Modifiers help
initializer checks for the following:
Source Code
function __Context_init() internal initializer {
__Context_init_unchained();
}
internal ContextUpgradeable.__Context_init_unchained keyboard_arrow_up
Parameters help
This function has no parameters.
Modifiers help
initializer checks for the following:
Source Code
function __Context_init_unchained() internal initializer {}
internal ContextUpgradeable._msgSender keyboard_arrow_up
internal ContextUpgradeable._msgData keyboard_arrow_up
Parameters help
This function has no parameters.
Source Code
function _msgData() internal view virtual returns (bytes memory) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
return msg.data;
}
internal Initializable._isConstructor keyboard_arrow_up
Parameters help
This function has no parameters.
Source Code
function _isConstructor() private view returns (bool) {
// extcodesize checks the size of the code stored in an address, and
// address returns the current address. Since the code is still not
// deployed when running a constructor, any checks on its code size will
// yield zero, making it an effective way to detect if a contract is
// under construction or not.
address self = address(this);
uint256 cs;
// solhint-disable-next-line no-inline-assembly
assembly {
cs := extcodesize(self)
}
return cs == 0;
}
internal ERC20BurnableUpgradeable.__ERC20Burnable_init keyboard_arrow_up
Parameters help
This function has no parameters.
Modifiers help
initializer checks for the following:
Source Code
function __ERC20Burnable_init() internal initializer {
__Context_init_unchained();
__ERC20Burnable_init_unchained();
}
internal ERC20BurnableUpgradeable.__ERC20Burnable_init_unchained keyboard_arrow_up
Parameters help
This function has no parameters.
Modifiers help
initializer checks for the following:
Source Code
function __ERC20Burnable_init_unchained() internal initializer {}
internal Initializable._isConstructor keyboard_arrow_up
Parameters help
This function has no parameters.
Source Code
function _isConstructor() private view returns (bool) {
// extcodesize checks the size of the code stored in an address, and
// address returns the current address. Since the code is still not
// deployed when running a constructor, any checks on its code size will
// yield zero, making it an effective way to detect if a contract is
// under construction or not.
address self = address(this);
uint256 cs;
// solhint-disable-next-line no-inline-assembly
assembly {
cs := extcodesize(self)
}
return cs == 0;
}
internal ContextUpgradeable.__Context_init keyboard_arrow_up
Parameters help
This function has no parameters.
Modifiers help
initializer checks for the following:
Source Code
function __Context_init() internal initializer {
__Context_init_unchained();
}
internal ContextUpgradeable.__Context_init_unchained keyboard_arrow_up
Parameters help
This function has no parameters.
Modifiers help
initializer checks for the following:
Source Code
function __Context_init_unchained() internal initializer {}
internal ContextUpgradeable._msgSender keyboard_arrow_up
internal ContextUpgradeable._msgData keyboard_arrow_up
Parameters help
This function has no parameters.
Source Code
function _msgData() internal view virtual returns (bytes memory) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
return msg.data;
}
internal Initializable._isConstructor keyboard_arrow_up
Parameters help
This function has no parameters.
Source Code
function _isConstructor() private view returns (bool) {
// extcodesize checks the size of the code stored in an address, and
// address returns the current address. Since the code is still not
// deployed when running a constructor, any checks on its code size will
// yield zero, making it an effective way to detect if a contract is
// under construction or not.
address self = address(this);
uint256 cs;
// solhint-disable-next-line no-inline-assembly
assembly {
cs := extcodesize(self)
}
return cs == 0;
}
internal ERC20Upgradeable.__ERC20_init keyboard_arrow_up
Modifiers help
initializer checks for the following:
Source Code
function __ERC20_init(string memory name_, string memory symbol_)
internal
initializer
{
__Context_init_unchained();
__ERC20_init_unchained(name_, symbol_);
}
internal ERC20Upgradeable.__ERC20_init_unchained keyboard_arrow_up
Modifiers help
initializer checks for the following:
Source Code
function __ERC20_init_unchained(string memory name_, string memory symbol_)
internal
initializer
{
_name = name_;
_symbol = symbol_;
_decimals = 18;
}
internal ERC20Upgradeable._transfer keyboard_arrow_up
Requirements help
Source Code
function _transfer(
address sender,
address recipient,
uint256 amount
) internal virtual {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(sender, recipient, amount);
_balances[sender] = _balances[sender].sub(
amount,
"ERC20: transfer amount exceeds balance"
);
_balances[recipient] = _balances[recipient].add(amount);
emit Transfer(sender, recipient, amount);
}
internal ERC20Upgradeable._mint keyboard_arrow_up
Source Code
function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply = _totalSupply.add(amount);
_balances[account] = _balances[account].add(amount);
emit Transfer(address(0), account, amount);
}
internal ERC20Upgradeable._burn keyboard_arrow_up
Requirements help
Source Code
function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
_balances[account] = _balances[account].sub(
amount,
"ERC20: burn amount exceeds balance"
);
_totalSupply = _totalSupply.sub(amount);
emit Transfer(account, address(0), amount);
}
internal ERC20Upgradeable._approve keyboard_arrow_up
Requirements help
Source Code
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
internal ERC20Upgradeable._setupDecimals keyboard_arrow_up
internal ERC20Upgradeable._beforeTokenTransfer keyboard_arrow_up
internal Initializable._isConstructor keyboard_arrow_up
Parameters help
This function has no parameters.
Source Code
function _isConstructor() private view returns (bool) {
// extcodesize checks the size of the code stored in an address, and
// address returns the current address. Since the code is still not
// deployed when running a constructor, any checks on its code size will
// yield zero, making it an effective way to detect if a contract is
// under construction or not.
address self = address(this);
uint256 cs;
// solhint-disable-next-line no-inline-assembly
assembly {
cs := extcodesize(self)
}
return cs == 0;
}
internal ContextUpgradeable.__Context_init keyboard_arrow_up
Parameters help
This function has no parameters.
Modifiers help
initializer checks for the following:
Source Code
function __Context_init() internal initializer {
__Context_init_unchained();
}
internal ContextUpgradeable.__Context_init_unchained keyboard_arrow_up
Parameters help
This function has no parameters.
Modifiers help
initializer checks for the following:
Source Code
function __Context_init_unchained() internal initializer {}
internal ContextUpgradeable._msgSender keyboard_arrow_up
internal ContextUpgradeable._msgData keyboard_arrow_up
Parameters help
This function has no parameters.
Source Code
function _msgData() internal view virtual returns (bytes memory) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
return msg.data;
}
internal Initializable._isConstructor keyboard_arrow_up
Parameters help
This function has no parameters.
Source Code
function _isConstructor() private view returns (bool) {
// extcodesize checks the size of the code stored in an address, and
// address returns the current address. Since the code is still not
// deployed when running a constructor, any checks on its code size will
// yield zero, making it an effective way to detect if a contract is
// under construction or not.
address self = address(this);
uint256 cs;
// solhint-disable-next-line no-inline-assembly
assembly {
cs := extcodesize(self)
}
return cs == 0;
}
internal ERC20PausableUpgradeable.__ERC20Pausable_init keyboard_arrow_up
Parameters help
This function has no parameters.
Modifiers help
initializer checks for the following:
Source Code
function __ERC20Pausable_init() internal initializer {
__Context_init_unchained();
__Pausable_init_unchained();
__ERC20Pausable_init_unchained();
}
internal ERC20PausableUpgradeable.__ERC20Pausable_init_unchained keyboard_arrow_up
Parameters help
This function has no parameters.
Modifiers help
initializer checks for the following:
Source Code
function __ERC20Pausable_init_unchained() internal initializer {}
internal ERC20PausableUpgradeable._beforeTokenTransfer keyboard_arrow_up
Source Code
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual override {
super._beforeTokenTransfer(from, to, amount);
require(!paused(), "ERC20Pausable: token transfer while paused");
}
internal Initializable._isConstructor keyboard_arrow_up
Parameters help
This function has no parameters.
Source Code
function _isConstructor() private view returns (bool) {
// extcodesize checks the size of the code stored in an address, and
// address returns the current address. Since the code is still not
// deployed when running a constructor, any checks on its code size will
// yield zero, making it an effective way to detect if a contract is
// under construction or not.
address self = address(this);
uint256 cs;
// solhint-disable-next-line no-inline-assembly
assembly {
cs := extcodesize(self)
}
return cs == 0;
}
internal ERC20Upgradeable.__ERC20_init keyboard_arrow_up
Modifiers help
initializer checks for the following:
Source Code
function __ERC20_init(string memory name_, string memory symbol_)
internal
initializer
{
__Context_init_unchained();
__ERC20_init_unchained(name_, symbol_);
}
internal ERC20Upgradeable.__ERC20_init_unchained keyboard_arrow_up
Modifiers help
initializer checks for the following:
Source Code
function __ERC20_init_unchained(string memory name_, string memory symbol_)
internal
initializer
{
_name = name_;
_symbol = symbol_;
_decimals = 18;
}
internal ERC20Upgradeable._transfer keyboard_arrow_up
Requirements help
Source Code
function _transfer(
address sender,
address recipient,
uint256 amount
) internal virtual {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(sender, recipient, amount);
_balances[sender] = _balances[sender].sub(
amount,
"ERC20: transfer amount exceeds balance"
);
_balances[recipient] = _balances[recipient].add(amount);
emit Transfer(sender, recipient, amount);
}
internal ERC20Upgradeable._mint keyboard_arrow_up
Source Code
function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply = _totalSupply.add(amount);
_balances[account] = _balances[account].add(amount);
emit Transfer(address(0), account, amount);
}
internal ERC20Upgradeable._burn keyboard_arrow_up
Requirements help
Source Code
function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
_balances[account] = _balances[account].sub(
amount,
"ERC20: burn amount exceeds balance"
);
_totalSupply = _totalSupply.sub(amount);
emit Transfer(account, address(0), amount);
}
internal ERC20Upgradeable._approve keyboard_arrow_up
Requirements help
Source Code
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
internal ERC20Upgradeable._setupDecimals keyboard_arrow_up
internal ERC20Upgradeable._beforeTokenTransfer keyboard_arrow_up
internal Initializable._isConstructor keyboard_arrow_up
Parameters help
This function has no parameters.
Source Code
function _isConstructor() private view returns (bool) {
// extcodesize checks the size of the code stored in an address, and
// address returns the current address. Since the code is still not
// deployed when running a constructor, any checks on its code size will
// yield zero, making it an effective way to detect if a contract is
// under construction or not.
address self = address(this);
uint256 cs;
// solhint-disable-next-line no-inline-assembly
assembly {
cs := extcodesize(self)
}
return cs == 0;
}
internal ContextUpgradeable.__Context_init keyboard_arrow_up
Parameters help
This function has no parameters.
Modifiers help
initializer checks for the following:
Source Code
function __Context_init() internal initializer {
__Context_init_unchained();
}
internal ContextUpgradeable.__Context_init_unchained keyboard_arrow_up
Parameters help
This function has no parameters.
Modifiers help
initializer checks for the following:
Source Code
function __Context_init_unchained() internal initializer {}
internal ContextUpgradeable._msgSender keyboard_arrow_up
internal ContextUpgradeable._msgData keyboard_arrow_up
Parameters help
This function has no parameters.
Source Code
function _msgData() internal view virtual returns (bytes memory) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
return msg.data;
}
internal Initializable._isConstructor keyboard_arrow_up
Parameters help
This function has no parameters.
Source Code
function _isConstructor() private view returns (bool) {
// extcodesize checks the size of the code stored in an address, and
// address returns the current address. Since the code is still not
// deployed when running a constructor, any checks on its code size will
// yield zero, making it an effective way to detect if a contract is
// under construction or not.
address self = address(this);
uint256 cs;
// solhint-disable-next-line no-inline-assembly
assembly {
cs := extcodesize(self)
}
return cs == 0;
}
internal PausableUpgradeable.__Pausable_init keyboard_arrow_up
Parameters help
This function has no parameters.
Modifiers help
initializer checks for the following:
Source Code
function __Pausable_init() internal initializer {
__Context_init_unchained();
__Pausable_init_unchained();
}
internal PausableUpgradeable.__Pausable_init_unchained keyboard_arrow_up
Parameters help
This function has no parameters.
Modifiers help
initializer checks for the following:
Source Code
function __Pausable_init_unchained() internal initializer {
_paused = false;
}
internal PausableUpgradeable._pause keyboard_arrow_up
Parameters help
This function has no parameters.
Source Code
function _pause() internal virtual whenNotPaused {
_paused = true;
emit Paused(_msgSender());
}
internal PausableUpgradeable._unpause keyboard_arrow_up
internal Initializable._isConstructor keyboard_arrow_up
Parameters help
This function has no parameters.
Source Code
function _isConstructor() private view returns (bool) {
// extcodesize checks the size of the code stored in an address, and
// address returns the current address. Since the code is still not
// deployed when running a constructor, any checks on its code size will
// yield zero, making it an effective way to detect if a contract is
// under construction or not.
address self = address(this);
uint256 cs;
// solhint-disable-next-line no-inline-assembly
assembly {
cs := extcodesize(self)
}
return cs == 0;
}
internal ContextUpgradeable.__Context_init keyboard_arrow_up
Parameters help
This function has no parameters.
Modifiers help
initializer checks for the following:
Source Code
function __Context_init() internal initializer {
__Context_init_unchained();
}
internal ContextUpgradeable.__Context_init_unchained keyboard_arrow_up
Parameters help
This function has no parameters.
Modifiers help
initializer checks for the following:
Source Code
function __Context_init_unchained() internal initializer {}
internal ContextUpgradeable._msgSender keyboard_arrow_up
internal ContextUpgradeable._msgData keyboard_arrow_up
Parameters help
This function has no parameters.
Source Code
function _msgData() internal view virtual returns (bytes memory) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
return msg.data;
}
internal Initializable._isConstructor keyboard_arrow_up
Parameters help
This function has no parameters.
Source Code
function _isConstructor() private view returns (bool) {
// extcodesize checks the size of the code stored in an address, and
// address returns the current address. Since the code is still not
// deployed when running a constructor, any checks on its code size will
// yield zero, making it an effective way to detect if a contract is
// under construction or not.
address self = address(this);
uint256 cs;
// solhint-disable-next-line no-inline-assembly
assembly {
cs := extcodesize(self)
}
return cs == 0;
}
internal ERC20PermitUpgradeable.__ERC20Permit_init keyboard_arrow_up
Modifiers help
initializer checks for the following:
Source Code
function __ERC20Permit_init(string memory name) internal initializer {
__Context_init_unchained();
__EIP712_init_unchained(name, "1");
__ERC20Permit_init_unchained(name);
}
internal ERC20PermitUpgradeable.__ERC20Permit_init_unchained keyboard_arrow_up
Modifiers help
initializer checks for the following:
Source Code
function __ERC20Permit_init_unchained(string memory name) internal initializer {
_PERMIT_TYPEHASH = keccak256(
"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"
);
}
internal Initializable._isConstructor keyboard_arrow_up
Parameters help
This function has no parameters.
Source Code
function _isConstructor() private view returns (bool) {
// extcodesize checks the size of the code stored in an address, and
// address returns the current address. Since the code is still not
// deployed when running a constructor, any checks on its code size will
// yield zero, making it an effective way to detect if a contract is
// under construction or not.
address self = address(this);
uint256 cs;
// solhint-disable-next-line no-inline-assembly
assembly {
cs := extcodesize(self)
}
return cs == 0;
}
internal ERC20Upgradeable.__ERC20_init keyboard_arrow_up
Modifiers help
initializer checks for the following:
Source Code
function __ERC20_init(string memory name_, string memory symbol_)
internal
initializer
{
__Context_init_unchained();
__ERC20_init_unchained(name_, symbol_);
}
internal ERC20Upgradeable.__ERC20_init_unchained keyboard_arrow_up
Modifiers help
initializer checks for the following:
Source Code
function __ERC20_init_unchained(string memory name_, string memory symbol_)
internal
initializer
{
_name = name_;
_symbol = symbol_;
_decimals = 18;
}
internal ERC20Upgradeable._transfer keyboard_arrow_up
Requirements help
Source Code
function _transfer(
address sender,
address recipient,
uint256 amount
) internal virtual {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(sender, recipient, amount);
_balances[sender] = _balances[sender].sub(
amount,
"ERC20: transfer amount exceeds balance"
);
_balances[recipient] = _balances[recipient].add(amount);
emit Transfer(sender, recipient, amount);
}
internal ERC20Upgradeable._mint keyboard_arrow_up
Source Code
function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply = _totalSupply.add(amount);
_balances[account] = _balances[account].add(amount);
emit Transfer(address(0), account, amount);
}
internal ERC20Upgradeable._burn keyboard_arrow_up
Requirements help
Source Code
function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
_balances[account] = _balances[account].sub(
amount,
"ERC20: burn amount exceeds balance"
);
_totalSupply = _totalSupply.sub(amount);
emit Transfer(account, address(0), amount);
}
internal ERC20Upgradeable._approve keyboard_arrow_up
Requirements help
Source Code
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
internal ERC20Upgradeable._setupDecimals keyboard_arrow_up
internal ERC20Upgradeable._beforeTokenTransfer keyboard_arrow_up
internal Initializable._isConstructor keyboard_arrow_up
Parameters help
This function has no parameters.
Source Code
function _isConstructor() private view returns (bool) {
// extcodesize checks the size of the code stored in an address, and
// address returns the current address. Since the code is still not
// deployed when running a constructor, any checks on its code size will
// yield zero, making it an effective way to detect if a contract is
// under construction or not.
address self = address(this);
uint256 cs;
// solhint-disable-next-line no-inline-assembly
assembly {
cs := extcodesize(self)
}
return cs == 0;
}
internal ContextUpgradeable.__Context_init keyboard_arrow_up
Parameters help
This function has no parameters.
Modifiers help
initializer checks for the following:
Source Code
function __Context_init() internal initializer {
__Context_init_unchained();
}
internal ContextUpgradeable.__Context_init_unchained keyboard_arrow_up
Parameters help
This function has no parameters.
Modifiers help
initializer checks for the following:
Source Code
function __Context_init_unchained() internal initializer {}
internal ContextUpgradeable._msgSender keyboard_arrow_up
internal ContextUpgradeable._msgData keyboard_arrow_up
Parameters help
This function has no parameters.
Source Code
function _msgData() internal view virtual returns (bytes memory) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
return msg.data;
}
internal Initializable._isConstructor keyboard_arrow_up
Parameters help
This function has no parameters.
Source Code
function _isConstructor() private view returns (bool) {
// extcodesize checks the size of the code stored in an address, and
// address returns the current address. Since the code is still not
// deployed when running a constructor, any checks on its code size will
// yield zero, making it an effective way to detect if a contract is
// under construction or not.
address self = address(this);
uint256 cs;
// solhint-disable-next-line no-inline-assembly
assembly {
cs := extcodesize(self)
}
return cs == 0;
}
internal EIP712Upgradeable.__EIP712_init keyboard_arrow_up
Modifiers help
initializer checks for the following:
Source Code
function __EIP712_init(string memory name, string memory version)
internal
initializer
{
__EIP712_init_unchained(name, version);
}
internal EIP712Upgradeable.__EIP712_init_unchained keyboard_arrow_up
Modifiers help
initializer checks for the following:
Source Code
function __EIP712_init_unchained(string memory name, string memory version)
internal
initializer
{
bytes32 hashedName = keccak256(bytes(name));
bytes32 hashedVersion = keccak256(bytes(version));
_HASHED_NAME = hashedName;
_HASHED_VERSION = hashedVersion;
}
internal EIP712Upgradeable._domainSeparatorV4 keyboard_arrow_up
internal EIP712Upgradeable._buildDomainSeparator keyboard_arrow_up
Source Code
function _buildDomainSeparator(
bytes32 typeHash,
bytes32 name,
bytes32 version
) private view returns (bytes32) {
return
keccak256(
abi.encode(typeHash, name, version, _getChainId(), address(this))
);
}
internal EIP712Upgradeable._hashTypedDataV4 keyboard_arrow_up
internal EIP712Upgradeable._getChainId keyboard_arrow_up
Parameters help
This function has no parameters.
Source Code
function _getChainId() private view returns (uint256 chainId) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
// solhint-disable-next-line no-inline-assembly
assembly {
chainId := chainid()
}
}
internal EIP712Upgradeable._EIP712NameHash keyboard_arrow_up
internal EIP712Upgradeable._EIP712VersionHash keyboard_arrow_up
internal Initializable._isConstructor keyboard_arrow_up
Parameters help
This function has no parameters.
Source Code
function _isConstructor() private view returns (bool) {
// extcodesize checks the size of the code stored in an address, and
// address returns the current address. Since the code is still not
// deployed when running a constructor, any checks on its code size will
// yield zero, making it an effective way to detect if a contract is
// under construction or not.
address self = address(this);
uint256 cs;
// solhint-disable-next-line no-inline-assembly
assembly {
cs := extcodesize(self)
}
return cs == 0;
}