Cover photo

The Developer Guide to Getting Started with Phosphor

Introducing Phosphor for developers. Here’s everything you need to get started using Phosphor to build NFT projects.

Exploring the vibrant world of NFTs brings a mix of creative thrill and technical challenges, from navigating smart contracts to tracking digital assets across various blockchains. Phosphor simplifies the management and lifecycle of NFT drops through an advanced API that sidesteps the complexity of direct smart contract interactions. Phosphor transforms the complex tasks associated with managing digital collectibles into a seamless, enjoyable process. 

Why use Phosphor as a developer?

Phosphor enables creators to efficiently generate and administer NFT collections, facilitate the distribution and listing of assets, and securely handle the collection of royalties and payments for both non-fungible and semi-fungible items using a set of simple API commands.

The platform is built to support NFTs based on ERC-721 and ERC-1155 standards and is compatible with multiple blockchain networks, including Mainnet, Polygon, Linea, and Palm, out of the box. Additionally, it offers the flexibility to integrate with other EVM-compatible sidechains and Layer 2 solutions through manual configuration, providing users with a versatile and powerful tool for NFT management.

  • Full Ownership of Smart Contracts: Users retain total control over their smart contracts, with Phosphor facilitating their management.

  • Contract Versatility and Security: Provides a selection of pre-audited contract templates or the option to use custom contracts, all audited by Diligence for enhanced security.

  • Efficient Minting Infrastructure: Features a robust infrastructure for multi-wallet minting, streamlining the NFT creation process.

  • Bulk Minting Capability: Allows the creation of hundreds of NFTs with a single API call, perfect for extensive collections or projects.

  • High Customization Options: Supports extensive customization for creating branded storefronts and personalizing email communications, including SMTP email provider integration.

  • Comprehensive API for NFT Lifecycle Management: Simplifies the entire lifecycle of managing NFT drops, from creation to royalty collection, through straightforward API calls.

  • Secure Royalty and Payment Processing: Ensures the secure collection of royalties and payments from both non-fungible and semi-fungible assets.

  • Flexible Integration Options: Allows for the integration of additional EVM-compatible sidechains and Layer 2 solutions, offering flexibility for users to expand their NFT projects' capabilities.

  • Credit Card Payments for Blockchain Fees: Facilitates the convenience of paying blockchain fees with a credit card, simplifying the process for users unfamiliar with cryptocurrency.

  • No web3 experience required: Phosphor API is for any type of developer to facilitate the convenience of paying blockchain fees with a credit card. This simplifies the process for users unfamiliar with cryptocurrency and/or private keys, while also enabling full ownership of smart contracts for those that want to retain total control over the collections deployed on-chain.

Phosphor dashboard for developers

The Phosphor Dashboard, serves as a command center for users. Upon signing up for Phosphor Developer, users are allocated to an organization, streamlining activities and features. This organization-centric approach facilitates straightforward and secure management of API keys, user roles, collections, and communications. It also includes tools for payment integration, email marketing, and real-time notifications via webhooks, simplifying NFT management for creators and collectors.

Prior to creating a collection, it's essential to generate an API key within the Phosphor Dashboard. This key grants access to a wide array of NFT management features, enabling secure interaction with the Phosphor API. With this key, we can seamlessly create, manage, and distribute our NFT collections, ensuring smooth integration of digital assets within the Phosphor ecosystem and a streamlined start to our NFT projects.

Head over to User Profile and you will find the API keys option. Make sure to create your own API key first.

We can use two types of token standards for phosphor, ERC721 and ERC1155.

The Phosphor platform provides a few default contracts that users can pick, including FrozenERC721, FrozenERC1155, FlexibleERC721, FlexibleERC1155, and SignatureERC721.

You can check more about using platform contracts over here. 

ERC-721 handles transactions on a one-token-at-a-time basis, suited for individual transfers. In contrast, ERC-1155 supports batch transfers, enabling multiple token types to be sent in a single transaction, significantly enhancing efficiency and reducing costs.

You can also use a custom contract, meaning bringing your own contract (BYOC).

Creating collections with Postman

Let's dive into creating and managing our NFT collection. We'll start by creating different collections that leverage the strengths of both ERC-1155 and ERC-721 standards, each suited for different use cases of our project. First we need to get the postman collection from here .

