How to tell if/how long an 1155 edition is available to mint?

I am building an NFT marketplace aggregator and would like to enable live minting of Manifold 1155s through our interface. I am wondering how I could query the following information from the 1155 contract?

  • when does minting start?
  • when does minting end?
  • how many mints are still available?
  • what is the price of minting?

I am reviewing the ERC1155Creator and ERC1155LazyPayableClaim contracts, but am having a hard time finding an answer. What contract functions could I query to get the information above? Thanks.

gm

You want getClaim on ERC*LazyPayableClaim [1] which will return you the Claim struct [2].

Couple caveats:

  • Creators can update these at anytime, so you’ll want to listen for ClaimUpdated events [3].
  • The Claim struct returned by getClaim has added some fields over different versions of the contracts

You might also be interested in some of the web2 APIs: https://docs.manifold.xyz/v/manifold-for-developers/tools-and-apis/claims-apis


  1. https://github.com/manifoldxyz/creator-core-extensions-solidity/blob/main/packages/manifold/contracts/lazyclaim/ERC1155LazyPayableClaim.sol#L147-L149
  2. https://github.com/manifoldxyz/creator-core-extensions-solidity/blob/main/packages/manifold/contracts/lazyclaim/IERC1155LazyPayableClaim.sol#L27-L40
  3. https://github.com/manifoldxyz/creator-core-extensions-solidity/blob/main/packages/manifold/contracts/lazyclaim/ILazyPayableClaim.sol#L13-L17