Address Contract Verified
Address
0x513D3246A54148192d6bEf4de81885c8F4bFE96c
Balance
0 ETH
Nonce
1
Code Size
4027 bytes
Creator
0x83BB46d1...FA74 at tx 0x09320bbe...b79164
Indexed Transactions
0
Contract Bytecode
4027 bytes
0x608060405234801561001057600080fd5b50600436106101215760003560e01c806370a08231116100ad57806395d89b411161007157806395d89b4114610217578063a457c2d71461021f578063a9059cbb14610232578063dd62ed3e14610245578063f2fde38b1461025857610121565b806370a08231146101cc578063715018a6146101df57806379cc6790146101e75780638456cb59146101fa5780638da5cb5b1461020257610121565b8063313ce567116100f4578063313ce5671461018c57806339509351146101945780633f4ba83a146101a757806342966c68146101b15780635c975abb146101c457610121565b806306fdde0314610126578063095ea7b31461014457806318160ddd1461016457806323b872dd14610179575b600080fd5b61012e61026b565b60405161013b9190610ba5565b60405180910390f35b610157610152366004610b45565b6102fd565b60405161013b9190610b9a565b61016c61036b565b60405161013b9190610f1d565b610157610187366004610b0a565b610371565b61016c6103e2565b6101576101a2366004610b45565b6103e8565b6101af610457565b005b6101af6101bf366004610b6e565b610469565b61015761047d565b61016c6101da366004610ab7565b61048d565b6101af6104ac565b6101af6101f5366004610b45565b6104be565b6101af6104de565b61020a6104ee565b60405161013b9190610b86565b61012e6104fd565b61015761022d366004610b45565b61050c565b610157610240366004610b45565b610597565b61016c610253366004610ad8565b6105f2565b6101af610266366004610ab7565b61061d565b60606002805461027a90610f4a565b80601f01602080910402602001604051908101604052809291908181526020018280546102a690610f4a565b80156102f35780601f106102c8576101008083540402835291602001916102f3565b820191906000526020600020905b8154815290600101906020018083116102d657829003601f168201915b5050505050905090565b6000610307610654565b6000610311610679565b6001600160a01b03811660009081526001602052604090205490915060ff16156103565760405162461bcd60e51b815260040161034d90610ead565b60405180910390fd5b61036181858561067d565b5060019392505050565b60055490565b600061037b610654565b6000610385610679565b6001600160a01b03861660009081526001602052604090205490915060ff16156103c15760405162461bcd60e51b815260040161034d90610ead565b6103cc858285610731565b6103d785858561077b565b506001949350505050565b60045490565b60006103f2610654565b60006103fc610679565b6001600160a01b03811660009081526001602052604090205490915060ff16156104385760405162461bcd60e51b815260040161034d90610ead565b61036181858561044885896105f2565b6104529190610f26565b61067d565b61045f61087c565b6104676108bb565b565b61047a610474610679565b82610910565b50565b600054600160a01b900460ff1690565b6001600160a01b0381166000908152600660205260409020545b919050565b6104b461087c565b61046760006109e8565b6104d0826104ca610679565b83610731565b6104da8282610910565b5050565b6104e661087c565b610467610a38565b6000546001600160a01b031690565b60606003805461027a90610f4a565b6000610516610654565b6000610520610679565b9050600061052e82866105f2565b6001600160a01b03831660009081526001602052604090205490915060ff161561056a5760405162461bcd60e51b815260040161034d90610ead565b8381101561058a5760405162461bcd60e51b815260040161034d90610eda565b6103d7828686840361067d565b60006105a1610654565b60006105ab610679565b6001600160a01b03811660009081526001602052604090205490915060ff16156105e75760405162461bcd60e51b815260040161034d90610ead565b61036181858561077b565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205490565b61062561087c565b6001600160a01b03811661064b5760405162461bcd60e51b815260040161034d90610c5b565b61047a816109e8565b61065c61047d565b156104675760405162461bcd60e51b815260040161034d90610d51565b3390565b6001600160a01b0383166106a35760405162461bcd60e51b815260040161034d90610d7b565b6001600160a01b0382166106c95760405162461bcd60e51b815260040161034d90610c26565b6001600160a01b0380841660008181526007602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610724908590610f1d565b60405180910390a3505050565b600061073d84846105f2565b9050600019811461077557818110156107685760405162461bcd60e51b815260040161034d90610ca1565b610775848484840361067d565b50505050565b6001600160a01b0383166107a15760405162461bcd60e51b815260040161034d90610df2565b6001600160a01b0382166107c75760405162461bcd60e51b815260040161034d90610e6c565b6107d28383836109e3565b6001600160a01b0383166000908152600660205260409020548181101561080b5760405162461bcd60e51b815260040161034d90610cd8565b6001600160a01b0380851660008181526006602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610869908690610f1d565b60405180910390a36107758484846109e3565b610884610679565b6001600160a01b03166108956104ee565b6001600160a01b0316146104675760405162461bcd60e51b815260040161034d90610dbd565b6108c3610a7c565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6108f9610679565b6040516109069190610b86565b60405180910390a1565b6001600160a01b0382166109365760405162461bcd60e51b815260040161034d90610e35565b610942826000836109e3565b6001600160a01b0382166000908152600660205260409020548181101561097b5760405162461bcd60e51b815260040161034d90610d1c565b6001600160a01b0383166000818152600660205260408082208585039055600580548690039055519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906109d3908690610f1d565b60405180910390a36109e3836000845b505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b610a40610654565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586108f9610679565b610a8461047d565b6104675760405162461bcd60e51b815260040161034d90610bf8565b80356001600160a01b03811681146104a757600080fd5b600060208284031215610ac8578081fd5b610ad182610aa0565b9392505050565b60008060408385031215610aea578081fd5b610af383610aa0565b9150610b0160208401610aa0565b90509250929050565b600080600060608486031215610b1e578081fd5b610b2784610aa0565b9250610b3560208501610aa0565b9150604084013590509250925092565b60008060408385031215610b57578182fd5b610b6083610aa0565b946020939093013593505050565b600060208284031215610b7f578081fd5b5035919050565b6001600160a01b0391909116815260200190565b901515815260200190565b6000602080835283518082850152825b81811015610bd157858101830151858201604001528201610bb5565b81811115610be25783604083870101525b50601f01601f1916929092016040019392505050565b60208082526014908201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604082015260600190565b6020808252818101527f474f4e3a20617070726f766520746f20746865207a65726f2061646472657373604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252601b908201527f474f4e3a20696e73756666696369656e7420616c6c6f77616e63650000000000604082015260600190565b60208082526024908201527f474f4e3a207472616e7366657220616d6f756e7420657863656564732062616c604082015263616e636560e01b606082015260800190565b6020808252818101527f474f4e3a206275726e20616d6f756e7420657863656564732062616c616e6365604082015260600190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b60208082526022908201527f474f4e3a20617070726f76652066726f6d20746865207a65726f206164647265604082015261737360f01b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526023908201527f474f4e3a207472616e736665722066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b6020808252601f908201527f474f4e3a206275726e2066726f6d20746865207a65726f206164647265737300604082015260600190565b60208082526021908201527f474f4e3a207472616e7366657220746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526013908201527211d3d38e881b1bd8dad959081858d8dbdd5b9d606a1b604082015260600190565b60208082526023908201527f474f4e3a2064656372656173656420616c6c6f77616e63652062656c6f77207a60408201526265726f60e81b606082015260800190565b90815260200190565b60008219821115610f4557634e487b7160e01b81526011600452602481fd5b500190565b600281046001821680610f5e57607f821691505b60208210811415610f7f57634e487b7160e01b600052602260045260246000fd5b5091905056fea26469706673582212205e902a6b4aeab20a4722a23057311f4ccd31a6ee6882fe1ba6dc9d7de10a7ed864736f6c63430008000033
Verified Source Code Full Match
Compiler: v0.8.0+commit.c7dfd78e
EVM: istanbul
Optimization: Yes (200 runs)
GONTOKEN.sol 221 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import './Security.sol';
contract GONTOKEN is Security {
string private _name;
string private _symbol;
uint256 private _decimals;
uint256 private _totalSupply;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
constructor() {
_name = "GON";
_symbol = "GON";
_decimals = 8;
_mint(_msgSender(), 72000000000000 * 10 ** 8);
}
/**
* @dev Returns the name of the token.
*/
function name() public view returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token.
*/
function symbol() public view returns (string memory) {
return _symbol;
}
/**
* @dev Returns the decimals of the token.
*/
function decimals() public view returns (uint256) {
return _decimals;
}
/**
* @dev Returns the total supply of the token.
*/
function totalSupply() public view returns (uint256) {
return _totalSupply;
}
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) public view returns (uint256) {
return _balances[account];
}
/**
* @dev Returns the allowances.
*/
function allowance(address owner, address spender) public view returns (uint256) {
return _allowances[owner][spender];
}
/**
* @dev Burns the amount of tokens owned by caller.
*/
function burn(uint256 amount) public {
_burn(_msgSender(), amount);
}
function burnFrom(address account, uint256 value) public virtual {
_spendAllowance(account, _msgSender(), value);
_burn(account, value);
}
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*/
function approve(address spender, uint256 amount) public whenNotPaused returns (bool) {
address owner = _msgSender();
require(!isBlackListed[owner], "GON: locked account");
_approve(owner, spender, amount);
return true;
}
/**
* @dev Increases the allowance of `spender` by `amount`.
*/
function increaseAllowance(address spender, uint256 addedValue) public whenNotPaused returns (bool) {
address owner = _msgSender();
require(!isBlackListed[owner], "GON: locked account");
_approve(owner, spender, allowance(owner, spender) + addedValue);
return true;
}
/**
* @dev Decreases the allowance of `spender` by `amount`.
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public whenNotPaused returns (bool) {
address owner = _msgSender();
uint256 currentAllowance = allowance(owner, spender);
require(!isBlackListed[owner], "GON: locked account");
require(currentAllowance >= subtractedValue, "GON: decreased allowance below zero");
unchecked {
_approve(owner, spender, currentAllowance - subtractedValue);
}
return true;
}
/**
* @dev Moves `amount` tokens from the caller's account to `to`.
*/
function transfer(address to, uint256 amount) public whenNotPaused returns (bool) {
address owner = _msgSender();
require(!isBlackListed[owner], "GON: locked account");
_transfer(owner, to, amount);
return true;
}
/**
* @dev Moves `amount` tokens from `from` to `to` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*/
function transferFrom(address from, address to, uint256 amount) public whenNotPaused returns (bool) {
address spender = _msgSender();
require(!isBlackListed[from], "GON: locked account");
_spendAllowance(from, spender, amount);
_transfer(from, to, amount);
return true;
}
/*////////////////////////////////////////////////
INTERNAL FUNCTIONS
////////////////////////////////////////////////*/
function _mint(address account, uint256 amount) internal {
require(account != address(0), "GON: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply += amount;
unchecked {
// Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.
_balances[account] += amount;
}
emit Transfer(address(0), account, amount);
_afterTokenTransfer(address(0), account, amount);
}
function _burn(address account, uint256 amount) internal {
require(account != address(0), "GON: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
uint256 accountBalance = _balances[account];
require(accountBalance >= amount, "GON: burn amount exceeds balance");
unchecked {
_balances[account] = accountBalance - amount;
// Overflow not possible: amount <= accountBalance <= totalSupply.
_totalSupply -= amount;
}
emit Transfer(account, address(0), amount);
_afterTokenTransfer(account, address(0), amount);
}
function _approve(address owner, address spender, uint256 amount) internal {
require(owner != address(0), "GON: approve from the zero address");
require(spender != address(0), "GON: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {
uint256 currentAllowance = allowance(owner, spender);
if (currentAllowance != type(uint256).max) {
require(currentAllowance >= amount, "GON: insufficient allowance");
unchecked {
_approve(owner, spender, currentAllowance - amount);
}
}
}
function _transfer(address from, address to, uint256 amount) internal {
require(from != address(0), "GON: transfer from the zero address");
require(to != address(0), "GON: transfer to the zero address");
_beforeTokenTransfer(from, to, amount);
uint256 fromBalance = _balances[from];
require(fromBalance >= amount, "GON: transfer amount exceeds balance");
unchecked {
_balances[from] = fromBalance - amount;
// Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by
// decrementing then incrementing.
_balances[to] += amount;
}
emit Transfer(from, to, amount);
_afterTokenTransfer(from, to, amount);
}
function _beforeTokenTransfer(address from, address to, uint256 amount) internal {}
function _afterTokenTransfer(address from, address to, uint256 amount) internal {}
/*////////////////////////////////////////////////
EVENTS
////////////////////////////////////////////////*/
event Approval(address indexed owner, address indexed spender, uint256 value);
event Transfer(address indexed from, address indexed to, uint256 value);
}
Security.sol 25 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
contract Security is Ownable, Pausable {
mapping(address => bool) isBlackListed;
/**
* @dev Pauses the contract.
*/
function pause() public onlyOwner {
_pause();
}
/**
* @dev Unpause the contract.
*/
function unpause() public onlyOwner {
_unpause();
}
}
Context.sol 28 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)
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) {
return msg.data;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}
Ownable.sol 83 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)
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() {
_transferOwnership(_msgSender());
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(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");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
Pausable.sol 105 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which allows children to implement an emergency stop
* mechanism that can be triggered by an authorized account.
*
* This module is used through inheritance. It will make available the
* modifiers `whenNotPaused` and `whenPaused`, which can be applied to
* the functions of your contract. Note that they will not be pausable by
* simply including this module, only once the modifiers are put in place.
*/
abstract contract Pausable is Context {
/**
* @dev Emitted when the pause is triggered by `account`.
*/
event Paused(address account);
/**
* @dev Emitted when the pause is lifted by `account`.
*/
event Unpaused(address account);
bool private _paused;
/**
* @dev Initializes the contract in unpaused state.
*/
constructor() {
_paused = false;
}
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*
* Requirements:
*
* - The contract must not be paused.
*/
modifier whenNotPaused() {
_requireNotPaused();
_;
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*
* Requirements:
*
* - The contract must be paused.
*/
modifier whenPaused() {
_requirePaused();
_;
}
/**
* @dev Returns true if the contract is paused, and false otherwise.
*/
function paused() public view virtual returns (bool) {
return _paused;
}
/**
* @dev Throws if the contract is paused.
*/
function _requireNotPaused() internal view virtual {
require(!paused(), "Pausable: paused");
}
/**
* @dev Throws if the contract is not paused.
*/
function _requirePaused() internal view virtual {
require(paused(), "Pausable: not paused");
}
/**
* @dev Triggers stopped state.
*
* Requirements:
*
* - The contract must not be paused.
*/
function _pause() internal virtual whenNotPaused {
_paused = true;
emit Paused(_msgSender());
}
/**
* @dev Returns to normal state.
*
* Requirements:
*
* - The contract must be paused.
*/
function _unpause() internal virtual whenPaused {
_paused = false;
emit Unpaused(_msgSender());
}
}
Read Contract
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
decimals 0x313ce567 → uint256
name 0x06fdde03 → string
owner 0x8da5cb5b → address
paused 0x5c975abb → bool
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256
Write Contract 11 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
burnFrom 0x79cc6790
address account
uint256 value
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
pause 0x8456cb59
No parameters
renounceOwnership 0x715018a6
No parameters
transfer 0xa9059cbb
address to
uint256 amount
returns: bool
transferFrom 0x23b872dd
address from
address to
uint256 amount
returns: bool
transferOwnership 0xf2fde38b
address newOwner
unpause 0x3f4ba83a
No parameters
Recent Transactions
No transactions found for this address