Address Contract Partially Verified
Address
0x626E8036dEB333b408Be468F951bdB42433cBF18
Balance
0 ETH
Nonce
2
Code Size
3747 bytes
Creator
0x62E8Af11...366a at tx 0x1f7926bf...0b3f10
Indexed Transactions
1 (24,451,984 → 24,451,984)
Gas Used (indexed)
34,517
Contract Bytecode
3747 bytes
0x608060405234801561001057600080fd5b50600436106101005760003560e01c806370a0823111610097578063a457c2d711610066578063a457c2d714610209578063a9059cbb1461021c578063dd62ed3e1461022f578063f2fde38b1461026857610100565b806370a08231146101b3578063715018a6146101dc5780638da5cb5b146101e657806395d89b411461020157610100565b8063313ce567116100d3578063313ce5671461016b578063395093511461017a57806340c10f191461018d57806342966c68146101a057610100565b806306fdde0314610105578063095ea7b31461012357806318160ddd1461014657806323b872dd14610158575b600080fd5b61010d61027b565b60405161011a9190610d65565b60405180910390f35b610136610131366004610d24565b61030d565b604051901515815260200161011a565b6002545b60405190815260200161011a565b610136610166366004610ce9565b610323565b6040516012815260200161011a565b610136610188366004610d24565b6103d9565b61013661019b366004610d24565b610410565b6101366101ae366004610d4d565b6104d2565b61014a6101c1366004610c96565b6001600160a01b031660009081526020819052604090205490565b6101e4610520565b005b6005546040516001600160a01b03909116815260200161011a565b61010d6105a3565b610136610217366004610d24565b6105b2565b61013661022a366004610d24565b61064d565b61014a61023d366004610cb7565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6101e4610276366004610c96565b61065a565b60606003805461028a90610e1c565b80601f01602080910402602001604051908101604052809291908181526020018280546102b690610e1c565b80156103035780601f106102d857610100808354040283529160200191610303565b820191906000526020600020905b8154815290600101906020018083116102e657829003601f168201915b5050505050905090565b600061031a338484610754565b50600192915050565b6000610330848484610879565b6001600160a01b0384166000908152600160209081526040808320338452909152902054828110156103ba5760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b6103ce85336103c98685610e05565b610754565b506001949350505050565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909161031a9185906103c9908690610ded565b6000336104256005546001600160a01b031690565b6001600160a01b03161461044b5760405162461bcd60e51b81526004016103b190610db8565b6006548261045860025490565b6104629190610ded565b11156104c85760405162461bcd60e51b815260206004820152602f60248201527f41494f5a20546f6b656e3a206d696e74206d6f7265207468616e20746865206d60448201526e617820746f74616c20737570706c7960881b60648201526084016103b1565b61031a8383610a51565b6000336104e76005546001600160a01b031690565b6001600160a01b03161461050d5760405162461bcd60e51b81526004016103b190610db8565b6105173383610b30565b5060015b919050565b336105336005546001600160a01b031690565b6001600160a01b0316146105595760405162461bcd60e51b81526004016103b190610db8565b6005546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600580546001600160a01b0319169055565b60606004805461028a90610e1c565b3360009081526001602090815260408083206001600160a01b0386168452909152812054828110156106345760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016103b1565b61064333856103c98685610e05565b5060019392505050565b600061031a338484610879565b3361066d6005546001600160a01b031690565b6001600160a01b0316146106935760405162461bcd60e51b81526004016103b190610db8565b6001600160a01b0381166106f85760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103b1565b6005546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600580546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0383166107b65760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016103b1565b6001600160a01b0382166108175760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016103b1565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b0383166108dd5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016103b1565b6001600160a01b03821661093f5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016103b1565b6001600160a01b038316600090815260208190526040902054818110156109b75760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016103b1565b6109c18282610e05565b6001600160a01b0380861660009081526020819052604080822093909355908516815290812080548492906109f7908490610ded565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610a4391815260200190565b60405180910390a350505050565b6001600160a01b038216610aa75760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016103b1565b8060026000828254610ab99190610ded565b90915550506001600160a01b03821660009081526020819052604081208054839290610ae6908490610ded565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b038216610b905760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016103b1565b6001600160a01b03821660009081526020819052604090205481811015610c045760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016103b1565b610c0e8282610e05565b6001600160a01b03841660009081526020819052604081209190915560028054849290610c3c908490610e05565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200161086c565b80356001600160a01b038116811461051b57600080fd5b600060208284031215610ca7578081fd5b610cb082610c7f565b9392505050565b60008060408385031215610cc9578081fd5b610cd283610c7f565b9150610ce060208401610c7f565b90509250929050565b600080600060608486031215610cfd578081fd5b610d0684610c7f565b9250610d1460208501610c7f565b9150604084013590509250925092565b60008060408385031215610d36578182fd5b610d3f83610c7f565b946020939093013593505050565b600060208284031215610d5e578081fd5b5035919050565b6000602080835283518082850152825b81811015610d9157858101830151858201604001528201610d75565b81811115610da25783604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008219821115610e0057610e00610e57565b500190565b600082821015610e1757610e17610e57565b500390565b600181811c90821680610e3057607f821691505b60208210811415610e5157634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fdfea26469706673582212209956c04a9402c8c7d6c143961f3ee377a1a3777eeaa8189bf3402636c9783a9b64736f6c63430008030033
Verified Source Code Partial Match
Compiler: v0.8.3+commit.8d00100c
EVM: istanbul
Optimization: Yes (200 runs)
IERC20.sol 13 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
Ownable.sol 67 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @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 {
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 = msg.sender;
_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() == msg.sender, "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() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
}
AIOZToken.sol 171 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import './IERC20.sol';
import './IERC20Metadata.sol';
import './Ownable.sol';
import './TokenTimelock.sol';
contract ERC20 is IERC20, IERC20Metadata {
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
constructor (string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
function name() public view virtual override returns (string memory) {
return _name;
}
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
function decimals() public view virtual override returns (uint8) {
return 18;
}
function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
function balanceOf(address account) public view virtual override returns (uint256) {
return _balances[account];
}
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(msg.sender, recipient, amount);
return true;
}
function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
function approve(address spender, uint256 amount) public virtual override returns (bool) {
_approve(msg.sender, spender, amount);
return true;
}
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(sender, recipient, amount);
uint256 currentAllowance = _allowances[sender][msg.sender];
require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
_approve(sender, msg.sender, currentAllowance - amount);
return true;
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
_approve(msg.sender, spender, _allowances[msg.sender][spender] + addedValue);
return true;
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
uint256 currentAllowance = _allowances[msg.sender][spender];
require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
_approve(msg.sender, spender, currentAllowance - subtractedValue);
return true;
}
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");
uint256 senderBalance = _balances[sender];
require(senderBalance >= amount, "ERC20: transfer amount exceeds balance");
_balances[sender] = senderBalance - amount;
_balances[recipient] += amount;
emit Transfer(sender, recipient, amount);
}
function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_totalSupply += amount;
_balances[account] += amount;
emit Transfer(address(0), account, amount);
}
function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
uint256 accountBalance = _balances[account];
require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
_balances[account] = accountBalance - amount;
_totalSupply -= amount;
emit Transfer(account, address(0), amount);
}
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);
}
}
contract AIOZToken is ERC20, Ownable {
uint256 private _maxTotalSupply;
constructor() ERC20("AIOZ Network", "AIOZ") {
_maxTotalSupply = 1000000000e18;
// init timelock factory
TimelockFactory timelockFactory = new TimelockFactory();
// ERC20
// public sales
mint(0x076592ad72b79bBaBDD05aDd7d367f44f2CFf658, 10333333e18); // for Paid Ignition
// private sales
mint(0xF8477220f8375968E38a3B79ECA4343822b53af2, 73000000e18*25/100);
address privateSalesLock = timelockFactory.createTimelock(this, 0xF8477220f8375968E38a3B79ECA4343822b53af2, block.timestamp + 30 days, 73000000e18*25/100, 30 days);
mint(privateSalesLock, 73000000e18*75/100);
// team
address teamLock = timelockFactory.createTimelock(this, 0x82E83054CC631C0Da85Ca67087E45ca31b93F29b, block.timestamp + 180 days, 250000000e18*8/100, 30 days);
mint(teamLock, 250000000e18);
// advisors
address advisorsLock = timelockFactory.createTimelock(this, 0xBbf78c2Ee1794229e31af81c83F4d5125F08FE0F, block.timestamp + 90 days, 50000000e18*8/100, 30 days);
mint(advisorsLock, 50000000e18);
// marketing
mint(0x9E2F8e278585CAfD3308E894d2E09ffEc520b1E9, 30000000e18*10/100);
address marketingERC20Lock = timelockFactory.createTimelock(this, 0x9E2F8e278585CAfD3308E894d2E09ffEc520b1E9, block.timestamp + 30 days, 30000000e18*5/100, 30 days);
mint(marketingERC20Lock, 30000000e18*90/100);
// exchange liquidity provision
mint(0x6c3D8872002B66C808aE462Db314B87962DCC7aF, 23333333e18);
// ecosystem growth
address growthLock = timelockFactory.createTimelock(this, 0xCFd6736a11e76c0e3418FEEbb788822211d92F1e, block.timestamp + 90 days, 0, 0);
mint(growthLock, 530000000e18);
// BEP20
// // public sales
// mint(0xc9Fc843DBAA8ccCcf37E09b67DeEa5f963E3919E, 6666667e18); // for BSCPad
// // marketing
// mint(0x7e318e80EB8e401451334cAa2278E39Da7F6C49B, 20000000e18*10/100);
// address marketingBEP20Lock = timelockFactory.createTimelock(this, 0x7e318e80EB8e401451334cAa2278E39Da7F6C49B, block.timestamp + 30 days, 20000000e18*5/100, 30 days);
// mint(marketingBEP20Lock, 20000000e18*90/100);
// // exchange liquidity provision
// mint(0x0a515Ac284E3c741575A4fd71C27e377a19D5E6D, 6666667e18);
}
function mint(address account, uint256 amount) public onlyOwner returns (bool) {
require(totalSupply() + amount <= _maxTotalSupply, "AIOZ Token: mint more than the max total supply");
_mint(account, amount);
return true;
}
function burn(uint256 amount) public onlyOwner returns (bool) {
_burn(msg.sender, amount);
return true;
}
}
TokenTimelock.sol 150 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import './IERC20.sol';
contract TokenTimelock {
IERC20 private _token;
address private _beneficiary;
uint256 private _nextReleaseTime;
uint256 private _releaseAmount;
uint256 private _releasePeriod;
TimelockFactory private _factory;
event Released(address indexed beneficiary, uint256 amount);
event BeneficiaryTransferred(address indexed previousBeneficiary, address indexed newBeneficiary);
constructor(){
_token = IERC20(address(1));
}
function init(IERC20 token_, address beneficiary_, uint256 releaseStart_, uint256 releaseAmount_, uint256 releasePeriod_) external {
require(_token == IERC20(address(0)), "TokenTimelock: already initialized");
require(token_ != IERC20(address(0)), "TokenTimelock: erc20 token address is zero");
require(beneficiary_ != address(0), "TokenTimelock: beneficiary address is zero");
require(releasePeriod_ == 0 || releaseAmount_ != 0, "TokenTimelock: release amount is zero");
emit BeneficiaryTransferred(address(0), beneficiary_);
_token = token_;
_beneficiary = beneficiary_;
_nextReleaseTime = releaseStart_;
_releaseAmount = releaseAmount_;
_releasePeriod = releasePeriod_;
_factory = TimelockFactory(msg.sender);
}
function token() public view virtual returns (IERC20) {
return _token;
}
function beneficiary() public view virtual returns (address) {
return _beneficiary;
}
function nextReleaseTime() public view virtual returns (uint256) {
return _nextReleaseTime;
}
function releaseAmount() public view virtual returns (uint256) {
return _releaseAmount;
}
function balance() public view virtual returns (uint256) {
return token().balanceOf(address(this));
}
function releasableAmount() public view virtual returns (uint256) {
if (block.timestamp < _nextReleaseTime) return 0;
uint256 amount = balance();
if (amount == 0) return 0;
if (_releasePeriod == 0) return amount;
uint256 passedPeriods = (block.timestamp - _nextReleaseTime) / _releasePeriod;
uint256 maxReleasableAmount = (passedPeriods + 1) * _releaseAmount;
if (amount <= maxReleasableAmount) return amount;
return maxReleasableAmount;
}
function releasePeriod() public view virtual returns (uint256) {
return _releasePeriod;
}
function release() public virtual returns (bool) {
// solhint-disable-next-line not-rely-on-time
require(block.timestamp >= nextReleaseTime(), "TokenTimelock: current time is before release time");
uint256 _releasableAmount = releasableAmount();
require(_releasableAmount > 0, "TokenTimelock: no releasable tokens");
emit Released(beneficiary(), _releasableAmount);
require(token().transfer(beneficiary(), _releasableAmount));
if (_releasePeriod != 0) {
uint256 passedPeriods = (block.timestamp - _nextReleaseTime) / _releasePeriod;
_nextReleaseTime += (passedPeriods + 1) * _releasePeriod;
}
return true;
}
function transferBeneficiary(address newBeneficiary) public virtual returns (bool) {
require(msg.sender == beneficiary(), "TokenTimelock: caller is not the beneficiary");
require(newBeneficiary != address(0), "TokenTimelock: the new beneficiary is zero address");
emit BeneficiaryTransferred(beneficiary(), newBeneficiary);
_beneficiary = newBeneficiary;
return true;
}
function split(address splitBeneficiary, uint256 splitAmount) public virtual returns (bool) {
uint256 _amount = balance();
require(msg.sender == beneficiary(), "TokenTimelock: caller is not the beneficiary");
require(splitBeneficiary != address(0), "TokenTimelock: beneficiary address is zero");
require(splitAmount > 0, "TokenTimelock: amount is zero");
require(splitAmount <= _amount, "TokenTimelock: amount exceeds balance");
uint256 splitReleaseAmount;
if (_releasePeriod > 0) {
splitReleaseAmount = _releaseAmount * splitAmount / _amount;
}
address newTimelock = _factory.createTimelock(token(), splitBeneficiary, _nextReleaseTime, splitReleaseAmount, _releasePeriod);
require(token().transfer(newTimelock, splitAmount));
_releaseAmount -= splitReleaseAmount;
return true;
}
}
contract CloneFactory {
function createClone(address target) internal returns (address result) {
bytes20 targetBytes = bytes20(target);
assembly {
let clone := mload(0x40)
mstore(clone, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)
mstore(add(clone, 0x14), targetBytes)
mstore(add(clone, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)
result := create(0, clone, 0x37)
}
}
}
contract TimelockFactory is CloneFactory {
address private _tokenTimelockImpl;
event Timelock(address timelockContract);
constructor() {
_tokenTimelockImpl = address(new TokenTimelock());
}
function createTimelock(IERC20 token, address to, uint256 releaseTime, uint256 releaseAmount, uint256 period) public returns (address) {
address clone = createClone(_tokenTimelockImpl);
TokenTimelock(clone).init(token, to, releaseTime, releaseAmount, period);
emit Timelock(clone);
return clone;
}
}
IERC20Metadata.sol 10 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./IERC20.sol";
interface IERC20Metadata is IERC20 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
}
Read Contract
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
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
burn 0x42966c68
uint256 amount
returns: bool
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
mint 0x40c10f19
address account
uint256 amount
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
Top Interactions
| Address | Txns | Sent | Received |
|---|---|---|---|
| 0x6522B7F9...7E90 | 1 | 1 |
Token Balances (2)
View Transfers →Recent Transactions
|
| Hash | Block | Age | From/To | Value | |
|---|---|---|---|---|---|
| 0x2711a71d...6a75c4 | 24,451,984 | IN | 0x6522B7F9...7E90 | 0 ETH |