Feature Tip: Add private address tag to any address under My Name Tag !
Source Code
Latest 25 from a total of 1,738 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Mint | 17519770 | 984 days ago | IN | 0 ETH | 0.00134676 | ||||
| Mint | 17426934 | 997 days ago | IN | 0 ETH | 0.0019661 | ||||
| Mint | 17425320 | 997 days ago | IN | 0 ETH | 0.00187931 | ||||
| Mint | 17421124 | 998 days ago | IN | 0 ETH | 0.00180474 | ||||
| Mint | 17420911 | 998 days ago | IN | 0 ETH | 0.00164103 | ||||
| Mint | 17420037 | 998 days ago | IN | 0 ETH | 0.0018177 | ||||
| Mint | 17412498 | 999 days ago | IN | 0 ETH | 0.00192551 | ||||
| Mint | 17410885 | 999 days ago | IN | 0 ETH | 0.00243642 | ||||
| Mint | 17402576 | 1000 days ago | IN | 0 ETH | 0.0019133 | ||||
| Mint | 17395114 | 1001 days ago | IN | 0 ETH | 0.0022058 | ||||
| Mint | 17390581 | 1002 days ago | IN | 0 ETH | 0.0022058 | ||||
| Mint | 17342939 | 1009 days ago | IN | 0 ETH | 0.00216453 | ||||
| Set Mining Targe... | 17306765 | 1014 days ago | IN | 0 ETH | 0.00081144 | ||||
| Set Mining Targe... | 17306630 | 1014 days ago | IN | 0 ETH | 0.00081562 | ||||
| Mint | 17306093 | 1014 days ago | IN | 0 ETH | 0.0022058 | ||||
| Mint | 17305814 | 1014 days ago | IN | 0 ETH | 0.0022058 | ||||
| Mint | 17305506 | 1014 days ago | IN | 0 ETH | 0.0022058 | ||||
| Mint | 17305461 | 1014 days ago | IN | 0 ETH | 0.0022058 | ||||
| Mint | 17305414 | 1014 days ago | IN | 0 ETH | 0.0022058 | ||||
| Mint | 17305407 | 1014 days ago | IN | 0 ETH | 0.0006461 | ||||
| Mint | 17305407 | 1014 days ago | IN | 0 ETH | 0.0022058 | ||||
| Mint | 17305390 | 1014 days ago | IN | 0 ETH | 0.0006461 | ||||
| Mint | 17305390 | 1014 days ago | IN | 0 ETH | 0.0006461 | ||||
| Mint | 17305370 | 1014 days ago | IN | 0 ETH | 0.0022055 | ||||
| Mint | 17305330 | 1014 days ago | IN | 0 ETH | 0.0006461 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
Giver
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 1000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";
contract Giver is Ownable {
address constant _token = 0x59fc0F9626e872bc89c71bAe90f40021F5A211A8;
uint256 constant _BLOCKS_PER_READJUSTMENT = 24;
uint256 constant _MINIMUM_TARGET = 2**16;
uint256 constant _MAXIMUM_TARGET = 2**220;
uint256 constant rewardAmount = 93*10**18;
uint256 constant burnAmount = 30*10**18;
uint256 constant targetEthBlocksPerDiffPeriod = _BLOCKS_PER_READJUSTMENT * 150;
uint256 constant burnBlockStart = 17608710;
uint256 public latestDifficultyPeriodStarted;
uint256 public epochCount;
uint256 public maximumDifficulty;
uint256 public miningTarget;
uint256 public tokensMinted;
bytes32 public challengeNumber;
mapping(bytes32 => bytes32) solutions;
bool locked = false;
bool public burningEnabled;
event Mint(address indexed from, uint256 reward_amount, uint256 epochCount, bytes32 newChallengeNumber);
constructor() {
if(locked) revert();
locked = true;
miningTarget = _MAXIMUM_TARGET;
latestDifficultyPeriodStarted = block.number;
_startNewMiningEpoch();
}
function _startNewMiningEpoch() internal {
epochCount = epochCount+1;
if(epochCount % _BLOCKS_PER_READJUSTMENT == 0)
{
_reAdjustDifficulty();
}
challengeNumber = blockhash(block.number - 1);
}
function _reAdjustDifficulty() internal {
uint256 ethBlocksSinceLastDifficultyPeriod = block.number - latestDifficultyPeriodStarted;
if(ethBlocksSinceLastDifficultyPeriod < targetEthBlocksPerDiffPeriod)
{
uint256 excess_block_pct = (targetEthBlocksPerDiffPeriod*100) / ethBlocksSinceLastDifficultyPeriod;
uint256 excess_block_pct_extra = (excess_block_pct-100);
if (excess_block_pct_extra>1000) {excess_block_pct_extra=1000;}
miningTarget = miningTarget-(miningTarget/2000)*excess_block_pct_extra;
} else {
uint256 shortage_block_pct = (ethBlocksSinceLastDifficultyPeriod*100) / targetEthBlocksPerDiffPeriod;
uint256 shortage_block_pct_extra = shortage_block_pct-100;
if (shortage_block_pct_extra>1000) {shortage_block_pct_extra=1000;}
miningTarget = miningTarget+(miningTarget/2000)*shortage_block_pct_extra;
}
latestDifficultyPeriodStarted = block.number;
if(miningTarget < _MINIMUM_TARGET)
{
miningTarget = _MINIMUM_TARGET;
}
if(miningTarget > _MAXIMUM_TARGET)
{
miningTarget = _MAXIMUM_TARGET;
}
if (block.number>burnBlockStart) {
uint256 difficulty=_MAXIMUM_TARGET/miningTarget;
if(difficulty>maximumDifficulty) {
maximumDifficulty=difficulty;
burningEnabled=false;
}
if(burningEnabled==false) {
uint256 burningDifficulty = maximumDifficulty-(maximumDifficulty/100)*30;
if(difficulty<burningDifficulty) {
burningEnabled=true;
}
}
}
}
function getChallengeNumber() external view returns (bytes32) {
return challengeNumber;
}
function getMiningTarget() external view returns (uint256) {
return miningTarget;
}
function getMiningDifficulty() external view returns (uint256) {
return _MAXIMUM_TARGET/miningTarget;
}
function getMiningReward() external pure returns (uint256) {
return (rewardAmount);
}
function checkMintSolution(bytes32 challenge_number, uint256 testTarget, bytes32 msgHash, uint8 v, bytes32 r, bytes32 s) external view returns (bool success) {
bytes memory prefix = "\x19Ethereum Signed Message:\n72";
bytes32 prefixedHashMessage = keccak256(abi.encodePacked(prefix, msg.sender, challenge_number));
if (prefixedHashMessage!=msgHash) return false;
address pow_addr = ecrecover(msgHash, v, r, s);
bytes32 digest=keccak256(abi.encodePacked(pow_addr,msg.sender,challenge_number));
if(uint256(digest) > testTarget) return false;
return true;
}
fallback () external payable {
revert();
}
receive () external payable {
revert();
}
function mint(bytes32 msgHash, uint8 v, bytes32 r, bytes32 s) external returns (bool success) {
bytes memory prefix = "\x19Ethereum Signed Message:\n72";
bytes32 prefixedHashMessage = keccak256(abi.encodePacked(prefix, msg.sender,challengeNumber));
if (prefixedHashMessage!=msgHash) revert('message must contain msg.sender');
address pow_addr = ecrecover(msgHash, v, r, s);
bytes32 digest=keccak256(abi.encodePacked(pow_addr,msg.sender,challengeNumber));
if(uint256(digest) > miningTarget) revert('high-hash');
bytes32 solution = solutions[challengeNumber];
if(solution != 0x0) revert('duplicate-solution'); //prevent the same answer from awarding twice
tokensMinted = tokensMinted+rewardAmount;
solutions[challengeNumber] = digest;
uint256 contract_balance = IERC20(_token).balanceOf(address(this));
require(rewardAmount<=contract_balance, "low-balance");
IERC20(_token).transfer(msg.sender, rewardAmount);
if(burningEnabled==true) {
if(contract_balance-rewardAmount-burnAmount > 0) {
ERC20Burnable(_token).burn(burnAmount);
}
}
_startNewMiningEpoch();
emit Mint(msg.sender, rewardAmount, epochCount, challengeNumber);
return true;
}
function setMiningTarget(uint256 target) external onlyOwner {
miningTarget=target;
}
function burnTokens(uint256 amount) external onlyOwner {
ERC20Burnable(_token).burn(amount);
}
function transferERC20(address token, uint256 amount) external onlyOwner {
IERC20(token).transfer(msg.sender, amount);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.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 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 {
_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);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/ERC20.sol)
pragma solidity ^0.8.0;
import "./IERC20.sol";
import "./extensions/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.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* We have followed general OpenZeppelin Contracts guidelines: functions revert
* instead 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 default 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
* overridden;
*
* 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:
*
* - `to` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address to, uint256 amount) public virtual override returns (bool) {
address owner = _msgSender();
_transfer(owner, to, 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}.
*
* NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
* `transferFrom`. This is semantically equivalent to an infinite approval.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) public virtual override returns (bool) {
address owner = _msgSender();
_approve(owner, 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}.
*
* NOTE: Does not update the allowance if the current allowance
* is the maximum `uint256`.
*
* Requirements:
*
* - `from` and `to` cannot be the zero address.
* - `from` must have a balance of at least `amount`.
* - the caller must have allowance for ``from``'s tokens of at least
* `amount`.
*/
function transferFrom(
address from,
address to,
uint256 amount
) public virtual override returns (bool) {
address spender = _msgSender();
_spendAllowance(from, spender, amount);
_transfer(from, to, 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) {
address owner = _msgSender();
_approve(owner, spender, allowance(owner, 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) {
address owner = _msgSender();
uint256 currentAllowance = allowance(owner, spender);
require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
unchecked {
_approve(owner, spender, currentAllowance - subtractedValue);
}
return true;
}
/**
* @dev Moves `amount` of tokens from `from` to `to`.
*
* This 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:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `from` must have a balance of at least `amount`.
*/
function _transfer(
address from,
address to,
uint256 amount
) internal virtual {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(from, to, amount);
uint256 fromBalance = _balances[from];
require(fromBalance >= amount, "ERC20: 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);
}
/** @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:
*
* - `account` 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;
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);
}
/**
* @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");
unchecked {
_balances[account] = accountBalance - amount;
// Overflow not possible: amount <= accountBalance <= totalSupply.
_totalSupply -= amount;
}
emit Transfer(account, address(0), amount);
_afterTokenTransfer(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 Updates `owner` s allowance for `spender` based on spent `amount`.
*
* Does not update the allowance amount in case of infinite allowance.
* Revert if not enough allowance is available.
*
* Might emit an {Approval} event.
*/
function _spendAllowance(
address owner,
address spender,
uint256 amount
) internal virtual {
uint256 currentAllowance = allowance(owner, spender);
if (currentAllowance != type(uint256).max) {
require(currentAllowance >= amount, "ERC20: insufficient allowance");
unchecked {
_approve(owner, spender, currentAllowance - 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 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 {}
/**
* @dev Hook that is called after any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* has been transferred to `to`.
* - when `from` is zero, `amount` tokens have been minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens have been 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 _afterTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
* https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
*
* Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
* presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
* need to send a transaction, and thus is not required to hold Ether at all.
*/
interface IERC20Permit {
/**
* @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
* given ``owner``'s signed approval.
*
* IMPORTANT: The same issues {IERC20-approve} has related to transaction
* ordering also apply here.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `deadline` must be a timestamp in the future.
* - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
* over the EIP712-formatted function arguments.
* - the signature must use ``owner``'s current nonce (see {nonces}).
*
* For more information on the signature format, see the
* https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
* section].
*/
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
/**
* @dev Returns the current nonce for `owner`. This value must be
* included whenever a signature is generated for {permit}.
*
* Every successful call to {permit} increases ``owner``'s nonce by one. This
* prevents a signature from being used multiple times.
*/
function nonces(address owner) external view returns (uint256);
/**
* @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
*/
// solhint-disable-next-line func-name-mixedcase
function DOMAIN_SEPARATOR() external view returns (bytes32);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol)
pragma solidity ^0.8.0;
import "../ERC20.sol";
import "../../../utils/Context.sol";
/**
* @dev Extension of {ERC20} that allows token holders to destroy both their own
* tokens and those that they have an allowance for, in a way that can be
* recognized off-chain (via event analysis).
*/
abstract contract ERC20Burnable is Context, ERC20 {
/**
* @dev Destroys `amount` tokens from the caller.
*
* See {ERC20-_burn}.
*/
function burn(uint256 amount) public virtual {
_burn(_msgSender(), amount);
}
/**
* @dev Destroys `amount` tokens from `account`, deducting from the caller's
* allowance.
*
* See {ERC20-_burn} and {ERC20-allowance}.
*
* Requirements:
*
* - the caller must have allowance for ``accounts``'s tokens of at least
* `amount`.
*/
function burnFrom(address account, uint256 amount) public virtual {
_spendAllowance(account, _msgSender(), amount);
_burn(account, amount);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)
pragma solidity ^0.8.0;
import "../IERC20.sol";
/**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*
* _Available since v4.1._
*/
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);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @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);
/**
* @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 `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, 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 `from` to `to` 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 from,
address to,
uint256 amount
) external returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.0;
import "../IERC20.sol";
import "../extensions/draft-IERC20Permit.sol";
import "../../../utils/Address.sol";
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using Address for address;
function safeTransfer(
IERC20 token,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(
IERC20 token,
address from,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
}
/**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/
function safeApprove(
IERC20 token,
address spender,
uint256 value
) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
require(
(value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve from non-zero to non-zero allowance"
);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
}
function safeIncreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
uint256 newAllowance = token.allowance(address(this), spender) + value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
function safeDecreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
unchecked {
uint256 oldAllowance = token.allowance(address(this), spender);
require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
uint256 newAllowance = oldAllowance - value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
}
function safePermit(
IERC20Permit token,
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) internal {
uint256 nonceBefore = token.nonces(owner);
token.permit(owner, spender, value, deadline, v, r, s);
uint256 nonceAfter = token.nonces(owner);
require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that
// the target address contains contract code and also asserts for success in the low-level call.
bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
if (returndata.length > 0) {
// Return data is optional
require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
* the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
*
* _Available since v4.8._
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
// only check isContract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
/**
* @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason or using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function _revert(bytes memory returndata, string memory errorMessage) private pure {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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;
}
}{
"optimizer": {
"enabled": true,
"runs": 1000
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward_amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"epochCount","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"newChallengeNumber","type":"bytes32"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burnTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"burningEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"challengeNumber","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"challenge_number","type":"bytes32"},{"internalType":"uint256","name":"testTarget","type":"uint256"},{"internalType":"bytes32","name":"msgHash","type":"bytes32"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"checkMintSolution","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"epochCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getChallengeNumber","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMiningDifficulty","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMiningReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getMiningTarget","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestDifficultyPeriodStarted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maximumDifficulty","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"miningTarget","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"msgHash","type":"bytes32"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"mint","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"target","type":"uint256"}],"name":"setMiningTarget","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"tokensMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]Contract Creation Code
60806040526008805460ff191690553480156200001b57600080fd5b50620000273362000063565b60085460ff16156200003857600080fd5b6008805460ff19166001908117909155600160dc1b6004554390556200005d620000b3565b620003ab565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600254620000c39060016200031b565b6002819055620000d6906018906200034d565b600003620000e857620000e8620000fb565b620000f560014362000364565b40600655565b6000600154436200010d919062000364565b90506200011d601860966200037a565b811015620001ac5760008162000136601860966200037a565b620001439060646200037a565b6200014f919062000394565b905060006200016060648362000364565b90506103e88111156200017257506103e85b806107d060045462000185919062000394565b6200019191906200037a565b600454620001a0919062000364565b600455506200022c9050565b6000620001bc601860966200037a565b620001c98360646200037a565b620001d5919062000394565b90506000620001e660648362000364565b90506103e8811115620001f857506103e85b806107d06004546200020b919062000394565b6200021791906200037a565b6004546200022691906200031b565b60045550505b436001556004546201000011156200024657620100006004555b600160dc1b60045411156200025e57600160dc1b6004555b63010cb00643111562000302576000600454600160dc1b62000281919062000394565b90506003548111156200029f5760038190556008805461ff00191690555b600854610100900460ff161515600003620003005760006064600354620002c7919062000394565b620002d490601e6200037a565b600354620002e3919062000364565b905080821015620002fe576008805461ff0019166101001790555b505b505b50565b634e487b7160e01b600052601160045260246000fd5b8082018082111562000331576200033162000305565b92915050565b634e487b7160e01b600052601260045260246000fd5b6000826200035f576200035f62000337565b500690565b8181038181111562000331576200033162000305565b808202811582820484141762000331576200033162000305565b600082620003a657620003a662000337565b500490565b61109f80620003bb6000396000f3fe6080604052600436106101485760003560e01c8063829965cc116100c0578063d6746dba11610074578063f2fde38b11610059578063f2fde38b14610317578063f7448a3114610337578063f84f26641461035757600080fd5b8063d6746dba146102d7578063d8b8ac31146102f757600080fd5b80638ae0368b116100a55780638ae0368b146102835780638da5cb5b14610299578063cb9ae707146102c157600080fd5b8063829965cc146102575780638a769d351461026d57600080fd5b80634ef37628116101175780636d1b229d116100fc5780636d1b229d1461020a5780636de9f32b1461022c578063715018a61461024257600080fd5b80634ef37628146101df5780635ae0cc36146101f457600080fd5b806317da485f1461015757806332e997081461017f578063490203a7146101945780634d754715146101b057600080fd5b3661015257600080fd5b600080fd5b34801561016357600080fd5b5061016c610377565b6040519081526020015b60405180910390f35b34801561018b57600080fd5b5060045461016c565b3480156101a057600080fd5b5068050aa25f43cf54000061016c565b3480156101bc57600080fd5b506008546101cf90610100900460ff1681565b6040519015158152602001610176565b3480156101eb57600080fd5b5060065461016c565b34801561020057600080fd5b5061016c60035481565b34801561021657600080fd5b5061022a610225366004610e2a565b610390565b005b34801561023857600080fd5b5061016c60055481565b34801561024e57600080fd5b5061022a610400565b34801561026357600080fd5b5061016c60025481565b34801561027957600080fd5b5061016c60045481565b34801561028f57600080fd5b5061016c60065481565b3480156102a557600080fd5b506000546040516001600160a01b039091168152602001610176565b3480156102cd57600080fd5b5061016c60015481565b3480156102e357600080fd5b5061022a6102f2366004610e2a565b610414565b34801561030357600080fd5b506101cf610312366004610e59565b610421565b34801561032357600080fd5b5061022a610332366004610ec1565b610572565b34801561034357600080fd5b5061022a610352366004610ee3565b610607565b34801561036357600080fd5b506101cf610372366004610f0d565b610685565b6000600454600160dc1b61038b9190610f74565b905090565b610398610b53565b604051630852cd8d60e31b8152600481018290527359fc0f9626e872bc89c71bae90f40021f5a211a8906342966c6890602401600060405180830381600087803b1580156103e557600080fd5b505af11580156103f9573d6000803e3d6000fd5b5050505050565b610408610b53565b6104126000610bad565b565b61041c610b53565b600455565b6000806040518060400160405280601c81526020017f19457468657265756d205369676e6564204d6573736167653a0a3732000000008152509050600081338a60405160200161047393929190610f88565b60405160208183030381529060405280519060200120905086811461049d57600092505050610568565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa1580156104f1573d6000803e3d6000fd5b5050604051601f198101516bffffffffffffffffffffffff19606082811b8216602085015233901b166034830152604882018d9052925060009150606801604051602081830303815290604052805190602001209050898160001c111561055f576000945050505050610568565b60019450505050505b9695505050505050565b61057a610b53565b6001600160a01b0381166105fb5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b61060481610bad565b50565b61060f610b53565b60405163a9059cbb60e01b8152336004820152602481018290526001600160a01b0383169063a9059cbb906044016020604051808303816000875af115801561065c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106809190610fd7565b505050565b6000806040518060400160405280601c81526020017f19457468657265756d205369676e6564204d6573736167653a0a3732000000008152509050600081336006546040516020016106d993929190610f88565b6040516020818303038152906040528051906020012090508681146107405760405162461bcd60e51b815260206004820152601f60248201527f6d657373616765206d75737420636f6e7461696e206d73672e73656e6465720060448201526064016105f2565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610794573d6000803e3d6000fd5b5050604051601f198101516006546bffffffffffffffffffffffff19606083811b8216602086015233901b16603484015260488301529250600091506068016040516020818303038152906040528051906020012090506004548160001c11156108405760405162461bcd60e51b815260206004820152600960248201527f686967682d68617368000000000000000000000000000000000000000000000060448201526064016105f2565b60065460009081526007602052604090205480156108a05760405162461bcd60e51b815260206004820152601260248201527f6475706c69636174652d736f6c7574696f6e000000000000000000000000000060448201526064016105f2565b68050aa25f43cf5400006005546108b79190610ff9565b600555600654600090815260076020526040808220849055517f70a082310000000000000000000000000000000000000000000000000000000081523060048201527359fc0f9626e872bc89c71bae90f40021f5a211a8906370a0823190602401602060405180830381865afa158015610935573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109599190611012565b90508068050aa25f43cf54000011156109b45760405162461bcd60e51b815260206004820152600b60248201527f6c6f772d62616c616e636500000000000000000000000000000000000000000060448201526064016105f2565b60405163a9059cbb60e01b815233600482015268050aa25f43cf54000060248201527359fc0f9626e872bc89c71bae90f40021f5a211a89063a9059cbb906044016020604051808303816000875af1158015610a14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a389190610fd7565b50600854610100900460ff161515600103610aea5760006801a055690d9db80000610a6c68050aa25f43cf5400008461102b565b610a76919061102b565b1115610aea57604051630852cd8d60e31b81526801a055690d9db8000060048201527359fc0f9626e872bc89c71bae90f40021f5a211a8906342966c6890602401600060405180830381600087803b158015610ad157600080fd5b505af1158015610ae5573d6000803e3d6000fd5b505050505b610af2610c15565b6002546006546040805168050aa25f43cf5400008152602081019390935282015233907fcf6fbb9dcea7d07263ab4f5c3a92f53af33dffc421d9d121e1c74b307e68189d9060600160405180910390a25060019a9950505050505050505050565b6000546001600160a01b031633146104125760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105f2565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600254610c23906001610ff9565b6002819055610c349060189061103e565b600003610c4357610c43610c54565b610c4e60014361102b565b40600655565b600060015443610c64919061102b565b9050610c7260186096611052565b811015610cf057600081610c8860186096611052565b610c93906064611052565b610c9d9190610f74565b90506000610cac60648361102b565b90506103e8811115610cbd57506103e85b806107d0600454610cce9190610f74565b610cd89190611052565b600454610ce5919061102b565b60045550610d619050565b6000610cfe60186096611052565b610d09836064611052565b610d139190610f74565b90506000610d2260648361102b565b90506103e8811115610d3357506103e85b806107d0600454610d449190610f74565b610d4e9190611052565b600454610d5b9190610ff9565b60045550505b43600155600454620100001115610d7a57620100006004555b600160dc1b6004541115610d9157600160dc1b6004555b63010cb006431115610604576000600454600160dc1b610db19190610f74565b9050600354811115610dce5760038190556008805461ff00191690555b600854610100900460ff161515600003610e265760006064600354610df39190610f74565b610dfe90601e611052565b600354610e0b919061102b565b905080821015610680576008805461ff001916610100179055505b5050565b600060208284031215610e3c57600080fd5b5035919050565b803560ff81168114610e5457600080fd5b919050565b60008060008060008060c08789031215610e7257600080fd5b863595506020870135945060408701359350610e9060608801610e43565b92506080870135915060a087013590509295509295509295565b80356001600160a01b0381168114610e5457600080fd5b600060208284031215610ed357600080fd5b610edc82610eaa565b9392505050565b60008060408385031215610ef657600080fd5b610eff83610eaa565b946020939093013593505050565b60008060008060808587031215610f2357600080fd5b84359350610f3360208601610e43565b93969395505050506040820135916060013590565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082610f8357610f83610f48565b500490565b6000845160005b81811015610fa95760208188018101518583015201610f8f565b5060609490941b6bffffffffffffffffffffffff191691909301908152601481019190915260340192915050565b600060208284031215610fe957600080fd5b81518015158114610edc57600080fd5b8082018082111561100c5761100c610f5e565b92915050565b60006020828403121561102457600080fd5b5051919050565b8181038181111561100c5761100c610f5e565b60008261104d5761104d610f48565b500690565b808202811582820484141761100c5761100c610f5e56fea26469706673582212209ffed8166e078c96d60b35b2c524362c67daa8cf6ccd1c9158a4b384cbe1df3664736f6c63430008110033
Deployed Bytecode
0x6080604052600436106101485760003560e01c8063829965cc116100c0578063d6746dba11610074578063f2fde38b11610059578063f2fde38b14610317578063f7448a3114610337578063f84f26641461035757600080fd5b8063d6746dba146102d7578063d8b8ac31146102f757600080fd5b80638ae0368b116100a55780638ae0368b146102835780638da5cb5b14610299578063cb9ae707146102c157600080fd5b8063829965cc146102575780638a769d351461026d57600080fd5b80634ef37628116101175780636d1b229d116100fc5780636d1b229d1461020a5780636de9f32b1461022c578063715018a61461024257600080fd5b80634ef37628146101df5780635ae0cc36146101f457600080fd5b806317da485f1461015757806332e997081461017f578063490203a7146101945780634d754715146101b057600080fd5b3661015257600080fd5b600080fd5b34801561016357600080fd5b5061016c610377565b6040519081526020015b60405180910390f35b34801561018b57600080fd5b5060045461016c565b3480156101a057600080fd5b5068050aa25f43cf54000061016c565b3480156101bc57600080fd5b506008546101cf90610100900460ff1681565b6040519015158152602001610176565b3480156101eb57600080fd5b5060065461016c565b34801561020057600080fd5b5061016c60035481565b34801561021657600080fd5b5061022a610225366004610e2a565b610390565b005b34801561023857600080fd5b5061016c60055481565b34801561024e57600080fd5b5061022a610400565b34801561026357600080fd5b5061016c60025481565b34801561027957600080fd5b5061016c60045481565b34801561028f57600080fd5b5061016c60065481565b3480156102a557600080fd5b506000546040516001600160a01b039091168152602001610176565b3480156102cd57600080fd5b5061016c60015481565b3480156102e357600080fd5b5061022a6102f2366004610e2a565b610414565b34801561030357600080fd5b506101cf610312366004610e59565b610421565b34801561032357600080fd5b5061022a610332366004610ec1565b610572565b34801561034357600080fd5b5061022a610352366004610ee3565b610607565b34801561036357600080fd5b506101cf610372366004610f0d565b610685565b6000600454600160dc1b61038b9190610f74565b905090565b610398610b53565b604051630852cd8d60e31b8152600481018290527359fc0f9626e872bc89c71bae90f40021f5a211a8906342966c6890602401600060405180830381600087803b1580156103e557600080fd5b505af11580156103f9573d6000803e3d6000fd5b5050505050565b610408610b53565b6104126000610bad565b565b61041c610b53565b600455565b6000806040518060400160405280601c81526020017f19457468657265756d205369676e6564204d6573736167653a0a3732000000008152509050600081338a60405160200161047393929190610f88565b60405160208183030381529060405280519060200120905086811461049d57600092505050610568565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa1580156104f1573d6000803e3d6000fd5b5050604051601f198101516bffffffffffffffffffffffff19606082811b8216602085015233901b166034830152604882018d9052925060009150606801604051602081830303815290604052805190602001209050898160001c111561055f576000945050505050610568565b60019450505050505b9695505050505050565b61057a610b53565b6001600160a01b0381166105fb5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b61060481610bad565b50565b61060f610b53565b60405163a9059cbb60e01b8152336004820152602481018290526001600160a01b0383169063a9059cbb906044016020604051808303816000875af115801561065c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106809190610fd7565b505050565b6000806040518060400160405280601c81526020017f19457468657265756d205369676e6564204d6573736167653a0a3732000000008152509050600081336006546040516020016106d993929190610f88565b6040516020818303038152906040528051906020012090508681146107405760405162461bcd60e51b815260206004820152601f60248201527f6d657373616765206d75737420636f6e7461696e206d73672e73656e6465720060448201526064016105f2565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610794573d6000803e3d6000fd5b5050604051601f198101516006546bffffffffffffffffffffffff19606083811b8216602086015233901b16603484015260488301529250600091506068016040516020818303038152906040528051906020012090506004548160001c11156108405760405162461bcd60e51b815260206004820152600960248201527f686967682d68617368000000000000000000000000000000000000000000000060448201526064016105f2565b60065460009081526007602052604090205480156108a05760405162461bcd60e51b815260206004820152601260248201527f6475706c69636174652d736f6c7574696f6e000000000000000000000000000060448201526064016105f2565b68050aa25f43cf5400006005546108b79190610ff9565b600555600654600090815260076020526040808220849055517f70a082310000000000000000000000000000000000000000000000000000000081523060048201527359fc0f9626e872bc89c71bae90f40021f5a211a8906370a0823190602401602060405180830381865afa158015610935573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109599190611012565b90508068050aa25f43cf54000011156109b45760405162461bcd60e51b815260206004820152600b60248201527f6c6f772d62616c616e636500000000000000000000000000000000000000000060448201526064016105f2565b60405163a9059cbb60e01b815233600482015268050aa25f43cf54000060248201527359fc0f9626e872bc89c71bae90f40021f5a211a89063a9059cbb906044016020604051808303816000875af1158015610a14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a389190610fd7565b50600854610100900460ff161515600103610aea5760006801a055690d9db80000610a6c68050aa25f43cf5400008461102b565b610a76919061102b565b1115610aea57604051630852cd8d60e31b81526801a055690d9db8000060048201527359fc0f9626e872bc89c71bae90f40021f5a211a8906342966c6890602401600060405180830381600087803b158015610ad157600080fd5b505af1158015610ae5573d6000803e3d6000fd5b505050505b610af2610c15565b6002546006546040805168050aa25f43cf5400008152602081019390935282015233907fcf6fbb9dcea7d07263ab4f5c3a92f53af33dffc421d9d121e1c74b307e68189d9060600160405180910390a25060019a9950505050505050505050565b6000546001600160a01b031633146104125760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105f2565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600254610c23906001610ff9565b6002819055610c349060189061103e565b600003610c4357610c43610c54565b610c4e60014361102b565b40600655565b600060015443610c64919061102b565b9050610c7260186096611052565b811015610cf057600081610c8860186096611052565b610c93906064611052565b610c9d9190610f74565b90506000610cac60648361102b565b90506103e8811115610cbd57506103e85b806107d0600454610cce9190610f74565b610cd89190611052565b600454610ce5919061102b565b60045550610d619050565b6000610cfe60186096611052565b610d09836064611052565b610d139190610f74565b90506000610d2260648361102b565b90506103e8811115610d3357506103e85b806107d0600454610d449190610f74565b610d4e9190611052565b600454610d5b9190610ff9565b60045550505b43600155600454620100001115610d7a57620100006004555b600160dc1b6004541115610d9157600160dc1b6004555b63010cb006431115610604576000600454600160dc1b610db19190610f74565b9050600354811115610dce5760038190556008805461ff00191690555b600854610100900460ff161515600003610e265760006064600354610df39190610f74565b610dfe90601e611052565b600354610e0b919061102b565b905080821015610680576008805461ff001916610100179055505b5050565b600060208284031215610e3c57600080fd5b5035919050565b803560ff81168114610e5457600080fd5b919050565b60008060008060008060c08789031215610e7257600080fd5b863595506020870135945060408701359350610e9060608801610e43565b92506080870135915060a087013590509295509295509295565b80356001600160a01b0381168114610e5457600080fd5b600060208284031215610ed357600080fd5b610edc82610eaa565b9392505050565b60008060408385031215610ef657600080fd5b610eff83610eaa565b946020939093013593505050565b60008060008060808587031215610f2357600080fd5b84359350610f3360208601610e43565b93969395505050506040820135916060013590565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082610f8357610f83610f48565b500490565b6000845160005b81811015610fa95760208188018101518583015201610f8f565b5060609490941b6bffffffffffffffffffffffff191691909301908152601481019190915260340192915050565b600060208284031215610fe957600080fd5b81518015158114610edc57600080fd5b8082018082111561100c5761100c610f5e565b92915050565b60006020828403121561102457600080fd5b5051919050565b8181038181111561100c5761100c610f5e565b60008261104d5761104d610f48565b500690565b808202811582820484141761100c5761100c610f5e56fea26469706673582212209ffed8166e078c96d60b35b2c524362c67daa8cf6ccd1c9158a4b384cbe1df3664736f6c63430008110033
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.