Step 1: Add a Smart Contract. Whether you're looking to use your pre-existing smart contract or create one from scratch, this page has all the tips you need to make sure integration goes smoothly.

Pre-existing Contracts

The first step is adding your smart contract! Paper is compatible with any pre-existing smart contract. Here's some tips to make sure your integration goes smoothly:

Single method to handle minting
This method should not rely on msg.sender since the user themselves will not be calling the contract. Instead, the recipient of the NFT should be taken in as a parameter into the function. Here's an example:

function claimTo(address _recipient, uint256 _quantity, uint256 _tokenId) {
    // your function here
}

Have a method to check eligibility (Optional)
This method should return a string. This string will be displayed as the error message preventing the customer from minting.Returning an empty string means that the user is not restricted from minting.
You can omit such a method altogether if the customer is able to mint regardless.

📘

Additional Features: Fiat Payout, Dynamic Pricing, & Only-Paper Restricted Functions

Writing your own smart contract comes with so much more flexibility. At paper, we try to make it as easy as possible to implement any custom feature such as:

Creating a Smart Contract from Scratch

If you're new to creating smart contracts or looking for a quick way to build one without coding, we recommend ThirdWeb for EVM (Ethereum, Polygon, AVAX, etc.) chains and Candy Machine v2 or Auction House for Solana.

Paper is compatible with the following pre-built contracts on ThirdWeb:

  • NFT Drop
  • Edition Drop
  • Signature Drop
  • Edition
  • Marketplace

On Solana, we are compatible with any Auction House marketplace (only for "Buy Now" purchases) or Candy Machine V2 drops. We also support custom contracts on Solana for enterprise customers. Please contact us if you have a custom need on Solana.

If you're looking for inspiration to code up your smart contract from scratch, you can see sample smart contracts on our public github repo.

Summary

Whether you're looking to create a custom smart contract from scratch or modify an existing one, the tips on this page should help integration go smoothly! You're now ready to move on to Step 2: Building a Checkout Flow!: