Explore Philand
  • Welcome to Phi
    • 🏝️What's Phi?
    • 🌄Mission
    • 🏃‍♀️Story
    • 🏄Phi Crew
  • ⚡Products
    • 🏝️Phi Land
      • 🔦User Guide for Phi Land
        • 0️⃣Before Playing Phi
          • 🦊Download a Crypto Wallet
          • 🟣Get $MATIC
          • 🔷Get an ENS Domain
        • 1️⃣Access Phi Land
        • 2️⃣Create your Phi Land
        • 3️⃣Claim Quest Objects
        • 4️⃣Purchase Items on Shop
        • 5️⃣Deposit Objects to Land
        • 6️⃣Build your land
        • 7️⃣Share your land on Twitter
      • 🎧Phi Music
      • ⛓️Hyperlinks & Link List
      • 💫Transferring Land
      • ↔️Phi Connect
    • ⚔️Phi Quest
      • 🔦User Guide for Phi Quest
        • 0️⃣Before Playing Phi
          • 🦊Download a Crypto Wallet
          • 🟣Get $MATIC
        • 1️⃣Access Phi Quest
        • 2️⃣Claim Quest Objects
          • Quest List
          • Adventure
          • Campaign
        • 3️⃣Purchase Items on Shop
        • 4️⃣Play Phi Land with Items you got
      • 🧑Account
      • 🏅Active Score Rank Quests
    • 🍭Phi Opportunity (beta)
    • 💎Phi Material
      • ⚒️Phi Craft
      • 🥗UGC Craft
    • 🔮OpenSea Collection Links
    • 💡How-to's
      • 🏷️Mastering ENS (Ethereum Name Service)
        • How to Register an ENS Domain Name
        • How to Renew an ENS Domain Name
        • How to Manage ENS records
          • How to set up the Avatar record in ENS
            • Using MintYourPFP to set an Avatar to an ENS name
        • How to Transfer ENS to Another Wallet
        • How to set up an ENS Subdomain
    • ❓FAQ
      • Must I have an ENS to play Phi Quest?
      • How can I get an ENS domain?
      • Why don't my ENS domains show up?
      • Can I use ENS subdomains for Phi Land?
      • What happens when I transfer ENS?
      • I can't create a land
      • Why cannot access to my land?
      • Why can't I change the baseplate?
      • Why can’t I claim Quest objects?
      • Any rewards for participating in Testnet?
      • What is Phi Quest?
      • How the Leaderboard on Phi Quest is calculated?
      • Why are there two EXPs?
      • I claimed objects on Phi Quest. How can I create my Phi Land?
      • Why can’t I see my objects in my wallet?
      • Can I trade Quest Objects?
      • Are traded objects included in my EXP calculation?
      • My EXP not showing, leaderboard not updating
      • Which browser should I use?
      • Which devices are supported?
      • How to update my Twitter OGP image (card)?
    • 📬Submit Feedback
      • Bug Report
      • Feature Request
      • User Survey
  • ⚙️DEVELOPERS
    • 🪴Create Philand
    • 🎨Objects NFT
      • ⛓️Quest Object
      • 🌾Free Object
      • 🧊Premium Object
      • 🍰Baseplate Object
      • 🧮Wallpaper Object
      • 💄Other Topics
      • 💡Appendix
    • 🛠️Use PhiMap
      • 🗺️Deposit/Withdraw
      • 🍧Save Philand
      • 👀View Function
      • 💡Appendix
    • 💝Philand API
      • ⌚Introduction
      • 🔑Authentication
        • 😄Use API key
        • 😍Get Access Token
        • 🤩Verify Access Token
        • 🤪Get Refresh Token
        • 😎Refresh JWT
      • 🫔Quest
        • 🎾Get Quest List
        • 🏀Get Quest Status
        • ⚽Trigger Eligible Check
        • 🎯Get Claimed Status
        • 🏓Get Verify Coupon
      • 🏝️Philand
        • 🫑View Philand Link
        • 🍍Get Philand Image
      • 🧸Account
        • 🍞Get Philand List
        • 👑Get PhiRank
      • 🎺Object
        • 🎸Get Object Info
      • 🦖Example Call
        • 🤠Quest Claim
      • 👔Related Links
    • 🧑‍🏫How to Verify your transaction
      • 👓Read Contract Method
      • 🚩Third-party API
      • 🦷Whitelist
    • 📄Contracts
      • 👮Audit
  • 💼Career
    • 👯Phi is hiring
  • 🔗Official links
    • Website
    • Twitter
    • Discord
    • Discourse
    • Medium
    • Github
    • Guild.xyz
    • Lenster
    • Instagram
