Address Contract Verified
Address
0x970a341B4E311A5c7248Dc9c3d8d4f35fEdFA73e
Balance
0 ETH
Nonce
1
Code Size
4863 bytes
Creator
0xf948be20...3c06 at tx 0x98dd00bb...ca7f58
Indexed Transactions
0
Contract Bytecode
4863 bytes
0x608060405234801561001057600080fd5b506004361061011b5760003560e01c806370a08231116100b2578063a457c2d711610081578063dd62ed3e11610066578063dd62ed3e14610264578063e5962195146102aa578063f2fde38b146102e357600080fd5b8063a457c2d71461023e578063a9059cbb1461025157600080fd5b806370a08231146101d0578063715018a6146102065780638da5cb5b1461020e57806395d89b411461023657600080fd5b8063313ce567116100ee578063313ce56714610186578063395093511461019557806339d319e5146101a85780633da01325146101bd57600080fd5b806306fdde0314610120578063095ea7b31461013e57806318160ddd1461016157806323b872dd14610173575b600080fd5b6101286102f6565b60405161013591906110d0565b60405180910390f35b61015161014c366004611166565b610388565b6040519015158152602001610135565b6002545b604051908152602001610135565b610151610181366004611190565b61039f565b60405160128152602001610135565b6101516101a3366004611166565b610491565b6101bb6101b63660046111cc565b6104d5565b005b6101bb6101cb3660046111cc565b610563565b6101656101de3660046111cc565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b6101bb6105ed565b60065460405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610135565b610128610678565b61015161024c366004611166565b610687565b61015161025f366004611166565b610761565b6101656102723660046111ee565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260016020908152604080832093909416825291909152205490565b6101516102b83660046111cc565b73ffffffffffffffffffffffffffffffffffffffff1660009081526005602052604090205460ff1690565b6101bb6102f13660046111cc565b61076e565b60606003805461030590611221565b80601f016020809104026020016040519081016040528092919081815260200182805461033190611221565b801561037e5780601f106103535761010080835404028352916020019161037e565b820191906000526020600020905b81548152906001019060200180831161036157829003601f168201915b5050505050905090565b6000610395338484610920565b5060015b92915050565b60006103ac8484846109a8565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260016020908152604080832033845290915290205482811015610472576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e636500000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b610486853361048186856112a3565b610920565b506001949350505050565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716845290915281205490916103959185906104819086906112b6565b60065473ffffffffffffffffffffffffffffffffffffffff163314610556576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610469565b61055f81610c70565b5050565b60065473ffffffffffffffffffffffffffffffffffffffff1633146105e4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610469565b61055f81610d16565b60065473ffffffffffffffffffffffffffffffffffffffff16331461066e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610469565b610676610dbe565b565b60606004805461030590611221565b33600090815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff8616845290915281205482811015610748576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610469565b610757338561048186856112a3565b5060019392505050565b60006103953384846109a8565b60065473ffffffffffffffffffffffffffffffffffffffff1633146107ef576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610469565b73ffffffffffffffffffffffffffffffffffffffff8116610892576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610469565b60065460405173ffffffffffffffffffffffffffffffffffffffff8084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600680547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b73ffffffffffffffffffffffffffffffffffffffff831660009081526005602052604090205460ff1615610998576040517fbfe3937200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84166004820152602401610469565b6109a3838383610e2d565b505050565b73ffffffffffffffffffffffffffffffffffffffff8316610a4b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610469565b73ffffffffffffffffffffffffffffffffffffffff8216610aee576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610469565b610af9838383610fe0565b73ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604090205481811015610baf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610469565b610bb982826112a3565b73ffffffffffffffffffffffffffffffffffffffff8086166000908152602081905260408082209390935590851681529081208054849290610bfc9084906112b6565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610c6291815260200190565b60405180910390a350505050565b73ffffffffffffffffffffffffffffffffffffffff811660009081526005602052604081205460ff1680156103995773ffffffffffffffffffffffffffffffffffffffff831660008181526005602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055517f798117ec059ab8d319461ef2502b1f9d8a47cd966bfd1f3e23b6f26c30bebb779190a292915050565b73ffffffffffffffffffffffffffffffffffffffff811660009081526005602052604081205460ff16806103995773ffffffffffffffffffffffffffffffffffffffff831660008181526005602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055517fca86d8c91ca6d00afd863578cc633a0901fad724592f89649629fe65f61410d29190a292915050565b60065460405160009173ffffffffffffffffffffffffffffffffffffffff16907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600680547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b73ffffffffffffffffffffffffffffffffffffffff8316610ecf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610469565b73ffffffffffffffffffffffffffffffffffffffff8216610f72576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610469565b73ffffffffffffffffffffffffffffffffffffffff83811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff831660009081526005602052604090205460ff1615611058576040517fbfe3937200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84166004820152602401610469565b73ffffffffffffffffffffffffffffffffffffffff821660009081526005602052604090205460ff16156109a3576040517fbfe3937200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83166004820152602401610469565b60006020808352835180602085015260005b818110156110fe578581018301518582016040015282016110e2565b5060006040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461116157600080fd5b919050565b6000806040838503121561117957600080fd5b6111828361113d565b946020939093013593505050565b6000806000606084860312156111a557600080fd5b6111ae8461113d565b92506111bc6020850161113d565b9150604084013590509250925092565b6000602082840312156111de57600080fd5b6111e78261113d565b9392505050565b6000806040838503121561120157600080fd5b61120a8361113d565b91506112186020840161113d565b90509250929050565b600181811c9082168061123557607f821691505b60208210810361126e577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8181038181111561039957610399611274565b808201808211156103995761039961127456fea264697066735822122040ca1a9d3e5b2a7011d5b793e5d778a08f1a5e19edc3145b1db0ea4180aa6fc464736f6c63430008190033
Verified Source Code Full Match
Compiler: v0.8.25+commit.b61c2a91
EVM: paris
Optimization: Yes (1000000 runs)
ERC20.sol 304 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./IERC20.sol";
import "./IERC20Metadata.sol";
import "./utils/Context.sol";
/**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
* https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* We have followed general OpenZeppelin guidelines: functions revert instead
* of returning `false` on failure. This behavior is nonetheless conventional
* and does not conflict with the expectations of ERC20 applications.
*
* Additionally, an {Approval} event is emitted on calls to {transferFrom}.
* This allows applications to reconstruct the allowance for all accounts just
* by listening to said events. Other implementations of the EIP may not emit
* these events, as it isn't required by the specification.
*
* Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
* functions have been added to mitigate the well-known issues around setting
* allowances. See {IERC20-approve}.
*/
contract ERC20 is Context, IERC20, IERC20Metadata {
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {name} and {symbol}.
*
* The defaut value of {decimals} is 18. To select a different value for
* {decimals} you should overload it.
*
* All two of these values are immutable: they can only be set once during
* construction.
*/
constructor (string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev Returns the name of the token.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5,05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the value {ERC20} uses, unless this function is
* overloaded;
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() public view virtual override returns (uint8) {
return 18;
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view virtual override returns (uint256) {
return _balances[account];
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
/**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) public virtual override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
/**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* Requirements:
*
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
* - the caller must have allowance for ``sender``'s tokens of at least
* `amount`.
*/
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(sender, recipient, amount);
uint256 currentAllowance = _allowances[sender][_msgSender()];
require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
_approve(sender, _msgSender(), currentAllowance - amount);
return true;
}
/**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);
return true;
}
/**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `spender` must have allowance for the caller of at least
* `subtractedValue`.
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
uint256 currentAllowance = _allowances[_msgSender()][spender];
require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
_approve(_msgSender(), spender, currentAllowance - subtractedValue);
return true;
}
/**
* @dev Moves tokens `amount` from `sender` to `recipient`.
*
* This is internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
* - `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
*/
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);
uint256 senderBalance = _balances[sender];
require(senderBalance >= amount, "ERC20: transfer amount exceeds balance");
_balances[sender] = senderBalance - amount;
_balances[recipient] += amount;
emit Transfer(sender, recipient, amount);
}
/** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements:
*
* - `to` cannot be the zero address.
*/
function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply += amount;
_balances[account] += amount;
emit Transfer(address(0), account, amount);
}
/**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/
function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
uint256 accountBalance = _balances[account];
require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
_balances[account] = accountBalance - amount;
_totalSupply -= amount;
emit Transfer(account, address(0), amount);
}
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*/
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);
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be to transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
}
ERC20Blocklist.sol 88 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./ERC20.sol";
/**
* @dev Extension of {ERC20} that allows to implement a blocklist
* mechanism that can be managed by an authorized account with the
* {_blockUser} and {_unblockUser} functions.
*
* The blocklist provides the guarantee to the contract owner
* (e.g. a DAO or a well-configured multisig) that any account won't be
* able to execute transfers or approvals to other entities to operate
* on its behalf if {_blockUser} was not called with such account as an
* argument. Similarly, the account will be unblocked again if
* {_unblockUser} is called.
*
*/
abstract contract ERC20Blocklist is ERC20 {
/**
* @dev Blocked status of addresses. True if blocked, False otherwise.
*/
mapping(address => bool) private _blocked;
/**
* @dev Emitted when a user is blocked.
*/
event UserBlocked(address indexed user);
/**
* @dev Emitted when a user is unblocked.
*/
event UserUnblocked(address indexed user);
/**
* @dev The operation failed because the user is blocked.
*/
error ERC20Blocked(address user);
/**
* @dev Returns the blocked status of an account.
*/
function blocked(address account) public view virtual returns (bool) {
return _blocked[account];
}
/**
* @dev Blocks a user from receiving and transferring tokens, including minting and burning.
*/
function _blockUser(address user) internal virtual returns (bool) {
bool isBlocked = blocked(user);
if (!isBlocked) {
_blocked[user] = true;
emit UserBlocked(user);
}
return isBlocked;
}
/**
* @dev Unblocks a user from receiving and transferring tokens, including minting and burning.
*/
function _unblockUser(address user) internal virtual returns (bool) {
bool isBlocked = blocked(user);
if (isBlocked) {
_blocked[user] = false;
emit UserUnblocked(user);
}
return isBlocked;
}
/**
* @dev See {ERC20-_approve}.
*/
function _approve(address owner, address spender, uint256 amount) internal virtual override {
if (blocked(owner)) revert ERC20Blocked(owner);
super._approve(owner, spender, amount);
}
/**
* @dev See {ERC20-_beforeTokenTransfer}.
*/
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override {
if (blocked(from)) revert ERC20Blocked(from);
if (blocked(to)) revert ERC20Blocked(to);
super._beforeTokenTransfer(from, to, amount);
}
}
IERC20.sol 77 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) 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 `amount` 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 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/**
* @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);
}
IERC20Metadata.sol 25 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./IERC20.sol";
/**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*/
interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
}
Ownable.sol 79 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./utils/Context.sol";
/**
* @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.
*
* By default, the owner account will be the one that deploys the contract. 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
);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
address msgSender = _msgSender();
_owner = msgSender;
emit OwnershipTransferred(address(0), msgSender);
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
_;
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() external virtual onlyOwner {
_renounceOwnership();
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) external virtual onlyOwner {
require(
newOwner != address(0),
"Ownable: new owner is the zero address"
);
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
function _renounceOwnership() private {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
}
Context.sol 24 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/*
* @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) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
return msg.data;
}
}
Helios.sol 88 lines
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.0;
import "./@openzeppelin/contracts/ERC20Blocklist.sol";
import "./@openzeppelin/contracts/Ownable.sol";
import "./@openzeppelin/contracts/ERC20.sol";
/**
* @title Helios HLS
*
* @notice
* Helios is an ERC20 token whose entire maximum supply (5,000,000,000 HLS) is
* minted at deployment time and immediately distributed on-chain to its
* designated allocation wallets (team, advisors, foundation, community,
* liquidity, etc.). The allocation percentages, recipient addresses, and
* initial balances are fully transparent and verifiable directly on-chain.
*
* In addition, 1,450,000,000 HLS are immediately burned on Ethereum mainnet,
* since these tokens are intended to be generated natively on the Helios mainnet.
* This ensures that the effective circulating supply on Ethereum reflects the
* intended tokenomics while reserving the node rewards issuance for the Helios
* network itself.
*
* The contract also integrates a blocklist mechanism that can prevent specific
* addresses from transferring or receiving tokens, as well as from creating
* approvals. This mechanism is administered by the contract owner
* (expected to be a DAO, a regulated entity, or a properly configured
* multisig) and is intended to enable regulatory compliance in line with
* current European frameworks such as MiCA, including measures against illicit
* activities, sanctioned addresses, or fraudulent behavior.
*
* The Helios token is therefore designed to support transparent initial
* distribution while providing compliance-oriented controls when required,
* without altering the publicly verifiable tokenomics.
*/
contract Helios is ERC20Blocklist, Ownable {
constructor() ERC20("Helios", "HLS") {
// 18 decimals (hardcoded)
// Seed — 2.00% — 100,000,000 - 0x3F83181F3B5B46186307Ed1b45639b429B30a271 (Treasury Wallet)
// Strategic — 2.00% — 100,000,000 - 0x3F83181F3B5B46186307Ed1b45639b429B30a271 (Treasury Wallet)
// Public — 3.00% — 150,000,000 - 0x3F83181F3B5B46186307Ed1b45639b429B30a271 (Treasury Wallet)
// Team — 15.00% — 750,000,000 - 0x5F0Cf2D3738E67BbA660D354E8483977bC61Ba68 (Team Wallet)
// Advisors — 5.00% — 250,000,000 - 0x825fe6Db349d3A020c588D8f748A14f182DA84c8 (Advisors Wallet)
// Foundation — 24.00% — 1,200,000,000 - 0xf948be20f0b732994f14027d9a04A46a74393c06 (Foundation Wallet)
// Community — 10.00% — 500,000,000 - 0x53Cf9DD4db705b2e15C1027B74699C361c27bEDD (Community Wallet)
// Airdrop — 5.00% — 250,000,000 - 0xb25c18bC0763B5CEE424aDBF3078c9C284E38cCF (Airdrop Wallet)
// Node Rewards Phase 1 — 12.50% — 625,000,000 - 0x0000000000000000000000000000000000000000 (Node Rewards Phase 1 Wallet)
// Node Rewards Phase 2 — 9.00% — 450,000,000 - 0x0000000000000000000000000000000000000000 (Node Rewards Phase 2 Wallet)
// Node Rewards Phase 3 — 7.50% — 375,000,000 - 0x0000000000000000000000000000000000000000 (Node Rewards Phase 3 Wallet)
// Liquidity — 5.00% — 250,000,000 - 0x3F83181F3B5B46186307Ed1b45639b429B30a271 (Treasury Wallet who manage liquidity)
// Total Supply: 3,550,000,000
// Supply Via Node Rewards: 1,450,000,000 - burnt on Ethereum Mainnet (0x000000000000000000000000000000000000dEaD)
// Max Total Supply: 5,000,000,000
// 1 ether = 10^18 HLS
_mint(address(this), 5000000000 ether); // Max Total Supply
// Transfer to the wallets
_transfer(address(this), 0x3F83181F3B5B46186307Ed1b45639b429B30a271, 100000000 ether); // Seed
_transfer(address(this), 0x3F83181F3B5B46186307Ed1b45639b429B30a271, 100000000 ether); // Strategic
_transfer(address(this), 0x3F83181F3B5B46186307Ed1b45639b429B30a271, 150000000 ether); // Public
_transfer(address(this), 0x5F0Cf2D3738E67BbA660D354E8483977bC61Ba68, 750000000 ether); // Team
_transfer(address(this), 0x825fe6Db349d3A020c588D8f748A14f182DA84c8, 250000000 ether); // Advisors
_transfer(address(this), 0xf948be20f0b732994f14027d9a04A46a74393c06, 1200000000 ether); // Foundation
_transfer(address(this), 0x53Cf9DD4db705b2e15C1027B74699C361c27bEDD, 500000000 ether); // Community
_transfer(address(this), 0xb25c18bC0763B5CEE424aDBF3078c9C284E38cCF, 250000000 ether); // Airdrop
_transfer(address(this), 0x000000000000000000000000000000000000dEaD, 625000000 ether); // Node Rewards Phase 1
_transfer(address(this), 0x000000000000000000000000000000000000dEaD, 450000000 ether); // Node Rewards Phase 2
_transfer(address(this), 0x000000000000000000000000000000000000dEaD, 375000000 ether); // Node Rewards Phase 3
_transfer(address(this), 0x3F83181F3B5B46186307Ed1b45639b429B30a271, 250000000 ether); // Liquidity
}
/**
* @dev Block a user from receiving and transferring tokens.
* @param user The address of the user to block.
*/
function blockUser(address user) external onlyOwner {
_blockUser(user);
}
/**
* @dev Unblock a user from receiving and transferring tokens.
* @param user The address of the user to unblock.
*/
function unblockUser(address user) external onlyOwner {
_unblockUser(user);
}
}
Read Contract
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
blocked 0xe5962195 → bool
decimals 0x313ce567 → uint8
name 0x06fdde03 → string
owner 0x8da5cb5b → address
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256
Write Contract 9 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address spender
uint256 amount
returns: bool
blockUser 0x3da01325
address user
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
renounceOwnership 0x715018a6
No parameters
transfer 0xa9059cbb
address recipient
uint256 amount
returns: bool
transferFrom 0x23b872dd
address sender
address recipient
uint256 amount
returns: bool
transferOwnership 0xf2fde38b
address newOwner
unblockUser 0x39d319e5
address user
Recent Transactions
No transactions found for this address