getTokenAllocation()

Returns the breakdown of a wallets allocation for a token. Factors in any access list allocations as well as any public allocation

Parameters

NameTypeRequiredDescription
tokenIdNumberYThe token ID for which the allocation is being checked
walletAddressStringYThe wallet address of the user who's allocation is being checked

Response

[
   {
      "remainingAllocation": "number | undefined",
      "pricePerToken": "number"
   }   
]

Example Usage

const tokenId = 1;
const walletAddress = "test";

const allocation = await contract.getTokenAllocation(tokenId, walletAddress);

Feedback

Something not quite right, unclear or can't find what you are looking for? Please let us know at support.moonpay.com and we will get back to you as soon as we can.