Feature Tip: Add private address tag to any address under My Name Tag !
ERC-20
DeFi
Overview
Max Total Supply
1,000,000,000 AWOO
Holders
211 (0.00%)
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Balance
239,906.533731085628848704 AWOOValue
$0.00Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
AwooFinance
Compiler Version
v0.8.0+commit.c7dfd78e
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "./interfaces/IUniswapV2Router02.sol"; import "./interfaces/IUniswapV2Factory.sol"; import "./DogNFT.sol"; contract AwooFinance is Context, IERC20, IERC20Metadata, Ownable { using SafeMath for uint256; using Address for address; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply = 1000000000 * 10**18; string private _name = "AWOO Finance"; string private _symbol = "AWOO"; mapping(address => bool) private _isExcludedFromFee; uint256 private _totalFee; uint256 private _taxFee = 1; uint256 private _charityFee = 1; uint256 private _opFee = 1; uint256 private _previousTaxFee = _taxFee; uint256 private _previousCharityFee = _charityFee; uint256 private _previousOpFee = _opFee; address payable public _charityWalletAddress; address payable public _opWalletAddress; IUniswapV2Router02 public immutable uniswapV2Router; address public immutable uniswapV2Pair; DogNFT _dogNFT; bool inSwap = false; bool public swapEnabled = true; uint256 totalHolders; uint256 private _maxTxAmount = 1000000000e18; // Set a minimum amount of tokens to be swapped to avoid waste => 50000 uint256 private _numOfTokensToExchangeForCharity = 5 * 10**4 * 10**18; event MinTokensBeforeSwapUpdated(uint256 minTokensBeforeSwap); event SwapEnabledUpdated(bool enabled); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor( address payable charityWalletAddress, address payable opWalletAddress, DogNFT _dogNFTAddr ) { _charityWalletAddress = charityWalletAddress; _opWalletAddress = opWalletAddress; _balances[_msgSender()] = _totalSupply; totalHolders = 1; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02( 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D ); // UniswapV2 for Ethereum network // Create a uniswap pair for this new token uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); // set the rest of the contract variables uniswapV2Router = _uniswapV2Router; // Exclude owner and this contract from fee _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _dogNFT = _dogNFTAddr; emit Transfer(address(0), _msgSender(), _totalSupply); } /** * @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; } function calculatedSupply() public view returns (uint256) { uint256 nonHolderSupply = _totalSupply .sub(_totalFee) .sub(_balances[address(this)]) .sub(_balances[uniswapV2Pair]); uint256 cSupply; for (uint256 i = 0; i < _dogNFT.totalBoosters(); i = i.add(1)) { address booster = _dogNFT.boosters(i); nonHolderSupply = nonHolderSupply.sub(_balances[booster]); cSupply = cSupply.add( (100 + _dogNFT.boostFee(booster)).mul(_balances[booster]).div( 100 ) ); } cSupply = cSupply.add( nonHolderSupply .mul( 100 - _dogNFT.totalBoosts().mul(10**6).div(totalHolders).div( 10**6 ) ).div(100) ); return cSupply; } function feeOf(address account, uint256 userBalance) private view returns (uint256) { uint256 cSupply = calculatedSupply(); uint256 distFee; if (_dogNFT.getRedistFeeOf(account) > 0) distFee = 10**8 + _dogNFT.getRedistFeeOf(account).mul(10**6); else distFee = 10**8 - _dogNFT.totalBoosts().mul(10**6).div(totalHolders); return userBalance .mul(distFee) .div(10**8) .mul(10**6) .mul(_totalFee) .div(cSupply) .div(10**6); } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { if (account == address(this) || account == uniswapV2Pair) return _balances[account]; uint256 userBalance = _balances[account]; uint256 feeOfUser = feeOf(account, userBalance); return _balances[account].add(feeOfUser); } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require( currentAllowance >= amount, "ERC20: transfer amount exceeds allowance" ); _approve(sender, _msgSender(), currentAllowance - amount); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve( _msgSender(), spender, _allowances[_msgSender()][spender] + addedValue ); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { uint256 currentAllowance = _allowances[_msgSender()][spender]; require( currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero" ); _approve(_msgSender(), spender, currentAllowance - subtractedValue); return true; } function _getTValues( uint256 tAmount, uint256 taxFee, uint256 charityFee, uint256 opFee ) private pure returns ( uint256, uint256, uint256, uint256 ) { uint256 _tAmount = tAmount; uint256 tFee = _tAmount.mul(taxFee).div(100); uint256 tCharity = _tAmount.mul(charityFee).div(100); uint256 tOp = _tAmount.mul(opFee).div(100); uint256 tTransferAmount = _tAmount.sub(tFee).sub(tCharity).sub(tOp); return (tTransferAmount, tFee, tCharity, tOp); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { // generate the uniswap pair path of token -> weth address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); // make the swap uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, // accept any amount of ETH path, address(this), block.timestamp ); } function sendETHToCharity(uint256 amount) private { _charityWalletAddress.transfer(amount); } function sendETHToOp(uint256 amount) private { _opWalletAddress.transfer(amount); } // We are exposing these functions to be able to manual swap and send // in case the token is highly valued and 5M becomes too much function manualSwap() external onlyOwner { uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualSend() external onlyOwner { uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { uint256 totalFee = _charityFee + _opFee; sendETHToCharity(contractETHBalance.mul(_charityFee).div(totalFee)); sendETHToOp(contractETHBalance.mul(_opFee).div(totalFee)); } } function setSwapEnabled(bool enabled) external onlyOwner { swapEnabled = enabled; } function removeAllFee() private { if (_taxFee == 0 && _charityFee == 0 && _opFee == 0) return; _previousTaxFee = _taxFee; _previousCharityFee = _charityFee; _previousOpFee = _opFee; _taxFee = 0; _charityFee = 0; _opFee = 0; } function restoreAllFee() private { _taxFee = _previousTaxFee; _charityFee = _previousCharityFee; _opFee = _previousOpFee; } function setExcludeFromFee(address account, bool excluded) external onlyOwner { _isExcludedFromFee[account] = excluded; } function isExcludedFromFee(address account) public view returns (bool) { return _isExcludedFromFee[account]; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); uint256 rSenderBalance = balanceOf(sender); uint256 senderBalance = _balances[sender]; require( rSenderBalance >= amount, "ERC20: transfer amount exceeds balance" ); if (amount > senderBalance) { uint256 remain = amount.sub(senderBalance); _balances[sender] = 0; _totalFee = _totalFee.sub(remain); } else { _balances[sender] = _balances[sender].sub(amount); } ( uint256 tTransferAmount, uint256 tFee, uint256 tCharity, uint256 tOp ) = _getTValues(amount, _taxFee, _charityFee, _opFee); if (_balances[sender] == 0) totalHolders = totalHolders.sub(1); if (tTransferAmount > 0 && _balances[recipient] == 0) totalHolders = totalHolders.add(1); _balances[recipient] += tTransferAmount; _balances[address(this)] = _balances[address(this)].add(tCharity).add( tOp ); _totalFee = _totalFee.add(tFee); emit Transfer(sender, recipient, tTransferAmount); emit Transfer(sender, address(this), tCharity.add(tOp)); if (!takeFee) restoreAllFee(); } /** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer( address sender, address recipient, uint256 amount ) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to te zero address"); require(amount > 0, "Transfer amount must be greater than zero"); _beforeTokenTransfer(sender, recipient, amount); if (sender != owner() && recipient != owner()) require( amount <= _maxTxAmount, "Transfer amount exceeds the maxTxAmount." ); // is the token balance of this contract address over the min number of // tokens that we need to initiate a swap? // also, don't get caught in a circular charity event. // also, don't swap if sender is uniswap pair. uint256 contractTokenBalance = balanceOf(address(this)); if (contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } bool overMinTokenBalance = contractTokenBalance >= _numOfTokensToExchangeForCharity; if ( !inSwap && swapEnabled && overMinTokenBalance && sender != uniswapV2Pair ) { // We need to swap the current tokens to ETH and send to the charity wallet swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { uint256 totalFee = _charityFee + _opFee; sendETHToCharity( contractETHBalance.mul(_charityFee).div(totalFee) ); sendETHToOp(contractETHBalance.mul(_opFee).div(totalFee)); } } //indicates if fee should be deducted from transfer bool takeFee = true; //if any account belongs to _isExcludedFromFee account then remove the fee if ( _isExcludedFromFee[sender] || _isExcludedFromFee[recipient] || recipient == uniswapV2Pair ) { takeFee = false; } //transfer amount, it will take tax and charity fee _tokenTransfer(sender, recipient, amount, takeFee); } //to recieve ETH from uniswapV2Router when swaping receive() external payable {} /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `to` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); _balances[account] = accountBalance - amount; _totalSupply -= amount; emit Transfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be to transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} function _getTaxFee() public view returns (uint256) { return _taxFee; } function _getCharityFee() public view returns (uint256) { return _charityFee; } function _getOpFee() public view returns (uint256) { return _opFee; } function _getMaxTxAmount() private view returns (uint256) { return _maxTxAmount; } function _getETHBalance() public view returns (uint256 balance) { return address(this).balance; } function _setTaxFee(uint256 taxFee) external onlyOwner { require(taxFee >= 1 && taxFee <= 5, "taxFee should be in 1 - 5"); _taxFee = taxFee; } function _setCharityFee(uint256 charityFee) external onlyOwner { require( charityFee >= 1 && charityFee <= 5, "charityFee should be in 1 - 5" ); _charityFee = charityFee; } function _setOpFee(uint256 opFee) external onlyOwner { require(opFee >= 1 && opFee <= 3, "opFee should be in 1 - 3"); _opFee = opFee; } function _setCharityWallet(address payable charityWalletAddress) external onlyOwner { _charityWalletAddress = charityWalletAddress; } function _setOpWallet(address payable opWalletAddress) external onlyOwner { _opWalletAddress = opWalletAddress; } function _setMaxTxAmount(uint256 maxTxAmount) external onlyOwner { require( maxTxAmount >= 1000000000e18, "maxTxAmount should be greater than 1000000000e18" ); _maxTxAmount = maxTxAmount; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT 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 pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() 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; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @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 * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 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"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (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 functionCall(target, data, "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"); require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: value }(data); return _verifyCallResult(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) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(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) { require(isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { if (success) { return returndata; } else { // 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 // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
//SPDX-License-Identifier: Unlicense pragma solidity ^0.8.0; import "./IUniswapV2Router01.sol"; interface IUniswapV2Router02 is IUniswapV2Router01 { function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external returns (uint256 amountETH); function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint256 amountETH); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; }
//SPDX-License-Identifier: Unlicense pragma solidity ^0.8.0; interface IUniswapV2Factory { event PairCreated( address indexed token0, address indexed token1, address pair, uint256 ); function feeTo() external view returns (address); function feeToSetter() external view returns (address); function getPair(address tokenA, address tokenB) external view returns (address pair); function allPairs(uint256) external view returns (address pair); function allPairsLength() external view returns (uint256); function createPair(address tokenA, address tokenB) external returns (address pair); function setFeeTo(address) external; function setFeeToSetter(address) external; }
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "./TreatsNFT.sol"; contract DogNFT is ERC721, Ownable { using Address for address; using Strings for uint256; using SafeMath for uint256; /********** DEV DEFINED ***********/ mapping(address => uint256) public boostFee; mapping(uint256 => uint256) public tokenEvolution; mapping(uint256 => uint256) public tokenEvolved; uint256 _totalBoosts; uint256 _totalBoosters; address[] public boosters; string _baseUri = "https://awoo.finance/snctry/json/dogs/"; TreatsNFT treatsNFT; constructor( TreatsNFT _treatsNft, string memory name, string memory symbol ) ERC721(name, symbol) { treatsNFT = _treatsNft; } function setTreatsNFT(TreatsNFT _treatsNft) external onlyOwner { treatsNFT = _treatsNft; } function setBaseURI(string memory _uri) external onlyOwner { _baseUri = _uri; } function contractURI() public pure returns (string memory) { return "https://awoo.finance/snctry/json/contractdog"; } function mint(address to, uint256 tokenId) external onlyOwner { _safeMint(to, tokenId); if (boostFee[to] == 0) { _totalBoosters = _totalBoosters.add(1); boosters.push(to); } boostFee[to] = boostFee[to].add(10); _totalBoosts = _totalBoosts.add(10); uint256 randomEvolution = uint256( keccak256(abi.encodePacked(block.difficulty, block.timestamp)) ).mod(100) .add(10) .div(10) .mul(10); tokenEvolution[tokenId] = randomEvolution; } function getRedistFeeOf(address _holder) public view returns (uint256) { return boostFee[_holder]; } function totalBoosts() public view returns (uint256) { return _totalBoosts; } function totalBoosters() public view returns (uint256) { return _totalBoosters; } function feedDog( uint256 tokenId, uint256 treatTokenId, uint256 amount ) external { require( tokenEvolved[tokenId] < tokenEvolution[tokenId], "Already Evolved" ); treatsNFT.burn(_msgSender(), treatTokenId, amount); tokenEvolved[tokenId] = tokenEvolved[tokenId].add( treatsNFT.evoPoint(treatTokenId).mul(amount) ); if (tokenEvolved[tokenId] >= tokenEvolution[tokenId]) { address boosterAddr = ownerOf(tokenId); uint256 extraBoost = tokenEvolution[tokenId].div(10); boostFee[boosterAddr] = boostFee[boosterAddr].add(extraBoost); _totalBoosts = _totalBoosts.add(extraBoost); } } /** * @dev Base URI for computing {tokenURI}. Empty by default, can be overriden * in child contracts. */ function _baseURI() internal view override returns (string memory) { return _baseUri; } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal override { if (from == address(0)) return; uint256 tokenBoost = 10; if (tokenEvolved[tokenId] > tokenEvolution[tokenId]) { tokenBoost = tokenBoost.add(tokenEvolution[tokenId].div(10)); } boostFee[from] = boostFee[from].sub(tokenBoost); if (boostFee[from] == 0) { for (uint256 i = 0; i < boosters.length; i = i.add(1)) { if (boosters[i] == from) { boosters[i] = boosters[boosters.length - 1]; boosters.pop(); _totalBoosters = _totalBoosters.sub(1); break; } } } boostFee[to] = boostFee[to].add(tokenBoost); if (boostFee[to] == tokenBoost) { boosters.push(to); _totalBoosters = _totalBoosters.add(1); } } }
//SPDX-License-Identifier: Unlicense pragma solidity ^0.8.0; interface IUniswapV2Router01 { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline ) external returns ( uint256 amountA, uint256 amountB, uint256 liquidity ); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); function removeLiquidity( address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline ) external returns (uint256 amountA, uint256 amountB); function removeLiquidityETH( address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external returns (uint256 amountToken, uint256 amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint256 amountA, uint256 amountB); function removeLiquidityETHWithPermit( address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint256 amountToken, uint256 amountETH); function swapExactTokensForTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external returns (uint256[] memory amounts); function swapTokensForExactTokens( uint256 amountOut, uint256 amountInMax, address[] calldata path, address to, uint256 deadline ) external returns (uint256[] memory amounts); function swapExactETHForTokens( uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external payable returns (uint256[] memory amounts); function swapTokensForExactETH( uint256 amountOut, uint256 amountInMax, address[] calldata path, address to, uint256 deadline ) external returns (uint256[] memory amounts); function swapExactTokensForETH( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external returns (uint256[] memory amounts); function swapETHForExactTokens( uint256 amountOut, address[] calldata path, address to, uint256 deadline ) external payable returns (uint256[] memory amounts); function quote( uint256 amountA, uint256 reserveA, uint256 reserveB ) external pure returns (uint256 amountB); function getAmountOut( uint256 amountIn, uint256 reserveIn, uint256 reserveOut ) external pure returns (uint256 amountOut); function getAmountIn( uint256 amountOut, uint256 reserveIn, uint256 reserveOut ) external pure returns (uint256 amountIn); function getAmountsOut(uint256 amountIn, address[] calldata path) external view returns (uint256[] memory amounts); function getAmountsIn(uint256 amountOut, address[] calldata path) external view returns (uint256[] memory amounts); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping (uint256 => address) private _owners; // Mapping owner address to token count mapping (address => uint256) private _balances; // Mapping from token ID to approved address mapping (uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping (address => mapping (address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor (string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ''; } /** * @dev Base URI for computing {tokenURI}. Empty by default, can be overriden * in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require(_msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { require(operator != _msgSender(), "ERC721: approve to caller"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom(address from, address to, uint256 tokenId) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer(address from, address to, uint256 tokenId, bytes memory _data) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint(address to, uint256 tokenId, bytes memory _data) internal virtual { _mint(to, tokenId); require(_checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer(address from, address to, uint256 tokenId) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory _data) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { // solhint-disable-next-line no-inline-assembly assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual { } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant alphabet = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = alphabet[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; contract TreatsNFT is ERC1155Burnable, Ownable { using Strings for uint256; string tokenUri = "https://awoo.finance/snctry/json/treats/"; mapping(uint256 => uint256) public evoPoint; function setTokenURI(string calldata _uri) public onlyOwner { tokenUri = _uri; } function contractURI() public pure returns (string memory) { return "https://awoo.finance/snctry/json/contracttreats"; } constructor() ERC1155("https://awoo.finance/snctry/json/treats/") { evoPoint[0] = 10; } /** * @dev See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for all token types. It relies * on the token type ID substituion mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the \{id\} substring with the * actual token type ID. */ function uri(uint256 _id) public view override returns (string memory) { return bytes(tokenUri).length > 0 ? string(abi.encodePacked(tokenUri, _id.toString())) : ""; } function mint( address account, uint256 id, uint256 amount, bytes memory data ) external onlyOwner { _mint(account, id, amount, data); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 tokenId) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data) external returns (bytes4); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../ERC1155.sol"; /** * @dev Extension of {ERC1155} that allows token holders to destroy both their * own tokens and those that they have been approved to use. * * _Available since v3.1._ */ abstract contract ERC1155Burnable is ERC1155 { function burn(address account, uint256 id, uint256 value) public virtual { require( account == _msgSender() || isApprovedForAll(account, _msgSender()), "ERC1155: caller is not owner nor approved" ); _burn(account, id, value); } function burnBatch(address account, uint256[] memory ids, uint256[] memory values) public virtual { require( account == _msgSender() || isApprovedForAll(account, _msgSender()), "ERC1155: caller is not owner nor approved" ); _burnBatch(account, ids, values); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC1155.sol"; import "./IERC1155Receiver.sol"; import "./extensions/IERC1155MetadataURI.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of the basic standard multi-token. * See https://eips.ethereum.org/EIPS/eip-1155 * Originally based on code by Enjin: https://github.com/enjin/erc-1155 * * _Available since v3.1._ */ contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI { using Address for address; // Mapping from token ID to account balances mapping (uint256 => mapping(address => uint256)) private _balances; // Mapping from account to operator approvals mapping (address => mapping(address => bool)) private _operatorApprovals; // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json string private _uri; /** * @dev See {_setURI}. */ constructor (string memory uri_) { _setURI(uri_); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC1155).interfaceId || interfaceId == type(IERC1155MetadataURI).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256) public view virtual override returns (string memory) { return _uri; } /** * @dev See {IERC1155-balanceOf}. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) public view virtual override returns (uint256) { require(account != address(0), "ERC1155: balance query for the zero address"); return _balances[id][account]; } /** * @dev See {IERC1155-balanceOfBatch}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch( address[] memory accounts, uint256[] memory ids ) public view virtual override returns (uint256[] memory) { require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch"); uint256[] memory batchBalances = new uint256[](accounts.length); for (uint256 i = 0; i < accounts.length; ++i) { batchBalances[i] = balanceOf(accounts[i], ids[i]); } return batchBalances; } /** * @dev See {IERC1155-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { require(_msgSender() != operator, "ERC1155: setting approval status for self"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC1155-isApprovedForAll}. */ function isApprovedForAll(address account, address operator) public view virtual override returns (bool) { return _operatorApprovals[account][operator]; } /** * @dev See {IERC1155-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) public virtual override { require(to != address(0), "ERC1155: transfer to the zero address"); require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not owner nor approved" ); address operator = _msgSender(); _beforeTokenTransfer(operator, from, to, _asSingletonArray(id), _asSingletonArray(amount), data); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); _balances[id][from] = fromBalance - amount; _balances[id][to] += amount; emit TransferSingle(operator, from, to, id, amount); _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data); } /** * @dev See {IERC1155-safeBatchTransferFrom}. */ function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) public virtual override { require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); require(to != address(0), "ERC1155: transfer to the zero address"); require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: transfer caller is not owner nor approved" ); address operator = _msgSender(); _beforeTokenTransfer(operator, from, to, ids, amounts, data); for (uint256 i = 0; i < ids.length; ++i) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); _balances[id][from] = fromBalance - amount; _balances[id][to] += amount; } emit TransferBatch(operator, from, to, ids, amounts); _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data); } /** * @dev Sets a new URI for all token types, by relying on the token type ID * substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * By this mechanism, any occurrence of the `\{id\}` substring in either the * URI or any of the amounts in the JSON file at said URI will be replaced by * clients with the token type ID. * * For example, the `https://token-cdn-domain/\{id\}.json` URI would be * interpreted by clients as * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json` * for token type ID 0x4cce0. * * See {uri}. * * Because these URIs cannot be meaningfully represented by the {URI} event, * this function emits no events. */ function _setURI(string memory newuri) internal virtual { _uri = newuri; } /** * @dev Creates `amount` tokens of token type `id`, and assigns them to `account`. * * Emits a {TransferSingle} event. * * Requirements: * * - `account` cannot be the zero address. * - If `account` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mint(address account, uint256 id, uint256 amount, bytes memory data) internal virtual { require(account != address(0), "ERC1155: mint to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, address(0), account, _asSingletonArray(id), _asSingletonArray(amount), data); _balances[id][account] += amount; emit TransferSingle(operator, address(0), account, id, amount); _doSafeTransferAcceptanceCheck(operator, address(0), account, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _mintBatch(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); for (uint i = 0; i < ids.length; i++) { _balances[ids[i]][to] += amounts[i]; } emit TransferBatch(operator, address(0), to, ids, amounts); _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data); } /** * @dev Destroys `amount` tokens of token type `id` from `account` * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens of token type `id`. */ function _burn(address account, uint256 id, uint256 amount) internal virtual { require(account != address(0), "ERC1155: burn from the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, account, address(0), _asSingletonArray(id), _asSingletonArray(amount), ""); uint256 accountBalance = _balances[id][account]; require(accountBalance >= amount, "ERC1155: burn amount exceeds balance"); _balances[id][account] = accountBalance - amount; emit TransferSingle(operator, account, address(0), id, amount); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}. * * Requirements: * * - `ids` and `amounts` must have the same length. */ function _burnBatch(address account, uint256[] memory ids, uint256[] memory amounts) internal virtual { require(account != address(0), "ERC1155: burn from the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, account, address(0), ids, amounts, ""); for (uint i = 0; i < ids.length; i++) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 accountBalance = _balances[id][account]; require(accountBalance >= amount, "ERC1155: burn amount exceeds balance"); _balances[id][account] = accountBalance - amount; } emit TransferBatch(operator, account, address(0), ids, amounts); } /** * @dev Hook that is called before any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `id` and `amount` arrays will be 1. * * Calling conditions (for each `id` and `amount` pair): * * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens * of token type `id` will be transferred to `to`. * - When `from` is zero, `amount` tokens of token type `id` will be minted * for `to`. * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` * will be burned. * - `from` and `to` are never both zero. * - `ids` and `amounts` have the same, non-zero length. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { } function _doSafeTransferAcceptanceCheck( address operator, address from, address to, uint256 id, uint256 amount, bytes memory data ) private { if (to.isContract()) { try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) { if (response != IERC1155Receiver(to).onERC1155Received.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non ERC1155Receiver implementer"); } } } function _doSafeBatchTransferAcceptanceCheck( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) private { if (to.isContract()) { try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (bytes4 response) { if (response != IERC1155Receiver(to).onERC1155BatchReceived.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non ERC1155Receiver implementer"); } } } function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) { uint256[] memory array = new uint256[](1); array[0] = element; return array; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155 is IERC165 { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch(address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom(address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev _Available since v3.1._ */ interface IERC1155Receiver is IERC165 { /** @dev Handles the receipt of a single ERC1155 token type. This function is called at the end of a `safeTransferFrom` after the balance has been updated. To accept the transfer, this must return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` (i.e. 0xf23a6e61, or its own function selector). @param operator The address which initiated the transfer (i.e. msg.sender) @param from The address which previously owned the token @param id The ID of the token being transferred @param value The amount of tokens being transferred @param data Additional data with no specified format @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed */ function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external returns(bytes4); /** @dev Handles the receipt of a multiple ERC1155 token types. This function is called at the end of a `safeBatchTransferFrom` after the balances have been updated. To accept the transfer(s), this must return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` (i.e. 0xbc197c81, or its own function selector). @param operator The address which initiated the batch transfer (i.e. msg.sender) @param from The address which previously owned the token @param ids An array containing ids of each token being transferred (order and length must match values array) @param values An array containing amounts of each token being transferred (order and length must match ids array) @param data Additional data with no specified format @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed */ function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external returns(bytes4); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC1155.sol"; /** * @dev Interface of the optional ERC1155MetadataExtension interface, as defined * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP]. * * _Available since v3.1._ */ interface IERC1155MetadataURI is IERC1155 { /** * @dev Returns the URI for token type `id`. * * If the `\{id\}` substring is present in the URI, it must be replaced by * clients with the actual token type ID. */ function uri(uint256 id) external view returns (string memory); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address payable","name":"charityWalletAddress","type":"address"},{"internalType":"address payable","name":"opWalletAddress","type":"address"},{"internalType":"contract DogNFT","name":"_dogNFTAddr","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"minTokensBeforeSwap","type":"uint256"}],"name":"MinTokensBeforeSwapUpdated","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"enabled","type":"bool"}],"name":"SwapEnabledUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"_charityWalletAddress","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_getCharityFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_getETHBalance","outputs":[{"internalType":"uint256","name":"balance","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_getOpFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_getTaxFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_opWalletAddress","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"charityFee","type":"uint256"}],"name":"_setCharityFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"charityWalletAddress","type":"address"}],"name":"_setCharityWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"maxTxAmount","type":"uint256"}],"name":"_setMaxTxAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"opFee","type":"uint256"}],"name":"_setOpFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"opWalletAddress","type":"address"}],"name":"_setOpWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"taxFee","type":"uint256"}],"name":"_setTaxFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"calculatedSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isExcludedFromFee","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"manualSend","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"manualSwap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","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":"address","name":"account","type":"address"},{"internalType":"bool","name":"excluded","type":"bool"}],"name":"setExcludeFromFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"enabled","type":"bool"}],"name":"setSwapEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"swapEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"uniswapV2Pair","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"uniswapV2Router","outputs":[{"internalType":"contract IUniswapV2Router02","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
6b033b2e3c9fd0803ce8000000600355610100604052600c60c08190526b41574f4f2046696e616e636560a01b60e090815262000040916004919062000423565b506040805180820190915260048082526341574f4f60e01b60209092019182526200006e9160059162000423565b50600160088190556009819055600a819055600b819055600c819055600d556010805461ffff60a01b1916600160a81b1790556b033b2e3c9fd0803ce8000000601255690a968163f0a57b400000601355348015620000cc57600080fd5b5060405162002ae838038062002ae8833981016040819052620000ef91620004ef565b6000620000fb62000410565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600e80546001600160a01b038086166001600160a01b031992831617909255600f805492851692909116919091179055600354600160006200018662000410565b6001600160a01b031681526020808201929092526040908101600020929092556001601155815163c45a015560e01b81529151737a250d5630b4cf539739df2c5dacb4c659f2488d92839263c45a015592600480840193829003018186803b158015620001f257600080fd5b505afa15801562000207573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200022d9190620004c9565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156200027657600080fd5b505afa1580156200028b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002b19190620004c9565b6040518363ffffffff1660e01b8152600401620002d092919062000542565b602060405180830381600087803b158015620002eb57600080fd5b505af115801562000300573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620003269190620004c9565b6001600160601b0319606091821b811660a0529082901b166080526001600660006200035162000414565b6001600160a01b03908116825260208083019390935260409182016000908120805495151560ff19968716179055308152600690935291208054909216600117909155601080549184166001600160a01b0319909216919091179055620003b762000410565b6001600160a01b031660006001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600354604051620003fe91906200055c565b60405180910390a350505050620005bb565b3390565b6000546001600160a01b031690565b828054620004319062000565565b90600052602060002090601f016020900481019282620004555760008555620004a0565b82601f106200047057805160ff1916838001178555620004a0565b82800160010185558215620004a0579182015b82811115620004a057825182559160200191906001019062000483565b50620004ae929150620004b2565b5090565b5b80821115620004ae5760008155600101620004b3565b600060208284031215620004db578081fd5b8151620004e881620005a2565b9392505050565b60008060006060848603121562000504578182fd5b83516200051181620005a2565b60208501519093506200052481620005a2565b60408501519092506200053781620005a2565b809150509250925092565b6001600160a01b0392831681529116602082015260400190565b90815260200190565b6002810460018216806200057a57607f821691505b602082108114156200059c57634e487b7160e01b600052602260045260246000fd5b50919050565b6001600160a01b0381168114620005b857600080fd5b50565b60805160601c60a05160601c6124d062000618600039600081816107ed01528181610b7f01528181610d95015281816114a301526115870152600081816106ab015281816116870152818161175d015261179901526124d06000f3fe6080604052600436106102085760003560e01c80635f18c69111610118578063a5181e87116100a0578063dd62ed3e1161006f578063dd62ed3e14610570578063e01af92c14610590578063f2fde38b146105b0578063f4293890146105d0578063f815a842146105e55761020f565b8063a5181e87146104fb578063a9059cbb14610510578063af9549e014610530578063d047e4b7146105505761020f565b806376d4ab99116100e757806376d4ab991461047c5780638da5cb5b1461049157806395d89b41146104a6578063a24a8d0f146104bb578063a457c2d7146104db5761020f565b80635f18c691146104125780636ddd17131461043257806370a0823114610447578063715018a6146104675761020f565b8063313ce5671161019b5780634ecee6791161016a5780634ecee6791461038857806351bc3c851461039d578063532b5ec4146103b25780635342acb4146103d25780635880b873146103f25761020f565b8063313ce5671461031c578063395093511461033e57806340a3d1431461035e57806349bd5a5e146103735761020f565b80631bbae6e0116101d75780631bbae6e0146102b057806323b872dd146102d257806324c03457146102f25780632fbff030146103075761020f565b806306fdde0314610214578063095ea7b31461023f5780631694505e1461026c57806318160ddd1461028e5761020f565b3661020f57005b600080fd5b34801561022057600080fd5b506102296105fa565b6040516102369190611f0b565b60405180910390f35b34801561024b57600080fd5b5061025f61025a366004611e77565b61068c565b6040516102369190611f00565b34801561027857600080fd5b506102816106a9565b6040516102369190611eec565b34801561029a57600080fd5b506102a36106cd565b604051610236919061233f565b3480156102bc57600080fd5b506102d06102cb366004611ebc565b6106d3565b005b3480156102de57600080fd5b5061025f6102ed366004611e03565b61074c565b3480156102fe57600080fd5b506102a36107e3565b34801561031357600080fd5b506102a3610b1d565b34801561032857600080fd5b50610331610b23565b60405161023691906123b8565b34801561034a57600080fd5b5061025f610359366004611e77565b610b28565b34801561036a57600080fd5b506102a3610b77565b34801561037f57600080fd5b50610281610b7d565b34801561039457600080fd5b50610281610ba1565b3480156103a957600080fd5b506102d0610bb0565b3480156103be57600080fd5b506102d06103cd366004611d93565b610c08565b3480156103de57600080fd5b5061025f6103ed366004611d93565b610c69565b3480156103fe57600080fd5b506102d061040d366004611ebc565b610c8b565b34801561041e57600080fd5b506102d061042d366004611ebc565b610cfd565b34801561043e57600080fd5b5061025f610d6f565b34801561045357600080fd5b506102a3610462366004611d93565b610d7f565b34801561047357600080fd5b506102d0610e3f565b34801561048857600080fd5b50610281610ec8565b34801561049d57600080fd5b50610281610ed7565b3480156104b257600080fd5b50610229610ee6565b3480156104c757600080fd5b506102d06104d6366004611ebc565b610ef5565b3480156104e757600080fd5b5061025f6104f6366004611e77565b610f67565b34801561050757600080fd5b506102a3610fe2565b34801561051c57600080fd5b5061025f61052b366004611e77565b610fe8565b34801561053c57600080fd5b506102d061054b366004611e43565b610ffc565b34801561055c57600080fd5b506102d061056b366004611d93565b611066565b34801561057c57600080fd5b506102a361058b366004611dcb565b6110c7565b34801561059c57600080fd5b506102d06105ab366004611ea2565b6110f2565b3480156105bc57600080fd5b506102d06105cb366004611d93565b61114f565b3480156105dc57600080fd5b506102d061120f565b3480156105f157600080fd5b506102a36112af565b60606004805461060990612434565b80601f016020809104026020016040519081016040528092919081815260200182805461063590612434565b80156106825780601f1061065757610100808354040283529160200191610682565b820191906000526020600020905b81548152906001019060200180831161066557829003601f168201915b5050505050905090565b60006106a06106996112b3565b84846112b7565b50600192915050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60035490565b6106db6112b3565b6001600160a01b03166106ec610ed7565b6001600160a01b03161461071b5760405162461bcd60e51b8152600401610712906120f3565b60405180910390fd5b6b033b2e3c9fd0803ce80000008110156107475760405162461bcd60e51b8152600401610712906121b6565b601255565b600061075984848461136b565b6001600160a01b03841660009081526002602052604081208161077a6112b3565b6001600160a01b03166001600160a01b03168152602001908152602001600020549050828110156107bd5760405162461bcd60e51b8152600401610712906120ab565b6107d8856107c96112b3565b6107d3868561241d565b6112b7565b506001949350505050565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166000908152600160205260408082205430835290822054600754600354849361084393909261083d9283916115d8565b906115d8565b90506000805b601060009054906101000a90046001600160a01b03166001600160a01b031663d0e0f3936040518163ffffffff1660e01b815260040160206040518083038186803b15801561089757600080fd5b505afa1580156108ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108cf9190611ed4565b811015610a5757601054604051633866915760e11b81526000916001600160a01b0316906370cd22ae9061090790859060040161233f565b60206040518083038186803b15801561091f57600080fd5b505afa158015610933573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109579190611daf565b6001600160a01b03811660009081526001602052604090205490915061097e9085906115d8565b6001600160a01b038083166000908152600160205260409081902054601054915163c270d5ef60e01b8152939750610a4193610a3a93606493610a34939291169063c270d5ef906109d3908990600401611eec565b60206040518083038186803b1580156109eb57600080fd5b505afa1580156109ff573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a239190611ed4565b610a2e9060646123c6565b906115eb565b906115f7565b8490611603565b9250610a509050816001611603565b9050610849565b50610b16610b0f6064610a34610afd620f4240610a34601154610a34620f4240601060009054906101000a90046001600160a01b03166001600160a01b031663d66e54e16040518163ffffffff1660e01b815260040160206040518083038186803b158015610ac557600080fd5b505afa158015610ad9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2e9190611ed4565b610b0890606461241d565b86906115eb565b8290611603565b9250505090565b60085490565b601290565b60006106a0610b356112b3565b848460026000610b436112b3565b6001600160a01b03908116825260208083019390935260409182016000908120918b16815292529020546107d391906123c6565b60095490565b7f000000000000000000000000000000000000000000000000000000000000000081565b600f546001600160a01b031681565b610bb86112b3565b6001600160a01b0316610bc9610ed7565b6001600160a01b031614610bef5760405162461bcd60e51b8152600401610712906120f3565b6000610bfa30610d7f565b9050610c058161160f565b50565b610c106112b3565b6001600160a01b0316610c21610ed7565b6001600160a01b031614610c475760405162461bcd60e51b8152600401610712906120f3565b600f80546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03811660009081526006602052604090205460ff165b919050565b610c936112b3565b6001600160a01b0316610ca4610ed7565b6001600160a01b031614610cca5760405162461bcd60e51b8152600401610712906120f3565b60018110158015610cdc575060058111155b610cf85760405162461bcd60e51b81526004016107129061224a565b600855565b610d056112b3565b6001600160a01b0316610d16610ed7565b6001600160a01b031614610d3c5760405162461bcd60e51b8152600401610712906120f3565b60018110158015610d4e575060038111155b610d6a5760405162461bcd60e51b815260040161071290612281565b600a55565b601054600160a81b900460ff1681565b60006001600160a01b038216301480610dc957507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316145b15610ded57506001600160a01b038116600090815260016020526040902054610c86565b6001600160a01b03821660009081526001602052604081205490610e11848361181a565b6001600160a01b038516600090815260016020526040902054909150610e379082611603565b949350505050565b610e476112b3565b6001600160a01b0316610e58610ed7565b6001600160a01b031614610e7e5760405162461bcd60e51b8152600401610712906120f3565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b600e546001600160a01b031681565b6000546001600160a01b031690565b60606005805461060990612434565b610efd6112b3565b6001600160a01b0316610f0e610ed7565b6001600160a01b031614610f345760405162461bcd60e51b8152600401610712906120f3565b60018110158015610f46575060058111155b610f625760405162461bcd60e51b81526004016107129061202c565b600955565b60008060026000610f766112b3565b6001600160a01b0390811682526020808301939093526040918201600090812091881681529252902054905082811015610fc25760405162461bcd60e51b8152600401610712906122b8565b610fd8610fcd6112b3565b856107d3868561241d565b5060019392505050565b600a5490565b60006106a0610ff56112b3565b848461136b565b6110046112b3565b6001600160a01b0316611015610ed7565b6001600160a01b03161461103b5760405162461bcd60e51b8152600401610712906120f3565b6001600160a01b03919091166000908152600660205260409020805460ff1916911515919091179055565b61106e6112b3565b6001600160a01b031661107f610ed7565b6001600160a01b0316146110a55760405162461bcd60e51b8152600401610712906120f3565b600e80546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6110fa6112b3565b6001600160a01b031661110b610ed7565b6001600160a01b0316146111315760405162461bcd60e51b8152600401610712906120f3565b60108054911515600160a81b0260ff60a81b19909216919091179055565b6111576112b3565b6001600160a01b0316611168610ed7565b6001600160a01b03161461118e5760405162461bcd60e51b8152600401610712906120f3565b6001600160a01b0381166111b45760405162461bcd60e51b815260040161071290611f5e565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6112176112b3565b6001600160a01b0316611228610ed7565b6001600160a01b03161461124e5760405162461bcd60e51b8152600401610712906120f3565b478015610c05576000600a5460095461126791906123c6565b905061128a61128582610a34600954866115eb90919063ffffffff16565b6119bf565b6112ab6112a682610a34600a54866115eb90919063ffffffff16565b6119f9565b5050565b4790565b3390565b6001600160a01b0383166112dd5760405162461bcd60e51b815260040161071290612206565b6001600160a01b0382166113035760405162461bcd60e51b815260040161071290611fa4565b6001600160a01b0380841660008181526002602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259061135e90859061233f565b60405180910390a3505050565b6001600160a01b0383166113915760405162461bcd60e51b815260040161071290612171565b6001600160a01b0382166113b75760405162461bcd60e51b8152600401610712906122fd565b600081116113d75760405162461bcd60e51b815260040161071290612128565b6113e2838383611a33565b6113ea610ed7565b6001600160a01b0316836001600160a01b031614158015611424575061140e610ed7565b6001600160a01b0316826001600160a01b031614155b1561144b5760125481111561144b5760405162461bcd60e51b815260040161071290612063565b600061145630610d7f565b9050601254811061146657506012545b6013546010549082101590600160a01b900460ff161580156114915750601054600160a81b900460ff165b801561149a5750805b80156114d857507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316856001600160a01b031614155b1561153d576114e68261160f565b47801561153b576000600a546009546114ff91906123c6565b905061151d61128582610a34600954866115eb90919063ffffffff16565b6115396112a682610a34600a54866115eb90919063ffffffff16565b505b505b6001600160a01b03851660009081526006602052604090205460019060ff168061157f57506001600160a01b03851660009081526006602052604090205460ff165b806115bb57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316856001600160a01b0316145b156115c4575060005b6115d086868684611a38565b505050505050565b60006115e4828461241d565b9392505050565b60006115e482846123fe565b60006115e482846123de565b60006115e482846123c6565b6010805460ff60a01b1916600160a01b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061166557634e487b7160e01b600052603260045260246000fd5b60200260200101906001600160a01b031690816001600160a01b0316815250507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156116de57600080fd5b505afa1580156116f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117169190611daf565b8160018151811061173757634e487b7160e01b600052603260045260246000fd5b60200260200101906001600160a01b031690816001600160a01b031681525050611782307f0000000000000000000000000000000000000000000000000000000000000000846112b7565b60405163791ac94760e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063791ac947906117d7908590600090869030904290600401612348565b600060405180830381600087803b1580156117f157600080fd5b505af1158015611805573d6000803e3d6000fd5b50506010805460ff60a01b1916905550505050565b6000806118256107e3565b60105460405163907fca0b60e01b815291925060009182916001600160a01b03169063907fca0b9061185b908990600401611eec565b60206040518083038186803b15801561187357600080fd5b505afa158015611887573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118ab9190611ed4565b11156119175760105460405163907fca0b60e01b815261190291620f4240916001600160a01b039091169063907fca0b906118ea908a90600401611eec565b60206040518083038186803b158015610ac557600080fd5b611910906305f5e1006123c6565b9050611983565b611972601154610a34620f4240601060009054906101000a90046001600160a01b03166001600160a01b031663d66e54e16040518163ffffffff1660e01b815260040160206040518083038186803b158015610ac557600080fd5b611980906305f5e10061241d565b90505b6119b6620f4240610a3484610a34600754610a2e620f4240610a2e6305f5e100610a348b8f6115eb90919063ffffffff16565b95945050505050565b600e546040516001600160a01b039091169082156108fc029083906000818181858888f193505050501580156112ab573d6000803e3d6000fd5b600f546040516001600160a01b039091169082156108fc029083906000818181858888f193505050501580156112ab573d6000803e3d6000fd5b505050565b80611a4557611a45611cc2565b6000611a5085610d7f565b6001600160a01b03861660009081526001602052604090205490915083821015611a8c5760405162461bcd60e51b815260040161071290611fe6565b80841115611ad2576000611aa085836115d8565b6001600160a01b038816600090815260016020526040812055600754909150611ac990826115d8565b60075550611b0f565b6001600160a01b038616600090815260016020526040902054611af590856115d8565b6001600160a01b0387166000908152600160205260409020555b600080600080611b2788600854600954600a54611d0b565b6001600160a01b038e1660009081526001602052604090205493975091955093509150611b6057601154611b5c9060016115d8565b6011555b600084118015611b8657506001600160a01b038916600090815260016020526040902054155b15611b9d57601154611b99906001611603565b6011555b6001600160a01b03891660009081526001602052604081208054869290611bc59084906123c6565b909155505030600090815260016020526040902054611bf0908290611bea9085611603565b90611603565b30600090815260016020526040902055600754611c0d9084611603565b600781905550886001600160a01b03168a6001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef86604051611c56919061233f565b60405180910390a3306001600160a01b038b167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef611c948585611603565b604051611ca1919061233f565b60405180910390a386611cb657611cb6611d6f565b50505050505050505050565b600854158015611cd25750600954155b8015611cde5750600a54155b15611ce857611d09565b60088054600b5560098054600c55600a8054600d5560009283905590829055555b565b60008080808781611d216064610a34848c6115eb565b90506000611d346064610a34858c6115eb565b90506000611d476064610a34868c6115eb565b90506000611d5b8261083d858189896115d8565b9d939c50919a509850909650505050505050565b600b54600855600c54600955600d54600a55565b80358015158114610c8657600080fd5b600060208284031215611da4578081fd5b81356115e481612485565b600060208284031215611dc0578081fd5b81516115e481612485565b60008060408385031215611ddd578081fd5b8235611de881612485565b91506020830135611df881612485565b809150509250929050565b600080600060608486031215611e17578081fd5b8335611e2281612485565b92506020840135611e3281612485565b929592945050506040919091013590565b60008060408385031215611e55578182fd5b8235611e6081612485565b9150611e6e60208401611d83565b90509250929050565b60008060408385031215611e89578182fd5b8235611e9481612485565b946020939093013593505050565b600060208284031215611eb3578081fd5b6115e482611d83565b600060208284031215611ecd578081fd5b5035919050565b600060208284031215611ee5578081fd5b5051919050565b6001600160a01b0391909116815260200190565b901515815260200190565b6000602080835283518082850152825b81811015611f3757858101830151858201604001528201611f1b565b81811115611f485783604083870101525b50601f01601f1916929092016040019392505050565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b60208082526022908201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604082015261737360f01b606082015260800190565b60208082526026908201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604082015265616c616e636560d01b606082015260800190565b6020808252601d908201527f636861726974794665652073686f756c6420626520696e2031202d2035000000604082015260600190565b60208082526028908201527f5472616e7366657220616d6f756e74206578636565647320746865206d6178546040820152673c20b6b7bab73a1760c11b606082015260800190565b60208082526028908201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616040820152676c6c6f77616e636560c01b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526029908201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206040820152687468616e207a65726f60b81b606082015260800190565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526030908201527f6d61785478416d6f756e742073686f756c64206265206772656174657220746860408201526f0c2dc4062606060606060606060ca62760831b606082015260800190565b60208082526024908201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646040820152637265737360e01b606082015260800190565b60208082526019908201527f7461784665652073686f756c6420626520696e2031202d203500000000000000604082015260600190565b60208082526018908201527f6f704665652073686f756c6420626520696e2031202d20330000000000000000604082015260600190565b60208082526025908201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604082015264207a65726f60d81b606082015260800190565b60208082526022908201527f45524332303a207472616e7366657220746f207465207a65726f206164647265604082015261737360f01b606082015260800190565b90815260200190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b818110156123975784516001600160a01b031683529383019391830191600101612372565b50506001600160a01b03969096166060850152505050608001529392505050565b60ff91909116815260200190565b600082198211156123d9576123d961246f565b500190565b6000826123f957634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156124185761241861246f565b500290565b60008282101561242f5761242f61246f565b500390565b60028104600182168061244857607f821691505b6020821081141561246957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b0381168114610c0557600080fdfea2646970667358221220c4d8192410cdb7d790f80ccb0858c52b25d100ec6ef182716189ba8b23e9443064736f6c634300080000330000000000000000000000004beeeb8cba96a3bf97031f180f67bc908effde110000000000000000000000008fecb5b87dacde1905a24d43200cefda43804d9200000000000000000000000081dd9c8a758ed5bb111eaf5cc4f45c3ace576129
Deployed Bytecode
0x6080604052600436106102085760003560e01c80635f18c69111610118578063a5181e87116100a0578063dd62ed3e1161006f578063dd62ed3e14610570578063e01af92c14610590578063f2fde38b146105b0578063f4293890146105d0578063f815a842146105e55761020f565b8063a5181e87146104fb578063a9059cbb14610510578063af9549e014610530578063d047e4b7146105505761020f565b806376d4ab99116100e757806376d4ab991461047c5780638da5cb5b1461049157806395d89b41146104a6578063a24a8d0f146104bb578063a457c2d7146104db5761020f565b80635f18c691146104125780636ddd17131461043257806370a0823114610447578063715018a6146104675761020f565b8063313ce5671161019b5780634ecee6791161016a5780634ecee6791461038857806351bc3c851461039d578063532b5ec4146103b25780635342acb4146103d25780635880b873146103f25761020f565b8063313ce5671461031c578063395093511461033e57806340a3d1431461035e57806349bd5a5e146103735761020f565b80631bbae6e0116101d75780631bbae6e0146102b057806323b872dd146102d257806324c03457146102f25780632fbff030146103075761020f565b806306fdde0314610214578063095ea7b31461023f5780631694505e1461026c57806318160ddd1461028e5761020f565b3661020f57005b600080fd5b34801561022057600080fd5b506102296105fa565b6040516102369190611f0b565b60405180910390f35b34801561024b57600080fd5b5061025f61025a366004611e77565b61068c565b6040516102369190611f00565b34801561027857600080fd5b506102816106a9565b6040516102369190611eec565b34801561029a57600080fd5b506102a36106cd565b604051610236919061233f565b3480156102bc57600080fd5b506102d06102cb366004611ebc565b6106d3565b005b3480156102de57600080fd5b5061025f6102ed366004611e03565b61074c565b3480156102fe57600080fd5b506102a36107e3565b34801561031357600080fd5b506102a3610b1d565b34801561032857600080fd5b50610331610b23565b60405161023691906123b8565b34801561034a57600080fd5b5061025f610359366004611e77565b610b28565b34801561036a57600080fd5b506102a3610b77565b34801561037f57600080fd5b50610281610b7d565b34801561039457600080fd5b50610281610ba1565b3480156103a957600080fd5b506102d0610bb0565b3480156103be57600080fd5b506102d06103cd366004611d93565b610c08565b3480156103de57600080fd5b5061025f6103ed366004611d93565b610c69565b3480156103fe57600080fd5b506102d061040d366004611ebc565b610c8b565b34801561041e57600080fd5b506102d061042d366004611ebc565b610cfd565b34801561043e57600080fd5b5061025f610d6f565b34801561045357600080fd5b506102a3610462366004611d93565b610d7f565b34801561047357600080fd5b506102d0610e3f565b34801561048857600080fd5b50610281610ec8565b34801561049d57600080fd5b50610281610ed7565b3480156104b257600080fd5b50610229610ee6565b3480156104c757600080fd5b506102d06104d6366004611ebc565b610ef5565b3480156104e757600080fd5b5061025f6104f6366004611e77565b610f67565b34801561050757600080fd5b506102a3610fe2565b34801561051c57600080fd5b5061025f61052b366004611e77565b610fe8565b34801561053c57600080fd5b506102d061054b366004611e43565b610ffc565b34801561055c57600080fd5b506102d061056b366004611d93565b611066565b34801561057c57600080fd5b506102a361058b366004611dcb565b6110c7565b34801561059c57600080fd5b506102d06105ab366004611ea2565b6110f2565b3480156105bc57600080fd5b506102d06105cb366004611d93565b61114f565b3480156105dc57600080fd5b506102d061120f565b3480156105f157600080fd5b506102a36112af565b60606004805461060990612434565b80601f016020809104026020016040519081016040528092919081815260200182805461063590612434565b80156106825780601f1061065757610100808354040283529160200191610682565b820191906000526020600020905b81548152906001019060200180831161066557829003601f168201915b5050505050905090565b60006106a06106996112b3565b84846112b7565b50600192915050565b7f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d81565b60035490565b6106db6112b3565b6001600160a01b03166106ec610ed7565b6001600160a01b03161461071b5760405162461bcd60e51b8152600401610712906120f3565b60405180910390fd5b6b033b2e3c9fd0803ce80000008110156107475760405162461bcd60e51b8152600401610712906121b6565b601255565b600061075984848461136b565b6001600160a01b03841660009081526002602052604081208161077a6112b3565b6001600160a01b03166001600160a01b03168152602001908152602001600020549050828110156107bd5760405162461bcd60e51b8152600401610712906120ab565b6107d8856107c96112b3565b6107d3868561241d565b6112b7565b506001949350505050565b6001600160a01b037f000000000000000000000000ff8adbcf49264adca2ad6bdd323eae1f7b040089166000908152600160205260408082205430835290822054600754600354849361084393909261083d9283916115d8565b906115d8565b90506000805b601060009054906101000a90046001600160a01b03166001600160a01b031663d0e0f3936040518163ffffffff1660e01b815260040160206040518083038186803b15801561089757600080fd5b505afa1580156108ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108cf9190611ed4565b811015610a5757601054604051633866915760e11b81526000916001600160a01b0316906370cd22ae9061090790859060040161233f565b60206040518083038186803b15801561091f57600080fd5b505afa158015610933573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109579190611daf565b6001600160a01b03811660009081526001602052604090205490915061097e9085906115d8565b6001600160a01b038083166000908152600160205260409081902054601054915163c270d5ef60e01b8152939750610a4193610a3a93606493610a34939291169063c270d5ef906109d3908990600401611eec565b60206040518083038186803b1580156109eb57600080fd5b505afa1580156109ff573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a239190611ed4565b610a2e9060646123c6565b906115eb565b906115f7565b8490611603565b9250610a509050816001611603565b9050610849565b50610b16610b0f6064610a34610afd620f4240610a34601154610a34620f4240601060009054906101000a90046001600160a01b03166001600160a01b031663d66e54e16040518163ffffffff1660e01b815260040160206040518083038186803b158015610ac557600080fd5b505afa158015610ad9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2e9190611ed4565b610b0890606461241d565b86906115eb565b8290611603565b9250505090565b60085490565b601290565b60006106a0610b356112b3565b848460026000610b436112b3565b6001600160a01b03908116825260208083019390935260409182016000908120918b16815292529020546107d391906123c6565b60095490565b7f000000000000000000000000ff8adbcf49264adca2ad6bdd323eae1f7b04008981565b600f546001600160a01b031681565b610bb86112b3565b6001600160a01b0316610bc9610ed7565b6001600160a01b031614610bef5760405162461bcd60e51b8152600401610712906120f3565b6000610bfa30610d7f565b9050610c058161160f565b50565b610c106112b3565b6001600160a01b0316610c21610ed7565b6001600160a01b031614610c475760405162461bcd60e51b8152600401610712906120f3565b600f80546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03811660009081526006602052604090205460ff165b919050565b610c936112b3565b6001600160a01b0316610ca4610ed7565b6001600160a01b031614610cca5760405162461bcd60e51b8152600401610712906120f3565b60018110158015610cdc575060058111155b610cf85760405162461bcd60e51b81526004016107129061224a565b600855565b610d056112b3565b6001600160a01b0316610d16610ed7565b6001600160a01b031614610d3c5760405162461bcd60e51b8152600401610712906120f3565b60018110158015610d4e575060038111155b610d6a5760405162461bcd60e51b815260040161071290612281565b600a55565b601054600160a81b900460ff1681565b60006001600160a01b038216301480610dc957507f000000000000000000000000ff8adbcf49264adca2ad6bdd323eae1f7b0400896001600160a01b0316826001600160a01b0316145b15610ded57506001600160a01b038116600090815260016020526040902054610c86565b6001600160a01b03821660009081526001602052604081205490610e11848361181a565b6001600160a01b038516600090815260016020526040902054909150610e379082611603565b949350505050565b610e476112b3565b6001600160a01b0316610e58610ed7565b6001600160a01b031614610e7e5760405162461bcd60e51b8152600401610712906120f3565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b600e546001600160a01b031681565b6000546001600160a01b031690565b60606005805461060990612434565b610efd6112b3565b6001600160a01b0316610f0e610ed7565b6001600160a01b031614610f345760405162461bcd60e51b8152600401610712906120f3565b60018110158015610f46575060058111155b610f625760405162461bcd60e51b81526004016107129061202c565b600955565b60008060026000610f766112b3565b6001600160a01b0390811682526020808301939093526040918201600090812091881681529252902054905082811015610fc25760405162461bcd60e51b8152600401610712906122b8565b610fd8610fcd6112b3565b856107d3868561241d565b5060019392505050565b600a5490565b60006106a0610ff56112b3565b848461136b565b6110046112b3565b6001600160a01b0316611015610ed7565b6001600160a01b03161461103b5760405162461bcd60e51b8152600401610712906120f3565b6001600160a01b03919091166000908152600660205260409020805460ff1916911515919091179055565b61106e6112b3565b6001600160a01b031661107f610ed7565b6001600160a01b0316146110a55760405162461bcd60e51b8152600401610712906120f3565b600e80546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6110fa6112b3565b6001600160a01b031661110b610ed7565b6001600160a01b0316146111315760405162461bcd60e51b8152600401610712906120f3565b60108054911515600160a81b0260ff60a81b19909216919091179055565b6111576112b3565b6001600160a01b0316611168610ed7565b6001600160a01b03161461118e5760405162461bcd60e51b8152600401610712906120f3565b6001600160a01b0381166111b45760405162461bcd60e51b815260040161071290611f5e565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6112176112b3565b6001600160a01b0316611228610ed7565b6001600160a01b03161461124e5760405162461bcd60e51b8152600401610712906120f3565b478015610c05576000600a5460095461126791906123c6565b905061128a61128582610a34600954866115eb90919063ffffffff16565b6119bf565b6112ab6112a682610a34600a54866115eb90919063ffffffff16565b6119f9565b5050565b4790565b3390565b6001600160a01b0383166112dd5760405162461bcd60e51b815260040161071290612206565b6001600160a01b0382166113035760405162461bcd60e51b815260040161071290611fa4565b6001600160a01b0380841660008181526002602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259061135e90859061233f565b60405180910390a3505050565b6001600160a01b0383166113915760405162461bcd60e51b815260040161071290612171565b6001600160a01b0382166113b75760405162461bcd60e51b8152600401610712906122fd565b600081116113d75760405162461bcd60e51b815260040161071290612128565b6113e2838383611a33565b6113ea610ed7565b6001600160a01b0316836001600160a01b031614158015611424575061140e610ed7565b6001600160a01b0316826001600160a01b031614155b1561144b5760125481111561144b5760405162461bcd60e51b815260040161071290612063565b600061145630610d7f565b9050601254811061146657506012545b6013546010549082101590600160a01b900460ff161580156114915750601054600160a81b900460ff165b801561149a5750805b80156114d857507f000000000000000000000000ff8adbcf49264adca2ad6bdd323eae1f7b0400896001600160a01b0316856001600160a01b031614155b1561153d576114e68261160f565b47801561153b576000600a546009546114ff91906123c6565b905061151d61128582610a34600954866115eb90919063ffffffff16565b6115396112a682610a34600a54866115eb90919063ffffffff16565b505b505b6001600160a01b03851660009081526006602052604090205460019060ff168061157f57506001600160a01b03851660009081526006602052604090205460ff165b806115bb57507f000000000000000000000000ff8adbcf49264adca2ad6bdd323eae1f7b0400896001600160a01b0316856001600160a01b0316145b156115c4575060005b6115d086868684611a38565b505050505050565b60006115e4828461241d565b9392505050565b60006115e482846123fe565b60006115e482846123de565b60006115e482846123c6565b6010805460ff60a01b1916600160a01b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061166557634e487b7160e01b600052603260045260246000fd5b60200260200101906001600160a01b031690816001600160a01b0316815250507f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156116de57600080fd5b505afa1580156116f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117169190611daf565b8160018151811061173757634e487b7160e01b600052603260045260246000fd5b60200260200101906001600160a01b031690816001600160a01b031681525050611782307f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d846112b7565b60405163791ac94760e01b81526001600160a01b037f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d169063791ac947906117d7908590600090869030904290600401612348565b600060405180830381600087803b1580156117f157600080fd5b505af1158015611805573d6000803e3d6000fd5b50506010805460ff60a01b1916905550505050565b6000806118256107e3565b60105460405163907fca0b60e01b815291925060009182916001600160a01b03169063907fca0b9061185b908990600401611eec565b60206040518083038186803b15801561187357600080fd5b505afa158015611887573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118ab9190611ed4565b11156119175760105460405163907fca0b60e01b815261190291620f4240916001600160a01b039091169063907fca0b906118ea908a90600401611eec565b60206040518083038186803b158015610ac557600080fd5b611910906305f5e1006123c6565b9050611983565b611972601154610a34620f4240601060009054906101000a90046001600160a01b03166001600160a01b031663d66e54e16040518163ffffffff1660e01b815260040160206040518083038186803b158015610ac557600080fd5b611980906305f5e10061241d565b90505b6119b6620f4240610a3484610a34600754610a2e620f4240610a2e6305f5e100610a348b8f6115eb90919063ffffffff16565b95945050505050565b600e546040516001600160a01b039091169082156108fc029083906000818181858888f193505050501580156112ab573d6000803e3d6000fd5b600f546040516001600160a01b039091169082156108fc029083906000818181858888f193505050501580156112ab573d6000803e3d6000fd5b505050565b80611a4557611a45611cc2565b6000611a5085610d7f565b6001600160a01b03861660009081526001602052604090205490915083821015611a8c5760405162461bcd60e51b815260040161071290611fe6565b80841115611ad2576000611aa085836115d8565b6001600160a01b038816600090815260016020526040812055600754909150611ac990826115d8565b60075550611b0f565b6001600160a01b038616600090815260016020526040902054611af590856115d8565b6001600160a01b0387166000908152600160205260409020555b600080600080611b2788600854600954600a54611d0b565b6001600160a01b038e1660009081526001602052604090205493975091955093509150611b6057601154611b5c9060016115d8565b6011555b600084118015611b8657506001600160a01b038916600090815260016020526040902054155b15611b9d57601154611b99906001611603565b6011555b6001600160a01b03891660009081526001602052604081208054869290611bc59084906123c6565b909155505030600090815260016020526040902054611bf0908290611bea9085611603565b90611603565b30600090815260016020526040902055600754611c0d9084611603565b600781905550886001600160a01b03168a6001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef86604051611c56919061233f565b60405180910390a3306001600160a01b038b167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef611c948585611603565b604051611ca1919061233f565b60405180910390a386611cb657611cb6611d6f565b50505050505050505050565b600854158015611cd25750600954155b8015611cde5750600a54155b15611ce857611d09565b60088054600b5560098054600c55600a8054600d5560009283905590829055555b565b60008080808781611d216064610a34848c6115eb565b90506000611d346064610a34858c6115eb565b90506000611d476064610a34868c6115eb565b90506000611d5b8261083d858189896115d8565b9d939c50919a509850909650505050505050565b600b54600855600c54600955600d54600a55565b80358015158114610c8657600080fd5b600060208284031215611da4578081fd5b81356115e481612485565b600060208284031215611dc0578081fd5b81516115e481612485565b60008060408385031215611ddd578081fd5b8235611de881612485565b91506020830135611df881612485565b809150509250929050565b600080600060608486031215611e17578081fd5b8335611e2281612485565b92506020840135611e3281612485565b929592945050506040919091013590565b60008060408385031215611e55578182fd5b8235611e6081612485565b9150611e6e60208401611d83565b90509250929050565b60008060408385031215611e89578182fd5b8235611e9481612485565b946020939093013593505050565b600060208284031215611eb3578081fd5b6115e482611d83565b600060208284031215611ecd578081fd5b5035919050565b600060208284031215611ee5578081fd5b5051919050565b6001600160a01b0391909116815260200190565b901515815260200190565b6000602080835283518082850152825b81811015611f3757858101830151858201604001528201611f1b565b81811115611f485783604083870101525b50601f01601f1916929092016040019392505050565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b60208082526022908201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604082015261737360f01b606082015260800190565b60208082526026908201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604082015265616c616e636560d01b606082015260800190565b6020808252601d908201527f636861726974794665652073686f756c6420626520696e2031202d2035000000604082015260600190565b60208082526028908201527f5472616e7366657220616d6f756e74206578636565647320746865206d6178546040820152673c20b6b7bab73a1760c11b606082015260800190565b60208082526028908201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616040820152676c6c6f77616e636560c01b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526029908201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206040820152687468616e207a65726f60b81b606082015260800190565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526030908201527f6d61785478416d6f756e742073686f756c64206265206772656174657220746860408201526f0c2dc4062606060606060606060ca62760831b606082015260800190565b60208082526024908201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646040820152637265737360e01b606082015260800190565b60208082526019908201527f7461784665652073686f756c6420626520696e2031202d203500000000000000604082015260600190565b60208082526018908201527f6f704665652073686f756c6420626520696e2031202d20330000000000000000604082015260600190565b60208082526025908201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604082015264207a65726f60d81b606082015260800190565b60208082526022908201527f45524332303a207472616e7366657220746f207465207a65726f206164647265604082015261737360f01b606082015260800190565b90815260200190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b818110156123975784516001600160a01b031683529383019391830191600101612372565b50506001600160a01b03969096166060850152505050608001529392505050565b60ff91909116815260200190565b600082198211156123d9576123d961246f565b500190565b6000826123f957634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156124185761241861246f565b500290565b60008282101561242f5761242f61246f565b500390565b60028104600182168061244857607f821691505b6020821081141561246957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b0381168114610c0557600080fdfea2646970667358221220c4d8192410cdb7d790f80ccb0858c52b25d100ec6ef182716189ba8b23e9443064736f6c63430008000033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000004beeeb8cba96a3bf97031f180f67bc908effde110000000000000000000000008fecb5b87dacde1905a24d43200cefda43804d9200000000000000000000000081dd9c8a758ed5bb111eaf5cc4f45c3ace576129
-----Decoded View---------------
Arg [0] : charityWalletAddress (address): 0x4BeeeB8CBa96a3bf97031f180f67bc908EFFde11
Arg [1] : opWalletAddress (address): 0x8FECB5B87dACDE1905a24d43200cEfDa43804D92
Arg [2] : _dogNFTAddr (address): 0x81dD9C8A758eD5bb111EaF5Cc4F45C3ace576129
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000004beeeb8cba96a3bf97031f180f67bc908effde11
Arg [1] : 0000000000000000000000008fecb5b87dacde1905a24d43200cefda43804d92
Arg [2] : 00000000000000000000000081dd9c8a758ed5bb111eaf5cc4f45c3ace576129
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.