More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 695 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
Value | ||||
---|---|---|---|---|---|---|---|---|---|
Claim Many From ... | 19680680 | 78 days ago | IN | 0 ETH | 0.00164265 | ||||
Claim Many From ... | 18987198 | 176 days ago | IN | 0 ETH | 0.01513061 | ||||
Claim Many From ... | 18892678 | 189 days ago | IN | 0 ETH | 0.01117487 | ||||
Claim Many From ... | 18608698 | 229 days ago | IN | 0 ETH | 0.0052127 | ||||
Set Reward Per D... | 18585296 | 232 days ago | IN | 0 ETH | 0.00083344 | ||||
Set Reward Per D... | 18585296 | 232 days ago | IN | 0 ETH | 0.00083191 | ||||
Set Reward Per D... | 18585295 | 232 days ago | IN | 0 ETH | 0.00083673 | ||||
Claim Many From ... | 18582447 | 233 days ago | IN | 0 ETH | 0.02206552 | ||||
Claim Many From ... | 18575748 | 233 days ago | IN | 0 ETH | 0.00497243 | ||||
Claim Many From ... | 18560558 | 236 days ago | IN | 0 ETH | 0.01004369 | ||||
Claim Many From ... | 18553957 | 237 days ago | IN | 0 ETH | 0.02679302 | ||||
Claim Many From ... | 18552674 | 237 days ago | IN | 0 ETH | 0.03159203 | ||||
Claim Many From ... | 18508138 | 243 days ago | IN | 0 ETH | 0.00375076 | ||||
Claim Many From ... | 18490847 | 245 days ago | IN | 0 ETH | 0.00367052 | ||||
Set Reward Per D... | 18465391 | 249 days ago | IN | 0 ETH | 0.00076508 | ||||
Set Reward Per D... | 18465390 | 249 days ago | IN | 0 ETH | 0.00079225 | ||||
Claim Many From ... | 18437499 | 253 days ago | IN | 0 ETH | 0.05032493 | ||||
Claim Many From ... | 18382277 | 261 days ago | IN | 0 ETH | 0.00375749 | ||||
Claim Many From ... | 18343578 | 266 days ago | IN | 0 ETH | 0.00478951 | ||||
Claim Many From ... | 18332315 | 268 days ago | IN | 0 ETH | 0.00326771 | ||||
Claim Many From ... | 18260244 | 278 days ago | IN | 0 ETH | 0.00560782 | ||||
Claim Many From ... | 18221564 | 283 days ago | IN | 0 ETH | 0.00681429 | ||||
Claim Many From ... | 18198354 | 286 days ago | IN | 0 ETH | 0.00335455 | ||||
Claim Many From ... | 18188419 | 288 days ago | IN | 0 ETH | 0.00545627 | ||||
Claim Many From ... | 18170198 | 290 days ago | IN | 0 ETH | 0.00745565 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
BioApesStaking
Compiler Version
v0.8.2+commit.661d1103
Contract Source Code (Solidity Multiple files format)
// SPDX-License-Identifier: MIT LICENSE /* $BCT & BioApes NFT Staking Contract Stake BioApes Earn $BCT token! Visit our Website at www.mandoxglobal.com and $BCT page www.BananaClubToken.com Keep up to date with our socials! t.me/officialmandox - twitter.com/officialmandox - discord.gg/mandox Rewards are paid out per tier, per lockup, Use at your own Risk, Mandox LLC is not liable for any lost, stolen or misplaced funds/tokens. Built By and For Mandox, with Openzeppelin Libraries - Happy Staking! */ pragma solidity 0.8.2; import "./Context.sol"; import "./Ownable.sol"; import "./BananaClubToken.sol"; import "./Bioapes.sol"; import "./Pausable.sol"; contract BioApesStaking is Ownable, IERC721Receiver, Pausable { struct NftInfo { uint256 tokenId; address owner; uint256 stakeTime; uint256 lockTime; uint16 tier; } event TokenStaked(address owner, uint256 tokenId, uint256 lastClaimed); event BCTClaimed(uint256 tokenId, uint256 earned, bool unstaked); // reference to the BioApes NFT contract BioApes bioapes; // reference to the $BCT contract for $BCT earnings BananaClubToken bct; // maps tokenId to stake mapping(uint256 => NftInfo) public register; mapping(address => NftInfo[]) public stakedTokens; address public rewardingWallet; uint256 public rewardPerDay30 = 500; // Values in $BCT tokens for Payout uint256 public rewardPerDay60 = 1000; uint256 public rewardPerDay90 = 2000; // amount of $BCT earned so far uint256 public totalBctEarned; // number of Nft staked in the register uint256 public totalNFTStaked; // the last time $BCT was claimed uint256 public lastClaimTimestamp; // emergency rescue to allow unstaking without any checks but without $BCT bool public rescueEnabled = false; constructor(address _bioapes, address payable _bct, address _rewardingWallet) { bioapes = BioApes(_bioapes); bct = BananaClubToken(_bct); rewardingWallet = _rewardingWallet; totalNFTStaked = 0; } function addManyToRegister(uint256[] calldata tokenIds, uint16 tier) external { for (uint i = 0; i < tokenIds.length; i++) { require(bioapes.ownerOf(tokenIds[i]) == _msgSender(), "BIOAPES: IS NOT OWNER"); bioapes.transferFrom(_msgSender(), address(this), tokenIds[i]); _addNftToRegister(_msgSender(), tokenIds[i], tier); } } function _addNftToRegister(address account, uint256 tokenId, uint16 tier) internal whenNotPaused { NftInfo storage _nftInfo = register[tokenId]; require(_nftInfo.tokenId == 0, "Already Staked!"); require(_nftInfo.tier == 0, "Already in some tier"); _nftInfo.tokenId = tokenId; _nftInfo.owner = account; _nftInfo.stakeTime = block.timestamp; uint256 lockTime = 0; if (tier == 30) { lockTime = block.timestamp + 30 days; } else if (tier == 60) { lockTime = block.timestamp + 60 days; } else if (tier == 90) { lockTime = block.timestamp + 90 days; } else { require(false, "Invalid tier"); } _nftInfo.lockTime = lockTime; _nftInfo.tier = tier; stakedTokens[account].push(_nftInfo); totalNFTStaked += 1; emit TokenStaked(account, tokenId, block.timestamp); } /** CLAIMING / UNSTAKING */ /** * @param tokenIds the IDs of the tokens to claim earnings from * @param unstake whether or not to unstake ALL of the tokens listed in tokenIds */ function claimManyFromRegister(uint256[] calldata tokenIds, bool unstake) external whenNotPaused { uint256 rewards = 0; for (uint i = 0; i < tokenIds.length; i++) { rewards += _claimNftFromRegister(tokenIds[i], unstake); } if (rewards == 0) return; uint256 _allowance = pendingRewards(); require(_allowance >= rewards, "Pending Rewards Not Allocated"); bct.transferFrom(rewardingWallet, _msgSender(), rewards); } /** * @param tokenId the ID of the NFT to claim earnings from * @param unstake whether or not to unstake the NFT * @return rewards - the amount of $BCT earned */ function _claimNftFromRegister(uint256 tokenId, bool unstake) internal returns (uint256 rewards) { NftInfo storage stake = register[tokenId]; require(stake.owner == _msgSender(), "BIOAPES: SHOULD BE OWNER"); require(block.timestamp >= stake.lockTime, "BIOAPES: CAN NOT CLAIM YET"); require(stake.tokenId == tokenId, "Not Staked"); if (stake.tier == 30) { rewards = uint256((block.timestamp - stake.stakeTime) * rewardPerDay30 / 1 days * (10 ** 9)); } else if (stake.tier == 60) { rewards = uint256((block.timestamp - stake.stakeTime) * rewardPerDay60 / 1 days * (10 ** 9)); } else if (stake.tier == 90) { rewards = uint256((block.timestamp - stake.stakeTime) * rewardPerDay90 / 1 days * (10 ** 9)); } else { require(false, "Invalid Tier"); } if (unstake) { bioapes.safeTransferFrom(address(this), _msgSender(), tokenId); // send back NFT delete register[tokenId]; for (uint i = 0; i < stakedTokens[_msgSender()].length; i++) { if (stakedTokens[_msgSender()][i].tokenId == tokenId) { for (uint j = i; j < stakedTokens[_msgSender()].length - 1; j++) { stakedTokens[_msgSender()][j] = stakedTokens[_msgSender()][j + 1]; } stakedTokens[_msgSender()].pop(); } } totalNFTStaked -= 1; } else { stake.stakeTime = block.timestamp; stake.lockTime = block.timestamp + register[tokenId].tier * 1 days; // reset stake } emit BCTClaimed(tokenId, rewards, unstake); } function getStaked(address _owner) public view returns (NftInfo[] memory) { return stakedTokens[_owner]; } /** * emergency unstake tokens * @param tokenIds the IDs of the tokens to claim earnings from */ function rescue(uint256[] calldata tokenIds) external { require(rescueEnabled, "BIOAPES: RESCUE DISABLED"); uint256 tokenId; NftInfo memory stake; for (uint i = 0; i < tokenIds.length; i++) { tokenId = tokenIds[i]; stake = register[tokenId]; require(stake.owner == _msgSender(), "BIOAPES: SHOULD BE OWNER"); bioapes.safeTransferFrom(address(this), _msgSender(), tokenId); // send back Apes delete register[tokenId]; for (uint j = 0; j < stakedTokens[_msgSender()].length; j++) { if (stakedTokens[_msgSender()][j].tokenId == tokenId) { for (uint k = j; j < stakedTokens[_msgSender()].length - 1; k++) { stakedTokens[_msgSender()][k] = stakedTokens[_msgSender()][k + 1]; } stakedTokens[_msgSender()].pop(); } } totalNFTStaked -= 1; emit BCTClaimed(tokenId, 0, true); } } function setRewardPerDay30(uint256 value) public onlyOwner{ rewardPerDay30 = value; } function setRewardPerDay60(uint256 value) public onlyOwner{ rewardPerDay60 = value; } function setRewardPerDay90(uint256 value) public onlyOwner{ rewardPerDay90= value; } function setRewardingWallet(address _rewardingWallet) public onlyOwner{ rewardingWallet= _rewardingWallet; } /** * allows owner to enable "rescue mode" * simplifies accounting, prioritizes tokens out in emergency */ function setRescueEnabled(bool _enabled) external onlyOwner { rescueEnabled = _enabled; } /** * enables owner to pause / unpause claiming */ function setPaused(bool _paused) external onlyOwner { if (_paused) _pause(); else _unpause(); } function pendingRewards() public view returns (uint256){ return bct.allowance(rewardingWallet , address(this)); } function onERC721Received( address, address from, uint256, bytes calldata ) external pure override returns (bytes4) { require(from == address(0x0), "BIOAPES: CAN NOT STAKE DIRECTLY"); return IERC721Receiver.onERC721Received.selector; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/ERC20.sol) pragma solidity ^0.8.0; import "./IERC20.sol"; import "./IERC20MetaData.sol"; import "./Context.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The default value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 9; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance"); unchecked { _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"); unchecked { _approve(_msgSender(), spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `sender` to `recipient`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer( address sender, address recipient, uint256 amount ) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); uint256 senderBalance = _balances[sender]; require(senderBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[sender] = senderBalance - amount; } _balances[recipient] += amount; emit Transfer(sender, recipient, amount); _afterTokenTransfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; } _totalSupply -= amount; emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} }
// SPDX-License-Identifier: MIT import "./Ownable.sol"; import "./SafeMath.sol"; import "./BANANA20.sol"; import "./BananaFactory.sol"; import "./BananaRouter.sol"; pragma solidity 0.8.2; //File: BananaToken.sol /* * */ contract BananaClubToken is ERC20, Ownable { using SafeMath for uint256; IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private _swapping; address public treasury; address public buyBack; uint256 public maxTransactionAmount; uint256 public swapTokensAtAmount; uint256 public maxWallet; bool public limitsInEffect = true; bool public tradingActive = false; uint256 public buyTotalFees; uint256 private _buyTreasuryFee; uint256 private _buyLiquidityFee; uint256 private _buyBuyBackFee; uint256 public sellTotalFees; uint256 private _sellTreasuryFee; uint256 private _sellLiquidityFee; uint256 private _sellBuyBackFee; uint256 private _tokensForTreasury; uint256 private _tokensForLiquidity; uint256 private _tokensForBuyBack; /******************/ // exclude from fees and max transaction amount mapping (address => bool) private _isExcludedFromFees; mapping (address => bool) public _isExcludedMaxTransactionAmount; // store addresses that a automatic market maker pairs. Any transfer *to* these addresses // could be subject to a maximum transfer amount mapping (address => bool) public automatedMarketMakerPairs; event ExcludeFromFees(address indexed account, bool isExcluded); event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value); event TreasuryUpdated(address newAddress); event BuyBackUpdated(address newAddress); event LPSwap(uint256 tokensSwapped, uint256 ethReceived, uint256 tokensIntoLiquidity); event tradingEnabled(bool tradingActive); event MaxTxnUpdated(uint256 newNum); event MaxWalletAmount(uint256 newNum); event MaxTxnExcluded(address updAds); event BuyFeeUpdated(uint256 marketingFee, uint256 liquidityFee, uint256 buyBackFee); event SellFeeUpdated(uint256 marketingFee, uint256 liquidityFee, uint256 buyBackFee); event ExcludedFromFee(address account, bool excluded); event limitsRemoved(bool limitsInEffect); event swapTokensAt(uint newAmount); event feesCollected(bool); constructor() ERC20("BananaClubToken", "BCT") { IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); excludeFromMaxTransaction(address(_uniswapV2Router), true); uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); excludeFromMaxTransaction(address(uniswapV2Pair), true); _setAutomatedMarketMakerPair(address(uniswapV2Pair), true); uint256 buyTreasuryFee = 1; uint256 buyLiquidityFee = 0; uint256 buyBuyBackFee = 1; uint256 sellTreasuryFee = 1; uint256 sellLiquidityFee = 1; uint256 sellBuyBackFee = 1; uint256 totalSupply = 1e8 * 1e9; // 100 million 1e8 = 1(00,000,000) * 1e9 ((9).000000000 decimals) // Initial Deployed settings maybe be changed later with individual functions - Set all fees, Max AMTs maxTransactionAmount = totalSupply * 3 / 1000; // 0.3% maxTransactionAmountTxn 300,000 Tokens maxWallet = totalSupply * 2 / 100; // 2% maxWallet 2,000,000 Tokens swapTokensAtAmount = totalSupply * 3 / 10000; // 0.03% swap wallet 30,000 tokens _buyTreasuryFee = buyTreasuryFee; _buyLiquidityFee = buyLiquidityFee; _buyBuyBackFee = buyBuyBackFee; buyTotalFees = _buyTreasuryFee + _buyLiquidityFee + _buyBuyBackFee; _sellTreasuryFee = sellTreasuryFee; _sellLiquidityFee = sellLiquidityFee; _sellBuyBackFee = sellBuyBackFee; sellTotalFees = _sellTreasuryFee + _sellLiquidityFee + _sellBuyBackFee; treasury = address(owner()); // set owner as treasury at launch. Change it after Launch with the Update Function buyBack = address(owner()); // set owner as buyBack at launch. Change it after Launch with the Update Function // exclude from paying fees or having max transaction amount Owner/this/dead excludeFromFees(owner(), true); excludeFromFees(address(this), true); excludeFromFees(address(0xdead), true); excludeFromMaxTransaction(owner(), true); excludeFromMaxTransaction(address(this), true); excludeFromMaxTransaction(address(0xdead), true); /* _mint is an internal function in ERC20.sol that is only called here, and CANNOT be called ever again, this is used to Issue the initial Supply */ _mint(msg.sender, totalSupply); } // three required checks in solidity function _afterTokenTransfer(address from, address to, uint256 amount) internal override(ERC20) { super._afterTokenTransfer(from, to, amount); } function _mint(address to, uint256 amount) internal override(ERC20) { super._mint(to, amount); } function _burn(address account, uint256 amount) internal override(ERC20) { super._burn(account, amount); } /** * @dev Enables Trading on Uniswap */ function enableTrading() external onlyOwner { tradingActive = true; emit tradingEnabled(tradingActive); } /** * @dev Removes Max txn, and wallet limits if and when its Needed * cannot be turned back on. */ function removeLimits() external onlyOwner returns (bool) { limitsInEffect = false; emit limitsRemoved(limitsInEffect); return true; } /** * @dev Update how many tokens to Swap&Liquify at */ function updateSwapTokensAtAmount(uint256 newAmount) external onlyOwner returns (bool) { require(newAmount >= totalSupply() * 1 / 100000, "Swap amount cannot be lower than 0.001% total supply."); require(newAmount <= totalSupply() * 5 / 1000, "Swap amount cannot be higher than 0.5% total supply."); swapTokensAtAmount = newAmount; emit swapTokensAt(newAmount); return true; } /** * @dev Update MaxTransaction */ function updateMaxTxnAmount(uint256 newNum) external onlyOwner { require(newNum >= (totalSupply() * 1 / 1000) / 1e9, "Cannot set maxTransactionAmount lower than 0.1%"); maxTransactionAmount = newNum * 1e9; emit MaxTxnUpdated(newNum); } /** * @dev Update MaxWallet */ function updateMaxWalletAmount(uint256 newNum) external onlyOwner { require(newNum >= (totalSupply() * 5 / 1000)/1e9, "Cannot set maxWallet lower than 0.5%"); maxWallet = newNum * 1e9; emit MaxWalletAmount(newNum); } /** * @dev exclude Address from MaxTxn */ function excludeFromMaxTransaction(address updAds, bool isEx) public onlyOwner { _isExcludedMaxTransactionAmount[updAds] = isEx; emit MaxTxnExcluded(updAds); } /** * @dev Update Buy Tax */ function updateBuyFees(uint256 treasuryFee, uint256 liquidityFee, uint256 buyBackFee) external onlyOwner { _buyTreasuryFee = treasuryFee; _buyLiquidityFee = liquidityFee; _buyBuyBackFee = buyBackFee; buyTotalFees = _buyTreasuryFee + _buyLiquidityFee + _buyBuyBackFee; require(buyTotalFees <= 10, "Must keep fees at 10% or less"); emit BuyFeeUpdated(treasuryFee, liquidityFee, buyBackFee); } /** * @dev Update Sell Tax */ function updateSellFees(uint256 treasuryFee, uint256 liquidityFee, uint256 buyBackFee) external onlyOwner { _sellTreasuryFee = treasuryFee; _sellLiquidityFee = liquidityFee; _sellBuyBackFee = buyBackFee; sellTotalFees = _sellTreasuryFee + _sellLiquidityFee + _sellBuyBackFee; require(sellTotalFees <= 15, "Must keep fees at 15% or less"); emit SellFeeUpdated(treasuryFee, liquidityFee, buyBackFee); } /** * @dev Exclude Address from Tax */ function excludeFromFees(address account, bool excluded) public onlyOwner { _isExcludedFromFees[account] = excluded; emit ExcludeFromFees(account, excluded); } // function for setting AMM Pairs in the future function setAutomatedMarketMakerPair(address pair, bool value) external onlyOwner { require(pair != uniswapV2Pair, "The pair cannot be removed from automatedMarketMakerPairs"); _setAutomatedMarketMakerPair(pair, value); } function _setAutomatedMarketMakerPair(address pair, bool value) private { automatedMarketMakerPairs[pair] = value; emit SetAutomatedMarketMakerPair(pair, value); } /** * @dev Update Treasury Address */ function updateTreasury(address newAddress) external onlyOwner { treasury = newAddress; require(newAddress != address(0),"Address cannot be Zero address"); emit TreasuryUpdated(newAddress); } /** * @dev Update BuyBack Address */ function updateBuyBack(address newAddress) external onlyOwner { buyBack = newAddress; require(newAddress != address(0),"Address cannot be Zero address"); emit BuyBackUpdated(newAddress); } function isExcludedFromFees(address account) public view returns(bool) { return _isExcludedFromFees[account]; } // transfer function with required checks function _transfer( address from, address to, uint256 amount ) internal override { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); if (amount == 0) { super._transfer(from, to, 0); return; } if (limitsInEffect) { if ( from != owner() && to != owner() && to != address(0) && to != address(0xdead) && !_swapping ) { if (!tradingActive) { require(_isExcludedFromFees[from] || _isExcludedFromFees[to], "Trading is not active."); } // when buy if (automatedMarketMakerPairs[from] && !_isExcludedMaxTransactionAmount[to]) { require(amount <= maxTransactionAmount, "Buy transfer amount exceeds the maxTransactionAmount."); require(amount + balanceOf(to) <= maxWallet, "Max wallet exceeded"); } // when sell else if (automatedMarketMakerPairs[to] && !_isExcludedMaxTransactionAmount[from]) { require(amount <= maxTransactionAmount, "Sell transfer amount exceeds the maxTransactionAmount."); } else if (!_isExcludedMaxTransactionAmount[to]){ require(amount + balanceOf(to) <= maxWallet, "Max wallet exceeded"); } } } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= swapTokensAtAmount; if ( canSwap && !_swapping && !automatedMarketMakerPairs[from] && !_isExcludedFromFees[from] && !_isExcludedFromFees[to] ) { _swapping = true; swapBack(); _swapping = false; } bool takeFee = !_swapping; // if any account belongs to _isExcludedFromFee account then remove the fee if (_isExcludedFromFees[from] || _isExcludedFromFees[to]) { takeFee = false; } uint256 fees = 0; // only take fees on buys/sells, do not take on wallet transfers if (takeFee) { // on sell if (automatedMarketMakerPairs[to] && sellTotalFees > 0) { fees = amount.mul(sellTotalFees).div(100); _tokensForLiquidity += fees * _sellLiquidityFee / sellTotalFees; _tokensForTreasury += fees * _sellTreasuryFee / sellTotalFees; _tokensForBuyBack += fees * _sellBuyBackFee / sellTotalFees; } // on buy else if (automatedMarketMakerPairs[from] && buyTotalFees > 0) { fees = amount.mul(buyTotalFees).div(100); _tokensForLiquidity += fees * _buyLiquidityFee / buyTotalFees; _tokensForTreasury += fees * _buyTreasuryFee / buyTotalFees; _tokensForBuyBack += fees * _buyBuyBackFee / buyTotalFees; } if (fees > 0) { super._transfer(from, address(this), fees); } amount -= fees; } super._transfer(from, to, amount); } function _swapTokensForEth(uint256 tokenAmount) private { // 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 _addLiquidity(uint256 tokenAmount, uint256 ethAmount) private { // approve token transfer to cover all possible scenarios _approve(address(this), address(uniswapV2Router), tokenAmount); // add the liquidity uniswapV2Router.addLiquidityETH{value: ethAmount}( address(this), tokenAmount, 0, // slippage is unavoidable 0, // slippage is unavoidable owner(), block.timestamp ); } function swapBack() private { uint256 contractBalance = balanceOf(address(this)); uint256 totalTokensToSwap = _tokensForLiquidity + _tokensForTreasury + _tokensForBuyBack; bool success; if (contractBalance == 0 || totalTokensToSwap == 0) return; if (contractBalance > swapTokensAtAmount * 20) { contractBalance = swapTokensAtAmount * 20; } // Halve the amount of liquidity tokens uint256 liquidityTokens = contractBalance * _tokensForLiquidity / totalTokensToSwap / 2; uint256 amountToSwapForETH = contractBalance.sub(liquidityTokens); uint256 initialETHBalance = address(this).balance; _swapTokensForEth(amountToSwapForETH); uint256 ethBalance = address(this).balance.sub(initialETHBalance); uint256 ethForTreasury = ethBalance.mul(_tokensForTreasury).div(totalTokensToSwap); uint256 ethForLiquidity = ethBalance.mul(_tokensForLiquidity).div(totalTokensToSwap); uint256 ethForBuyBack = ethBalance - ethForLiquidity - ethForTreasury; _tokensForLiquidity = 0; _tokensForTreasury = 0; _tokensForBuyBack = 0; if (liquidityTokens > 0 && ethForLiquidity > 0) { _addLiquidity(liquidityTokens, ethForLiquidity); emit LPSwap(amountToSwapForETH, ethForLiquidity, _tokensForLiquidity); } if (ethForTreasury > 0) { (success,) = address(treasury).call{value: ethForTreasury}(""); } if (ethForBuyBack > 0) { (success,) = address(buyBack).call{value: ethForBuyBack}(""); } } /** * @dev manually collect any eth from contract to treasury */ function manualCollectFees() external onlyOwner { bool success; (success,) = address(treasury).call{value: address(this).balance}(""); require(success, "Error on transfer, reverted"); emit feesCollected(success); } /** * @dev Fallback function for contract to recieve. */ receive() external payable {} }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /* * * UniswapV2 Pair and Factory Interfaces Needed with Router to swap tokens * for eth supporting the fees of the Token * * */ interface IUniswapV2Pair { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint); function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external; event Mint(address indexed sender, uint amount0, uint amount1); event Burn(address indexed sender, uint amount0, uint amount1, address indexed to); event Swap( address indexed sender, uint amount0In, uint amount1In, uint amount0Out, uint amount1Out, address indexed to ); event Sync(uint112 reserve0, uint112 reserve1); function MINIMUM_LIQUIDITY() external pure returns (uint); function factory() external view returns (address); function token0() external view returns (address); function token1() external view returns (address); function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); function price0CumulativeLast() external view returns (uint); function price1CumulativeLast() external view returns (uint); function kLast() external view returns (uint); function mint(address to) external returns (uint liquidity); function burn(address to) external returns (uint amount0, uint amount1); function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external; function skim(address to) external; function sync() external; function initialize(address, address) external; } // Uniswap V2 Factory interface IUniswapV2Factory { event PairCreated(address indexed token0, address indexed token1, address pair, uint); 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(uint) external view returns (address pair); function allPairsLength() external view returns (uint); 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; /* * * Uniswap Router 01 and 02 Interfaces. Needed with Factory * and pair to swap tokens for eth supporting * the fees of the Token * */ interface IUniswapV2Router01 { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB, uint liquidity); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); function removeLiquidity( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB); function removeLiquidityETH( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountToken, uint amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountA, uint amountB); function removeLiquidityETHWithPermit( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountToken, uint amountETH); function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapTokensForExactTokens( uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB); function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut); function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts); } interface IUniswapV2Router02 is IUniswapV2Router01 { function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountETH); function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountETH); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; }
/** *Submitted for verification at Etherscan.io on 2022-05-26 */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./Context.sol"; import "./Ownable.sol"; import "./SafeMath.sol"; // File: @openzeppelin/contracts/introspection/IERC165.sol /** * @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); } // File: @openzeppelin/contracts/token/ERC721/IERC721.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; } // File: @openzeppelin/contracts/token/ERC721/IERC721Metadata.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); } // File: @openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); } // File: @openzeppelin/contracts/token/ERC721/IERC721Receiver.sol /** * @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); } // File: @openzeppelin/contracts/introspection/ERC165.sol /** * @dev Implementation of the {IERC165} interface. * * Contracts may inherit from this and call {_registerInterface} to declare * their support of an interface. */ abstract contract ERC165 is IERC165 { /* * bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7 */ bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7; /** * @dev Mapping of interface ids to whether or not it's supported. */ mapping(bytes4 => bool) private _supportedInterfaces; constructor() { // Derived contracts need only register support for their own interfaces, // we register support for ERC165 itself here _registerInterface(_INTERFACE_ID_ERC165); } /** * @dev See {IERC165-supportsInterface}. * * Time complexity O(1), guaranteed to always use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return _supportedInterfaces[interfaceId]; } /** * @dev Registers the contract as an implementer of the interface defined by * `interfaceId`. Support of the actual ERC165 interface is automatic and * registering its interface id is not required. * * See {IERC165-supportsInterface}. * * Requirements: * * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`). */ function _registerInterface(bytes4 interfaceId) internal virtual { require(interfaceId != 0xffffffff, "ERC165: invalid interface id"); _supportedInterfaces[interfaceId] = true; } } // File: @openzeppelin/contracts/utils/Address.sol /** * @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); } } } } // File: @openzeppelin/contracts/utils/EnumerableSet.sol /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement. bytes32 lastvalue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastvalue; // Update the index for the moved value set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { require( set._values.length > index, "EnumerableSet: index out of bounds" ); return set._values[index]; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } } // File: @openzeppelin/contracts/utils/EnumerableMap.sol /** * @dev Library for managing an enumerable variant of Solidity's * https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`] * type. * * Maps have the following properties: * * - Entries are added, removed, and checked for existence in constant time * (O(1)). * - Entries are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableMap for EnumerableMap.UintToAddressMap; * * // Declare a set state variable * EnumerableMap.UintToAddressMap private myMap; * } * ``` * * As of v3.0.0, only maps of type `uint256 -> address` (`UintToAddressMap`) are * supported. */ library EnumerableMap { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Map type with // bytes32 keys and values. // The Map implementation uses private functions, and user-facing // implementations (such as Uint256ToAddressMap) are just wrappers around // the underlying Map. // This means that we can only create new EnumerableMaps for types that fit // in bytes32. struct MapEntry { bytes32 _key; bytes32 _value; } struct Map { // Storage of map keys and values MapEntry[] _entries; // Position of the entry defined by a key in the `entries` array, plus 1 // because index 0 means a key is not in the map. mapping(bytes32 => uint256) _indexes; } /** * @dev Adds a key-value pair to a map, or updates the value for an existing * key. O(1). * * Returns true if the key was added to the map, that is if it was not * already present. */ function _set( Map storage map, bytes32 key, bytes32 value ) private returns (bool) { // We read and store the key's index to prevent multiple reads from the same storage slot uint256 keyIndex = map._indexes[key]; if (keyIndex == 0) { // Equivalent to !contains(map, key) map._entries.push(MapEntry({_key: key, _value: value})); // The entry is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value map._indexes[key] = map._entries.length; return true; } else { map._entries[keyIndex - 1]._value = value; return false; } } /** * @dev Removes a key-value pair from a map. O(1). * * Returns true if the key was removed from the map, that is if it was present. */ function _remove(Map storage map, bytes32 key) private returns (bool) { // We read and store the key's index to prevent multiple reads from the same storage slot uint256 keyIndex = map._indexes[key]; if (keyIndex != 0) { // Equivalent to contains(map, key) // To delete a key-value pair from the _entries array in O(1), we swap the entry to delete with the last one // in the array, and then remove the last entry (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = keyIndex - 1; uint256 lastIndex = map._entries.length - 1; // When the entry to delete is the last one, the swap operation is unnecessary. However, since this occurs // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement. MapEntry storage lastEntry = map._entries[lastIndex]; // Move the last entry to the index where the entry to delete is map._entries[toDeleteIndex] = lastEntry; // Update the index for the moved entry map._indexes[lastEntry._key] = toDeleteIndex + 1; // All indexes are 1-based // Delete the slot where the moved entry was stored map._entries.pop(); // Delete the index for the deleted slot delete map._indexes[key]; return true; } else { return false; } } /** * @dev Returns true if the key is in the map. O(1). */ function _contains(Map storage map, bytes32 key) private view returns (bool) { return map._indexes[key] != 0; } /** * @dev Returns the number of key-value pairs in the map. O(1). */ function _length(Map storage map) private view returns (uint256) { return map._entries.length; } /** * @dev Returns the key-value pair stored at position `index` in the map. O(1). * * Note that there are no guarantees on the ordering of entries inside the * array, and it may change when more entries are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Map storage map, uint256 index) private view returns (bytes32, bytes32) { require( map._entries.length > index, "EnumerableMap: index out of bounds" ); MapEntry storage entry = map._entries[index]; return (entry._key, entry._value); } /** * @dev Tries to returns the value associated with `key`. O(1). * Does not revert if `key` is not in the map. */ function _tryGet(Map storage map, bytes32 key) private view returns (bool, bytes32) { uint256 keyIndex = map._indexes[key]; if (keyIndex == 0) return (false, 0); // Equivalent to contains(map, key) return (true, map._entries[keyIndex - 1]._value); // All indexes are 1-based } /** * @dev Returns the value associated with `key`. O(1). * * Requirements: * * - `key` must be in the map. */ function _get(Map storage map, bytes32 key) private view returns (bytes32) { uint256 keyIndex = map._indexes[key]; require(keyIndex != 0, "EnumerableMap: nonexistent key"); // Equivalent to contains(map, key) return map._entries[keyIndex - 1]._value; // All indexes are 1-based } /** * @dev Same as {_get}, with a custom error message when `key` is not in the map. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {_tryGet}. */ function _get( Map storage map, bytes32 key, string memory errorMessage ) private view returns (bytes32) { uint256 keyIndex = map._indexes[key]; require(keyIndex != 0, errorMessage); // Equivalent to contains(map, key) return map._entries[keyIndex - 1]._value; // All indexes are 1-based } // UintToAddressMap struct UintToAddressMap { Map _inner; } /** * @dev Adds a key-value pair to a map, or updates the value for an existing * key. O(1). * * Returns true if the key was added to the map, that is if it was not * already present. */ function set( UintToAddressMap storage map, uint256 key, address value ) internal returns (bool) { return _set(map._inner, bytes32(key), bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the key was removed from the map, that is if it was present. */ function remove(UintToAddressMap storage map, uint256 key) internal returns (bool) { return _remove(map._inner, bytes32(key)); } /** * @dev Returns true if the key is in the map. O(1). */ function contains(UintToAddressMap storage map, uint256 key) internal view returns (bool) { return _contains(map._inner, bytes32(key)); } /** * @dev Returns the number of elements in the map. O(1). */ function length(UintToAddressMap storage map) internal view returns (uint256) { return _length(map._inner); } /** * @dev Returns the element stored at position `index` in the set. O(1). * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintToAddressMap storage map, uint256 index) internal view returns (uint256, address) { (bytes32 key, bytes32 value) = _at(map._inner, index); return (uint256(key), address(uint160(uint256(value)))); } /** * @dev Tries to returns the value associated with `key`. O(1). * Does not revert if `key` is not in the map. * * _Available since v3.4._ */ function tryGet(UintToAddressMap storage map, uint256 key) internal view returns (bool, address) { (bool success, bytes32 value) = _tryGet(map._inner, bytes32(key)); return (success, address(uint160(uint256(value)))); } /** * @dev Returns the value associated with `key`. O(1). * * Requirements: * * - `key` must be in the map. */ function get(UintToAddressMap storage map, uint256 key) internal view returns (address) { return address(uint160(uint256(_get(map._inner, bytes32(key))))); } /** * @dev Same as {get}, with a custom error message when `key` is not in the map. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryGet}. */ function get( UintToAddressMap storage map, uint256 key, string memory errorMessage ) internal view returns (address) { return address( uint160(uint256(_get(map._inner, bytes32(key), errorMessage))) ); } } // File: @openzeppelin/contracts/utils/Strings.sol /** * @dev String operations. */ library Strings { /** * @dev Converts a `uint256` to its ASCII `string` 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); } } // File: @openzeppelin/contracts/token/ERC721/ERC721.sol /** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://eips.ethereum.org/EIPS/eip-721 */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using SafeMath for uint256; using Address for address; using EnumerableSet for EnumerableSet.UintSet; using EnumerableMap for EnumerableMap.UintToAddressMap; using Strings for uint256; // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` // which can be also obtained as `IERC721Receiver(0).onERC721Received.selector` bytes4 private constant _ERC721_RECEIVED = 0x150b7a02; // Mapping from holder address to their (enumerable) set of owned tokens mapping(address => EnumerableSet.UintSet) private _holderTokens; // Enumerable mapping from token ids to their owners EnumerableMap.UintToAddressMap private _tokenOwners; // 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; // Token name string private _name; // Token symbol string private _symbol; // Optional mapping for token URIs mapping(uint256 => string) private _tokenURIs; // Base URI string private _baseURI; /* * bytes4(keccak256('balanceOf(address)')) == 0x70a08231 * bytes4(keccak256('ownerOf(uint256)')) == 0x6352211e * bytes4(keccak256('approve(address,uint256)')) == 0x095ea7b3 * bytes4(keccak256('getApproved(uint256)')) == 0x081812fc * bytes4(keccak256('setApprovalForAll(address,bool)')) == 0xa22cb465 * bytes4(keccak256('isApprovedForAll(address,address)')) == 0xe985e9c5 * bytes4(keccak256('transferFrom(address,address,uint256)')) == 0x23b872dd * bytes4(keccak256('safeTransferFrom(address,address,uint256)')) == 0x42842e0e * bytes4(keccak256('safeTransferFrom(address,address,uint256,bytes)')) == 0xb88d4fde * * => 0x70a08231 ^ 0x6352211e ^ 0x095ea7b3 ^ 0x081812fc ^ * 0xa22cb465 ^ 0xe985e9c5 ^ 0x23b872dd ^ 0x42842e0e ^ 0xb88d4fde == 0x80ac58cd */ bytes4 private constant _INTERFACE_ID_ERC721 = 0x80ac58cd; /* * bytes4(keccak256('name()')) == 0x06fdde03 * bytes4(keccak256('symbol()')) == 0x95d89b41 * bytes4(keccak256('tokenURI(uint256)')) == 0xc87b56dd * * => 0x06fdde03 ^ 0x95d89b41 ^ 0xc87b56dd == 0x5b5e139f */ bytes4 private constant _INTERFACE_ID_ERC721_METADATA = 0x5b5e139f; /* * bytes4(keccak256('totalSupply()')) == 0x18160ddd * bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) == 0x2f745c59 * bytes4(keccak256('tokenByIndex(uint256)')) == 0x4f6ccce7 * * => 0x18160ddd ^ 0x2f745c59 ^ 0x4f6ccce7 == 0x780e9d63 */ bytes4 private constant _INTERFACE_ID_ERC721_ENUMERABLE = 0x780e9d63; /** * @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_; // register the supported interfaces to conform to ERC721 via ERC165 _registerInterface(_INTERFACE_ID_ERC721); _registerInterface(_INTERFACE_ID_ERC721_METADATA); _registerInterface(_INTERFACE_ID_ERC721_ENUMERABLE); } /** * @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 _holderTokens[owner].length(); } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { return _tokenOwners.get( tokenId, "ERC721: owner query for nonexistent token" ); } /** * @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 _tokenURI = _tokenURIs[tokenId]; string memory base = baseURI(); // If there is no base URI, return the token URI. if (bytes(base).length == 0) { return _tokenURI; } // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked). if (bytes(_tokenURI).length > 0) { return string(abi.encodePacked(base, _tokenURI)); } // If there is a baseURI but no tokenURI, concatenate the tokenID to the baseURI. return string(abi.encodePacked(base, tokenId.toString())); } /** * @dev Returns the base URI set via {_setBaseURI}. This will be * automatically added as a prefix in {tokenURI} to each token's URI, or * to the token ID if no specific URI is set for that token ID. */ function baseURI() public view virtual returns (string memory) { return _baseURI; } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { return _holderTokens[owner].at(index); } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { // _tokenOwners are indexed by tokenIds, so .length() returns the number of tokenIds return _tokenOwners.length(); } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { (uint256 tokenId, ) = _tokenOwners.at(index); return tokenId; } /** * @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 || ERC721.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 _tokenOwners.contains(tokenId); } /** * @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 || ERC721.isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: d* * - `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); _holderTokens[to].add(tokenId); _tokenOwners.set(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); // internal owner _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); // Clear metadata (if any) if (bytes(_tokenURIs[tokenId]).length != 0) { delete _tokenURIs[tokenId]; } _holderTokens[owner].remove(tokenId); _tokenOwners.remove(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" ); // internal owner require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _holderTokens[from].remove(tokenId); _holderTokens[to].add(tokenId); _tokenOwners.set(tokenId, to); emit Transfer(from, to, tokenId); } /** * @dev Sets `_tokenURI` as the tokenURI of `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual { require( _exists(tokenId), "ERC721Metadata: URI set of nonexistent token" ); _tokenURIs[tokenId] = _tokenURI; } /** * @dev Internal function to set the base URI for all token IDs. It is * automatically added as a prefix to the value returned in {tokenURI}, * or to the token ID if {tokenURI} is empty. */ function _setBaseURI(string memory baseURI_) internal virtual { _baseURI = baseURI_; } /** * @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()) { return true; } bytes memory returndata = to.functionCall( abi.encodeWithSelector( IERC721Receiver(to).onERC721Received.selector, _msgSender(), from, tokenId, _data ), "ERC721: transfer to non ERC721Receiver implementer" ); bytes4 retval = abi.decode(returndata, (bytes4)); return (retval == _ERC721_RECEIVED); } /** * @dev Approve `to` to operate on `tokenId` * * Emits an {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); // internal owner } /** * @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 {} } // File: contracts/BioApes.sol /** * @title BioApes contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */ contract BioApes is ERC721, Ownable { using SafeMath for uint256; using Strings for uint256; uint256 public startingIndexBlock; uint256 public startingIndex; uint256 public privateMintPrice = 0.06 ether; uint256 public publicMintPrice = 0.08 ether; uint256 public MAX_ELEMENTS = 1800; uint256 public REVEAL_TIMESTAMP; bool public revealed = false; string public notRevealedUri = ""; string public PROVENANCE_HASH = ""; bool public saleIsActive = false; bool public privateSaleIsActive = true; struct Whitelist { address addr; uint256 claimAmount; uint256 hasMinted; } mapping(address => Whitelist) public whitelist; mapping(address => Whitelist) public winnerlist; address[] whitelistAddr; address[] winnerlistAddr; constructor( string memory _name, string memory _symbol, string memory _initBaseURI, string memory _initNotRevealedUri ) ERC721(_name, _symbol) { REVEAL_TIMESTAMP = block.timestamp; _setBaseURI(_initBaseURI); setNotRevealedURI(_initNotRevealedUri); } /** * Get the array of token for owner. */ function tokensOfOwner(address _owner) external view returns (uint256[] memory) { uint256 tokenCount = balanceOf(_owner); if (tokenCount == 0) { return new uint256[](0); } else { uint256[] memory result = new uint256[](tokenCount); for (uint256 index; index < tokenCount; index++) { result[index] = tokenOfOwnerByIndex(_owner, index); } return result; } } /** * Check if certain token id is exists. */ function exists(uint256 _tokenId) public view returns (bool) { return _exists(_tokenId); } /** * Set presell price to mint */ function setPrivateMintPrice(uint256 _price) external onlyOwner { privateMintPrice = _price; } /** * Set publicsell price to mint */ function setPublicMintPrice(uint256 _price) external onlyOwner { publicMintPrice = _price; } /** * reserve by owner */ function reserve(uint256 _count) public onlyOwner { uint256 total = totalSupply(); require(total + _count <= MAX_ELEMENTS, "Exceeded"); for (uint256 i = 0; i < _count; i++) { _safeMint(msg.sender, total + i); } } /** * Set reveal timestamp when finished the sale. */ function setRevealTimestamp(uint256 _revealTimeStamp) external onlyOwner { REVEAL_TIMESTAMP = _revealTimeStamp; } /* * Set provenance once it's calculated */ function setProvenanceHash(string memory _provenanceHash) external onlyOwner { PROVENANCE_HASH = _provenanceHash; } function setBaseURI(string memory baseURI) external onlyOwner { _setBaseURI(baseURI); } function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner { notRevealedUri = _notRevealedURI; } //only owner function reveal() public onlyOwner { revealed = true; } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require( _exists(tokenId), "ERC721Metadata: URI query for nonexistent token" ); require(tokenId <= totalSupply(), "URI query for nonexistent token"); if (revealed == false) { return notRevealedUri; } string memory base = baseURI(); return string(abi.encodePacked(base, "/", tokenId.toString(), ".json")); } /* * Pause sale if active, make active if paused */ function flipSaleState() public onlyOwner { saleIsActive = !saleIsActive; } function flipPrivateSaleState() public onlyOwner { privateSaleIsActive = !privateSaleIsActive; } /** * Mints tokens */ function mint(uint256 _count) public payable { uint256 total = totalSupply(); require(saleIsActive, "Sale must be active to mint"); require((total + _count) <= MAX_ELEMENTS, "Max limit"); if (privateSaleIsActive) { require( (privateMintPrice * _count) <= msg.value, "Value below price" ); require(isWhitelisted(msg.sender), "Is not whitelisted"); whitelist[msg.sender].hasMinted = whitelist[msg.sender] .hasMinted .add(_count); } else { require( (publicMintPrice * _count) <= msg.value, "Value below price" ); } for (uint256 i = 0; i < _count; i++) { uint256 mintIndex = totalSupply() + 1; if (totalSupply() < MAX_ELEMENTS) { _safeMint(msg.sender, mintIndex); } } // If we haven't set the starting index and this is either // 1) the last saleable token or // 2) the first token to be sold after the end of pre-sale, set the starting index block if ( startingIndexBlock == 0 && (totalSupply() == MAX_ELEMENTS || block.timestamp >= REVEAL_TIMESTAMP) ) { startingIndexBlock = block.number; } } function freeMint(uint256 _count) public { uint256 total = totalSupply(); require(isWinnerlisted(msg.sender), "Is not winnerlisted"); require(saleIsActive, "Sale must be active to mint"); require((total + _count) <= MAX_ELEMENTS, "Exceeds max supply"); require( winnerlist[msg.sender].claimAmount > 0, "You have no amount to claim" ); require( _count <= winnerlist[msg.sender].claimAmount, "You claim amount exceeded" ); for (uint256 i = 0; i < _count; i++) { uint256 mintIndex = totalSupply() + 1; if (totalSupply() < MAX_ELEMENTS) { _safeMint(msg.sender, mintIndex); } } winnerlist[msg.sender].claimAmount = winnerlist[msg.sender].claimAmount - _count; // If we haven't set the starting index and this is either // 1) the last saleable token or // 2) the first token to be sold after the end of pre-sale, set the starting index block if ( startingIndexBlock == 0 && (totalSupply() == MAX_ELEMENTS || block.timestamp >= REVEAL_TIMESTAMP) ) { startingIndexBlock = block.number; } } /** * Set the starting index for the collection */ function setStartingIndex() external onlyOwner { require(startingIndex == 0, "Starting index is already set"); require(startingIndexBlock != 0, "Starting index block must be set"); startingIndex = uint256(blockhash(startingIndexBlock)) % MAX_ELEMENTS; // Just a sanity case in the worst case if this function is called late (EVM only stores last 256 block hashes) if ((block.number - startingIndexBlock) > 255) { startingIndex = uint256(blockhash(block.number - 1)) % MAX_ELEMENTS; } // Prevent default sequence if (startingIndex == 0) { startingIndex = startingIndex + 1; } } function setWhitelistAddr(address[] memory addrs) public onlyOwner { whitelistAddr = addrs; for (uint256 i = 0; i < whitelistAddr.length; i++) { addAddressToWhitelist(whitelistAddr[i]); } } /** * Set the starting index block for the collection, essentially unblocking * setting starting index */ function emergencySetStartingIndexBlock() external onlyOwner { require(startingIndex == 0, "Starting index is already set"); startingIndexBlock = block.number; } function withdraw() public onlyOwner { uint256 balance = address(this).balance; (bool success, ) = msg.sender.call{value: balance}(""); require(success); } function partialWithdraw(uint256 _amount, address payable _to) external onlyOwner { require(_amount > 0, "Withdraw must be greater than 0"); require(_amount <= address(this).balance, "Amount too high"); (bool success, ) = _to.call{value: _amount}(""); require(success); } function addAddressToWhitelist(address addr) public onlyOwner returns (bool success) { require(!isWhitelisted(addr), "Already whitelisted"); whitelist[addr].addr = addr; success = true; } function isWhitelisted(address addr) public view returns (bool isWhiteListed) { return whitelist[addr].addr == addr; } function addAddressToWinnerlist(address addr, uint256 claimAmount) public onlyOwner returns (bool success) { require(!isWinnerlisted(addr), "Already winnerlisted"); winnerlist[addr].addr = addr; winnerlist[addr].claimAmount = claimAmount; winnerlist[addr].hasMinted = 0; success = true; } function isWinnerlisted(address addr) public view returns (bool isWinnerListed) { return winnerlist[addr].addr == addr; } }
// 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) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol) 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 // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "./IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// SPDX-License-Identifier: MIT 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 "./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() { _setOwner(_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 { _setOwner(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"); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol) 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 generally not needed starting with Solidity 0.8, since 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. 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; } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_bioapes","type":"address"},{"internalType":"address payable","name":"_bct","type":"address"},{"internalType":"address","name":"_rewardingWallet","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"earned","type":"uint256"},{"indexed":false,"internalType":"bool","name":"unstaked","type":"bool"}],"name":"BCTClaimed","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":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lastClaimed","type":"uint256"}],"name":"TokenStaked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint16","name":"tier","type":"uint16"}],"name":"addManyToRegister","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"bool","name":"unstake","type":"bool"}],"name":"claimManyFromRegister","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"getStaked","outputs":[{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"stakeTime","type":"uint256"},{"internalType":"uint256","name":"lockTime","type":"uint256"},{"internalType":"uint16","name":"tier","type":"uint16"}],"internalType":"struct BioApesStaking.NftInfo[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastClaimTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"register","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"stakeTime","type":"uint256"},{"internalType":"uint256","name":"lockTime","type":"uint256"},{"internalType":"uint16","name":"tier","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"rescue","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rescueEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPerDay30","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPerDay60","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPerDay90","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardingWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_paused","type":"bool"}],"name":"setPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_enabled","type":"bool"}],"name":"setRescueEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"setRewardPerDay30","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"setRewardPerDay60","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"setRewardPerDay90","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardingWallet","type":"address"}],"name":"setRewardingWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"stakedTokens","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"stakeTime","type":"uint256"},{"internalType":"uint256","name":"lockTime","type":"uint256"},{"internalType":"uint16","name":"tier","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalBctEarned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalNFTStaked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040526101f46006556103e86007556107d0600855600c805460ff191690553480156200002d57600080fd5b5060405162001f5538038062001f558339810160408190526200005091620000fe565b6200005b33620000ae565b6000805460ff60a01b19168155600180546001600160a01b03199081166001600160a01b0396871617909155600280548216948616949094179093556005805490931691909316179055600a556200016a565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008060006060848603121562000113578283fd5b8351620001208162000151565b6020850151909350620001338162000151565b6040850151909250620001468162000151565b809150509250925092565b6001600160a01b03811681146200016757600080fd5b50565b611ddb806200017a6000396000f3fe608060405234801561001057600080fd5b506004361061018e5760003560e01c806380816f73116100de578063e81c712711610097578063f207564e11610071578063f207564e14610382578063f2fde38b146103ce578063f80570f4146103e1578063fbcf190d146103ea5761018e565b8063e81c712714610320578063e8bd290614610367578063eded3fda1461037a5761018e565b806380816f73146102a65780638da5cb5b146102b9578063960d77ca146102de5780639ce02b8f146102f1578063b67ed098146102fa578063c1beec551461030d5761018e565b8063399080ec1161014b578063607af39711610125578063607af3971461026f5780636a3ef05714610278578063715018a61461028b57806376531008146102935761018e565b8063399080ec1461021f57806339db714f1461023f5780635c975abb1461025c5761018e565b8063080bb1b2146101935780630aa3d065146101af5780630af1ce91146101b8578063150b7a02146101cd578063151cad84146101f957806316c38b3c1461020c575b600080fd5b61019c60065481565b6040519081526020015b60405180910390f35b61019c600a5481565b6101cb6101c6366004611b8a565b6103f3565b005b6101e06101db3660046119a8565b61042b565b6040516001600160e01b031990911681526020016101a6565b6101cb610207366004611b8a565b610496565b6101cb61021a366004611b52565b6104c5565b61023261022d366004611969565b61050d565b6040516101a69190611bde565b600c5461024c9060ff1681565b60405190151581526020016101a6565b61024c600054600160a01b900460ff1690565b61019c600b5481565b6101cb610286366004611a6d565b6105bb565b6101cb610a3c565b6101cb6102a1366004611b52565b610a72565b6101cb6102b4366004611b02565b610aaf565b6000546001600160a01b03165b6040516001600160a01b0390911681526020016101a6565b6101cb6102ec366004611969565b610c89565b61019c60085481565b6101cb610308366004611b8a565b610cd5565b6101cb61031b366004611aad565b610d04565b61033361032e366004611a42565b610e89565b604080519586526001600160a01b03909416602086015292840191909152606083015261ffff16608082015260a0016101a6565b6005546102c6906001600160a01b031681565b61019c610ee5565b610333610390366004611b8a565b60036020819052600091825260409091208054600182015460028301549383015460049093015491936001600160a01b0390911692909161ffff1685565b6101cb6103dc366004611969565b610f74565b61019c60075481565b61019c60095481565b6000546001600160a01b031633146104265760405162461bcd60e51b815260040161041d90611c83565b60405180910390fd5b600755565b60006001600160a01b038516156104845760405162461bcd60e51b815260206004820152601f60248201527f42494f415045533a2043414e204e4f54205354414b45204449524543544c5900604482015260640161041d565b50630a85bd0160e11b95945050505050565b6000546001600160a01b031633146104c05760405162461bcd60e51b815260040161041d90611c83565b600855565b6000546001600160a01b031633146104ef5760405162461bcd60e51b815260040161041d90611c83565b8015610502576104fd61100c565b61050a565b61050a611094565b50565b6001600160a01b0381166000908152600460209081526040808320805482518185028101850190935280835260609492939192909184015b828210156105b05760008481526020908190206040805160a08101825260058602909201805483526001808201546001600160a01b031684860152600282015492840192909252600381015460608401526004015461ffff1660808301529083529092019101610545565b505050509050919050565b600c5460ff1661060d5760405162461bcd60e51b815260206004820152601860248201527f42494f415045533a205245534355452044495341424c45440000000000000000604482015260640161041d565b6040805160a081018252600080825260208201819052918101829052606081018290526080810182905260005b83811015610a355784848281811061066257634e487b7160e01b600052603260045260246000fd5b6020908102929092013560008181526003808552604091829020825160a0810184528154815260018201546001600160a01b03169681018790526002820154938101939093529081015460608301526004015461ffff166080820152909550935050331461070d5760405162461bcd60e51b81526020600482015260186024820152772124a7a0a822a99d1029a427aaa6221021229027aba722a960411b604482015260640161041d565b6001546001600160a01b03166342842e0e3033866040518463ffffffff1660e01b815260040161073f93929190611bba565b600060405180830381600087803b15801561075957600080fd5b505af115801561076d573d6000803e3d6000fd5b505050600084815260036020819052604082208281556001810180546001600160a01b031916905560028101839055908101829055600401805461ffff1916905590505b336000908152600460205260409020548110156109ca573360009081526004602052604090208054859190839081106107fa57634e487b7160e01b600052603260045260246000fd5b90600052602060002090600502016000015414156109b857805b3360009081526004602052604090205461083090600190611d3a565b82101561094357336000908152600460205260409020610851826001611cb8565b8154811061086f57634e487b7160e01b600052603260045260246000fd5b9060005260206000209060050201600460006108883390565b6001600160a01b03166001600160a01b0316815260200190815260200160002082815481106108c757634e487b7160e01b600052603260045260246000fd5b60009182526020909120825460059092020190815560018083015490820180546001600160a01b0319166001600160a01b0390921691909117905560028083015490820155600380830154908201556004918201549101805461ffff191661ffff9092169190911790558061093b81611d51565b915050610814565b5033600090815260046020526040902080548061097057634e487b7160e01b600052603160045260246000fd5b6000828152602081206005600019909301928302018181556001810180546001600160a01b0319169055600281018290556003810191909155600401805461ffff1916905590555b806109c281611d51565b9150506107b1565b506001600a60008282546109de9190611d3a565b9091555050604080518481526000602082015260018183015290517f40dbaac97e2d87a47a33577bd2d6e2df1403c3e5d80fe61b8f28ecc54bdc567d9181900360600190a180610a2d81611d51565b91505061063a565b5050505050565b6000546001600160a01b03163314610a665760405162461bcd60e51b815260040161041d90611c83565b610a70600061111e565b565b6000546001600160a01b03163314610a9c5760405162461bcd60e51b815260040161041d90611c83565b600c805460ff1916911515919091179055565b60005b82811015610c835760015433906001600160a01b0316636352211e868685818110610aed57634e487b7160e01b600052603260045260246000fd5b905060200201356040518263ffffffff1660e01b8152600401610b1291815260200190565b60206040518083038186803b158015610b2a57600080fd5b505afa158015610b3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b62919061198c565b6001600160a01b031614610bb05760405162461bcd60e51b81526020600482015260156024820152742124a7a0a822a99d1024a9902727aa1027aba722a960591b604482015260640161041d565b6001546001600160a01b03166323b872dd3330878786818110610be357634e487b7160e01b600052603260045260246000fd5b905060200201356040518463ffffffff1660e01b8152600401610c0893929190611bba565b600060405180830381600087803b158015610c2257600080fd5b505af1158015610c36573d6000803e3d6000fd5b50505050610c71610c443390565b858584818110610c6457634e487b7160e01b600052603260045260246000fd5b905060200201358461116e565b80610c7b81611d51565b915050610ab2565b50505050565b6000546001600160a01b03163314610cb35760405162461bcd60e51b815260040161041d90611c83565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610cff5760405162461bcd60e51b815260040161041d90611c83565b600655565b610d17600054600160a01b900460ff1690565b15610d345760405162461bcd60e51b815260040161041d90611c59565b6000805b83811015610d8e57610d70858583818110610d6357634e487b7160e01b600052603260045260246000fd5b90506020020135846113ea565b610d7a9083611cb8565b915080610d8681611d51565b915050610d38565b5080610d9a5750610e84565b6000610da4610ee5565b905081811015610df65760405162461bcd60e51b815260206004820152601d60248201527f50656e64696e672052657761726473204e6f7420416c6c6f6361746564000000604482015260640161041d565b6002546005546040516323b872dd60e01b81526001600160a01b03928316926323b872dd92610e2e9291169033908790600401611bba565b602060405180830381600087803b158015610e4857600080fd5b505af1158015610e5c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e809190611b6e565b5050505b505050565b60046020528160005260406000208181548110610ea557600080fd5b6000918252602090912060059091020180546001820154600283015460038401546004909401549295506001600160a01b039091169350919061ffff1685565b600254600554604051636eb1769f60e11b81526001600160a01b039182166004820152306024820152600092919091169063dd62ed3e9060440160206040518083038186803b158015610f3757600080fd5b505afa158015610f4b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f6f9190611ba2565b905090565b6000546001600160a01b03163314610f9e5760405162461bcd60e51b815260040161041d90611c83565b6001600160a01b0381166110035760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161041d565b61050a8161111e565b61101f600054600160a01b900460ff1690565b1561103c5760405162461bcd60e51b815260040161041d90611c59565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586110773390565b6040516001600160a01b03909116815260200160405180910390a1565b6110a7600054600160a01b900460ff1690565b6110ea5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015260640161041d565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33611077565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b611181600054600160a01b900460ff1690565b1561119e5760405162461bcd60e51b815260040161041d90611c59565b60008281526003602052604090208054156111ed5760405162461bcd60e51b815260206004820152600f60248201526e416c7265616479205374616b65642160881b604482015260640161041d565b600481015461ffff161561123a5760405162461bcd60e51b815260206004820152601460248201527320b63932b0b23c9034b71039b7b6b2903a34b2b960611b604482015260640161041d565b8281556001810180546001600160a01b0319166001600160a01b038616179055426002820155600061ffff8316601e14156112835761127c4262278d00611cb8565b90506112ee565b8261ffff16603c141561129d5761127c42624f1a00611cb8565b8261ffff16605a14156112b75761127c426276a700611cb8565b60405162461bcd60e51b815260206004820152600c60248201526b24b73b30b634b2103a34b2b960a11b604482015260640161041d565b60038083018281556004808501805461ffff80891661ffff199283161783556001600160a01b03808c1660009081526020868152604082208054600181810183559184529183208c54600590930201918255808c015482820180546001600160a01b03191691909516179093556002808c015490820155965497870197909755925494909301805490911693909216929092179055600a805491929091611396908490611cb8565b9091555050604080516001600160a01b038716815260208101869052428183015290517f6173e4d2d9dd52aae0ed37afed3adcf924a490639b759ca93d32dc43366c17d29181900360600190a15050505050565b600082815260036020526040812060018101546001600160a01b0316331461144f5760405162461bcd60e51b81526020600482015260186024820152772124a7a0a822a99d1029a427aaa6221021229027aba722a960411b604482015260640161041d565b80600301544210156114a35760405162461bcd60e51b815260206004820152601a60248201527f42494f415045533a2043414e204e4f5420434c41494d20594554000000000000604482015260640161041d565b805484146114e05760405162461bcd60e51b815260206004820152600a602482015269139bdd0814dd185ad95960b21b604482015260640161041d565b600481015461ffff16601e141561153157620151806006548260020154426115089190611d3a565b6115129190611d1b565b61151c9190611cd0565b61152a90633b9aca00611d1b565b91506115b8565b600481015461ffff16603c141561155957620151806007548260020154426115089190611d3a565b600481015461ffff16605a141561158157620151806008548260020154426115089190611d3a565b60405162461bcd60e51b815260206004820152600c60248201526b24b73b30b634b2102a34b2b960a11b604482015260640161041d565b821561189a576001546001600160a01b03166342842e0e3033876040518463ffffffff1660e01b81526004016115f093929190611bba565b600060405180830381600087803b15801561160a57600080fd5b505af115801561161e573d6000803e3d6000fd5b505050600085815260036020819052604082208281556001810180546001600160a01b031916905560028101839055908101829055600401805461ffff1916905590505b3360009081526004602052604090205481101561187b573360009081526004602052604090208054869190839081106116ab57634e487b7160e01b600052603260045260246000fd5b906000526020600020906005020160000154141561186957805b336000908152600460205260409020546116e190600190611d3a565b8110156117f457336000908152600460205260409020611702826001611cb8565b8154811061172057634e487b7160e01b600052603260045260246000fd5b9060005260206000209060050201600460006117393390565b6001600160a01b03166001600160a01b03168152602001908152602001600020828154811061177857634e487b7160e01b600052603260045260246000fd5b60009182526020909120825460059092020190815560018083015490820180546001600160a01b0319166001600160a01b0390921691909117905560028083015490820155600380830154908201556004918201549101805461ffff191661ffff909216919091179055806117ec81611d51565b9150506116c5565b5033600090815260046020526040902080548061182157634e487b7160e01b600052603160045260246000fd5b6000828152602081206005600019909301928302018181556001810180546001600160a01b0319169055600281018290556003810191909155600401805461ffff1916905590555b8061187381611d51565b915050611662565b506001600a600082825461188f9190611d3a565b909155506118d89050565b4260028201556000848152600360205260409020600401546118c39061ffff1662015180611cf0565b6118d29062ffffff1642611cb8565b60038201555b60408051858152602081018490528415158183015290517f40dbaac97e2d87a47a33577bd2d6e2df1403c3e5d80fe61b8f28ecc54bdc567d9181900360600190a15092915050565b60008083601f840112611931578182fd5b50813567ffffffffffffffff811115611948578182fd5b602083019150836020808302850101111561196257600080fd5b9250929050565b60006020828403121561197a578081fd5b813561198581611d82565b9392505050565b60006020828403121561199d578081fd5b815161198581611d82565b6000806000806000608086880312156119bf578081fd5b85356119ca81611d82565b945060208601356119da81611d82565b935060408601359250606086013567ffffffffffffffff808211156119fd578283fd5b818801915088601f830112611a10578283fd5b813581811115611a1e578384fd5b896020828501011115611a2f578384fd5b9699959850939650602001949392505050565b60008060408385031215611a54578182fd5b8235611a5f81611d82565b946020939093013593505050565b60008060208385031215611a7f578182fd5b823567ffffffffffffffff811115611a95578283fd5b611aa185828601611920565b90969095509350505050565b600080600060408486031215611ac1578283fd5b833567ffffffffffffffff811115611ad7578384fd5b611ae386828701611920565b9094509250506020840135611af781611d97565b809150509250925092565b600080600060408486031215611b16578283fd5b833567ffffffffffffffff811115611b2c578384fd5b611b3886828701611920565b909450925050602084013561ffff81168114611af7578182fd5b600060208284031215611b63578081fd5b813561198581611d97565b600060208284031215611b7f578081fd5b815161198581611d97565b600060208284031215611b9b578081fd5b5035919050565b600060208284031215611bb3578081fd5b5051919050565b6001600160a01b039384168152919092166020820152604081019190915260600190565b602080825282518282018190526000919060409081850190868401855b82811015611c4c57815180518552868101516001600160a01b03168786015285810151868601526060808201519086015260809081015161ffff169085015260a09093019290850190600101611bfb565b5091979650505050505050565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008219821115611ccb57611ccb611d6c565b500190565b600082611ceb57634e487b7160e01b81526012600452602481fd5b500490565b600062ffffff80831681851681830481118215151615611d1257611d12611d6c565b02949350505050565b6000816000190483118215151615611d3557611d35611d6c565b500290565b600082821015611d4c57611d4c611d6c565b500390565b6000600019821415611d6557611d65611d6c565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b038116811461050a57600080fd5b801515811461050a57600080fdfea2646970667358221220a3ad7744c9ea2c85c90127389c808853b4d4f786d62da19fa9521ab958b2166564736f6c6343000802003300000000000000000000000004e062345c34ea36b2804a04cd7a99f8c26333d8000000000000000000000000350d3f0f41b5b21f0e252fe2645ae9d55562150a00000000000000000000000049795f28499d8b57428301099d2ff1a52d7b05fc
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061018e5760003560e01c806380816f73116100de578063e81c712711610097578063f207564e11610071578063f207564e14610382578063f2fde38b146103ce578063f80570f4146103e1578063fbcf190d146103ea5761018e565b8063e81c712714610320578063e8bd290614610367578063eded3fda1461037a5761018e565b806380816f73146102a65780638da5cb5b146102b9578063960d77ca146102de5780639ce02b8f146102f1578063b67ed098146102fa578063c1beec551461030d5761018e565b8063399080ec1161014b578063607af39711610125578063607af3971461026f5780636a3ef05714610278578063715018a61461028b57806376531008146102935761018e565b8063399080ec1461021f57806339db714f1461023f5780635c975abb1461025c5761018e565b8063080bb1b2146101935780630aa3d065146101af5780630af1ce91146101b8578063150b7a02146101cd578063151cad84146101f957806316c38b3c1461020c575b600080fd5b61019c60065481565b6040519081526020015b60405180910390f35b61019c600a5481565b6101cb6101c6366004611b8a565b6103f3565b005b6101e06101db3660046119a8565b61042b565b6040516001600160e01b031990911681526020016101a6565b6101cb610207366004611b8a565b610496565b6101cb61021a366004611b52565b6104c5565b61023261022d366004611969565b61050d565b6040516101a69190611bde565b600c5461024c9060ff1681565b60405190151581526020016101a6565b61024c600054600160a01b900460ff1690565b61019c600b5481565b6101cb610286366004611a6d565b6105bb565b6101cb610a3c565b6101cb6102a1366004611b52565b610a72565b6101cb6102b4366004611b02565b610aaf565b6000546001600160a01b03165b6040516001600160a01b0390911681526020016101a6565b6101cb6102ec366004611969565b610c89565b61019c60085481565b6101cb610308366004611b8a565b610cd5565b6101cb61031b366004611aad565b610d04565b61033361032e366004611a42565b610e89565b604080519586526001600160a01b03909416602086015292840191909152606083015261ffff16608082015260a0016101a6565b6005546102c6906001600160a01b031681565b61019c610ee5565b610333610390366004611b8a565b60036020819052600091825260409091208054600182015460028301549383015460049093015491936001600160a01b0390911692909161ffff1685565b6101cb6103dc366004611969565b610f74565b61019c60075481565b61019c60095481565b6000546001600160a01b031633146104265760405162461bcd60e51b815260040161041d90611c83565b60405180910390fd5b600755565b60006001600160a01b038516156104845760405162461bcd60e51b815260206004820152601f60248201527f42494f415045533a2043414e204e4f54205354414b45204449524543544c5900604482015260640161041d565b50630a85bd0160e11b95945050505050565b6000546001600160a01b031633146104c05760405162461bcd60e51b815260040161041d90611c83565b600855565b6000546001600160a01b031633146104ef5760405162461bcd60e51b815260040161041d90611c83565b8015610502576104fd61100c565b61050a565b61050a611094565b50565b6001600160a01b0381166000908152600460209081526040808320805482518185028101850190935280835260609492939192909184015b828210156105b05760008481526020908190206040805160a08101825260058602909201805483526001808201546001600160a01b031684860152600282015492840192909252600381015460608401526004015461ffff1660808301529083529092019101610545565b505050509050919050565b600c5460ff1661060d5760405162461bcd60e51b815260206004820152601860248201527f42494f415045533a205245534355452044495341424c45440000000000000000604482015260640161041d565b6040805160a081018252600080825260208201819052918101829052606081018290526080810182905260005b83811015610a355784848281811061066257634e487b7160e01b600052603260045260246000fd5b6020908102929092013560008181526003808552604091829020825160a0810184528154815260018201546001600160a01b03169681018790526002820154938101939093529081015460608301526004015461ffff166080820152909550935050331461070d5760405162461bcd60e51b81526020600482015260186024820152772124a7a0a822a99d1029a427aaa6221021229027aba722a960411b604482015260640161041d565b6001546001600160a01b03166342842e0e3033866040518463ffffffff1660e01b815260040161073f93929190611bba565b600060405180830381600087803b15801561075957600080fd5b505af115801561076d573d6000803e3d6000fd5b505050600084815260036020819052604082208281556001810180546001600160a01b031916905560028101839055908101829055600401805461ffff1916905590505b336000908152600460205260409020548110156109ca573360009081526004602052604090208054859190839081106107fa57634e487b7160e01b600052603260045260246000fd5b90600052602060002090600502016000015414156109b857805b3360009081526004602052604090205461083090600190611d3a565b82101561094357336000908152600460205260409020610851826001611cb8565b8154811061086f57634e487b7160e01b600052603260045260246000fd5b9060005260206000209060050201600460006108883390565b6001600160a01b03166001600160a01b0316815260200190815260200160002082815481106108c757634e487b7160e01b600052603260045260246000fd5b60009182526020909120825460059092020190815560018083015490820180546001600160a01b0319166001600160a01b0390921691909117905560028083015490820155600380830154908201556004918201549101805461ffff191661ffff9092169190911790558061093b81611d51565b915050610814565b5033600090815260046020526040902080548061097057634e487b7160e01b600052603160045260246000fd5b6000828152602081206005600019909301928302018181556001810180546001600160a01b0319169055600281018290556003810191909155600401805461ffff1916905590555b806109c281611d51565b9150506107b1565b506001600a60008282546109de9190611d3a565b9091555050604080518481526000602082015260018183015290517f40dbaac97e2d87a47a33577bd2d6e2df1403c3e5d80fe61b8f28ecc54bdc567d9181900360600190a180610a2d81611d51565b91505061063a565b5050505050565b6000546001600160a01b03163314610a665760405162461bcd60e51b815260040161041d90611c83565b610a70600061111e565b565b6000546001600160a01b03163314610a9c5760405162461bcd60e51b815260040161041d90611c83565b600c805460ff1916911515919091179055565b60005b82811015610c835760015433906001600160a01b0316636352211e868685818110610aed57634e487b7160e01b600052603260045260246000fd5b905060200201356040518263ffffffff1660e01b8152600401610b1291815260200190565b60206040518083038186803b158015610b2a57600080fd5b505afa158015610b3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b62919061198c565b6001600160a01b031614610bb05760405162461bcd60e51b81526020600482015260156024820152742124a7a0a822a99d1024a9902727aa1027aba722a960591b604482015260640161041d565b6001546001600160a01b03166323b872dd3330878786818110610be357634e487b7160e01b600052603260045260246000fd5b905060200201356040518463ffffffff1660e01b8152600401610c0893929190611bba565b600060405180830381600087803b158015610c2257600080fd5b505af1158015610c36573d6000803e3d6000fd5b50505050610c71610c443390565b858584818110610c6457634e487b7160e01b600052603260045260246000fd5b905060200201358461116e565b80610c7b81611d51565b915050610ab2565b50505050565b6000546001600160a01b03163314610cb35760405162461bcd60e51b815260040161041d90611c83565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610cff5760405162461bcd60e51b815260040161041d90611c83565b600655565b610d17600054600160a01b900460ff1690565b15610d345760405162461bcd60e51b815260040161041d90611c59565b6000805b83811015610d8e57610d70858583818110610d6357634e487b7160e01b600052603260045260246000fd5b90506020020135846113ea565b610d7a9083611cb8565b915080610d8681611d51565b915050610d38565b5080610d9a5750610e84565b6000610da4610ee5565b905081811015610df65760405162461bcd60e51b815260206004820152601d60248201527f50656e64696e672052657761726473204e6f7420416c6c6f6361746564000000604482015260640161041d565b6002546005546040516323b872dd60e01b81526001600160a01b03928316926323b872dd92610e2e9291169033908790600401611bba565b602060405180830381600087803b158015610e4857600080fd5b505af1158015610e5c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e809190611b6e565b5050505b505050565b60046020528160005260406000208181548110610ea557600080fd5b6000918252602090912060059091020180546001820154600283015460038401546004909401549295506001600160a01b039091169350919061ffff1685565b600254600554604051636eb1769f60e11b81526001600160a01b039182166004820152306024820152600092919091169063dd62ed3e9060440160206040518083038186803b158015610f3757600080fd5b505afa158015610f4b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f6f9190611ba2565b905090565b6000546001600160a01b03163314610f9e5760405162461bcd60e51b815260040161041d90611c83565b6001600160a01b0381166110035760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161041d565b61050a8161111e565b61101f600054600160a01b900460ff1690565b1561103c5760405162461bcd60e51b815260040161041d90611c59565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586110773390565b6040516001600160a01b03909116815260200160405180910390a1565b6110a7600054600160a01b900460ff1690565b6110ea5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015260640161041d565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33611077565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b611181600054600160a01b900460ff1690565b1561119e5760405162461bcd60e51b815260040161041d90611c59565b60008281526003602052604090208054156111ed5760405162461bcd60e51b815260206004820152600f60248201526e416c7265616479205374616b65642160881b604482015260640161041d565b600481015461ffff161561123a5760405162461bcd60e51b815260206004820152601460248201527320b63932b0b23c9034b71039b7b6b2903a34b2b960611b604482015260640161041d565b8281556001810180546001600160a01b0319166001600160a01b038616179055426002820155600061ffff8316601e14156112835761127c4262278d00611cb8565b90506112ee565b8261ffff16603c141561129d5761127c42624f1a00611cb8565b8261ffff16605a14156112b75761127c426276a700611cb8565b60405162461bcd60e51b815260206004820152600c60248201526b24b73b30b634b2103a34b2b960a11b604482015260640161041d565b60038083018281556004808501805461ffff80891661ffff199283161783556001600160a01b03808c1660009081526020868152604082208054600181810183559184529183208c54600590930201918255808c015482820180546001600160a01b03191691909516179093556002808c015490820155965497870197909755925494909301805490911693909216929092179055600a805491929091611396908490611cb8565b9091555050604080516001600160a01b038716815260208101869052428183015290517f6173e4d2d9dd52aae0ed37afed3adcf924a490639b759ca93d32dc43366c17d29181900360600190a15050505050565b600082815260036020526040812060018101546001600160a01b0316331461144f5760405162461bcd60e51b81526020600482015260186024820152772124a7a0a822a99d1029a427aaa6221021229027aba722a960411b604482015260640161041d565b80600301544210156114a35760405162461bcd60e51b815260206004820152601a60248201527f42494f415045533a2043414e204e4f5420434c41494d20594554000000000000604482015260640161041d565b805484146114e05760405162461bcd60e51b815260206004820152600a602482015269139bdd0814dd185ad95960b21b604482015260640161041d565b600481015461ffff16601e141561153157620151806006548260020154426115089190611d3a565b6115129190611d1b565b61151c9190611cd0565b61152a90633b9aca00611d1b565b91506115b8565b600481015461ffff16603c141561155957620151806007548260020154426115089190611d3a565b600481015461ffff16605a141561158157620151806008548260020154426115089190611d3a565b60405162461bcd60e51b815260206004820152600c60248201526b24b73b30b634b2102a34b2b960a11b604482015260640161041d565b821561189a576001546001600160a01b03166342842e0e3033876040518463ffffffff1660e01b81526004016115f093929190611bba565b600060405180830381600087803b15801561160a57600080fd5b505af115801561161e573d6000803e3d6000fd5b505050600085815260036020819052604082208281556001810180546001600160a01b031916905560028101839055908101829055600401805461ffff1916905590505b3360009081526004602052604090205481101561187b573360009081526004602052604090208054869190839081106116ab57634e487b7160e01b600052603260045260246000fd5b906000526020600020906005020160000154141561186957805b336000908152600460205260409020546116e190600190611d3a565b8110156117f457336000908152600460205260409020611702826001611cb8565b8154811061172057634e487b7160e01b600052603260045260246000fd5b9060005260206000209060050201600460006117393390565b6001600160a01b03166001600160a01b03168152602001908152602001600020828154811061177857634e487b7160e01b600052603260045260246000fd5b60009182526020909120825460059092020190815560018083015490820180546001600160a01b0319166001600160a01b0390921691909117905560028083015490820155600380830154908201556004918201549101805461ffff191661ffff909216919091179055806117ec81611d51565b9150506116c5565b5033600090815260046020526040902080548061182157634e487b7160e01b600052603160045260246000fd5b6000828152602081206005600019909301928302018181556001810180546001600160a01b0319169055600281018290556003810191909155600401805461ffff1916905590555b8061187381611d51565b915050611662565b506001600a600082825461188f9190611d3a565b909155506118d89050565b4260028201556000848152600360205260409020600401546118c39061ffff1662015180611cf0565b6118d29062ffffff1642611cb8565b60038201555b60408051858152602081018490528415158183015290517f40dbaac97e2d87a47a33577bd2d6e2df1403c3e5d80fe61b8f28ecc54bdc567d9181900360600190a15092915050565b60008083601f840112611931578182fd5b50813567ffffffffffffffff811115611948578182fd5b602083019150836020808302850101111561196257600080fd5b9250929050565b60006020828403121561197a578081fd5b813561198581611d82565b9392505050565b60006020828403121561199d578081fd5b815161198581611d82565b6000806000806000608086880312156119bf578081fd5b85356119ca81611d82565b945060208601356119da81611d82565b935060408601359250606086013567ffffffffffffffff808211156119fd578283fd5b818801915088601f830112611a10578283fd5b813581811115611a1e578384fd5b896020828501011115611a2f578384fd5b9699959850939650602001949392505050565b60008060408385031215611a54578182fd5b8235611a5f81611d82565b946020939093013593505050565b60008060208385031215611a7f578182fd5b823567ffffffffffffffff811115611a95578283fd5b611aa185828601611920565b90969095509350505050565b600080600060408486031215611ac1578283fd5b833567ffffffffffffffff811115611ad7578384fd5b611ae386828701611920565b9094509250506020840135611af781611d97565b809150509250925092565b600080600060408486031215611b16578283fd5b833567ffffffffffffffff811115611b2c578384fd5b611b3886828701611920565b909450925050602084013561ffff81168114611af7578182fd5b600060208284031215611b63578081fd5b813561198581611d97565b600060208284031215611b7f578081fd5b815161198581611d97565b600060208284031215611b9b578081fd5b5035919050565b600060208284031215611bb3578081fd5b5051919050565b6001600160a01b039384168152919092166020820152604081019190915260600190565b602080825282518282018190526000919060409081850190868401855b82811015611c4c57815180518552868101516001600160a01b03168786015285810151868601526060808201519086015260809081015161ffff169085015260a09093019290850190600101611bfb565b5091979650505050505050565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008219821115611ccb57611ccb611d6c565b500190565b600082611ceb57634e487b7160e01b81526012600452602481fd5b500490565b600062ffffff80831681851681830481118215151615611d1257611d12611d6c565b02949350505050565b6000816000190483118215151615611d3557611d35611d6c565b500290565b600082821015611d4c57611d4c611d6c565b500390565b6000600019821415611d6557611d65611d6c565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b038116811461050a57600080fd5b801515811461050a57600080fdfea2646970667358221220a3ad7744c9ea2c85c90127389c808853b4d4f786d62da19fa9521ab958b2166564736f6c63430008020033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000004e062345c34ea36b2804a04cd7a99f8c26333d8000000000000000000000000350d3f0f41b5b21f0e252fe2645ae9d55562150a00000000000000000000000049795f28499d8b57428301099d2ff1a52d7b05fc
-----Decoded View---------------
Arg [0] : _bioapes (address): 0x04E062345C34EA36B2804a04Cd7A99F8C26333d8
Arg [1] : _bct (address): 0x350D3f0f41b5B21F0e252fe2645AE9D55562150a
Arg [2] : _rewardingWallet (address): 0x49795F28499d8b57428301099D2FF1a52d7b05Fc
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 00000000000000000000000004e062345c34ea36b2804a04cd7a99f8c26333d8
Arg [1] : 000000000000000000000000350d3f0f41b5b21f0e252fe2645ae9d55562150a
Arg [2] : 00000000000000000000000049795f28499d8b57428301099d2ff1a52d7b05fc
Deployed Bytecode Sourcemap
722:8132:4:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1436:35;;;;;;;;;13008:25:13;;;12996:2;12981:18;1436:35:4;;;;;;;;1722:29;;;;;;7646:99;;;;;;:::i;:::-;;:::i;:::-;;8552:299;;;;;;:::i;:::-;;:::i;:::-;;;-1:-1:-1;;;;;;7512:33:13;;;7494:52;;7482:2;7467:18;8552:299:4;7449:103:13;7753:98:4;;;;;;:::i;:::-;;:::i;8291:118::-;;;;;;:::i;:::-;;:::i;6227:120::-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;1919:33::-;;;;;;;;;;;;7323:14:13;;7316:22;7298:41;;7286:2;7271:18;1919:33:4;7253:92:13;1070:86:11;;1117:4;1141:7;-1:-1:-1;;;1141:7:11;;;;;1070:86;1797:33:4;;;;;;6474:1057;;;;;;:::i;:::-;;:::i;1650:94:10:-;;;:::i;8116:103:4:-;;;;;;:::i;:::-;;:::i;2205:386::-;;;;;;:::i;:::-;;:::i;999:87:10:-;1045:7;1072:6;-1:-1:-1;;;;;1072:6:10;999:87;;;-1:-1:-1;;;;;5025:32:13;;;5007:51;;4995:2;4980:18;999:87:10;4962:102:13;7859:122:4;;;;;;:::i;:::-;;:::i;1559:36::-;;;;;;7539:99;;;;;;:::i;:::-;;:::i;3775:493::-;;;;;;:::i;:::-;;:::i;1339:49::-;;;;;;:::i;:::-;;:::i;:::-;;;;13301:25:13;;;-1:-1:-1;;;;;13362:32:13;;;13357:2;13342:18;;13335:60;13411:18;;;13404:34;;;;13469:2;13454:18;;13447:34;13530:6;13518:19;13512:3;13497:19;;13490:48;13288:3;13273:19;1339:49:4;13255:289:13;1397:30:4;;;;;-1:-1:-1;;;;;1397:30:4;;;8417:127;;;:::i;1287:43::-;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1287:43:4;;;;;;;;;;1899:192:10;;;;;;:::i;:::-;;:::i;1514:36:4:-;;;;;;1641:29;;;;;;7646:99;1045:7:10;1072:6;-1:-1:-1;;;;;1072:6:10;682:10:6;1219:23:10;1211:68;;;;-1:-1:-1;;;1211:68:10;;;;;;;:::i;:::-;;;;;;;;;7715:14:4::1;:22:::0;7646:99::o;8552:299::-;8701:6;-1:-1:-1;;;;;8728:20:4;;;8720:64;;;;-1:-1:-1;;;8720:64:4;;10271:2:13;8720:64:4;;;10253:21:13;10310:2;10290:18;;;10283:30;10349:33;10329:18;;;10322:61;10400:18;;8720:64:4;10243:181:13;8720:64:4;-1:-1:-1;;;;8552:299:4;;;;;;;:::o;7753:98::-;1045:7:10;1072:6;-1:-1:-1;;;;;1072:6:10;682:10:6;1219:23:10;1211:68;;;;-1:-1:-1;;;1211:68:10;;;;;;;:::i;:::-;7822:14:4::1;:21:::0;7753:98::o;8291:118::-;1045:7:10;1072:6;-1:-1:-1;;;;;1072:6:10;682:10:6;1219:23:10;1211:68;;;;-1:-1:-1;;;1211:68:10;;;;;;;:::i;:::-;8358:7:4::1;8354:47;;;8367:8;:6;:8::i;:::-;8354:47;;;8391:10;:8;:10::i;:::-;8291:118:::0;:::o;6227:120::-;-1:-1:-1;;;;;6319:20:4;;;;;;:12;:20;;;;;;;;6312:27;;;;;;;;;;;;;;;;;6283:16;;6312:27;;6319:20;;6312:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;6312:27:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6227:120;;;:::o;6474:1057::-;6547:13;;;;6539:50;;;;-1:-1:-1;;;6539:50:4;;9918:2:13;6539:50:4;;;9900:21:13;9957:2;9937:18;;;9930:30;9996:26;9976:18;;;9969:54;10040:18;;6539:50:4;9890:174:13;6539:50:4;-1:-1:-1;;;;;;;;6600:15:4;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;6662:6:4;6657:867;6674:19;;;6657:867;;;6725:8;;6734:1;6725:11;;;;;-1:-1:-1;;;6725:11:4;;;;;;;;;;;;;;;;;;6759:17;;;;:8;:17;;;;;;;;6751:25;;;;;;;;;;;;;;;-1:-1:-1;;;;;6751:25:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6725:11;;-1:-1:-1;6751:25:4;-1:-1:-1;;682:10:6;6799:27:4;6791:64;;;;-1:-1:-1;;;6791:64:4;;11326:2:13;6791:64:4;;;11308:21:13;11365:2;11345:18;;;11338:30;-1:-1:-1;;;11384:18:13;;;11377:54;11448:18;;6791:64:4;11298:174:13;6791:64:4;6870:7;;-1:-1:-1;;;;;6870:7:4;:24;6903:4;682:10:6;6924:7:4;6870:62;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;6972:17:4;;;;:8;:17;;;;;;;6965:24;;;;;;;;-1:-1:-1;;;;;;6965:24:4;;;;;;;;;;;;;;;;;;;-1:-1:-1;;6965:24:4;;;6972:17;-1:-1:-1;7004:427:4;682:10:6;7025:26:4;;;;:12;:26;;;;;:33;7021:37;;7004:427;;;682:10:6;7088:26:4;;;;:12;:26;;;;;:29;;7129:7;;7088:26;7115:1;;7088:29;;;;-1:-1:-1;;;7088:29:4;;;;;;;;;;;;;;;;;;;:37;;;:48;7084:332;;;7175:1;7161:181;682:10:6;7182:26:4;;;;:12;:26;;;;;:33;:37;;7218:1;;7182:37;:::i;:::-;7178:1;:41;7161:181;;;682:10:6;7285:26:4;;;;:12;:26;;;;;7312:5;:1;7316;7312:5;:::i;:::-;7285:33;;;;;;-1:-1:-1;;;7285:33:4;;;;;;;;;;;;;;;;;;;7253:12;:26;7266:12;682:10:6;602:98;;7266:12:4;-1:-1:-1;;;;;7253:26:4;-1:-1:-1;;;;;7253:26:4;;;;;;;;;;;;7280:1;7253:29;;;;;;-1:-1:-1;;;7253:29:4;;;;;;;;;;;;;;;;;:65;;:29;;;;;:65;;;;;;;;;;;;;-1:-1:-1;;;;;;7253:65:4;-1:-1:-1;;;;;7253:65:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;7253:65:4;;;;;;;;;;;7221:3;;;;:::i;:::-;;;;7161:181;;;-1:-1:-1;682:10:6;7364:26:4;;;;:12;:26;;;;;:32;;;;;-1:-1:-1;;;7364:32:4;;;;;;;;;;;;;;;;;-1:-1:-1;;7364:32:4;;;;;;;;;;;;;;;-1:-1:-1;;;;;;7364:32:4;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;7364:32:4;;;;;7084:332;7060:3;;;;:::i;:::-;;;;7004:427;;;;7463:1;7445:14;;:19;;;;;;;:::i;:::-;;;;-1:-1:-1;;7484:28:4;;;13753:25:13;;;7504:1:4;13809:2:13;13794:18;;13787:34;7507:4:4;13837:18:13;;;13830:50;7484:28:4;;;;;;;13741:2:13;7484:28:4;;;6695:3;;;;:::i;:::-;;;;6657:867;;;;6474:1057;;;;:::o;1650:94:10:-;1045:7;1072:6;-1:-1:-1;;;;;1072:6:10;682:10:6;1219:23:10;1211:68;;;;-1:-1:-1;;;1211:68:10;;;;;;;:::i;:::-;1715:21:::1;1733:1;1715:9;:21::i;:::-;1650:94::o:0;8116:103:4:-;1045:7:10;1072:6;-1:-1:-1;;;;;1072:6:10;682:10:6;1219:23:10;1211:68;;;;-1:-1:-1;;;1211:68:10;;;;;;;:::i;:::-;8187:13:4::1;:24:::0;;-1:-1:-1;;8187:24:4::1;::::0;::::1;;::::0;;;::::1;::::0;;8116:103::o;2205:386::-;2299:6;2294:290;2311:19;;;2294:290;;;2360:7;;682:10:6;;-1:-1:-1;;;;;2360:7:4;:15;2376:8;;2385:1;2376:11;;;;;-1:-1:-1;;;2376:11:4;;;;;;;;;;;;;;;2360:28;;;;;;;;;;;;;13008:25:13;;12996:2;12981:18;;12963:76;2360:28:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;;;;;2360:44:4;;2352:78;;;;-1:-1:-1;;;2352:78:4;;10631:2:13;2352:78:4;;;10613:21:13;10670:2;10650:18;;;10643:30;-1:-1:-1;;;10689:18:13;;;10682:51;10750:18;;2352:78:4;10603:171:13;2352:78:4;2445:7;;-1:-1:-1;;;;;2445:7:4;:20;682:10:6;2488:4:4;2495:8;;2504:1;2495:11;;;;;-1:-1:-1;;;2495:11:4;;;;;;;;;;;;;;;2445:62;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2522:50;2540:12;682:10:6;602:98;;2540:12:4;2554:8;;2563:1;2554:11;;;;;-1:-1:-1;;;2554:11:4;;;;;;;;;;;;;;;2567:4;2522:17;:50::i;:::-;2332:3;;;;:::i;:::-;;;;2294:290;;;;2205:386;;;:::o;7859:122::-;1045:7:10;1072:6;-1:-1:-1;;;;;1072:6:10;682:10:6;1219:23:10;1211:68;;;;-1:-1:-1;;;1211:68:10;;;;;;;:::i;:::-;7940:15:4::1;:33:::0;;-1:-1:-1;;;;;;7940:33:4::1;-1:-1:-1::0;;;;;7940:33:4;;;::::1;::::0;;;::::1;::::0;;7859:122::o;7539:99::-;1045:7:10;1072:6;-1:-1:-1;;;;;1072:6:10;682:10:6;1219:23:10;1211:68;;;;-1:-1:-1;;;1211:68:10;;;;;;;:::i;:::-;7608:14:4::1;:22:::0;7539:99::o;3775:493::-;1396:8:11;1117:4;1141:7;-1:-1:-1;;;1141:7:11;;;;;1070:86;1396:8;1395:9;1387:38;;;;-1:-1:-1;;;1387:38:11;;;;;;;:::i;:::-;3883:15:4::1;3918:6:::0;3913:124:::1;3930:19:::0;;::::1;3913:124;;;3982:43;4004:8;;4013:1;4004:11;;;;;-1:-1:-1::0;;;4004:11:4::1;;;;;;;;;;;;;;;4017:7;3982:21;:43::i;:::-;3971:54;::::0;;::::1;:::i;:::-;::::0;-1:-1:-1;3951:3:4;::::1;::::0;::::1;:::i;:::-;;;;3913:124;;;-1:-1:-1::0;4051:12:4;4047:25:::1;;4065:7;;;4047:25;4082:18;4103:16;:14;:16::i;:::-;4082:37;;4152:7;4138:10;:21;;4130:63;;;::::0;-1:-1:-1;;;4130:63:4;;9560:2:13;4130:63:4::1;::::0;::::1;9542:21:13::0;9599:2;9579:18;;;9572:30;9638:31;9618:18;;;9611:59;9687:18;;4130:63:4::1;9532:179:13::0;4130:63:4::1;4204:3;::::0;4221:15:::1;::::0;4204:56:::1;::::0;-1:-1:-1;;;4204:56:4;;-1:-1:-1;;;;;4204:3:4;;::::1;::::0;:16:::1;::::0;:56:::1;::::0;4221:15;::::1;::::0;682:10:6;;4252:7:4;;4204:56:::1;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;1436:1:11;;;3775:493:4::0;;;:::o;1339:49::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;1339:49:4;;;;-1:-1:-1;1339:49:4;;;;;:::o;8417:127::-;8490:3;;8504:15;;8490:46;;-1:-1:-1;;;8490:46:4;;-1:-1:-1;;;;;8504:15:4;;;8490:46;;;5281:34:13;8530:4:4;5331:18:13;;;5324:43;8464:7:4;;8490:3;;;;;:13;;5216:18:13;;8490:46:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;8483:53;;8417:127;:::o;1899:192:10:-;1045:7;1072:6;-1:-1:-1;;;;;1072:6:10;682:10:6;1219:23:10;1211:68;;;;-1:-1:-1;;;1211:68:10;;;;;;;:::i;:::-;-1:-1:-1;;;;;1988:22:10;::::1;1980:73;;;::::0;-1:-1:-1;;;1980:73:10;;8798:2:13;1980:73:10::1;::::0;::::1;8780:21:13::0;8837:2;8817:18;;;8810:30;8876:34;8856:18;;;8849:62;-1:-1:-1;;;8927:18:13;;;8920:36;8973:19;;1980:73:10::1;8770:228:13::0;1980:73:10::1;2064:19;2074:8;2064:9;:19::i;1870:118:11:-:0;1396:8;1117:4;1141:7;-1:-1:-1;;;1141:7:11;;;;;1070:86;1396:8;1395:9;1387:38;;;;-1:-1:-1;;;1387:38:11;;;;;;;:::i;:::-;1930:7:::1;:14:::0;;-1:-1:-1;;;;1930:14:11::1;-1:-1:-1::0;;;1930:14:11::1;::::0;;1960:20:::1;1967:12;682:10:6::0;602:98;;1967:12:11::1;1960:20;::::0;-1:-1:-1;;;;;5025:32:13;;;5007:51;;4995:2;4980:18;1960:20:11::1;;;;;;;1870:118::o:0;2129:120::-;1673:8;1117:4;1141:7;-1:-1:-1;;;1141:7:11;;;;;1070:86;1673:8;1665:41;;;;-1:-1:-1;;;1665:41:11;;7759:2:13;1665:41:11;;;7741:21:13;7798:2;7778:18;;;7771:30;-1:-1:-1;;;7817:18:13;;;7810:50;7877:18;;1665:41:11;7731:170:13;1665:41:11;2198:5:::1;2188:15:::0;;-1:-1:-1;;;;2188:15:11::1;::::0;;2219:22:::1;682:10:6::0;2228:12:11::1;602:98:6::0;2099:173:10;2155:16;2174:6;;-1:-1:-1;;;;;2191:17:10;;;-1:-1:-1;;;;;;2191:17:10;;;;;;2224:40;;2174:6;;;;;;;2224:40;;2155:16;2224:40;2099:173;;:::o;2599:963:4:-;1396:8:11;1117:4;1141:7;-1:-1:-1;;;1141:7:11;;;;;1070:86;1396:8;1395:9;1387:38;;;;-1:-1:-1;;;1387:38:11;;;;;;;:::i;:::-;2707:24:4::1;2734:17:::0;;;:8:::1;:17;::::0;;;;2770:16;;:21;2762:49:::1;;;::::0;-1:-1:-1;;;2762:49:4;;12379:2:13;2762:49:4::1;::::0;::::1;12361:21:13::0;12418:2;12398:18;;;12391:30;-1:-1:-1;;;12437:18:13;;;12430:45;12492:18;;2762:49:4::1;12351:165:13::0;2762:49:4::1;2830:13;::::0;::::1;::::0;::::1;;:18:::0;2822:51:::1;;;::::0;-1:-1:-1;;;2822:51:4;;8108:2:13;2822:51:4::1;::::0;::::1;8090:21:13::0;8147:2;8127:18;;;8120:30;-1:-1:-1;;;8166:18:13;;;8159:50;8226:18;;2822:51:4::1;8080:170:13::0;2822:51:4::1;2884:26:::0;;;2921:14:::1;::::0;::::1;:24:::0;;-1:-1:-1;;;;;;2921:24:4::1;-1:-1:-1::0;;;;;2921:24:4;::::1;;::::0;;2977:15:::1;2956:18;::::0;::::1;:36:::0;-1:-1:-1;3038:10:4::1;::::0;::::1;3046:2;3038:10;3034:312;;;3076:25;:15;3094:7;3076:25;:::i;:::-;3065:36;;3034:312;;;3123:4;:10;;3131:2;3123:10;3119:227;;;3161:25;:15;3179:7;3161:25;:::i;3119:227::-;3208:4;:10;;3216:2;3208:10;3204:142;;;3246:25;:15;3264:7;3246:25;:::i;3204:142::-;3304:30;::::0;-1:-1:-1;;;3304:30:4;;8457:2:13;3304:30:4::1;::::0;::::1;8439:21:13::0;8496:2;8476:18;;;8469:30;-1:-1:-1;;;8515:18:13;;;8508:42;8567:18;;3304:30:4::1;8429:162:13::0;3304:30:4::1;3356:17;::::0;;::::1;:28:::0;;;3395:13:::1;::::0;;::::1;:20:::0;;::::1;::::0;;::::1;-1:-1:-1::0;;3395:20:4;;::::1;;::::0;;-1:-1:-1;;;;;3426:21:4;;::::1;3395:13;3426:21:::0;;;::::1;::::0;;;;;;:36;;3395:20;3426:36;;::::1;::::0;;;;;;;;;;::::1;::::0;;::::1;;::::0;;;;;::::1;::::0;;;::::1;::::0;;-1:-1:-1;;;;;;3426:36:4::1;::::0;;;::::1;;::::0;;;::::1;::::0;;::::1;::::0;;;::::1;::::0;;;;;::::1;::::0;;;;;;;;;::::1;::::0;;;;::::1;::::0;;;::::1;::::0;;;::::1;::::0;;3473:14:::1;:19:::0;;3395:20;;3473:14;;:19:::1;::::0;3395:20;;3473:19:::1;:::i;:::-;::::0;;;-1:-1:-1;;3508:46:4::1;::::0;;-1:-1:-1;;;;;5978:32:13;;5960:51;;6042:2;6027:18;;6020:34;;;3538:15:4::1;6070:18:13::0;;;6063:34;3508:46:4;;::::1;::::0;;;;5948:2:13;3508:46:4;;::::1;1436:1:11;;2599:963:4::0;;;:::o;4463:1756::-;4543:15;4595:17;;;:8;:17;;;;;4631:11;;;;-1:-1:-1;;;;;4631:11:4;682:10:6;4631:27:4;4623:64;;;;-1:-1:-1;;;4623:64:4;;11326:2:13;4623:64:4;;;11308:21:13;11365:2;11345:18;;;11338:30;-1:-1:-1;;;11384:18:13;;;11377:54;11448:18;;4623:64:4;11298:174:13;4623:64:4;4725:5;:14;;;4706:15;:33;;4698:72;;;;-1:-1:-1;;;4698:72:4;;9205:2:13;4698:72:4;;;9187:21:13;9244:2;9224:18;;;9217:30;9283:28;9263:18;;;9256:56;9329:18;;4698:72:4;9177:176:13;4698:72:4;4789:13;;:24;;4781:47;;;;-1:-1:-1;;;4781:47:4;;12040:2:13;4781:47:4;;;12022:21:13;12079:2;12059:18;;;12052:30;-1:-1:-1;;;12098:18:13;;;12091:40;12148:18;;4781:47:4;12012:160:13;4781:47:4;4845:10;;;;;;4859:2;4845:16;4841:498;;;4951:6;4934:14;;4915:5;:15;;;4897;:33;;;;:::i;:::-;4896:52;;;;:::i;:::-;:61;;;;:::i;:::-;:73;;4961:7;4896:73;:::i;:::-;4878:92;;4841:498;;;4992:10;;;;;;5006:2;4992:16;4988:351;;;5098:6;5081:14;;5062:5;:15;;;5044;:33;;;;:::i;4988:351::-;5139:10;;;;;;5153:2;5139:16;5135:204;;;5245:6;5228:14;;5209:5;:15;;;5191;:33;;;;:::i;5135:204::-;5297:30;;-1:-1:-1;;;5297:30:4;;12723:2:13;5297:30:4;;;12705:21:13;12762:2;12742:18;;;12735:30;-1:-1:-1;;;12781:18:13;;;12774:42;12833:18;;5297:30:4;12695:162:13;5297:30:4;5355:7;5351:808;;;5379:7;;-1:-1:-1;;;;;5379:7:4;:24;5412:4;682:10:6;5433:7:4;5379:62;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;5480:17:4;;;;:8;:17;;;;;;;5473:24;;;;;;;;-1:-1:-1;;;;;;5473:24:4;;;;;;;;;;;;;;;;;;;-1:-1:-1;;5473:24:4;;;5480:17;-1:-1:-1;5512:427:4;682:10:6;5533:26:4;;;;:12;:26;;;;;:33;5529:37;;5512:427;;;682:10:6;5596:26:4;;;;:12;:26;;;;;:29;;5637:7;;5596:26;5623:1;;5596:29;;;;-1:-1:-1;;;5596:29:4;;;;;;;;;;;;;;;;;;;:37;;;:48;5592:332;;;5683:1;5669:181;682:10:6;5690:26:4;;;;:12;:26;;;;;:33;:37;;5726:1;;5690:37;:::i;:::-;5686:1;:41;5669:181;;;682:10:6;5793:26:4;;;;:12;:26;;;;;5820:5;:1;5824;5820:5;:::i;:::-;5793:33;;;;;;-1:-1:-1;;;5793:33:4;;;;;;;;;;;;;;;;;;;5761:12;:26;5774:12;682:10:6;602:98;;5774:12:4;-1:-1:-1;;;;;5761:26:4;-1:-1:-1;;;;;5761:26:4;;;;;;;;;;;;5788:1;5761:29;;;;;;-1:-1:-1;;;5761:29:4;;;;;;;;;;;;;;;;;:65;;:29;;;;;:65;;;;;;;;;;;;;-1:-1:-1;;;;;;5761:65:4;-1:-1:-1;;;;;5761:65:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;5761:65:4;;;;;;;;;;;5729:3;;;;:::i;:::-;;;;5669:181;;;-1:-1:-1;682:10:6;5872:26:4;;;;:12;:26;;;;;:32;;;;;-1:-1:-1;;;5872:32:4;;;;;;;;;;;;;;;;;-1:-1:-1;;5872:32:4;;;;;;;;;;;;;;;-1:-1:-1;;;;;;5872:32:4;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;5872:32:4;;;;;5592:332;5568:3;;;;:::i;:::-;;;;5512:427;;;;5971:1;5953:14;;:19;;;;;;;:::i;:::-;;;;-1:-1:-1;5351:808:4;;-1:-1:-1;5351:808:4;;6023:15;6005;;;:33;6088:17;;;;:8;:17;;;;;:22;;;:31;;:22;;6113:6;6088:31;:::i;:::-;6070:49;;;;:15;:49;:::i;:::-;6053:14;;;:66;5351:808;6174:37;;;13753:25:13;;;13809:2;13794:18;;13787:34;;;13864:14;;13857:22;13837:18;;;13830:50;6174:37:4;;;;;;;13741:2:13;6174:37:4;;;4463:1756;;;;;:::o;14:398:13:-;;;141:3;134:4;126:6;122:17;118:27;108:2;;166:8;156;149:26;108:2;-1:-1:-1;196:20:13;;239:18;228:30;;225:2;;;278:8;268;261:26;225:2;322:4;314:6;310:17;298:29;;385:3;378:4;370;362:6;358:17;350:6;346:30;342:41;339:50;336:2;;;402:1;399;392:12;336:2;98:314;;;;;:::o;417:257::-;;529:2;517:9;508:7;504:23;500:32;497:2;;;550:6;542;535:22;497:2;594:9;581:23;613:31;638:5;613:31;:::i;:::-;663:5;487:187;-1:-1:-1;;;487:187:13:o;679:261::-;;802:2;790:9;781:7;777:23;773:32;770:2;;;823:6;815;808:22;770:2;860:9;854:16;879:31;904:5;879:31;:::i;945:986::-;;;;;;1127:3;1115:9;1106:7;1102:23;1098:33;1095:2;;;1149:6;1141;1134:22;1095:2;1193:9;1180:23;1212:31;1237:5;1212:31;:::i;:::-;1262:5;-1:-1:-1;1319:2:13;1304:18;;1291:32;1332:33;1291:32;1332:33;:::i;:::-;1384:7;-1:-1:-1;1438:2:13;1423:18;;1410:32;;-1:-1:-1;1493:2:13;1478:18;;1465:32;1516:18;1546:14;;;1543:2;;;1578:6;1570;1563:22;1543:2;1621:6;1610:9;1606:22;1596:32;;1666:7;1659:4;1655:2;1651:13;1647:27;1637:2;;1693:6;1685;1678:22;1637:2;1738;1725:16;1764:2;1756:6;1753:14;1750:2;;;1785:6;1777;1770:22;1750:2;1835:7;1830:2;1821:6;1817:2;1813:15;1809:24;1806:37;1803:2;;;1861:6;1853;1846:22;1803:2;1085:846;;;;-1:-1:-1;1085:846:13;;-1:-1:-1;1897:2:13;1889:11;;1919:6;1085:846;-1:-1:-1;;;1085:846:13:o;1936:325::-;;;2065:2;2053:9;2044:7;2040:23;2036:32;2033:2;;;2086:6;2078;2071:22;2033:2;2130:9;2117:23;2149:31;2174:5;2149:31;:::i;:::-;2199:5;2251:2;2236:18;;;;2223:32;;-1:-1:-1;;;2023:238:13:o;2266:457::-;;;2413:2;2401:9;2392:7;2388:23;2384:32;2381:2;;;2434:6;2426;2419:22;2381:2;2479:9;2466:23;2512:18;2504:6;2501:30;2498:2;;;2549:6;2541;2534:22;2498:2;2593:70;2655:7;2646:6;2635:9;2631:22;2593:70;:::i;:::-;2682:8;;2567:96;;-1:-1:-1;2371:352:13;-1:-1:-1;;;;2371:352:13:o;2728:586::-;;;;2889:2;2877:9;2868:7;2864:23;2860:32;2857:2;;;2910:6;2902;2895:22;2857:2;2955:9;2942:23;2988:18;2980:6;2977:30;2974:2;;;3025:6;3017;3010:22;2974:2;3069:70;3131:7;3122:6;3111:9;3107:22;3069:70;:::i;:::-;3158:8;;-1:-1:-1;3043:96:13;-1:-1:-1;;3243:2:13;3228:18;;3215:32;3256:28;3215:32;3256:28;:::i;:::-;3303:5;3293:15;;;2847:467;;;;;:::o;3319:627::-;;;;3482:2;3470:9;3461:7;3457:23;3453:32;3450:2;;;3503:6;3495;3488:22;3450:2;3548:9;3535:23;3581:18;3573:6;3570:30;3567:2;;;3618:6;3610;3603:22;3567:2;3662:70;3724:7;3715:6;3704:9;3700:22;3662:70;:::i;:::-;3751:8;;-1:-1:-1;3636:96:13;-1:-1:-1;;3836:2:13;3821:18;;3808:32;3880:6;3869:18;;3859:29;;3849:2;;3907:6;3899;3892:22;3951:251;;4060:2;4048:9;4039:7;4035:23;4031:32;4028:2;;;4081:6;4073;4066:22;4028:2;4125:9;4112:23;4144:28;4166:5;4144:28;:::i;4207:255::-;;4327:2;4315:9;4306:7;4302:23;4298:32;4295:2;;;4348:6;4340;4333:22;4295:2;4385:9;4379:16;4404:28;4426:5;4404:28;:::i;4467:190::-;;4579:2;4567:9;4558:7;4554:23;4550:32;4547:2;;;4600:6;4592;4585:22;4547:2;-1:-1:-1;4628:23:13;;4537:120;-1:-1:-1;4537:120:13:o;4662:194::-;;4785:2;4773:9;4764:7;4760:23;4756:32;4753:2;;;4806:6;4798;4791:22;4753:2;-1:-1:-1;4834:16:13;;4743:113;-1:-1:-1;4743:113:13:o;5378:375::-;-1:-1:-1;;;;;5636:15:13;;;5618:34;;5688:15;;;;5683:2;5668:18;;5661:43;5735:2;5720:18;;5713:34;;;;5568:2;5553:18;;5535:218::o;6108:1045::-;6329:2;6381:21;;;6451:13;;6354:18;;;6473:22;;;6108:1045;;6329:2;6514;;6532:18;;;;6573:15;;;6108:1045;6619:508;6633:6;6630:1;6627:13;6619:508;;;6692:13;;6730:9;;6718:22;;6784:11;;;6778:18;-1:-1:-1;;;;;6774:44:13;6760:12;;;6753:66;6859:11;;;6853:18;6839:12;;;6832:40;6895:4;6939:11;;;6933:18;6919:12;;;6912:40;6975:4;7023:11;;;7017:18;7037:6;7013:31;6999:12;;;6992:53;6806:3;7065:14;;;;7102:15;;;;6815:1;6648:9;6619:508;;;-1:-1:-1;7144:3:13;;6309:844;-1:-1:-1;;;;;;;6309:844:13:o;10779:340::-;10981:2;10963:21;;;11020:2;11000:18;;;10993:30;-1:-1:-1;;;11054:2:13;11039:18;;11032:46;11110:2;11095:18;;10953:166::o;11477:356::-;11679:2;11661:21;;;11698:18;;;11691:30;11757:34;11752:2;11737:18;;11730:62;11824:2;11809:18;;11651:182::o;14225:128::-;;14296:1;14292:6;14289:1;14286:13;14283:2;;;14302:18;;:::i;:::-;-1:-1:-1;14338:9:13;;14273:80::o;14358:217::-;;14424:1;14414:2;;-1:-1:-1;;;14449:31:13;;14503:4;14500:1;14493:15;14531:4;14456:1;14521:15;14414:2;-1:-1:-1;14560:9:13;;14404:171::o;14580:260::-;;14651:8;14686:2;14683:1;14679:10;14716:2;14713:1;14709:10;14772:3;14768:2;14764:12;14759:3;14756:21;14749:3;14742:11;14735:19;14731:47;14728:2;;;14781:18;;:::i;:::-;14821:13;;14631:209;-1:-1:-1;;;;14631:209:13:o;14845:168::-;;14951:1;14947;14943:6;14939:14;14936:1;14933:21;14928:1;14921:9;14914:17;14910:45;14907:2;;;14958:18;;:::i;:::-;-1:-1:-1;14998:9:13;;14897:116::o;15018:125::-;;15086:1;15083;15080:8;15077:2;;;15091:18;;:::i;:::-;-1:-1:-1;15128:9:13;;15067:76::o;15148:135::-;;-1:-1:-1;;15208:17:13;;15205:2;;;15228:18;;:::i;:::-;-1:-1:-1;15275:1:13;15264:13;;15195:88::o;15288:127::-;15349:10;15344:3;15340:20;15337:1;15330:31;15380:4;15377:1;15370:15;15404:4;15401:1;15394:15;15420:131;-1:-1:-1;;;;;15495:31:13;;15485:42;;15475:2;;15541:1;15538;15531:12;15556:118;15642:5;15635:13;15628:21;15621:5;15618:32;15608:2;;15664:1;15661;15654:12
Swarm Source
ipfs://a3ad7744c9ea2c85c90127389c808853b4d4f786d62da19fa9521ab958b21665
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.