ERC-721
Overview
Max Total Supply
164 CMLUTIL
Holders
67
Total Transfers
-
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
CamelClanUtility
Compiler Version
v0.8.13+commit.abaa5c0e
Optimization Enabled:
Yes with 100 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "./CamelCoin.sol"; contract CamelClanUtility is ERC721Enumerable { CamelCoin public immutable camelCoin; address public owner; string public baseURI; string public baseExtension = ".json"; uint256 public maxSupply = 660; mapping(address => bool) public whiteListAddresses; mapping(address => uint256) public addressTokenCount; mapping(uint256 => string) public uriMap; mapping (address => mapping (uint256 => uint256)) tierTokenCount; mapping(uint256 => uint256) public tierCounts; mapping(uint256 => Tier) public tokenTier; mapping(uint256 => uint256) public tokenMintedAt; mapping(uint256 => uint256) public tokenLastTransferredAt; uint256 public tokenID = 1; // starting at 1 because of IPFS data struct Prices { uint256 bronzePrice; uint256 silverPrice; uint256 goldPrice; uint256 brailPrice; } Prices public _prices = Prices({ bronzePrice: 1_400, silverPrice: 7_000, goldPrice: 14_000, brailPrice: 70_000 }); //-- Tiers --// // Public tier info struct Tier { uint256 id; string name; } // Private tier info struct TierInfo { Tier tier; uint256 startingOffset; uint256 totalSupply; uint256 price; uint256 maxTotalMint; bool saleEnded; } // Bronze Tier - public info Tier public bronzeTier = Tier({id: 1, name: "Bronze"}); // Bronze Tier - private info TierInfo private bronzeTierInfo = TierInfo({ tier: bronzeTier, startingOffset: 1, totalSupply: 500, price: 1_400, maxTotalMint: 10, saleEnded: false }); // Silver Tier - public info Tier public silverTier = Tier({id: 2, name: "Silver"}); // Silver Tier - private info TierInfo private silverTierInfo = TierInfo({ tier: silverTier, startingOffset: 501, totalSupply: 100, price: 7_000, maxTotalMint: 4, saleEnded: false }); // Gold Tier - public info Tier public goldTier = Tier({id: 3, name: "Gold"}); // Gold Tier - private info TierInfo private goldTierInfo = TierInfo({ tier: goldTier, startingOffset: 601, totalSupply: 50, price: 14_000, maxTotalMint: 2, saleEnded: false }); // Brail Tier - public info Tier public brailTier = Tier({id: 4, name: "Brail"}); // Brail Tier - private info TierInfo private brailTierInfo = TierInfo({ tier: brailTier, startingOffset: 651, totalSupply: 10, price: 70_000, maxTotalMint: 1, saleEnded: false }); Tier[] public allTiersArray; TierInfo[] private allTiersInfoArray; uint256[] public allTierIds; mapping(uint256 => Tier) public allTiers; mapping(uint256 => TierInfo) private allTiersInfo; constructor(address _camelAddr, string memory _newBaseURI) ERC721("CamelClans Utility Token", "CMLUTIL") { owner = msg.sender; camelCoin = CamelCoin(_camelAddr); Tier[4] memory allTiersArrayMem = [bronzeTier, silverTier, goldTier, brailTier]; TierInfo[4] memory allTiersInfoArrayMem = [ bronzeTierInfo, silverTierInfo, goldTierInfo, brailTierInfo ]; for (uint256 i = 0; i < allTiersArrayMem.length; i++) { uint256 tierId = allTiersArrayMem[i].id; // Tier arrays allTiersArray.push(allTiersArrayMem[i]); allTiersInfoArray.push(allTiersInfoArrayMem[i]); allTierIds.push(tierId); // Tier mappings allTiers[tierId] = allTiersArray[i]; allTiersInfo[tierId] = allTiersInfoArray[i]; } whiteListAddresses[_msgSender()] = true; setBaseURI(_newBaseURI); } modifier onlyOwner() { require(msg.sender == owner, "only owner can perform this action"); _; } // Mint token - requires tier and amount function mint(uint256 _tierId, uint256 _amount) public payable { Tier memory tier = allTiers[_tierId]; TierInfo memory tierInfo = allTiersInfo[_tierId]; require(tier.id == _tierId, "Invalid tier"); // Must mint at least one require(_amount > 0, "Must mint at least one"); // Get current address total balance uint256 currentTotalAmount = camelCoin.balanceOf(_msgSender()); uint256 burnPrice = tierInfo.price * (10**camelCoin.decimals()); require(currentTotalAmount >= burnPrice * _amount, "Revert: minting wallet does not have enought CMLCOIN"); require(totalSupply() + _amount <= maxSupply, "Mint would exceed the total maximum supply"); if (!whiteListAddresses[_msgSender()]) { require(tierTokenCount[_msgSender()][_tierId] + _amount <= allTiersInfo[_tierId].maxTotalMint, "Mint would exceed maximum mint amount for tier"); } for (uint256 i = 0; i < _amount; i++) { // Token id is tier starting offset plus count of already minted uint256 tokenId = tierInfo.startingOffset + tierCounts[tier.id]; require(camelCoin.approve(address(this), burnPrice), "Not Approved"); camelCoin.burnFrom(_msgSender(), burnPrice); // Safe mint _safeMint(_msgSender(), tokenId); // Attribute token id with tier tokenTier[tokenId] = tier; // Store minted at timestamp by token id tokenMintedAt[tokenId] = block.timestamp; // Store tokenURI uriMap[tokenID] = tokenURI(tokenID); // Stores tier token count for address tierTokenCount[_msgSender()][_tierId] = tierTokenCount[_msgSender()][_tierId] + _amount; // Increment tier counter tierCounts[tier.id] = tierCounts[tier.id] + 1; } } // ----------------------------- // // IPFS/OPEANSEA FUNCTIONALITY // // -------------------------- // function _baseURI() internal view virtual override returns (string memory) { return baseURI; } function setBaseURI(string memory _newBaseURI) public onlyOwner { baseURI = _newBaseURI; } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require( _exists(tokenId), "ERC721Metadata: URI query for nonexistent token" ); string memory currentBaseURI = _baseURI(); return bytes(currentBaseURI).length > 0 ? string( abi.encodePacked( currentBaseURI, Strings.toString(tokenId), baseExtension ) ) : ""; } // Setters function setPrices(uint256 bronzePrice, uint256 silverPrice, uint256 goldPrice, uint256 brailPrice) external onlyOwner { _prices.bronzePrice = bronzePrice; _prices.silverPrice = silverPrice; _prices.goldPrice = goldPrice; _prices.brailPrice = brailPrice; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` 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 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; import "./IERC721Enumerable.sol"; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @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 override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "./CamelLiquidityProcessor.sol"; import "./CamelCollector.sol"; /** * @dev Implementation of the CamelCoin V3. */ contract CamelCoin is Context, IERC20, IERC20Metadata, Pausable { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; address private _owner; mapping(address => bool) public _isExcludedFee; mapping(address => bool) public _isExcludedWallet; mapping(address => bool) public _isLiquidityPair; CamelLiquidityProcessor public liquidityProcessor; CamelCollector public collector; uint256 private constant FEE_DENOMINATOR = 100_000; uint256 private walletLimit = 25_000; bool public isTradingEnabled = true; bool private inSwapAndLiquify = false; struct Fees { uint16 buyFee; uint16 sellFee; uint16 transferFee; } struct Ratios { uint16 liquidity; uint16 sandstorm; uint16 converter; uint16 total; } Fees public _taxRates = Fees({ buyFee: 5_000, sellFee: 15_000, transferFee: 0 }); Ratios public _ratios = Ratios({ liquidity: 4, sandstorm: 2, converter: 4, total: 10 }); uint256 constant public maxBuyTaxes = 10_000; uint256 constant public maxSellTaxes = 20_000; uint256 constant public maxTransferTaxes = 10_000; uint256 constant masterTaxDivisor = 100_000; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); modifier onlyOwner() { require(_owner == _msgSender(), "Caller =/= owner."); _; } /** * @dev Sets CamelCoin default values * such as name, symbol, fees, owners, and exclusion lists */ constructor() { _name = "Camel Coin"; _symbol = "CMLCOIN"; _owner = msg.sender; setFeeExclusion(msg.sender, true); setWalletExclusion(msg.sender, true); _mint(_msgSender(), 5_000_000 * (10**decimals())); } /** * @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. * Set to the default of 18 */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address to, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _transfer(owner, to, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _approve(owner, spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. * - the caller must have allowance for ``from``'s tokens of at least * `amount`. */ function transferFrom(address from, address to, uint256 amount ) public virtual override returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, amount); _transfer(from, to, amount); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, allowance(owner, spender) + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { address owner = _msgSender(); uint256 currentAllowance = allowance(owner, spender); require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(owner, spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `from` to `to`. * * This internal function is equivalent to {transfer}, and can be used to * process token fees, and process funds for liquidity and team collection * * Emits a {Transfer} event. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. */ function _transfer( address from, address to, uint256 amount ) internal virtual { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(from, to, amount); uint256 fromBalance = _balances[from]; require(fromBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[from] = fromBalance - amount; } uint256 receivedAmount = takeTaxes(from, to, amount); _balances[to] += receivedAmount; emit Transfer(from, to, receivedAmount); // Process Liquidity and Fees if (_isLiquidityPair[to] && !inSwapAndLiquify) { inSwapAndLiquify = true; liquidityProcessor.processFunds(); collector.processFunds(); inSwapAndLiquify = false; } _afterTokenTransfer(from, to, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _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 Updates `owner` s allowance for `spender` based on spent `amount`. * * Does not update the allowance amount in case of infinite allowance. * Revert if not enough allowance is available. * * Might emit an {Approval} event. */ function _spendAllowance(address owner, address spender, uint256 amount) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { require(currentAllowance >= amount, "ERC20: insufficient allowance"); unchecked { _approve(owner, spender, currentAllowance - amount); } } } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { if (!isTradingEnabled) { require(to != liquidityProcessor.uniswapPair() && from != liquidityProcessor.uniswapPair(), "Trading is disabled"); } } /** * @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 { if (walletLimit != 0) { if (!_isExcludedWallet[from]) { require(balanceOf(from) <= (totalSupply() * walletLimit) / FEE_DENOMINATOR, "Sender wallet limit reached"); } if (!_isExcludedWallet[to]) { require(balanceOf(to) <= (totalSupply() * walletLimit) / FEE_DENOMINATOR, "Receiver wallet limit reached"); } } } /** * @dev Calculates fees and returns the amount to address should receive */ function takeTaxes(address from, address to, uint256 amount) internal returns (uint256) { uint256 currentFee; if (_isExcludedFee[from] || _isExcludedFee[to]) { return amount; } else if (_isLiquidityPair[from] && !inSwapAndLiquify) { currentFee = _taxRates.buyFee; } else if (_isLiquidityPair[to] && !inSwapAndLiquify) { currentFee = _taxRates.sellFee; } else { currentFee = _taxRates.transferFee; } uint256 feeAmount = amount * currentFee / masterTaxDivisor; _balances[address(collector)] += feeAmount; emit Transfer(from, address(collector), feeAmount); return amount - feeAmount; } function transferOwner(address newOwner) external onlyOwner() { require(newOwner != address(0), "Call renounceOwnership to transfer owner to the zero address."); setFeeExclusion(_owner, false); setFeeExclusion(newOwner, true); if(balanceOf(_owner) > 0) { _transfer(_owner, newOwner, balanceOf(_owner)); } _owner = newOwner; emit OwnershipTransferred(_owner, newOwner); } /* ---------------------------- ----------ERC20Burnable-------- ------------------------------- */ /** * @dev Destroys `amount` tokens from the caller. * * See {ERC20-_burn}. */ function burn(uint256 amount) public virtual { _burn(_msgSender(), amount); } /** * @dev Destroys `amount` tokens from `account`, deducting from the caller's * allowance. * * See {ERC20-_burn} and {ERC20-allowance}. * * Requirements: * * - the caller must have allowance for ``accounts``'s tokens of at least * `amount`. */ function burnFrom(address account, uint256 amount) public virtual { _spendAllowance(account, _msgSender(), amount); _burn(account, amount); } /* ---------------------------- -------CamelCoin Setters------- ------------------------------- */ function setFeeProcessors(address payable _liquidityProcessor, address payable _collector) external onlyOwner { require(_liquidityProcessor != address(0), "Invalid liquidityProcessor"); require(_collector != address(0), "Invalid collector"); liquidityProcessor = CamelLiquidityProcessor(_liquidityProcessor); collector = CamelCollector(_collector); setFeeExclusion(_collector, true); setWalletExclusion(_liquidityProcessor, true); setWalletExclusion(_collector, true); setWalletExclusion(liquidityProcessor.uniswapPair(), true); setLiquidityPair(liquidityProcessor.uniswapPair(), true); } function setWalletLimit(uint256 _walletLimit) public onlyOwner { require(_walletLimit <= 25_000 && _walletLimit >= 0, "Wallet limit must be less than 25%"); walletLimit = _walletLimit; } function setFeeExclusion(address _wallet, bool _exclude) public onlyOwner { require(_wallet != address(0), "Invalid Wallet"); _isExcludedFee[_wallet] = _exclude; } function setFeeExclusion(address[] calldata _wallet, bool _exclude) public onlyOwner { for (uint256 i = 0; i < _wallet.length; i++) { setFeeExclusion(_wallet[i], _exclude); } } function setWalletExclusion(address _wallet, bool _exclude) public onlyOwner { require(_wallet != address(0), "Invalid Wallet"); _isExcludedWallet[_wallet] = _exclude; } function setWalletExclusion(address[] calldata _wallet, bool _exclude) public onlyOwner { for (uint256 i = 0; i < _wallet.length; i++) { setWalletExclusion(_wallet[i], _exclude); } } function setTradingEnabled(bool _enabled) external onlyOwner { isTradingEnabled = _enabled; } function setTransactionsPaused(bool _p) external onlyOwner { if (_p) { _pause(); } else { _unpause(); } } function setTaxes(uint16 buyFee, uint16 sellFee, uint16 transferFee) external onlyOwner { require(buyFee <= maxBuyTaxes && sellFee <= maxSellTaxes && transferFee <= maxTransferTaxes, "Taxes cannot exceed maximums."); _taxRates.buyFee = buyFee; _taxRates.sellFee = sellFee; _taxRates.transferFee = transferFee; } function setRatios(uint16 _liquidity, uint16 _sandstorm, uint16 _converter) external onlyOwner { _ratios.liquidity = _liquidity; _ratios.sandstorm = _sandstorm; _ratios.converter = _converter; _ratios.total = _liquidity + _sandstorm + _converter; } function setLiquidityPair(address _lpAddr, bool _isLP) public onlyOwner { _isLiquidityPair[_lpAddr] = _isLP; } function currentWalletLimit() public view virtual onlyOwner returns(uint256) { uint256 limVal = (totalSupply() * walletLimit) / FEE_DENOMINATOR; return limVal; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol) 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 // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; 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"); (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"); (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"); (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"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // 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 assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721.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); }
// 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 // OpenZeppelin Contracts v4.4.1 (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev 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: UNLICENSED pragma solidity ^0.8.2; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol"; import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol"; import "./CamelCoin.sol"; /// @title Camel Coin Liquidity Manager /// @author metacrypt.org contract CamelLiquidityProcessor is Ownable { CamelCoin public immutable camelCoin; IUniswapV2Router02 public immutable uniswapRouter; address public immutable uniswapPair; uint256 public minTokensToSwap; constructor(address _uniswapRouterAddress, address _camelCoinAddress) { require(_uniswapRouterAddress != address(0), "Uniswap Router can not be address(0)"); require(_camelCoinAddress != address(0), "Camel Coin can not be address(0)"); uniswapRouter = IUniswapV2Router02(_uniswapRouterAddress); camelCoin = CamelCoin(_camelCoinAddress); uniswapPair = IUniswapV2Factory(uniswapRouter.factory()).createPair(_camelCoinAddress, uniswapRouter.WETH()); setMinTokensToAdd(100 * (10**camelCoin.decimals())); } function setMinTokensToAdd(uint256 _minTokensToSwap) public onlyOwner { minTokensToSwap = _minTokensToSwap; } function addLiquidity() public { uint256 balanceToAdd = camelCoin.balanceOf(address(this)); camelCoin.approve(address(uniswapRouter), balanceToAdd); uniswapRouter.addLiquidityETH{value: address(this).balance}( address(camelCoin), balanceToAdd, 0, // slippage is unavoidable 0, // slippage is unavoidable address(this), block.timestamp + 1 ); } function autoSwap() internal returns (bool) { uint256 balanceToSwap = (camelCoin.balanceOf(address(this)) * 2) / 5; if (balanceToSwap < minTokensToSwap) { return false; } // Let's approve the exact swap amount. camelCoin.approve(address(uniswapRouter), balanceToSwap); // Router Path Token -> WETH address[] memory path = new address[](2); path[0] = address(camelCoin); path[1] = uniswapRouter.WETH(); uniswapRouter.swapExactTokensForETHSupportingFeeOnTransferTokens( balanceToSwap, 0, // slippage is unavoidable path, address(this), block.timestamp + 1 ); return true; } function processFunds() external { if (autoSwap()) { addLiquidity(); } } function recoverToken(address tokenAddress, uint256 tokenAmount) external onlyOwner { require(tokenAddress != address(camelCoin), "Can not recover Camel Coin"); IERC20(tokenAddress).transfer(owner(), tokenAmount == 0 ? IERC20(tokenAddress).balanceOf(address(this)) : tokenAmount); } receive() external payable {} }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.2; import "@openzeppelin/contracts/access/Ownable.sol"; import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol"; import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol"; import "./CamelCoin.sol"; /// @title Camel Coin Converter /// @notice Collects and converts Camel Coins to ETH, sends them to team & marketing wallets. /// @author metacrypt.org contract CamelCollector is Ownable { CamelCoin public immutable camelCoin; IUniswapV2Router02 public immutable uniswapRouter; uint256 private minTokensToSwap; address payable public teamWallet; address payable public marketingWallet; constructor( address _uniswapRouterAddress, address _camelCoinAddress, address payable _teamWallet, address payable _marketingWallet ) { uniswapRouter = IUniswapV2Router02(_uniswapRouterAddress); camelCoin = CamelCoin(_camelCoinAddress); setMinTokensToSwap(10000 * (10**camelCoin.decimals())); setDistributors(_teamWallet, _marketingWallet); } function setMinTokensToSwap(uint256 _minTokensToSwap) public onlyOwner { minTokensToSwap = _minTokensToSwap; } function setDistributors(address payable _teamWallet, address payable _marketingWallet) public onlyOwner { teamWallet = _teamWallet; marketingWallet = _marketingWallet; } // function setSplits(uint256 _splitTeam, uint256 _splitMarketing) public onlyOwner { // splitTeam = _splitTeam; // splitMarketing = _splitMarketing; // } function autoSwap() internal returns (bool) { uint256 balanceToSwap = camelCoin.balanceOf(address(this)); if (balanceToSwap < minTokensToSwap) { return false; } // Let's approve the exact swap amount. camelCoin.approve(address(uniswapRouter), balanceToSwap); // Router Path Token -> WETH address[] memory path = new address[](2); path[0] = address(camelCoin); path[1] = uniswapRouter.WETH(); uniswapRouter.swapExactTokensForETHSupportingFeeOnTransferTokens( balanceToSwap, 0, // slippage is unavoidable path, address(this), block.timestamp + 1 ); return true; } function processFunds() external { autoSwap(); if (teamWallet != address(0) && address(this).balance > 0) { (bool sent, ) = teamWallet.call{value: (address(this).balance)}(""); require(sent, "CamelConverter: Transfer Failed"); } } receive() external payable {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev 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 { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
pragma solidity >=0.6.2; import './IUniswapV2Router01.sol'; 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; }
pragma solidity >=0.5.0; 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; }
pragma solidity >=0.6.2; 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); }
{ "optimizer": { "enabled": true, "runs": 100 }, "metadata": { "bytecodeHash": "none" }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_camelAddr","type":"address"},{"internalType":"string","name":"_newBaseURI","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"_prices","outputs":[{"internalType":"uint256","name":"bronzePrice","type":"uint256"},{"internalType":"uint256","name":"silverPrice","type":"uint256"},{"internalType":"uint256","name":"goldPrice","type":"uint256"},{"internalType":"uint256","name":"brailPrice","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"addressTokenCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"allTierIds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"allTiers","outputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"string","name":"name","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"allTiersArray","outputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"string","name":"name","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseExtension","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"brailTier","outputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"string","name":"name","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bronzeTier","outputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"string","name":"name","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"camelCoin","outputs":[{"internalType":"contract CamelCoin","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"goldTier","outputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"string","name":"name","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tierId","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newBaseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"bronzePrice","type":"uint256"},{"internalType":"uint256","name":"silverPrice","type":"uint256"},{"internalType":"uint256","name":"goldPrice","type":"uint256"},{"internalType":"uint256","name":"brailPrice","type":"uint256"}],"name":"setPrices","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"silverTier","outputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"string","name":"name","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tierCounts","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenLastTransferredAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenMintedAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenTier","outputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"string","name":"name","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"uriMap","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whiteListAddresses","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60e0604052600560a081905264173539b7b760d91b60c09081526200002891600c91906200122b565b50610294600d556001601681905560408051608081018252610578808252611b5860208084018290526136b0848601819052620111706060909501859052601793909355601891909155601991909155601a91909155815180830183529283528151808301909252600682526542726f6e7a6560d01b8282019081529083018290528251601b9081559151620000c191601c916200122b565b5050506040518060c00160405280601b60405180604001604052908160008201548152602001600182018054620000f89062001355565b80601f0160208091040260200160405190810160405280929190818152602001828054620001269062001355565b8015620001775780601f106200014b5761010080835404028352916020019162000177565b820191906000526020600020905b8154815290600101906020018083116200015957829003601f168201915b50505091909252505050815260016020808301919091526101f460408301526105786060830152600a6080830152600060a09092019190915281518051601d90815581830151805191938492620001d392601e9201906200122b565b5050506020828101516002838101919091556040808501516003850155606085015160048501556080850151600585015560a0909401516006938401805460ff19169115159190911790558351808501855290815283518085019094529183526529b4b63b32b960d11b83820190815290820183905281516024908155925191929162000263916025916200122b565b5050506040518060c001604052806024604051806040016040529081600082015481526020016001820180546200029a9062001355565b80601f0160208091040260200160405190810160405280929190818152602001828054620002c89062001355565b8015620003195780601f10620002ed5761010080835404028352916020019162000319565b820191906000526020600020905b815481529060010190602001808311620002fb57829003601f168201915b5050509190925250505081526101f560208083019190915260646040830152611b58606083015260046080830152600060a09092019190915281518051602690815581830151805191938492620003759260279201906200122b565b505050602082810151600283015560408084015160038085019190915560608501516004808601919091556080860151600586015560a0909501516006909401805460ff1916941515949094179093558051808201825292835280518082019091529283526311dbdb1960e21b8382019081529082018390528151602d90815592519192916200040891602e916200122b565b5050506040518060c00160405280602d604051806040016040529081600082015481526020016001820180546200043f9062001355565b80601f01602080910402602001604051908101604052809291908181526020018280546200046d9062001355565b8015620004be5780601f106200049257610100808354040283529160200191620004be565b820191906000526020600020905b815481529060010190602001808311620004a057829003601f168201915b505050919092525050508152610259602080830191909152603260408301526136b0606083015260026080830152600060a09092019190915281518051602f908155818301518051919384926200051a9260309201906200122b565b505050602082810151600283015560408084015160038401556060840151600480850191909155608085015160058086019190915560a0909501516006909401805460ff19169415159490941790935580518082018252928352805180820190915292835264109c985a5b60da1b838201908152908201839052815160369081559251919291620005ae916037916200122b565b5050506040518060c00160405280603660405180604001604052908160008201548152602001600182018054620005e59062001355565b80601f0160208091040260200160405190810160405280929190818152602001828054620006139062001355565b8015620006645780601f10620006385761010080835404028352916020019162000664565b820191906000526020600020905b8154815290600101906020018083116200064657829003601f168201915b50505091909252505050815261028b602080830191909152600a604083015262011170606083015260016080830152600060a09092019190915281518051603890815581830151805191938492620006c19260399201906200122b565b5050506020820151600282015560408201516003820155606082015160048201556080820151600582015560a0909101516006909101805460ff19169115159190911790553480156200071357600080fd5b5060405162003feb38038062003feb8339810160408190526200073691620013a7565b604080518082018252601881527f43616d656c436c616e73205574696c69747920546f6b656e000000000000000060208083019182528351808501909452600784526610d3531555125360ca1b9084015281519192916200079a916000916200122b565b508051620007b09060019060208401906200122b565b5050600a80546001600160a01b03191633179055506001600160a01b03821660809081526040805160c08101909152601b8054928201928352601c805460009484939092909160a085019190620008079062001355565b80601f0160208091040260200160405190810160405280929190818152602001828054620008359062001355565b8015620008865780601f106200085a5761010080835404028352916020019162000886565b820191906000526020600020905b8154815290600101906020018083116200086857829003601f168201915b5050505050815250508152602001602460405180604001604052908160008201548152602001600182018054620008bd9062001355565b80601f0160208091040260200160405190810160405280929190818152602001828054620008eb9062001355565b80156200093c5780601f1062000910576101008083540402835291602001916200093c565b820191906000526020600020905b8154815290600101906020018083116200091e57829003601f168201915b5050505050815250508152602001602d60405180604001604052908160008201548152602001600182018054620009739062001355565b80601f0160208091040260200160405190810160405280929190818152602001828054620009a19062001355565b8015620009f25780601f10620009c657610100808354040283529160200191620009f2565b820191906000526020600020905b815481529060010190602001808311620009d457829003601f168201915b505050505081525050815260200160366040518060400160405290816000820154815260200160018201805462000a299062001355565b80601f016020809104026020016040519081016040528092919081815260200182805462000a579062001355565b801562000aa85780601f1062000a7c5761010080835404028352916020019162000aa8565b820191906000526020600020905b81548152906001019060200180831162000a8a57829003601f168201915b505050919092525050509052604080516101808101909152601d80546101408301908152601e80549495506000948493608085019390928492849161016088019162000af49062001355565b80601f016020809104026020016040519081016040528092919081815260200182805462000b229062001355565b801562000b735780601f1062000b475761010080835404028352916020019162000b73565b820191906000526020600020905b81548152906001019060200180831162000b5557829003601f168201915b5050505050815250508152602001600282015481526020016003820154815260200160048201548152602001600582015481526020016006820160009054906101000a900460ff161515151581525050815260200160266040518060c0016040529081600082016040518060400160405290816000820154815260200160018201805462000c019062001355565b80601f016020809104026020016040519081016040528092919081815260200182805462000c2f9062001355565b801562000c805780601f1062000c545761010080835404028352916020019162000c80565b820191906000526020600020905b81548152906001019060200180831162000c6257829003601f168201915b5050505050815250508152602001600282015481526020016003820154815260200160048201548152602001600582015481526020016006820160009054906101000a900460ff1615151515815250508152602001602f6040518060c0016040529081600082016040518060400160405290816000820154815260200160018201805462000d0e9062001355565b80601f016020809104026020016040519081016040528092919081815260200182805462000d3c9062001355565b801562000d8d5780601f1062000d615761010080835404028352916020019162000d8d565b820191906000526020600020905b81548152906001019060200180831162000d6f57829003601f168201915b5050505050815250508152602001600282015481526020016003820154815260200160048201548152602001600582015481526020016006820160009054906101000a900460ff161515151581525050815260200160386040518060c0016040529081600082016040518060400160405290816000820154815260200160018201805462000e1b9062001355565b80601f016020809104026020016040519081016040528092919081815260200182805462000e499062001355565b801562000e9a5780601f1062000e6e5761010080835404028352916020019162000e9a565b820191906000526020600020905b81548152906001019060200180831162000e7c57829003601f168201915b5050509190925250505081526002820154602082015260038201546040820152600482015460608201526005820154608082015260069091015460ff16151560a0909101529052905060005b60048110156200117857600083826004811062000f075762000f07620014a7565b6020020151519050603f84836004811062000f265762000f26620014a7565b6020908102919091015182546001818101855560009485529383902082516002909202019081558183015180519294919362000f6993928501929101906200122b565b505050604083836004811062000f835762000f83620014a7565b60209081029190910151825460018181018555600094855293839020825180516007909302909101918255808401518051939592949193859362000fcd939085019201906200122b565b5050506020820151600282015560408201516003820155606082015160048201556080820151600582015560a0909101516006909101805460ff1916911515919091179055604180546001810182556000919091527f7c9785e8241615bc80415d89775984a1337d15dc1bf4ce50f41988b2a2b336a701819055603f8054839081106200105e576200105e620014a7565b9060005260206000209060020201604260008381526020019081526020016000206000820154816000015560018201816001019080546200109f9062001355565b620010ac929190620012ba565b5090505060408281548110620010c657620010c6620014a7565b90600052602060002090600702016043600083815260200190815260200160002060008201816000016000820154816000015560018201816001019080546200110f9062001355565b6200111c929190620012ba565b505050600282810154908201556003808301549082015560048083015490820155600580830154908201556006918201549101805460ff191660ff909216151591909117905550806200116f81620014bd565b91505062000ee6565b50336000908152600e60205260409020805460ff191660011790556200119e83620011a8565b50505050620014e5565b600a546001600160a01b03163314620012125760405162461bcd60e51b815260206004820152602260248201527f6f6e6c79206f776e65722063616e20706572666f726d2074686973206163746960448201526137b760f11b606482015260840160405180910390fd5b80516200122790600b9060208401906200122b565b5050565b828054620012399062001355565b90600052602060002090601f0160209004810192826200125d5760008555620012a8565b82601f106200127857805160ff1916838001178555620012a8565b82800160010185558215620012a8579182015b82811115620012a85782518255916020019190600101906200128b565b50620012b69291506200133e565b5090565b828054620012c89062001355565b90600052602060002090601f016020900481019282620012ec5760008555620012a8565b82601f10620012ff5780548555620012a8565b82800160010185558215620012a857600052602060002091601f016020900482015b82811115620012a857825482559160010191906001019062001321565b5b80821115620012b657600081556001016200133f565b600181811c908216806200136a57607f821691505b6020821081036200138b57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b60008060408385031215620013bb57600080fd5b82516001600160a01b0381168114620013d357600080fd5b602084810151919350906001600160401b0380821115620013f357600080fd5b818601915086601f8301126200140857600080fd5b8151818111156200141d576200141d62001391565b604051601f8201601f19908116603f0116810190838211818310171562001448576200144862001391565b8160405282815289868487010111156200146157600080fd5b600093505b8284101562001485578484018601518185018701529285019262001466565b82841115620014975760008684830101525b8096505050505050509250929050565b634e487b7160e01b600052603260045260246000fd5b600060018201620014de57634e487b7160e01b600052601160045260246000fd5b5060010190565b608051612ace6200151d6000396000818161066901528181610c4e01528181610cc701528181610f4c01526110060152612ace6000f3fe60806040526004361061023b5760003560e01c806370a082311161012e578063aa338429116100ab578063d60f8f3f1161006f578063d60f8f3f146106f6578063d8e8685414610716578063dd2eb9f314610736578063e985e9c514610756578063fdb024221461077657600080fd5b8063aa33842914610657578063b88d4fde1461068b578063c6682862146106ab578063c87b56dd146106c0578063d5abeb01146106e057600080fd5b806392ed0d1b116100f257806392ed0d1b146105bf57806395d89b41146105ec578063a22cb46514610601578063a422948a14610621578063a5c42ef11461064157600080fd5b806370a082311461050d57806376772cf81461052d578063855e38751461055a5780638da5cb5b1461056f578063920674dc1461058f57600080fd5b80634369f4e5116101bc5780636352211e116101805780636352211e14610455578063642e132814610475578063649e705f146104b857806368d9aa0b146104d85780636c0360eb146104f857600080fd5b80634369f4e5146103a6578063474dd97d146103d35780634f6ccce714610400578063526365081461042057806355f804b31461043557600080fd5b80631b2ef1ca116102035780631b2ef1ca1461031057806323b872dd1461032357806326fbc7fd146103435780632f745c591461036657806342842e0e1461038657600080fd5b806301ffc9a71461024057806306fdde0314610275578063081812fc14610297578063095ea7b3146102cf57806318160ddd146102f1575b600080fd5b34801561024c57600080fd5b5061026061025b3660046122de565b61078b565b60405190151581526020015b60405180910390f35b34801561028157600080fd5b5061028a6107b6565b60405161026c9190612353565b3480156102a357600080fd5b506102b76102b2366004612366565b610848565b6040516001600160a01b03909116815260200161026c565b3480156102db57600080fd5b506102ef6102ea36600461239b565b6108d5565b005b3480156102fd57600080fd5b506008545b60405190815260200161026c565b6102ef61031e3660046123c5565b6109e5565b34801561032f57600080fd5b506102ef61033e3660046123e7565b611199565b34801561034f57600080fd5b506103586111ca565b60405161026c929190612423565b34801561037257600080fd5b5061030261038136600461239b565b611261565b34801561039257600080fd5b506102ef6103a13660046123e7565b6112f7565b3480156103b257600080fd5b506103026103c1366004612366565b60156020526000908152604090205481565b3480156103df57600080fd5b506103026103ee36600461243c565b600f6020526000908152604090205481565b34801561040c57600080fd5b5061030261041b366004612366565b611312565b34801561042c57600080fd5b506103586113a5565b34801561044157600080fd5b506102ef6104503660046124e3565b6113b9565b34801561046157600080fd5b506102b7610470366004612366565b6113fa565b34801561048157600080fd5b50601754601854601954601a546104989392919084565b60408051948552602085019390935291830152606082015260800161026c565b3480156104c457600080fd5b506103586104d3366004612366565b611471565b3480156104e457600080fd5b506103026104f3366004612366565b611493565b34801561050457600080fd5b5061028a6114b4565b34801561051957600080fd5b5061030261052836600461243c565b611542565b34801561053957600080fd5b50610302610548366004612366565b60146020526000908152604090205481565b34801561056657600080fd5b506103586115c9565b34801561057b57600080fd5b50600a546102b7906001600160a01b031681565b34801561059b57600080fd5b506102606105aa36600461243c565b600e6020526000908152604090205460ff1681565b3480156105cb57600080fd5b506103026105da366004612366565b60126020526000908152604090205481565b3480156105f857600080fd5b5061028a6115dd565b34801561060d57600080fd5b506102ef61061c36600461253a565b6115ec565b34801561062d57600080fd5b5061035861063c366004612366565b6115f7565b34801561064d57600080fd5b5061030260165481565b34801561066357600080fd5b506102b77f000000000000000000000000000000000000000000000000000000000000000081565b34801561069757600080fd5b506102ef6106a6366004612571565b61162c565b3480156106b757600080fd5b5061028a611664565b3480156106cc57600080fd5b5061028a6106db366004612366565b611671565b3480156106ec57600080fd5b50610302600d5481565b34801561070257600080fd5b50610358610711366004612366565b61173f565b34801561072257600080fd5b506102ef6107313660046125ed565b611761565b34801561074257600080fd5b5061028a610751366004612366565b61179f565b34801561076257600080fd5b5061026061077136600461261f565b6117b8565b34801561078257600080fd5b506103586117e6565b60006001600160e01b0319821663780e9d6360e01b14806107b057506107b0826117fa565b92915050565b6060600080546107c590612652565b80601f01602080910402602001604051908101604052809291908181526020018280546107f190612652565b801561083e5780601f106108135761010080835404028352916020019161083e565b820191906000526020600020905b81548152906001019060200180831161082157829003601f168201915b5050505050905090565b60006108538261184a565b6108b95760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b60006108e0826113fa565b9050806001600160a01b0316836001600160a01b03160361094d5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016108b0565b336001600160a01b0382161480610969575061096981336117b8565b6109d65760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776044820152771b995c881b9bdc88185c1c1c9bdd995908199bdc88185b1b60421b60648201526084016108b0565b6109e08383611867565b505050565b60006042600084815260200190815260200160002060405180604001604052908160008201548152602001600182018054610a1f90612652565b80601f0160208091040260200160405190810160405280929190818152602001828054610a4b90612652565b8015610a985780601f10610a6d57610100808354040283529160200191610a98565b820191906000526020600020905b815481529060010190602001808311610a7b57829003601f168201915b50505050508152505090506000604360008581526020019081526020016000206040518060c00160405290816000820160405180604001604052908160008201548152602001600182018054610aed90612652565b80601f0160208091040260200160405190810160405280929190818152602001828054610b1990612652565b8015610b665780601f10610b3b57610100808354040283529160200191610b66565b820191906000526020600020905b815481529060010190602001808311610b4957829003601f168201915b5050509190925250505081526002820154602082015260038201546040820152600482015460608201526005820154608082015260069091015460ff16151560a09091015282519091508414610bed5760405162461bcd60e51b815260206004820152600c60248201526b24b73b30b634b2103a34b2b960a11b60448201526064016108b0565b60008311610c365760405162461bcd60e51b81526020600482015260166024820152754d757374206d696e74206174206c65617374206f6e6560501b60448201526064016108b0565b6040516370a0823160e01b81523360048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610c9d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cc1919061268c565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d23573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d4791906126a5565b610d5290600a6127c2565b8360600151610d6191906127d1565b9050610d6d85826127d1565b821015610dd95760405162461bcd60e51b815260206004820152603460248201527f5265766572743a206d696e74696e672077616c6c657420646f6573206e6f74206044820152733430bb329032b737bab3b43a1021a6a621a7a4a760611b60648201526084016108b0565b600d5485610de660085490565b610df091906127f0565b1115610e515760405162461bcd60e51b815260206004820152602a60248201527f4d696e7420776f756c64206578636565642074686520746f74616c206d6178696044820152696d756d20737570706c7960b01b60648201526084016108b0565b336000908152600e602052604090205460ff16610f0157600086815260436020908152604080832060050154338452601183528184208a855290925290912054610e9c9087906127f0565b1115610f015760405162461bcd60e51b815260206004820152602e60248201527f4d696e7420776f756c6420657863656564206d6178696d756d206d696e74206160448201526d36b7bab73a103337b9103a34b2b960911b60648201526084016108b0565b60005b85811015611190578451600090815260126020908152604082205490860151610f2d91906127f0565b60405163095ea7b360e01b8152306004820152602481018590529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063095ea7b3906044016020604051808303816000875af1158015610f9d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fc19190612808565b610ffc5760405162461bcd60e51b815260206004820152600c60248201526b139bdd08105c1c1c9bdd995960a21b60448201526064016108b0565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166379cc6790336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101869052604401600060405180830381600087803b15801561107457600080fd5b505af1158015611088573d6000803e3d6000fd5b5050505061109c6110963390565b826118d5565b60008181526013602090815260409091208751815581880151805189936110ca92600185019291019061222c565b50505060008181526014602052604090204290556016546110ea90611671565b601060006016548152602001908152602001600020908051906020019061111292919061222c565b503360009081526011602090815260408083208b84529091529020546111399088906127f0565b3360009081526011602090815260408083208c84528252808320939093558851825260129052205461116c9060016127f0565b8651600090815260126020526040902055508061118881612825565b915050610f04565b50505050505050565b6111a333826118ef565b6111bf5760405162461bcd60e51b81526004016108b09061283e565b6109e08383836119b9565b601b8054601c80549192916111de90612652565b80601f016020809104026020016040519081016040528092919081815260200182805461120a90612652565b80156112575780601f1061122c57610100808354040283529160200191611257565b820191906000526020600020905b81548152906001019060200180831161123a57829003601f168201915b5050505050905082565b600061126c83611542565b82106112ce5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016108b0565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b6109e08383836040518060200160405280600081525061162c565b600061131d60085490565b82106113805760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016108b0565b600882815481106113935761139361288f565b90600052602060002001549050919050565b602d8054602e80549192916111de90612652565b600a546001600160a01b031633146113e35760405162461bcd60e51b81526004016108b0906128a5565b80516113f690600b90602084019061222c565b5050565b6000818152600260205260408120546001600160a01b0316806107b05760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016108b0565b601360205260009081526040902080546001820180549192916111de90612652565b604181815481106114a357600080fd5b600091825260209091200154905081565b600b80546114c190612652565b80601f01602080910402602001604051908101604052809291908181526020018280546114ed90612652565b801561153a5780601f1061150f5761010080835404028352916020019161153a565b820191906000526020600020905b81548152906001019060200180831161151d57829003601f168201915b505050505081565b60006001600160a01b0382166115ad5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016108b0565b506001600160a01b031660009081526003602052604090205490565b60248054602580549192916111de90612652565b6060600180546107c590612652565b6113f6338383611b64565b603f818154811061160757600080fd5b600091825260209091206002909102018054600182018054919350906111de90612652565b61163633836118ef565b6116525760405162461bcd60e51b81526004016108b09061283e565b61165e84848484611c2e565b50505050565b600c80546114c190612652565b606061167c8261184a565b6116e05760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016108b0565b60006116ea611c61565b9050600081511161170a5760405180602001604052806000815250611738565b8061171484611c70565b600c604051602001611728939291906128e7565b6040516020818303038152906040525b9392505050565b604260205260009081526040902080546001820180549192916111de90612652565b600a546001600160a01b0316331461178b5760405162461bcd60e51b81526004016108b0906128a5565b601793909355601891909155601955601a55565b601060205260009081526040902080546114c190612652565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b60368054603780549192916111de90612652565b60006001600160e01b031982166380ac58cd60e01b148061182b57506001600160e01b03198216635b5e139f60e01b145b806107b057506301ffc9a760e01b6001600160e01b03198316146107b0565b6000908152600260205260409020546001600160a01b0316151590565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061189c826113fa565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6113f6828260405180602001604052806000815250611d71565b60006118fa8261184a565b61195b5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016108b0565b6000611966836113fa565b9050806001600160a01b0316846001600160a01b031614806119a15750836001600160a01b031661199684610848565b6001600160a01b0316145b806119b157506119b181856117b8565b949350505050565b826001600160a01b03166119cc826113fa565b6001600160a01b031614611a345760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b60648201526084016108b0565b6001600160a01b038216611a965760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016108b0565b611aa1838383611da4565b611aac600082611867565b6001600160a01b0383166000908152600360205260408120805460019290611ad59084906129aa565b90915550506001600160a01b0382166000908152600360205260408120805460019290611b039084906127f0565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b816001600160a01b0316836001600160a01b031603611bc15760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b60448201526064016108b0565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b611c398484846119b9565b611c4584848484611e5c565b61165e5760405162461bcd60e51b81526004016108b0906129c1565b6060600b80546107c590612652565b606081600003611c975750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611cc15780611cab81612825565b9150611cba9050600a83612a29565b9150611c9b565b60008167ffffffffffffffff811115611cdc57611cdc612457565b6040519080825280601f01601f191660200182016040528015611d06576020820181803683370190505b5090505b84156119b157611d1b6001836129aa565b9150611d28600a86612a3d565b611d339060306127f0565b60f81b818381518110611d4857611d4861288f565b60200101906001600160f81b031916908160001a905350611d6a600a86612a29565b9450611d0a565b611d7b8383611f5d565b611d886000848484611e5c565b6109e05760405162461bcd60e51b81526004016108b0906129c1565b6001600160a01b038316611dff57611dfa81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b611e22565b816001600160a01b0316836001600160a01b031614611e2257611e22838261209c565b6001600160a01b038216611e39576109e081612139565b826001600160a01b0316826001600160a01b0316146109e0576109e082826121e8565b60006001600160a01b0384163b15611f5257604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611ea0903390899088908890600401612a51565b6020604051808303816000875af1925050508015611edb575060408051601f3d908101601f19168201909252611ed891810190612a8e565b60015b611f38573d808015611f09576040519150601f19603f3d011682016040523d82523d6000602084013e611f0e565b606091505b508051600003611f305760405162461bcd60e51b81526004016108b0906129c1565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506119b1565b506001949350505050565b6001600160a01b038216611fb35760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016108b0565b611fbc8161184a565b156120095760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016108b0565b61201560008383611da4565b6001600160a01b038216600090815260036020526040812080546001929061203e9084906127f0565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600060016120a984611542565b6120b391906129aa565b600083815260076020526040902054909150808214612106576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061214b906001906129aa565b600083815260096020526040812054600880549394509092849081106121735761217361288f565b9060005260206000200154905080600883815481106121945761219461288f565b60009182526020808320909101929092558281526009909152604080822084905585825281205560088054806121cc576121cc612aab565b6001900381819060005260206000200160009055905550505050565b60006121f383611542565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b82805461223890612652565b90600052602060002090601f01602090048101928261225a57600085556122a0565b82601f1061227357805160ff19168380011785556122a0565b828001600101855582156122a0579182015b828111156122a0578251825591602001919060010190612285565b506122ac9291506122b0565b5090565b5b808211156122ac57600081556001016122b1565b6001600160e01b0319811681146122db57600080fd5b50565b6000602082840312156122f057600080fd5b8135611738816122c5565b60005b838110156123165781810151838201526020016122fe565b8381111561165e5750506000910152565b6000815180845261233f8160208601602086016122fb565b601f01601f19169290920160200192915050565b6020815260006117386020830184612327565b60006020828403121561237857600080fd5b5035919050565b80356001600160a01b038116811461239657600080fd5b919050565b600080604083850312156123ae57600080fd5b6123b78361237f565b946020939093013593505050565b600080604083850312156123d857600080fd5b50508035926020909101359150565b6000806000606084860312156123fc57600080fd5b6124058461237f565b92506124136020850161237f565b9150604084013590509250925092565b8281526040602082015260006119b16040830184612327565b60006020828403121561244e57600080fd5b6117388261237f565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff8084111561248857612488612457565b604051601f8501601f19908116603f011681019082821181831017156124b0576124b0612457565b816040528093508581528686860111156124c957600080fd5b858560208301376000602087830101525050509392505050565b6000602082840312156124f557600080fd5b813567ffffffffffffffff81111561250c57600080fd5b8201601f8101841361251d57600080fd5b6119b18482356020840161246d565b80151581146122db57600080fd5b6000806040838503121561254d57600080fd5b6125568361237f565b915060208301356125668161252c565b809150509250929050565b6000806000806080858703121561258757600080fd5b6125908561237f565b935061259e6020860161237f565b925060408501359150606085013567ffffffffffffffff8111156125c157600080fd5b8501601f810187136125d257600080fd5b6125e18782356020840161246d565b91505092959194509250565b6000806000806080858703121561260357600080fd5b5050823594602084013594506040840135936060013592509050565b6000806040838503121561263257600080fd5b61263b8361237f565b91506126496020840161237f565b90509250929050565b600181811c9082168061266657607f821691505b60208210810361268657634e487b7160e01b600052602260045260246000fd5b50919050565b60006020828403121561269e57600080fd5b5051919050565b6000602082840312156126b757600080fd5b815160ff8116811461173857600080fd5b634e487b7160e01b600052601160045260246000fd5b600181815b808511156127195781600019048211156126ff576126ff6126c8565b8085161561270c57918102915b93841c93908002906126e3565b509250929050565b600082612730575060016107b0565b8161273d575060006107b0565b8160018114612753576002811461275d57612779565b60019150506107b0565b60ff84111561276e5761276e6126c8565b50506001821b6107b0565b5060208310610133831016604e8410600b841016171561279c575081810a6107b0565b6127a683836126de565b80600019048211156127ba576127ba6126c8565b029392505050565b600061173860ff841683612721565b60008160001904831182151516156127eb576127eb6126c8565b500290565b60008219821115612803576128036126c8565b500190565b60006020828403121561281a57600080fd5b81516117388161252c565b600060018201612837576128376126c8565b5060010190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b60208082526022908201527f6f6e6c79206f776e65722063616e20706572666f726d2074686973206163746960408201526137b760f11b606082015260800190565b6000845160206128fa8285838a016122fb565b85519184019161290d8184848a016122fb565b8554920191600090600181811c908083168061292a57607f831692505b858310810361294757634e487b7160e01b85526022600452602485fd5b80801561295b576001811461296c57612999565b60ff19851688528388019550612999565b60008b81526020902060005b858110156129915781548a820152908401908801612978565b505083880195505b50939b9a5050505050505050505050565b6000828210156129bc576129bc6126c8565b500390565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b634e487b7160e01b600052601260045260246000fd5b600082612a3857612a38612a13565b500490565b600082612a4c57612a4c612a13565b500690565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612a8490830184612327565b9695505050505050565b600060208284031215612aa057600080fd5b8151611738816122c5565b634e487b7160e01b600052603160045260246000fdfea164736f6c634300080d000a000000000000000000000000f026d795a7f28e0197bf9ae6fbe8c8f8a25277bc0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000005668747470733a2f2f63616d656c636c616e732e6d7970696e6174612e636c6f75642f697066732f516d574d5a3746423563626a67324242435a78373578626a526b6553545676576369336b6b31637a34686234654e2f00000000000000000000
Deployed Bytecode
0x60806040526004361061023b5760003560e01c806370a082311161012e578063aa338429116100ab578063d60f8f3f1161006f578063d60f8f3f146106f6578063d8e8685414610716578063dd2eb9f314610736578063e985e9c514610756578063fdb024221461077657600080fd5b8063aa33842914610657578063b88d4fde1461068b578063c6682862146106ab578063c87b56dd146106c0578063d5abeb01146106e057600080fd5b806392ed0d1b116100f257806392ed0d1b146105bf57806395d89b41146105ec578063a22cb46514610601578063a422948a14610621578063a5c42ef11461064157600080fd5b806370a082311461050d57806376772cf81461052d578063855e38751461055a5780638da5cb5b1461056f578063920674dc1461058f57600080fd5b80634369f4e5116101bc5780636352211e116101805780636352211e14610455578063642e132814610475578063649e705f146104b857806368d9aa0b146104d85780636c0360eb146104f857600080fd5b80634369f4e5146103a6578063474dd97d146103d35780634f6ccce714610400578063526365081461042057806355f804b31461043557600080fd5b80631b2ef1ca116102035780631b2ef1ca1461031057806323b872dd1461032357806326fbc7fd146103435780632f745c591461036657806342842e0e1461038657600080fd5b806301ffc9a71461024057806306fdde0314610275578063081812fc14610297578063095ea7b3146102cf57806318160ddd146102f1575b600080fd5b34801561024c57600080fd5b5061026061025b3660046122de565b61078b565b60405190151581526020015b60405180910390f35b34801561028157600080fd5b5061028a6107b6565b60405161026c9190612353565b3480156102a357600080fd5b506102b76102b2366004612366565b610848565b6040516001600160a01b03909116815260200161026c565b3480156102db57600080fd5b506102ef6102ea36600461239b565b6108d5565b005b3480156102fd57600080fd5b506008545b60405190815260200161026c565b6102ef61031e3660046123c5565b6109e5565b34801561032f57600080fd5b506102ef61033e3660046123e7565b611199565b34801561034f57600080fd5b506103586111ca565b60405161026c929190612423565b34801561037257600080fd5b5061030261038136600461239b565b611261565b34801561039257600080fd5b506102ef6103a13660046123e7565b6112f7565b3480156103b257600080fd5b506103026103c1366004612366565b60156020526000908152604090205481565b3480156103df57600080fd5b506103026103ee36600461243c565b600f6020526000908152604090205481565b34801561040c57600080fd5b5061030261041b366004612366565b611312565b34801561042c57600080fd5b506103586113a5565b34801561044157600080fd5b506102ef6104503660046124e3565b6113b9565b34801561046157600080fd5b506102b7610470366004612366565b6113fa565b34801561048157600080fd5b50601754601854601954601a546104989392919084565b60408051948552602085019390935291830152606082015260800161026c565b3480156104c457600080fd5b506103586104d3366004612366565b611471565b3480156104e457600080fd5b506103026104f3366004612366565b611493565b34801561050457600080fd5b5061028a6114b4565b34801561051957600080fd5b5061030261052836600461243c565b611542565b34801561053957600080fd5b50610302610548366004612366565b60146020526000908152604090205481565b34801561056657600080fd5b506103586115c9565b34801561057b57600080fd5b50600a546102b7906001600160a01b031681565b34801561059b57600080fd5b506102606105aa36600461243c565b600e6020526000908152604090205460ff1681565b3480156105cb57600080fd5b506103026105da366004612366565b60126020526000908152604090205481565b3480156105f857600080fd5b5061028a6115dd565b34801561060d57600080fd5b506102ef61061c36600461253a565b6115ec565b34801561062d57600080fd5b5061035861063c366004612366565b6115f7565b34801561064d57600080fd5b5061030260165481565b34801561066357600080fd5b506102b77f000000000000000000000000f026d795a7f28e0197bf9ae6fbe8c8f8a25277bc81565b34801561069757600080fd5b506102ef6106a6366004612571565b61162c565b3480156106b757600080fd5b5061028a611664565b3480156106cc57600080fd5b5061028a6106db366004612366565b611671565b3480156106ec57600080fd5b50610302600d5481565b34801561070257600080fd5b50610358610711366004612366565b61173f565b34801561072257600080fd5b506102ef6107313660046125ed565b611761565b34801561074257600080fd5b5061028a610751366004612366565b61179f565b34801561076257600080fd5b5061026061077136600461261f565b6117b8565b34801561078257600080fd5b506103586117e6565b60006001600160e01b0319821663780e9d6360e01b14806107b057506107b0826117fa565b92915050565b6060600080546107c590612652565b80601f01602080910402602001604051908101604052809291908181526020018280546107f190612652565b801561083e5780601f106108135761010080835404028352916020019161083e565b820191906000526020600020905b81548152906001019060200180831161082157829003601f168201915b5050505050905090565b60006108538261184a565b6108b95760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b60006108e0826113fa565b9050806001600160a01b0316836001600160a01b03160361094d5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016108b0565b336001600160a01b0382161480610969575061096981336117b8565b6109d65760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776044820152771b995c881b9bdc88185c1c1c9bdd995908199bdc88185b1b60421b60648201526084016108b0565b6109e08383611867565b505050565b60006042600084815260200190815260200160002060405180604001604052908160008201548152602001600182018054610a1f90612652565b80601f0160208091040260200160405190810160405280929190818152602001828054610a4b90612652565b8015610a985780601f10610a6d57610100808354040283529160200191610a98565b820191906000526020600020905b815481529060010190602001808311610a7b57829003601f168201915b50505050508152505090506000604360008581526020019081526020016000206040518060c00160405290816000820160405180604001604052908160008201548152602001600182018054610aed90612652565b80601f0160208091040260200160405190810160405280929190818152602001828054610b1990612652565b8015610b665780601f10610b3b57610100808354040283529160200191610b66565b820191906000526020600020905b815481529060010190602001808311610b4957829003601f168201915b5050509190925250505081526002820154602082015260038201546040820152600482015460608201526005820154608082015260069091015460ff16151560a09091015282519091508414610bed5760405162461bcd60e51b815260206004820152600c60248201526b24b73b30b634b2103a34b2b960a11b60448201526064016108b0565b60008311610c365760405162461bcd60e51b81526020600482015260166024820152754d757374206d696e74206174206c65617374206f6e6560501b60448201526064016108b0565b6040516370a0823160e01b81523360048201526000907f000000000000000000000000f026d795a7f28e0197bf9ae6fbe8c8f8a25277bc6001600160a01b0316906370a0823190602401602060405180830381865afa158015610c9d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cc1919061268c565b905060007f000000000000000000000000f026d795a7f28e0197bf9ae6fbe8c8f8a25277bc6001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d23573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d4791906126a5565b610d5290600a6127c2565b8360600151610d6191906127d1565b9050610d6d85826127d1565b821015610dd95760405162461bcd60e51b815260206004820152603460248201527f5265766572743a206d696e74696e672077616c6c657420646f6573206e6f74206044820152733430bb329032b737bab3b43a1021a6a621a7a4a760611b60648201526084016108b0565b600d5485610de660085490565b610df091906127f0565b1115610e515760405162461bcd60e51b815260206004820152602a60248201527f4d696e7420776f756c64206578636565642074686520746f74616c206d6178696044820152696d756d20737570706c7960b01b60648201526084016108b0565b336000908152600e602052604090205460ff16610f0157600086815260436020908152604080832060050154338452601183528184208a855290925290912054610e9c9087906127f0565b1115610f015760405162461bcd60e51b815260206004820152602e60248201527f4d696e7420776f756c6420657863656564206d6178696d756d206d696e74206160448201526d36b7bab73a103337b9103a34b2b960911b60648201526084016108b0565b60005b85811015611190578451600090815260126020908152604082205490860151610f2d91906127f0565b60405163095ea7b360e01b8152306004820152602481018590529091507f000000000000000000000000f026d795a7f28e0197bf9ae6fbe8c8f8a25277bc6001600160a01b03169063095ea7b3906044016020604051808303816000875af1158015610f9d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fc19190612808565b610ffc5760405162461bcd60e51b815260206004820152600c60248201526b139bdd08105c1c1c9bdd995960a21b60448201526064016108b0565b6001600160a01b037f000000000000000000000000f026d795a7f28e0197bf9ae6fbe8c8f8a25277bc166379cc6790336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101869052604401600060405180830381600087803b15801561107457600080fd5b505af1158015611088573d6000803e3d6000fd5b5050505061109c6110963390565b826118d5565b60008181526013602090815260409091208751815581880151805189936110ca92600185019291019061222c565b50505060008181526014602052604090204290556016546110ea90611671565b601060006016548152602001908152602001600020908051906020019061111292919061222c565b503360009081526011602090815260408083208b84529091529020546111399088906127f0565b3360009081526011602090815260408083208c84528252808320939093558851825260129052205461116c9060016127f0565b8651600090815260126020526040902055508061118881612825565b915050610f04565b50505050505050565b6111a333826118ef565b6111bf5760405162461bcd60e51b81526004016108b09061283e565b6109e08383836119b9565b601b8054601c80549192916111de90612652565b80601f016020809104026020016040519081016040528092919081815260200182805461120a90612652565b80156112575780601f1061122c57610100808354040283529160200191611257565b820191906000526020600020905b81548152906001019060200180831161123a57829003601f168201915b5050505050905082565b600061126c83611542565b82106112ce5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016108b0565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b6109e08383836040518060200160405280600081525061162c565b600061131d60085490565b82106113805760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016108b0565b600882815481106113935761139361288f565b90600052602060002001549050919050565b602d8054602e80549192916111de90612652565b600a546001600160a01b031633146113e35760405162461bcd60e51b81526004016108b0906128a5565b80516113f690600b90602084019061222c565b5050565b6000818152600260205260408120546001600160a01b0316806107b05760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016108b0565b601360205260009081526040902080546001820180549192916111de90612652565b604181815481106114a357600080fd5b600091825260209091200154905081565b600b80546114c190612652565b80601f01602080910402602001604051908101604052809291908181526020018280546114ed90612652565b801561153a5780601f1061150f5761010080835404028352916020019161153a565b820191906000526020600020905b81548152906001019060200180831161151d57829003601f168201915b505050505081565b60006001600160a01b0382166115ad5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016108b0565b506001600160a01b031660009081526003602052604090205490565b60248054602580549192916111de90612652565b6060600180546107c590612652565b6113f6338383611b64565b603f818154811061160757600080fd5b600091825260209091206002909102018054600182018054919350906111de90612652565b61163633836118ef565b6116525760405162461bcd60e51b81526004016108b09061283e565b61165e84848484611c2e565b50505050565b600c80546114c190612652565b606061167c8261184a565b6116e05760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016108b0565b60006116ea611c61565b9050600081511161170a5760405180602001604052806000815250611738565b8061171484611c70565b600c604051602001611728939291906128e7565b6040516020818303038152906040525b9392505050565b604260205260009081526040902080546001820180549192916111de90612652565b600a546001600160a01b0316331461178b5760405162461bcd60e51b81526004016108b0906128a5565b601793909355601891909155601955601a55565b601060205260009081526040902080546114c190612652565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b60368054603780549192916111de90612652565b60006001600160e01b031982166380ac58cd60e01b148061182b57506001600160e01b03198216635b5e139f60e01b145b806107b057506301ffc9a760e01b6001600160e01b03198316146107b0565b6000908152600260205260409020546001600160a01b0316151590565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061189c826113fa565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6113f6828260405180602001604052806000815250611d71565b60006118fa8261184a565b61195b5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016108b0565b6000611966836113fa565b9050806001600160a01b0316846001600160a01b031614806119a15750836001600160a01b031661199684610848565b6001600160a01b0316145b806119b157506119b181856117b8565b949350505050565b826001600160a01b03166119cc826113fa565b6001600160a01b031614611a345760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b60648201526084016108b0565b6001600160a01b038216611a965760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016108b0565b611aa1838383611da4565b611aac600082611867565b6001600160a01b0383166000908152600360205260408120805460019290611ad59084906129aa565b90915550506001600160a01b0382166000908152600360205260408120805460019290611b039084906127f0565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b816001600160a01b0316836001600160a01b031603611bc15760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b60448201526064016108b0565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b611c398484846119b9565b611c4584848484611e5c565b61165e5760405162461bcd60e51b81526004016108b0906129c1565b6060600b80546107c590612652565b606081600003611c975750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611cc15780611cab81612825565b9150611cba9050600a83612a29565b9150611c9b565b60008167ffffffffffffffff811115611cdc57611cdc612457565b6040519080825280601f01601f191660200182016040528015611d06576020820181803683370190505b5090505b84156119b157611d1b6001836129aa565b9150611d28600a86612a3d565b611d339060306127f0565b60f81b818381518110611d4857611d4861288f565b60200101906001600160f81b031916908160001a905350611d6a600a86612a29565b9450611d0a565b611d7b8383611f5d565b611d886000848484611e5c565b6109e05760405162461bcd60e51b81526004016108b0906129c1565b6001600160a01b038316611dff57611dfa81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b611e22565b816001600160a01b0316836001600160a01b031614611e2257611e22838261209c565b6001600160a01b038216611e39576109e081612139565b826001600160a01b0316826001600160a01b0316146109e0576109e082826121e8565b60006001600160a01b0384163b15611f5257604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611ea0903390899088908890600401612a51565b6020604051808303816000875af1925050508015611edb575060408051601f3d908101601f19168201909252611ed891810190612a8e565b60015b611f38573d808015611f09576040519150601f19603f3d011682016040523d82523d6000602084013e611f0e565b606091505b508051600003611f305760405162461bcd60e51b81526004016108b0906129c1565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506119b1565b506001949350505050565b6001600160a01b038216611fb35760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016108b0565b611fbc8161184a565b156120095760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016108b0565b61201560008383611da4565b6001600160a01b038216600090815260036020526040812080546001929061203e9084906127f0565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600060016120a984611542565b6120b391906129aa565b600083815260076020526040902054909150808214612106576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061214b906001906129aa565b600083815260096020526040812054600880549394509092849081106121735761217361288f565b9060005260206000200154905080600883815481106121945761219461288f565b60009182526020808320909101929092558281526009909152604080822084905585825281205560088054806121cc576121cc612aab565b6001900381819060005260206000200160009055905550505050565b60006121f383611542565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b82805461223890612652565b90600052602060002090601f01602090048101928261225a57600085556122a0565b82601f1061227357805160ff19168380011785556122a0565b828001600101855582156122a0579182015b828111156122a0578251825591602001919060010190612285565b506122ac9291506122b0565b5090565b5b808211156122ac57600081556001016122b1565b6001600160e01b0319811681146122db57600080fd5b50565b6000602082840312156122f057600080fd5b8135611738816122c5565b60005b838110156123165781810151838201526020016122fe565b8381111561165e5750506000910152565b6000815180845261233f8160208601602086016122fb565b601f01601f19169290920160200192915050565b6020815260006117386020830184612327565b60006020828403121561237857600080fd5b5035919050565b80356001600160a01b038116811461239657600080fd5b919050565b600080604083850312156123ae57600080fd5b6123b78361237f565b946020939093013593505050565b600080604083850312156123d857600080fd5b50508035926020909101359150565b6000806000606084860312156123fc57600080fd5b6124058461237f565b92506124136020850161237f565b9150604084013590509250925092565b8281526040602082015260006119b16040830184612327565b60006020828403121561244e57600080fd5b6117388261237f565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff8084111561248857612488612457565b604051601f8501601f19908116603f011681019082821181831017156124b0576124b0612457565b816040528093508581528686860111156124c957600080fd5b858560208301376000602087830101525050509392505050565b6000602082840312156124f557600080fd5b813567ffffffffffffffff81111561250c57600080fd5b8201601f8101841361251d57600080fd5b6119b18482356020840161246d565b80151581146122db57600080fd5b6000806040838503121561254d57600080fd5b6125568361237f565b915060208301356125668161252c565b809150509250929050565b6000806000806080858703121561258757600080fd5b6125908561237f565b935061259e6020860161237f565b925060408501359150606085013567ffffffffffffffff8111156125c157600080fd5b8501601f810187136125d257600080fd5b6125e18782356020840161246d565b91505092959194509250565b6000806000806080858703121561260357600080fd5b5050823594602084013594506040840135936060013592509050565b6000806040838503121561263257600080fd5b61263b8361237f565b91506126496020840161237f565b90509250929050565b600181811c9082168061266657607f821691505b60208210810361268657634e487b7160e01b600052602260045260246000fd5b50919050565b60006020828403121561269e57600080fd5b5051919050565b6000602082840312156126b757600080fd5b815160ff8116811461173857600080fd5b634e487b7160e01b600052601160045260246000fd5b600181815b808511156127195781600019048211156126ff576126ff6126c8565b8085161561270c57918102915b93841c93908002906126e3565b509250929050565b600082612730575060016107b0565b8161273d575060006107b0565b8160018114612753576002811461275d57612779565b60019150506107b0565b60ff84111561276e5761276e6126c8565b50506001821b6107b0565b5060208310610133831016604e8410600b841016171561279c575081810a6107b0565b6127a683836126de565b80600019048211156127ba576127ba6126c8565b029392505050565b600061173860ff841683612721565b60008160001904831182151516156127eb576127eb6126c8565b500290565b60008219821115612803576128036126c8565b500190565b60006020828403121561281a57600080fd5b81516117388161252c565b600060018201612837576128376126c8565b5060010190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b60208082526022908201527f6f6e6c79206f776e65722063616e20706572666f726d2074686973206163746960408201526137b760f11b606082015260800190565b6000845160206128fa8285838a016122fb565b85519184019161290d8184848a016122fb565b8554920191600090600181811c908083168061292a57607f831692505b858310810361294757634e487b7160e01b85526022600452602485fd5b80801561295b576001811461296c57612999565b60ff19851688528388019550612999565b60008b81526020902060005b858110156129915781548a820152908401908801612978565b505083880195505b50939b9a5050505050505050505050565b6000828210156129bc576129bc6126c8565b500390565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b634e487b7160e01b600052601260045260246000fd5b600082612a3857612a38612a13565b500490565b600082612a4c57612a4c612a13565b500690565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612a8490830184612327565b9695505050505050565b600060208284031215612aa057600080fd5b8151611738816122c5565b634e487b7160e01b600052603160045260246000fdfea164736f6c634300080d000a
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000f026d795a7f28e0197bf9ae6fbe8c8f8a25277bc0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000005668747470733a2f2f63616d656c636c616e732e6d7970696e6174612e636c6f75642f697066732f516d574d5a3746423563626a67324242435a78373578626a526b6553545676576369336b6b31637a34686234654e2f00000000000000000000
-----Decoded View---------------
Arg [0] : _camelAddr (address): 0xf026D795A7F28E0197Bf9ae6fBe8c8F8A25277bc
Arg [1] : _newBaseURI (string): https://camelclans.mypinata.cloud/ipfs/QmWMZ7FB5cbjg2BBCZx75xbjRkeSTVvWci3kk1cz4hb4eN/
-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 000000000000000000000000f026d795a7f28e0197bf9ae6fbe8c8f8a25277bc
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000056
Arg [3] : 68747470733a2f2f63616d656c636c616e732e6d7970696e6174612e636c6f75
Arg [4] : 642f697066732f516d574d5a3746423563626a67324242435a78373578626a52
Arg [5] : 6b6553545676576369336b6b31637a34686234654e2f00000000000000000000
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.