ERC20
This contract is an ERC20 token.
Name
Olyseum
Symbol
OLY
Decimals
18
Total Supply
5,000,000,000 OLY
About link description
Olyseum (OLY) is a cryptocurrency and operates on the Ethereum platform. Olyseum has a current supply of 5,000,000,000 with 1,166,187,285.615249 in circulation. The last known price of Olyseum is 0.01660545 USD and is down -0.72 over the last 24 hours. It is currently trading on 7 active market(s) with $658,793.39 traded over the last 24 hours. More information can be found at https://olyseum.com/.
Stats
Public Functions
13
Event Types
3
Code Size
19,369 bytes
Library Use
Uses SafeMath for uint256.
Events (3) keyboard_arrow_up
State Variables (8) keyboard_arrow_up
Functions
initialize keyboard_arrow_up
Parameters help
Requirements help
Source Code
function initialize(
string memory name,
string memory symbol,
uint8 decimals,
uint256 totalSupply,
address tokenHolder
) public {
require(!_initialized, "This contract is already initialized");
require(totalSupply > 0, "Total supply must be greater than 0");
_name = name;
_symbol = symbol;
_decimals = decimals;
_mint(tokenHolder, totalSupply);
_initialized = true;
}
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 returns (bool) {
_transfer(msg.sender, recipient, amount);
return true;
}
allowance keyboard_arrow_up
approve keyboard_arrow_up
Requirements help
Source Code
function approve(address spender, uint256 value) public returns (bool) {
_approve(msg.sender, spender, value);
return true;
}
transferFrom keyboard_arrow_up
Requirements help
Source Code
function transferFrom(
address sender,
address recipient,
uint256 amount
) public returns (bool) {
_transfer(sender, recipient, amount);
_approve(sender, msg.sender, _allowances[sender][msg.sender].sub(amount));
return true;
}
increaseAllowance keyboard_arrow_up
Requirements help
Source Code
function increaseAllowance(address spender, uint256 addedValue)
public
returns (bool)
{
_approve(
msg.sender,
spender,
_allowances[msg.sender][spender].add(addedValue)
);
return true;
}
decreaseAllowance keyboard_arrow_up
Requirements help
Source Code
function decreaseAllowance(address spender, uint256 subtractedValue)
public
returns (bool)
{
_approve(
msg.sender,
spender,
_allowances[msg.sender][spender].sub(subtractedValue)
);
return true;
}
publishMessages keyboard_arrow_up
Parameters help
Requirements help
Source Code
function publishMessages(
uint256[] memory nonces,
uint256[] memory paymentAmounts,
address[] memory paymentCollectors,
uint256[] memory paymentFees,
address[] memory feeCollectors,
bytes32[] memory sigsR,
bytes32[] memory sigsS,
uint8[] memory sigsV
) public {
require(
nonces.length == paymentAmounts.length &&
paymentAmounts.length == paymentCollectors.length &&
paymentCollectors.length == paymentFees.length &&
paymentFees.length == feeCollectors.length &&
feeCollectors.length == sigsR.length &&
sigsR.length == sigsS.length &&
sigsS.length == sigsV.length,
"Inconsistent message data received"
);
for (uint256 i = 0; i < nonces.length; i++) {
executeMessage(
nonces[i],
paymentAmounts[i],
paymentCollectors[i],
paymentFees[i],
feeCollectors[i],
sigsR[i],
sigsS[i],
sigsV[i]
);
}
}
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 OlyToken._transfer keyboard_arrow_up
Requirements help
Source Code
function _transfer(
address sender,
address recipient,
uint256 amount
) internal {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_balances[sender] = _balances[sender].sub(amount);
_balances[recipient] = _balances[recipient].add(amount);
emit Transfer(sender, recipient, amount);
}
internal OlyToken._mint keyboard_arrow_up
Requirements help
Source Code
function _mint(address account, uint256 amount) internal {
require(account != address(0), "ERC20: mint to the zero address");
_totalSupply = _totalSupply.add(amount);
_balances[account] = _balances[account].add(amount);
emit Transfer(address(0), account, amount);
}
internal OlyToken._burn keyboard_arrow_up
Source Code
function _burn(address account, uint256 value) internal {
require(account != address(0), "ERC20: burn from the zero address");
_totalSupply = _totalSupply.sub(value);
_balances[account] = _balances[account].sub(value);
emit Transfer(account, address(0), value);
}
internal OlyToken._approve keyboard_arrow_up
Requirements help
Source Code
function _approve(
address owner,
address spender,
uint256 value
) internal {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = value;
emit Approval(owner, spender, value);
}
internal OlyToken._burnFrom keyboard_arrow_up
Requirements help
Source Code
function _burnFrom(address account, uint256 amount) internal {
_burn(account, amount);
_approve(account, msg.sender, _allowances[account][msg.sender].sub(amount));
}
internal OlyToken.executeMessage keyboard_arrow_up
Parameters help
Source Code
function executeMessage(
uint256 nonce,
uint256 paymentAmount,
address paymentCollector,
uint256 paymentFee,
address feeCollector,
bytes32 sigR,
bytes32 sigS,
uint8 sigV
) private {
bytes32 hash = keccak256(
abi.encodePacked(
string("\x19Ethereum Signed Message:\n164Olyseum v1 Transfer Message:"),
nonce,
paymentAmount,
paymentCollector,
paymentFee,
msg.sender
)
);
address user = ecrecover(hash, sigV, sigR, sigS);
uint256 balance = _balances[user];
bool success = false;
uint256 totalExpenditure = paymentAmount.add(paymentFee);
if (
balance >= totalExpenditure &&
!usedNonces[user][nonce] &&
paymentCollector != address(0) &&
feeCollector != address(0)
) {
success = true;
usedNonces[user][nonce] = true;
// Execute transfer
_balances[user] = balance.sub(totalExpenditure);
_balances[paymentCollector] = _balances[paymentCollector].add(
paymentAmount
);
_balances[feeCollector] = _balances[feeCollector].add(paymentFee);
emit Transfer(user, paymentCollector, paymentAmount);
emit Transfer(user, feeCollector, paymentFee);
}
emit DeferredTransfer(
user,
nonce,
paymentAmount,
paymentCollector,
paymentFee,
feeCollector,
success
);
}