Smart Contracts and Collections
Deploy new contracts, fetch contract data, mint NFTs and search for NFT collections.
How we do it: You are the owner of every smart contract created with the Rareful API. You can find your wallet details in the profile page of the dashboard.
Working with Smart Contracts
Deploy a new smart contract
POST
https://api.rareful.io/v1/deployContract
Creates a new smart contract.
Headers
API_KEY*
String
Your API Key can found on the dashboard, and will be used to authenticate all requests (Required)
Content-Type*
String
application/json (Required)
Request Body
contract_name
string
The name of the contract. ie. "Bored Ape Yacht Club". (If none provided, the contract_name is "Our Web3 Collection")
contract_symbol
string
The symbol that represents the contract. ie. "BAYC". (If none provided, the contract_symbol is "OWC")
contract_type
int
(If none provided, the contract_type defaults to 1)
is_default
bool
If is_default is True, this contract becomes your default contract. This means it shows up first on your dashboard, and minting without specifying a contract address automatically mints to this default contract. (If none provided, is_default defaults to False)
description
String
The description for your contract/collection. This is not saved on the blockchain, but is useful to store if you want to describe the collection in your application.
ie. "A 10,000 item interstellar themed art collection."
(If none provided, the description defaults to "".)
cover_url
String
A link to an image that acts as the background/cover of your contract/collection. This is not saved on the blockchain, but is useful to provide if you want to visually represent the collection in your application.
profile_url
String
A link to an image that acts as the profile photo of your contract/collection. This is mostly for internal use. ie:
blockchain
String
The blockchain/network the contract will be deployed on. The options are "polygon" or "ethereum".
(If none provided, the default is "polygon")
Get contracts you have deployed
POST
https://api.rareful.io/v1/getAllContracts
Retrieve all the contracts you have deployed
Headers
API_KEY*
String
Your API Key can found on the dashboard, and will be used to authenticate all requests (Required)
Content-Type*
String
application/json (Required)
Fetch contract NFTs
POST
https://api.rareful.io/v1/getContractNFTs
Fetch NFTs in a contract and return associated metadata and image links.
Headers
API_KEY*
String
Your API Key can found on the dashboard, and will be used to authenticate all requests (Required)
Content-Type
String
application/json (Required)
Request Body
contract_address*
String
The contract address for which you are fetching NFTs and metadata. (Required)
blockchain
String
The blockchain this contract was minted on
Fetch contract NFTs
POST
https://api.rareful.io/v1/getContractNFTsForSale
Fetch all NFTs in a contract that are currently for sale.
Headers
API_KEY*
String
Your API Key can found on the dashboard, and will be used to authenticate all requests (Required)
Content-Type
String
application/json (Required)
Request Body
contract_address*
String
The contract address for which you are fetching NFTs and metadata.
Last updated