Head over to the postman and import the collection, and you’ll notice a few quickstarts that are given to you. If you’re new to Postman, then here’s the learning resource.

Let’s go to variables on postman, there add your API key and your wallet address. Variables is mostly to store your environment variables.

Airdrop 1 NFT to multiple addresses

First up, we have the airdrop quickstart. Airdrop refers to the free distribution of tokens or coins to the blockchain community's wallet addresses, typically used for promotion, rewarding loyalty and encouraging adoption. For this, we'll lean on the ERC-1155 standard due to its flexibility in handling multiple types of tokens under a single contract. This makes it perfect for distributing a unique NFT to a wide array of recipients efficiently. Whether it's directly minting to wallet addresses or sending out personal claim links via email, ERC-1155's ability to batch process transactions will save us time and reduce costs.

Steps to Follow:

  1. Add an item as ERC-1155 NFT to the collection and lock it for minting.

  2. Execute the airdrop:

    • Mint the NFT directly to recipients with wallet addresses.

    • For recipients with email addresses, send a personal claim link to redeem the NFT.

Why ERC-1155? ERC-1155 is chosen for the airdrop phase due to its versatility and efficiency in handling bulk operations, making it cost-effective and straightforward to distribute the NFT to a diverse recipient list without the need for individual transactions for each transfer.

Sell multiple NFTs

Next, we're setting the stage for selling exclusive NFTs. Here, the ERC-721 standard shines by allowing us to offer individual, one-of-a-kind tokens, each with its own distinct properties and value. This part of our project is all about giving collectors something special they can own exclusively, which is why ERC-721's emphasis on uniqueness is key. We'll add these NFTs to our collection, lock them for minting, and then create a listing for the sale. This phase is about connecting our unique digital creations with those who value them most.

Steps to Follow:

  1. Add multiple ERC-721 NFTs to the collection, locking them for minting.

  2. Create a primary market listing to put these NFTs up for sale.

  3. Generate a purchase intent for customers, facilitating the sale process.

Why ERC-721? ERC-721 is selected for the sale of unique NFTs due to its standard for one-of-a-kind digital assets, making it ideal for creating and selling individual pieces of art or collectibles. This ensures that each NFT sold is recognized as a distinct entity, appealing to collectors and investors seeking exclusive ownership.

Snapshot an NFT smart contract

Finally, understanding the distribution and engagement within our collection is crucial. We'll wrap up by generating a snapshot of our NFT contract. This isn't just about crunching numbers; it's a powerful way to see who's holding our tokens and how our collection is growing over time. Whether our tokens follow the ERC-721 or ERC-1155 standard, this snapshot gives us a clear picture of our community's landscape, aiding in future decisions and strategies.

Steps to Follow:

  1. Request a snapshot generation of the NFT contract, utilizing custom options to target specific details like the list of active NFT holders.

  2. Monitor the snapshot generation status, acknowledging that the process may take a few minutes based on the complexity and selected options.

  3. Retrieve the list of NFT holders once the snapshot generation is completed, gaining insights into the distribution and engagement of your collection.

Why Snapshot Across Both Standards? The snapshot process is essential for both ERC-721 and ERC-1155 tokens because it offers a comprehensive view of the token distribution regardless of the type. For ERC-721 tokens, snapshots help identify the unique ownership of individual assets, which is crucial for collections where each piece is distinct. For ERC-1155 tokens, snapshots can reveal the distribution of both fungible and non-fungible assets within a single contract, offering insights into how different types of assets are held across the community.

Tools and Resources:

  • Utilize the Phosphor Quickstart Postman collection to execute this comprehensive scenario within your own organization, leveraging the platform's API for streamlined management and deployment of your NFT project.

Other resources you might want to explore:

Phosphor Snippets: (github) (website)

Hardhat Phosphor Plugin:

This Hardhat plugin makes it easy to deploy smart contracts to phosphor via hardhat.

Phosphor Docs: 

Phosphor Developer Dashboard: 

As you keep exploring Phosphor, it's clear there's a lot more you can do with digital projects. It shows us how technology can really boost your creative ideas like never before, opening up exciting new possibilities for what you can create and share in the digital world. Enjoy and follow along for more updates. 

Phosphor logo
Subscribe to Phosphor and never miss a post.
  • Loading comments...