Powered by GitBook
On this page
  • Premium objects represent the cryptocurrency world in an attractive way.
  • Moon Rocket
  • Premium Object Contract
  • Price of Premium Object
  • Let's visit Our Shop and see Premium Object

Was this helpful?

  1. DEVELOPERS
  2. Objects NFT

Premium Object

Pixel art has the ability to bring joy and fulfillment to you.

PreviousFree ObjectNextBaseplate Object

Last updated 2 years ago

Was this helpful?

Premium objects represent the cryptocurrency world in an attractive way.

The cryptocurrency world has a number of memes and trends that are worth knowing about. These trends have gained a lot of popularity in recent times, and their use is expected to continue growing in the future.

Moon Rocket

Premium Object Contract

    /*
     * @title _buyObject
     * @notice mint Object to token buyer
     * @param tokenId : object nft token_id
     * @dev pay royality to phi wallet and creator
     */
    function _buyObject(uint256 tokenId) internal nonReentrant {
        // check the token id exists
        isValid(tokenId);
        // check token is open for sale
        require(allObjects[tokenId].forSale, "not open for sale");
        // check token's MaxClaimed
        require(super.totalSupply(tokenId) <= allObjects[tokenId].maxClaimed, "reach maxClaimed");

        // Pay royality to artist, and remaining to sales address
        (bool calcSuccess1, uint256 res) = SafeMath.tryMul(allObjects[tokenId].price, royalityFee);
        require(calcSuccess1, "calc error");
        (bool calcSuccess2, uint256 royality) = SafeMath.tryDiv(res, 10000);
        require(calcSuccess2, "calc error");
        (bool success1, ) = payable(allObjects[tokenId].creator).call{ value: royality }("");
        require(success1, "cant pay royality");
        (bool success2, ) = payable(treasuryAddress).call{ value: (allObjects[tokenId].price - royality) }("");
        require(success2, "cant transfer sales");

        // mint the token
        super._mint(msg.sender, tokenId, 1, "0x");
        emit LogBuyObject(msg.sender, tokenId, allObjects[tokenId].price);
    }

This code is a function for buying an object by specifying a tokenId.

First, it checks if the tokenId specified as an argument is valid. Next, it checks if the token is open for sale. It also checks if the token's MaxClaimed has not been exceeded. Then it calculates the price of the token, takes a fee, and pays a portion to the creator of the object. The remaining amount is paid to the sales destination that was previously set. Finally, it mints the token to msg.sender.

Price of Premium Object

To purchase a premium object, you will need $MATIC. The price would be influenced by multiple factors such as the size of the object, the time it took to create, and any special utility it may have. The price of the object is designed to follow a long tail distribution.

Let's visit Our Shop and see Premium Object

Contract Address:: '0x312E2F8AD479BEDd32c7A752bCB68FA24550CAF7', The purchase of premium objects requires $MATIC and that a check using the 'msg.value' variable is performed for this purpose. It also mentions that processing for the payment of royalties is carried out at the same time.

https://polygonscan.com/address/0x312E2F8AD479BEDd32c7A752bCB68FA24550CAF7
⚙️
🎨
🧊
Idea of Object creation
Long tail Theory "The Long Tail: Why the Future of Business is Selling Less of More".
Page cover image
Object - Shop | Phi QuestObject - Shop | Phi Quest
Logo