Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
Lamex
Compiler Version
v0.8.7+commit.e28d00a7
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import "../utils/ERC721EnumerableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol"; interface IYieldSwitch { function activateLamex(address _user) external; function hasUserPortaled(address _user) external view returns (bool); } interface IStaking { function getStakerTokens(address staker) external view returns (uint256[] memory, uint256[] memory, uint256[] memory); } interface ILoomi { function getUserBalance(address user) external view returns (uint256); function spendLoomi(address user, uint256 amount) external; } /** * @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 Lamex is ERC721EnumerableUpgradeable, OwnableUpgradeable, ReentrancyGuardUpgradeable { using Strings for uint256; uint256 public loomiToLamexRate; uint256 public minDepositAmount; IStaking public staking; IYieldSwitch public yieldSwitch; ILoomi public loomi; bool public isPaused; bool public transfersPaused; string public baseURI; mapping(address => uint256) private _nonces; event LamexMinted(address indexed mintedBy, uint256 indexed tokenId); event LamexTopUp(address indexed userLamex, uint256 nonce, uint256 amount); modifier whenNotPaused { if (_msgSender() != owner()) { require(!isPaused, "Contract paused!"); } _; } function initialize(address _loomi, address _staking, string memory _baseURI) external initializer { loomi = ILoomi(_loomi); staking = IStaking(_staking); baseURI = _baseURI; loomiToLamexRate = 5000; minDepositAmount = 5000 ether; isPaused = true; transfersPaused = true; __ERC721_init("LAMEX", "LAMEX"); __Ownable_init(); __ReentrancyGuard_init(); } function claimLamex(bool _loomiTransfer) public whenNotPaused { require(balanceOf(_msgSender()) == 0, "You cannot mint more than 1 Lamex"); yieldSwitch.activateLamex(_msgSender()); if (_loomiTransfer) { uint256 balance = loomi.getUserBalance(_msgSender()); _topUpLamex(_msgSender(), balance); } uint256 tokenId = totalSupply(); _mint(_msgSender(), tokenId); emit LamexMinted(_msgSender(), tokenId); } function topUpLamex(uint256 _amount) public whenNotPaused { _topUpLamex(_msgSender(), _amount); } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); address owner = ownerOf(tokenId); (uint256[] memory stakedCreeps,,) = IStaking(staking).getStakerTokens(owner); bool hasUserSwitched = IYieldSwitch(yieldSwitch).hasUserPortaled(owner); return _baseUriByCreepzStaked(stakedCreeps.length, hasUserSwitched); } function _topUpLamex(address _user, uint256 _amount) internal { require(_amount > minDepositAmount, "Amount less than min deposit"); loomi.spendLoomi(_user, _amount); uint256 lamexFromLoomi = _amount / loomiToLamexRate; _nonces[_user]++; emit LamexTopUp(_user, _nonces[_user], lamexFromLoomi); } function _baseUriByCreepzStaked(uint256 stakedCreepz, bool hasUserSwitched) internal view returns (string memory) { uint256 currentTier; if (!hasUserSwitched) return string(abi.encodePacked(baseURI, currentTier.toString(), ".json")); if (stakedCreepz > 0 && stakedCreepz <= 5) currentTier = 1; if (stakedCreepz > 5 && stakedCreepz <= 10) currentTier = 2; if (stakedCreepz > 10 && stakedCreepz <= 16) currentTier = 3; if (stakedCreepz > 16 && stakedCreepz <= 24) currentTier = 4; if (stakedCreepz > 24) currentTier = 5; return string(abi.encodePacked(baseURI, currentTier.toString(), ".json")); } function setBaseURI(string memory newBaseURI) public onlyOwner { baseURI = newBaseURI; } function updateMinDepositAmount(uint256 _minAmount) public onlyOwner { minDepositAmount = _minAmount; } function pause(bool _pause) public onlyOwner { isPaused = _pause; } function pauseTransfers(bool _pause) public onlyOwner { transfersPaused = _pause; } function updateLamexPrice(uint256 _newRate) public onlyOwner { loomiToLamexRate = _newRate; } function updateYieldSwitchAddress(address _yieldSwitch) public onlyOwner { yieldSwitch = IYieldSwitch(_yieldSwitch); } function _beforeTokenTransfer( address from, address, uint256 ) internal override virtual { if (from != address(0)) { require(!transfersPaused, "Non-transferable NFT"); } } function _msgSender() internal view override(Context, ContextUpgradeable) virtual returns (address) { return msg.sender; } function _msgData() internal view override(Context, ContextUpgradeable) virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import "./ERC721Upgradeable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/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 but rips out the core of the gas-wasting processing that comes from OpenZeppelin. */ abstract contract ERC721EnumerableUpgradeable is ERC721Upgradeable, IERC721Enumerable { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721Upgradeable) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _owners.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < _owners.length, "ERC721Enumerable: global index out of bounds"); return index; } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256 tokenId) { require(index < balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); uint count; for(uint i; i < _owners.length; i++){ if(owner == _owners[i]){ if(count == index) return i; else count++; } } revert("ERC721Enumerable: owner index out of bounds"); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.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 OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal onlyInitializing { __Ownable_init_unchained(); } function __Ownable_init_unchained() internal onlyInitializing { _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); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuardUpgradeable is Initializable { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; function __ReentrancyGuard_init() internal onlyInitializing { __ReentrancyGuard_init_unchained(); } function __ReentrancyGuard_init_unchained() internal onlyInitializing { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; library Address { function isContract(address account) internal view returns (bool) { uint size; assembly { size := extcodesize(account) } return size > 0; } } abstract contract ERC721Upgradeable is Initializable, Context, ERC165Upgradeable, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; string private _name; string private _symbol; // Mapping from token ID to owner address address[] internal _owners; mapping(uint256 => address) private _tokenApprovals; mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ function __ERC721_init(string memory name_, string memory symbol_) internal onlyInitializing { __ERC721_init_unchained(name_, symbol_); } function __ERC721_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, 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 (uint) { require(owner != address(0), "ERC721: balance query for the zero address"); uint count; for( uint i; i < _owners.length; ++i ){ if( owner == _owners[i] ) ++count; } return count; } /** * @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 {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721Upgradeable.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require( _exists(tokenId), "ERC721: approved query for nonexistent token" ); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { require(operator != _msgSender(), "ERC721: approve to caller"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require( _isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved" ); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require( _isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved" ); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require( _checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return tokenId < _owners.length && _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 = ERC721Upgradeable.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); _owners.push(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 = ERC721Upgradeable.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _owners[tokenId] = address(0); 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( ERC721Upgradeable.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); _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(ERC721Upgradeable.ownerOf(tokenId), to, tokenId); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received( _msgSender(), from, tokenId, _data ) returns (bytes4 retval) { return retval == IERC721Receiver.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/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/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/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 "./IERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.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 ERC165Upgradeable is Initializable, IERC165Upgradeable { function __ERC165_init() internal onlyInitializing { } function __ERC165_init_unchained() internal onlyInitializing { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165Upgradeable).interfaceId; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.0; import "../../utils/AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() initializer {} * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { // If the contract is initializing we ignore whether _initialized is set in order to support multiple // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the // contract may have been reentered. require(_initializing ? _isConstructor() : !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} modifier, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } function _isConstructor() private view returns (bool) { return !AddressUpgradeable.isContract(address(this)); } }
// 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 (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 IERC165Upgradeable { /** * @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 (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return 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 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; import "../proxy/utils/Initializable.sol"; /** * @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 ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"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":"mintedBy","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"LamexMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"userLamex","type":"address"},{"indexed":false,"internalType":"uint256","name":"nonce","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"LamexTopUp","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":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":[{"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":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_loomiTransfer","type":"bool"}],"name":"claimLamex","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_loomi","type":"address"},{"internalType":"address","name":"_staking","type":"address"},{"internalType":"string","name":"_baseURI","type":"string"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","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":"isPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"loomi","outputs":[{"internalType":"contract ILoomi","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"loomiToLamexRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minDepositAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":"bool","name":"_pause","type":"bool"}],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_pause","type":"bool"}],"name":"pauseTransfers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","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":[],"name":"staking","outputs":[{"internalType":"contract IStaking","name":"","type":"address"}],"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":"index","type":"uint256"}],"name":"tokenByIndex","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":"tokenId","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"topUpLamex","outputs":[],"stateMutability":"nonpayable","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":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"transfersPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newRate","type":"uint256"}],"name":"updateLamexPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minAmount","type":"uint256"}],"name":"updateMinDepositAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_yieldSwitch","type":"address"}],"name":"updateYieldSwitchAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"yieldSwitch","outputs":[{"internalType":"contract IYieldSwitch","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b506127a7806100206000396000f3fe608060405234801561001057600080fd5b506004361061021c5760003560e01c8063645006ca11610125578063b187bd26116100ad578063f11aafe11161007c578063f11aafe114610492578063f1c9b56c146104a5578063f2fde38b146104b8578063f8791468146104cb578063f9bb2483146104de57600080fd5b8063b187bd261461041c578063b88d4fde14610430578063c87b56dd14610443578063e985e9c51461045657600080fd5b80637ef611fd116100f45780637ef611fd146103ca57806384780205146103dd5780638da5cb5b146103f057806395d89b4114610401578063a22cb4651461040957600080fd5b8063645006ca1461039e5780636c0360eb146103a757806370a08231146103af578063715018a6146103c257600080fd5b806342842e0e116101a85780634cf088d9116101775780634cf088d9146103495780634f6ccce71461035c57806355f804b31461036f57806360018753146103825780636352211e1461038b57600080fd5b806342842e0e146102fc5780634563f30a1461030f5780634571e3a614610323578063464bc2141461033657600080fd5b8063081812fc116101ef578063081812fc14610286578063095ea7b3146102b157806318160ddd146102c457806323b872dd146102d65780632f745c59146102e957600080fd5b806301ffc9a71461022157806302329a291461024957806305ae50871461025e57806306fdde0314610271575b600080fd5b61023461022f366004612292565b6104f1565b60405190151581526020015b60405180910390f35b61025c610257366004612258565b61051c565b005b61025c61026c366004612015565b61056d565b6102796105b9565b604051610240919061246a565b610299610294366004612301565b61064b565b6040516001600160a01b039091168152602001610240565b61025c6102bf3660046121b0565b6106d3565b6035545b604051908152602001610240565b61025c6102e43660046120c1565b6107e9565b6102c86102f73660046121b0565b61081a565b61025c61030a3660046120c1565b6108cd565b60d25461023490600160a81b900460ff1681565b61025c610331366004612063565b6108e8565b60d254610299906001600160a01b031681565b60d054610299906001600160a01b031681565b6102c861036a366004612301565b610a58565b61025c61037d3660046122cc565b610ac5565b6102c860ce5481565b610299610399366004612301565b610b06565b6102c860cf5481565b610279610b92565b6102c86103bd366004612015565b610c20565b61025c610cee565b60d154610299906001600160a01b031681565b61025c6103eb366004612301565b610d24565b606a546001600160a01b0316610299565b610279610d53565b61025c610417366004612179565b610d62565b60d25461023490600160a01b900460ff1681565b61025c61043e3660046120fd565b610e27565b610279610451366004612301565b610e59565b610234610464366004612030565b6001600160a01b03918216600090815260376020908152604080832093909416825291909152205460ff1690565b61025c6104a0366004612258565b610ff5565b61025c6104b3366004612301565b61103d565b61025c6104c6366004612015565b6110aa565b61025c6104d9366004612258565b611142565b61025c6104ec366004612301565b611353565b60006001600160e01b0319821663780e9d6360e01b1480610516575061051682611382565b92915050565b606a546001600160a01b0316331461054f5760405162461bcd60e51b81526004016105469061251a565b60405180910390fd5b60d28054911515600160a01b0260ff60a01b19909216919091179055565b606a546001600160a01b031633146105975760405162461bcd60e51b81526004016105469061251a565b60d180546001600160a01b0319166001600160a01b0392909216919091179055565b6060603380546105c89061268b565b80601f01602080910402602001604051908101604052809291908181526020018280546105f49061268b565b80156106415780601f1061061657610100808354040283529160200191610641565b820191906000526020600020905b81548152906001019060200180831161062457829003601f168201915b5050505050905090565b6000610656826113d2565b6106b75760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610546565b506000908152603660205260409020546001600160a01b031690565b60006106de82610b06565b9050806001600160a01b0316836001600160a01b0316141561074c5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610546565b336001600160a01b038216148061076857506107688133610464565b6107da5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610546565b6107e4838361141c565b505050565b6107f3338261148a565b61080f5760405162461bcd60e51b81526004016105469061254f565b6107e4838383611574565b600061082583610c20565b82106108435760405162461bcd60e51b81526004016105469061247d565b6000805b6035548110156108b4576035818154811061086457610864612721565b6000918252602090912001546001600160a01b03868116911614156108a257838214156108945791506105169050565b8161089e816126c6565b9250505b806108ac816126c6565b915050610847565b5060405162461bcd60e51b81526004016105469061247d565b6107e483838360405180602001604052806000815250610e27565b600054610100900460ff166109035760005460ff1615610907565b303b155b61096a5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610546565b600054610100900460ff1615801561098c576000805461ffff19166101011790555b60d280546001600160a01b038087166001600160a01b03199283161790925560d080549286169290911691909117905581516109cf9060d3906020850190611e64565b5061138860ce5569010f0cf064dd5920000060cf5560d2805461ffff60a01b191661010160a01b179055604080518082018252600580825264098829a8ab60db1b6020808401829052845180860190955291845290830152610a30916116d5565b610a38611706565b610a40611735565b8015610a52576000805461ff00191690555b50505050565b6035546000908210610ac15760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610546565b5090565b606a546001600160a01b03163314610aef5760405162461bcd60e51b81526004016105469061251a565b8051610b029060d3906020840190611e64565b5050565b60008060358381548110610b1c57610b1c612721565b6000918252602090912001546001600160a01b03169050806105165760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610546565b60d38054610b9f9061268b565b80601f0160208091040260200160405190810160405280929190818152602001828054610bcb9061268b565b8015610c185780601f10610bed57610100808354040283529160200191610c18565b820191906000526020600020905b815481529060010190602001808311610bfb57829003601f168201915b505050505081565b60006001600160a01b038216610c8b5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610546565b6000805b603554811015610ce75760358181548110610cac57610cac612721565b6000918252602090912001546001600160a01b0385811691161415610cd757610cd4826126c6565b91505b610ce0816126c6565b9050610c8f565b5092915050565b606a546001600160a01b03163314610d185760405162461bcd60e51b81526004016105469061251a565b610d226000611764565b565b606a546001600160a01b03163314610d4e5760405162461bcd60e51b81526004016105469061251a565b60cf55565b6060603480546105c89061268b565b6001600160a01b038216331415610dbb5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610546565b3360008181526037602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b610e31338361148a565b610e4d5760405162461bcd60e51b81526004016105469061254f565b610a52848484846117b6565b6060610e64826113d2565b610ec85760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610546565b6000610ed383610b06565b60d0546040516310b0d15b60e11b81526001600160a01b03808416600483015292935060009290911690632161a2b69060240160006040518083038186803b158015610f1e57600080fd5b505afa158015610f32573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610f5a91908101906121da565b505060d15460405163cf9abf2760e01b81526001600160a01b0385811660048301529293506000929091169063cf9abf279060240160206040518083038186803b158015610fa757600080fd5b505afa158015610fbb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fdf9190612275565b9050610fec8251826117e9565b95945050505050565b606a546001600160a01b0316331461101f5760405162461bcd60e51b81526004016105469061251a565b60d28054911515600160a81b0260ff60a81b19909216919091179055565b606a546001600160a01b0316331461109c5760d254600160a01b900460ff161561109c5760405162461bcd60e51b815260206004820152601060248201526f436f6e7472616374207061757365642160801b6044820152606401610546565b6110a7335b826118ce565b50565b606a546001600160a01b031633146110d45760405162461bcd60e51b81526004016105469061251a565b6001600160a01b0381166111395760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610546565b6110a781611764565b606a546001600160a01b031633146111a15760d254600160a01b900460ff16156111a15760405162461bcd60e51b815260206004820152601060248201526f436f6e7472616374207061757365642160801b6044820152606401610546565b6111aa33610c20565b156112015760405162461bcd60e51b815260206004820152602160248201527f596f752063616e6e6f74206d696e74206d6f7265207468616e2031204c616d656044820152600f60fb1b6064820152608401610546565b60d1546001600160a01b0316638125e0d9336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401600060405180830381600087803b15801561125457600080fd5b505af1158015611268573d6000803e3d6000fd5b50505050801561130b5760d2546000906001600160a01b03166347734892336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b1580156112c657600080fd5b505afa1580156112da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112fe919061231a565b9050611309336110a1565b505b600061131660355490565b90506113223382611a19565b604051819033907fbb397bd42391b57c69ca8b5e84170b3d37fb0a3517a7d7ec2a95f4d4fed1a2b590600090a35050565b606a546001600160a01b0316331461137d5760405162461bcd60e51b81526004016105469061251a565b60ce55565b60006001600160e01b031982166380ac58cd60e01b14806113b357506001600160e01b03198216635b5e139f60e01b145b8061051657506301ffc9a760e01b6001600160e01b0319831614610516565b60355460009082108015610516575060006001600160a01b0316603583815481106113ff576113ff612721565b6000918252602090912001546001600160a01b0316141592915050565b600081815260366020526040902080546001600160a01b0319166001600160a01b038416908117909155819061145182610b06565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000611495826113d2565b6114f65760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610546565b600061150183610b06565b9050806001600160a01b0316846001600160a01b0316148061153c5750836001600160a01b03166115318461064b565b6001600160a01b0316145b8061156c57506001600160a01b0380821660009081526037602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b031661158782610b06565b6001600160a01b0316146115ef5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610546565b6001600160a01b0382166116515760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610546565b61165c838383611b4d565b61166760008261141c565b816035828154811061167b5761167b612721565b6000918252602082200180546001600160a01b0319166001600160a01b03938416179055604051839285811692908716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9190a4505050565b600054610100900460ff166116fc5760405162461bcd60e51b8152600401610546906125a0565b610b028282611bad565b600054610100900460ff1661172d5760405162461bcd60e51b8152600401610546906125a0565b610d22611bfb565b600054610100900460ff1661175c5760405162461bcd60e51b8152600401610546906125a0565b610d22611c2b565b606a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6117c1848484611574565b6117cd84848484611c59565b610a525760405162461bcd60e51b8152600401610546906124c8565b60606000826118255760d36117fd82611d66565b60405160200161180e92919061237b565b604051602081830303815290604052915050610516565b600084118015611836575060058411155b1561183f575060015b6005841180156118505750600a8411155b15611859575060025b600a8411801561186a575060108411155b15611873575060035b601084118015611884575060188411155b1561188d575060045b601884111561189a575060055b60d36118a582611d66565b6040516020016118b692919061237b565b60405160208183030381529060405291505092915050565b60cf54811161191f5760405162461bcd60e51b815260206004820152601c60248201527f416d6f756e74206c657373207468616e206d696e206465706f736974000000006044820152606401610546565b60d25460405163bfd77e2b60e01b81526001600160a01b038481166004830152602482018490529091169063bfd77e2b90604401600060405180830381600087803b15801561196d57600080fd5b505af1158015611981573d6000803e3d6000fd5b50505050600060ce54826119959190612634565b6001600160a01b038416600090815260d4602052604081208054929350906119bc836126c6565b90915550506001600160a01b038316600081815260d460209081526040918290205482519081529081018490527f7be918faa95d4c12890232c645736145289ff1f3aa9a20d792ae659f8b3019ec910160405180910390a2505050565b6001600160a01b038216611a6f5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610546565b611a78816113d2565b15611ac55760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610546565b611ad160008383611b4d565b6035805460018101825560009182527fcfa4bec1d3298408bb5afcfcd9c430549c5b31f8aa5c5848151c0a55f473c34d0180546001600160a01b0319166001600160a01b0385169081179091556040518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160a01b038316156107e45760d254600160a81b900460ff16156107e45760405162461bcd60e51b8152602060048201526014602482015273139bdb8b5d1c985b9cd9995c98589b194813919560621b6044820152606401610546565b600054610100900460ff16611bd45760405162461bcd60e51b8152600401610546906125a0565b8151611be7906033906020850190611e64565b5080516107e4906034906020840190611e64565b600054610100900460ff16611c225760405162461bcd60e51b8152600401610546906125a0565b610d2233611764565b600054610100900460ff16611c525760405162461bcd60e51b8152600401610546906125a0565b6001609c55565b60006001600160a01b0384163b15611d5b57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611c9d90339089908890889060040161242d565b602060405180830381600087803b158015611cb757600080fd5b505af1925050508015611ce7575060408051601f3d908101601f19168201909252611ce4918101906122af565b60015b611d41573d808015611d15576040519150601f19603f3d011682016040523d82523d6000602084013e611d1a565b606091505b508051611d395760405162461bcd60e51b8152600401610546906124c8565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061156c565b506001949350505050565b606081611d8a5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611db45780611d9e816126c6565b9150611dad9050600a83612634565b9150611d8e565b60008167ffffffffffffffff811115611dcf57611dcf612737565b6040519080825280601f01601f191660200182016040528015611df9576020820181803683370190505b5090505b841561156c57611e0e600183612648565b9150611e1b600a866126e1565b611e2690603061261c565b60f81b818381518110611e3b57611e3b612721565b60200101906001600160f81b031916908160001a905350611e5d600a86612634565b9450611dfd565b828054611e709061268b565b90600052602060002090601f016020900481019282611e925760008555611ed8565b82601f10611eab57805160ff1916838001178555611ed8565b82800160010185558215611ed8579182015b82811115611ed8578251825591602001919060010190611ebd565b50610ac19291505b80821115610ac15760008155600101611ee0565b600067ffffffffffffffff831115611f0e57611f0e612737565b611f21601f8401601f19166020016125eb565b9050828152838383011115611f3557600080fd5b828260208301376000602084830101529392505050565b80356001600160a01b0381168114611f6357600080fd5b919050565b600082601f830112611f7957600080fd5b8151602067ffffffffffffffff821115611f9557611f95612737565b8160051b611fa48282016125eb565b838152828101908684018388018501891015611fbf57600080fd5b600093505b85841015611fe2578051835260019390930192918401918401611fc4565b50979650505050505050565b600082601f830112611fff57600080fd5b61200e83833560208501611ef4565b9392505050565b60006020828403121561202757600080fd5b61200e82611f4c565b6000806040838503121561204357600080fd5b61204c83611f4c565b915061205a60208401611f4c565b90509250929050565b60008060006060848603121561207857600080fd5b61208184611f4c565b925061208f60208501611f4c565b9150604084013567ffffffffffffffff8111156120ab57600080fd5b6120b786828701611fee565b9150509250925092565b6000806000606084860312156120d657600080fd5b6120df84611f4c565b92506120ed60208501611f4c565b9150604084013590509250925092565b6000806000806080858703121561211357600080fd5b61211c85611f4c565b935061212a60208601611f4c565b925060408501359150606085013567ffffffffffffffff81111561214d57600080fd5b8501601f8101871361215e57600080fd5b61216d87823560208401611ef4565b91505092959194509250565b6000806040838503121561218c57600080fd5b61219583611f4c565b915060208301356121a58161274d565b809150509250929050565b600080604083850312156121c357600080fd5b6121cc83611f4c565b946020939093013593505050565b6000806000606084860312156121ef57600080fd5b835167ffffffffffffffff8082111561220757600080fd5b61221387838801611f68565b9450602086015191508082111561222957600080fd5b61223587838801611f68565b9350604086015191508082111561224b57600080fd5b506120b786828701611f68565b60006020828403121561226a57600080fd5b813561200e8161274d565b60006020828403121561228757600080fd5b815161200e8161274d565b6000602082840312156122a457600080fd5b813561200e8161275b565b6000602082840312156122c157600080fd5b815161200e8161275b565b6000602082840312156122de57600080fd5b813567ffffffffffffffff8111156122f557600080fd5b61156c84828501611fee565b60006020828403121561231357600080fd5b5035919050565b60006020828403121561232c57600080fd5b5051919050565b6000815180845261234b81602086016020860161265f565b601f01601f19169290920160200192915050565b6000815161237181856020860161265f565b9290920192915050565b600080845481600182811c91508083168061239757607f831692505b60208084108214156123b757634e487b7160e01b86526022600452602486fd5b8180156123cb57600181146123dc57612409565b60ff19861689528489019650612409565b60008b81526020902060005b868110156124015781548b8201529085019083016123e8565b505084890196505b505050505050610fec61241c828661235f565b64173539b7b760d91b815260050190565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061246090830184612333565b9695505050505050565b60208152600061200e6020830184612333565b6020808252602b908201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560408201526a74206f6620626f756e647360a81b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b604051601f8201601f1916810167ffffffffffffffff8111828210171561261457612614612737565b604052919050565b6000821982111561262f5761262f6126f5565b500190565b6000826126435761264361270b565b500490565b60008282101561265a5761265a6126f5565b500390565b60005b8381101561267a578181015183820152602001612662565b83811115610a525750506000910152565b600181811c9082168061269f57607f821691505b602082108114156126c057634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156126da576126da6126f5565b5060010190565b6000826126f0576126f061270b565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b80151581146110a757600080fd5b6001600160e01b0319811681146110a757600080fdfea26469706673582212201313dc9f076d53541e86a24824e4d942b8cb49f860bc7291c54bec074612294c64736f6c63430008070033
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061021c5760003560e01c8063645006ca11610125578063b187bd26116100ad578063f11aafe11161007c578063f11aafe114610492578063f1c9b56c146104a5578063f2fde38b146104b8578063f8791468146104cb578063f9bb2483146104de57600080fd5b8063b187bd261461041c578063b88d4fde14610430578063c87b56dd14610443578063e985e9c51461045657600080fd5b80637ef611fd116100f45780637ef611fd146103ca57806384780205146103dd5780638da5cb5b146103f057806395d89b4114610401578063a22cb4651461040957600080fd5b8063645006ca1461039e5780636c0360eb146103a757806370a08231146103af578063715018a6146103c257600080fd5b806342842e0e116101a85780634cf088d9116101775780634cf088d9146103495780634f6ccce71461035c57806355f804b31461036f57806360018753146103825780636352211e1461038b57600080fd5b806342842e0e146102fc5780634563f30a1461030f5780634571e3a614610323578063464bc2141461033657600080fd5b8063081812fc116101ef578063081812fc14610286578063095ea7b3146102b157806318160ddd146102c457806323b872dd146102d65780632f745c59146102e957600080fd5b806301ffc9a71461022157806302329a291461024957806305ae50871461025e57806306fdde0314610271575b600080fd5b61023461022f366004612292565b6104f1565b60405190151581526020015b60405180910390f35b61025c610257366004612258565b61051c565b005b61025c61026c366004612015565b61056d565b6102796105b9565b604051610240919061246a565b610299610294366004612301565b61064b565b6040516001600160a01b039091168152602001610240565b61025c6102bf3660046121b0565b6106d3565b6035545b604051908152602001610240565b61025c6102e43660046120c1565b6107e9565b6102c86102f73660046121b0565b61081a565b61025c61030a3660046120c1565b6108cd565b60d25461023490600160a81b900460ff1681565b61025c610331366004612063565b6108e8565b60d254610299906001600160a01b031681565b60d054610299906001600160a01b031681565b6102c861036a366004612301565b610a58565b61025c61037d3660046122cc565b610ac5565b6102c860ce5481565b610299610399366004612301565b610b06565b6102c860cf5481565b610279610b92565b6102c86103bd366004612015565b610c20565b61025c610cee565b60d154610299906001600160a01b031681565b61025c6103eb366004612301565b610d24565b606a546001600160a01b0316610299565b610279610d53565b61025c610417366004612179565b610d62565b60d25461023490600160a01b900460ff1681565b61025c61043e3660046120fd565b610e27565b610279610451366004612301565b610e59565b610234610464366004612030565b6001600160a01b03918216600090815260376020908152604080832093909416825291909152205460ff1690565b61025c6104a0366004612258565b610ff5565b61025c6104b3366004612301565b61103d565b61025c6104c6366004612015565b6110aa565b61025c6104d9366004612258565b611142565b61025c6104ec366004612301565b611353565b60006001600160e01b0319821663780e9d6360e01b1480610516575061051682611382565b92915050565b606a546001600160a01b0316331461054f5760405162461bcd60e51b81526004016105469061251a565b60405180910390fd5b60d28054911515600160a01b0260ff60a01b19909216919091179055565b606a546001600160a01b031633146105975760405162461bcd60e51b81526004016105469061251a565b60d180546001600160a01b0319166001600160a01b0392909216919091179055565b6060603380546105c89061268b565b80601f01602080910402602001604051908101604052809291908181526020018280546105f49061268b565b80156106415780601f1061061657610100808354040283529160200191610641565b820191906000526020600020905b81548152906001019060200180831161062457829003601f168201915b5050505050905090565b6000610656826113d2565b6106b75760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610546565b506000908152603660205260409020546001600160a01b031690565b60006106de82610b06565b9050806001600160a01b0316836001600160a01b0316141561074c5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610546565b336001600160a01b038216148061076857506107688133610464565b6107da5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610546565b6107e4838361141c565b505050565b6107f3338261148a565b61080f5760405162461bcd60e51b81526004016105469061254f565b6107e4838383611574565b600061082583610c20565b82106108435760405162461bcd60e51b81526004016105469061247d565b6000805b6035548110156108b4576035818154811061086457610864612721565b6000918252602090912001546001600160a01b03868116911614156108a257838214156108945791506105169050565b8161089e816126c6565b9250505b806108ac816126c6565b915050610847565b5060405162461bcd60e51b81526004016105469061247d565b6107e483838360405180602001604052806000815250610e27565b600054610100900460ff166109035760005460ff1615610907565b303b155b61096a5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610546565b600054610100900460ff1615801561098c576000805461ffff19166101011790555b60d280546001600160a01b038087166001600160a01b03199283161790925560d080549286169290911691909117905581516109cf9060d3906020850190611e64565b5061138860ce5569010f0cf064dd5920000060cf5560d2805461ffff60a01b191661010160a01b179055604080518082018252600580825264098829a8ab60db1b6020808401829052845180860190955291845290830152610a30916116d5565b610a38611706565b610a40611735565b8015610a52576000805461ff00191690555b50505050565b6035546000908210610ac15760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610546565b5090565b606a546001600160a01b03163314610aef5760405162461bcd60e51b81526004016105469061251a565b8051610b029060d3906020840190611e64565b5050565b60008060358381548110610b1c57610b1c612721565b6000918252602090912001546001600160a01b03169050806105165760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610546565b60d38054610b9f9061268b565b80601f0160208091040260200160405190810160405280929190818152602001828054610bcb9061268b565b8015610c185780601f10610bed57610100808354040283529160200191610c18565b820191906000526020600020905b815481529060010190602001808311610bfb57829003601f168201915b505050505081565b60006001600160a01b038216610c8b5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610546565b6000805b603554811015610ce75760358181548110610cac57610cac612721565b6000918252602090912001546001600160a01b0385811691161415610cd757610cd4826126c6565b91505b610ce0816126c6565b9050610c8f565b5092915050565b606a546001600160a01b03163314610d185760405162461bcd60e51b81526004016105469061251a565b610d226000611764565b565b606a546001600160a01b03163314610d4e5760405162461bcd60e51b81526004016105469061251a565b60cf55565b6060603480546105c89061268b565b6001600160a01b038216331415610dbb5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610546565b3360008181526037602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b610e31338361148a565b610e4d5760405162461bcd60e51b81526004016105469061254f565b610a52848484846117b6565b6060610e64826113d2565b610ec85760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610546565b6000610ed383610b06565b60d0546040516310b0d15b60e11b81526001600160a01b03808416600483015292935060009290911690632161a2b69060240160006040518083038186803b158015610f1e57600080fd5b505afa158015610f32573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610f5a91908101906121da565b505060d15460405163cf9abf2760e01b81526001600160a01b0385811660048301529293506000929091169063cf9abf279060240160206040518083038186803b158015610fa757600080fd5b505afa158015610fbb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fdf9190612275565b9050610fec8251826117e9565b95945050505050565b606a546001600160a01b0316331461101f5760405162461bcd60e51b81526004016105469061251a565b60d28054911515600160a81b0260ff60a81b19909216919091179055565b606a546001600160a01b0316331461109c5760d254600160a01b900460ff161561109c5760405162461bcd60e51b815260206004820152601060248201526f436f6e7472616374207061757365642160801b6044820152606401610546565b6110a7335b826118ce565b50565b606a546001600160a01b031633146110d45760405162461bcd60e51b81526004016105469061251a565b6001600160a01b0381166111395760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610546565b6110a781611764565b606a546001600160a01b031633146111a15760d254600160a01b900460ff16156111a15760405162461bcd60e51b815260206004820152601060248201526f436f6e7472616374207061757365642160801b6044820152606401610546565b6111aa33610c20565b156112015760405162461bcd60e51b815260206004820152602160248201527f596f752063616e6e6f74206d696e74206d6f7265207468616e2031204c616d656044820152600f60fb1b6064820152608401610546565b60d1546001600160a01b0316638125e0d9336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401600060405180830381600087803b15801561125457600080fd5b505af1158015611268573d6000803e3d6000fd5b50505050801561130b5760d2546000906001600160a01b03166347734892336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b1580156112c657600080fd5b505afa1580156112da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112fe919061231a565b9050611309336110a1565b505b600061131660355490565b90506113223382611a19565b604051819033907fbb397bd42391b57c69ca8b5e84170b3d37fb0a3517a7d7ec2a95f4d4fed1a2b590600090a35050565b606a546001600160a01b0316331461137d5760405162461bcd60e51b81526004016105469061251a565b60ce55565b60006001600160e01b031982166380ac58cd60e01b14806113b357506001600160e01b03198216635b5e139f60e01b145b8061051657506301ffc9a760e01b6001600160e01b0319831614610516565b60355460009082108015610516575060006001600160a01b0316603583815481106113ff576113ff612721565b6000918252602090912001546001600160a01b0316141592915050565b600081815260366020526040902080546001600160a01b0319166001600160a01b038416908117909155819061145182610b06565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000611495826113d2565b6114f65760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610546565b600061150183610b06565b9050806001600160a01b0316846001600160a01b0316148061153c5750836001600160a01b03166115318461064b565b6001600160a01b0316145b8061156c57506001600160a01b0380821660009081526037602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b031661158782610b06565b6001600160a01b0316146115ef5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610546565b6001600160a01b0382166116515760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610546565b61165c838383611b4d565b61166760008261141c565b816035828154811061167b5761167b612721565b6000918252602082200180546001600160a01b0319166001600160a01b03938416179055604051839285811692908716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9190a4505050565b600054610100900460ff166116fc5760405162461bcd60e51b8152600401610546906125a0565b610b028282611bad565b600054610100900460ff1661172d5760405162461bcd60e51b8152600401610546906125a0565b610d22611bfb565b600054610100900460ff1661175c5760405162461bcd60e51b8152600401610546906125a0565b610d22611c2b565b606a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6117c1848484611574565b6117cd84848484611c59565b610a525760405162461bcd60e51b8152600401610546906124c8565b60606000826118255760d36117fd82611d66565b60405160200161180e92919061237b565b604051602081830303815290604052915050610516565b600084118015611836575060058411155b1561183f575060015b6005841180156118505750600a8411155b15611859575060025b600a8411801561186a575060108411155b15611873575060035b601084118015611884575060188411155b1561188d575060045b601884111561189a575060055b60d36118a582611d66565b6040516020016118b692919061237b565b60405160208183030381529060405291505092915050565b60cf54811161191f5760405162461bcd60e51b815260206004820152601c60248201527f416d6f756e74206c657373207468616e206d696e206465706f736974000000006044820152606401610546565b60d25460405163bfd77e2b60e01b81526001600160a01b038481166004830152602482018490529091169063bfd77e2b90604401600060405180830381600087803b15801561196d57600080fd5b505af1158015611981573d6000803e3d6000fd5b50505050600060ce54826119959190612634565b6001600160a01b038416600090815260d4602052604081208054929350906119bc836126c6565b90915550506001600160a01b038316600081815260d460209081526040918290205482519081529081018490527f7be918faa95d4c12890232c645736145289ff1f3aa9a20d792ae659f8b3019ec910160405180910390a2505050565b6001600160a01b038216611a6f5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610546565b611a78816113d2565b15611ac55760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610546565b611ad160008383611b4d565b6035805460018101825560009182527fcfa4bec1d3298408bb5afcfcd9c430549c5b31f8aa5c5848151c0a55f473c34d0180546001600160a01b0319166001600160a01b0385169081179091556040518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160a01b038316156107e45760d254600160a81b900460ff16156107e45760405162461bcd60e51b8152602060048201526014602482015273139bdb8b5d1c985b9cd9995c98589b194813919560621b6044820152606401610546565b600054610100900460ff16611bd45760405162461bcd60e51b8152600401610546906125a0565b8151611be7906033906020850190611e64565b5080516107e4906034906020840190611e64565b600054610100900460ff16611c225760405162461bcd60e51b8152600401610546906125a0565b610d2233611764565b600054610100900460ff16611c525760405162461bcd60e51b8152600401610546906125a0565b6001609c55565b60006001600160a01b0384163b15611d5b57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611c9d90339089908890889060040161242d565b602060405180830381600087803b158015611cb757600080fd5b505af1925050508015611ce7575060408051601f3d908101601f19168201909252611ce4918101906122af565b60015b611d41573d808015611d15576040519150601f19603f3d011682016040523d82523d6000602084013e611d1a565b606091505b508051611d395760405162461bcd60e51b8152600401610546906124c8565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061156c565b506001949350505050565b606081611d8a5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611db45780611d9e816126c6565b9150611dad9050600a83612634565b9150611d8e565b60008167ffffffffffffffff811115611dcf57611dcf612737565b6040519080825280601f01601f191660200182016040528015611df9576020820181803683370190505b5090505b841561156c57611e0e600183612648565b9150611e1b600a866126e1565b611e2690603061261c565b60f81b818381518110611e3b57611e3b612721565b60200101906001600160f81b031916908160001a905350611e5d600a86612634565b9450611dfd565b828054611e709061268b565b90600052602060002090601f016020900481019282611e925760008555611ed8565b82601f10611eab57805160ff1916838001178555611ed8565b82800160010185558215611ed8579182015b82811115611ed8578251825591602001919060010190611ebd565b50610ac19291505b80821115610ac15760008155600101611ee0565b600067ffffffffffffffff831115611f0e57611f0e612737565b611f21601f8401601f19166020016125eb565b9050828152838383011115611f3557600080fd5b828260208301376000602084830101529392505050565b80356001600160a01b0381168114611f6357600080fd5b919050565b600082601f830112611f7957600080fd5b8151602067ffffffffffffffff821115611f9557611f95612737565b8160051b611fa48282016125eb565b838152828101908684018388018501891015611fbf57600080fd5b600093505b85841015611fe2578051835260019390930192918401918401611fc4565b50979650505050505050565b600082601f830112611fff57600080fd5b61200e83833560208501611ef4565b9392505050565b60006020828403121561202757600080fd5b61200e82611f4c565b6000806040838503121561204357600080fd5b61204c83611f4c565b915061205a60208401611f4c565b90509250929050565b60008060006060848603121561207857600080fd5b61208184611f4c565b925061208f60208501611f4c565b9150604084013567ffffffffffffffff8111156120ab57600080fd5b6120b786828701611fee565b9150509250925092565b6000806000606084860312156120d657600080fd5b6120df84611f4c565b92506120ed60208501611f4c565b9150604084013590509250925092565b6000806000806080858703121561211357600080fd5b61211c85611f4c565b935061212a60208601611f4c565b925060408501359150606085013567ffffffffffffffff81111561214d57600080fd5b8501601f8101871361215e57600080fd5b61216d87823560208401611ef4565b91505092959194509250565b6000806040838503121561218c57600080fd5b61219583611f4c565b915060208301356121a58161274d565b809150509250929050565b600080604083850312156121c357600080fd5b6121cc83611f4c565b946020939093013593505050565b6000806000606084860312156121ef57600080fd5b835167ffffffffffffffff8082111561220757600080fd5b61221387838801611f68565b9450602086015191508082111561222957600080fd5b61223587838801611f68565b9350604086015191508082111561224b57600080fd5b506120b786828701611f68565b60006020828403121561226a57600080fd5b813561200e8161274d565b60006020828403121561228757600080fd5b815161200e8161274d565b6000602082840312156122a457600080fd5b813561200e8161275b565b6000602082840312156122c157600080fd5b815161200e8161275b565b6000602082840312156122de57600080fd5b813567ffffffffffffffff8111156122f557600080fd5b61156c84828501611fee565b60006020828403121561231357600080fd5b5035919050565b60006020828403121561232c57600080fd5b5051919050565b6000815180845261234b81602086016020860161265f565b601f01601f19169290920160200192915050565b6000815161237181856020860161265f565b9290920192915050565b600080845481600182811c91508083168061239757607f831692505b60208084108214156123b757634e487b7160e01b86526022600452602486fd5b8180156123cb57600181146123dc57612409565b60ff19861689528489019650612409565b60008b81526020902060005b868110156124015781548b8201529085019083016123e8565b505084890196505b505050505050610fec61241c828661235f565b64173539b7b760d91b815260050190565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061246090830184612333565b9695505050505050565b60208152600061200e6020830184612333565b6020808252602b908201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560408201526a74206f6620626f756e647360a81b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b604051601f8201601f1916810167ffffffffffffffff8111828210171561261457612614612737565b604052919050565b6000821982111561262f5761262f6126f5565b500190565b6000826126435761264361270b565b500490565b60008282101561265a5761265a6126f5565b500390565b60005b8381101561267a578181015183820152602001612662565b83811115610a525750506000910152565b600181811c9082168061269f57607f821691505b602082108114156126c057634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156126da576126da6126f5565b5060010190565b6000826126f0576126f061270b565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b80151581146110a757600080fd5b6001600160e01b0319811681146110a757600080fdfea26469706673582212201313dc9f076d53541e86a24824e4d942b8cb49f860bc7291c54bec074612294c64736f6c63430008070033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.