getPrice()
/**
* Get the registration price of the Collective Portrait.
*
* @remarks
* The registration price is the price of the Collective Portrait for a given number of years.
* If the Collective Portrait is up for auction, the registration price will be the auction price for the first year.
* If the Collective Portrait is not up for auction, the registration price will be the price of the Collective Portrait for the given number of years.
*
* @param {CollectivePortraitName | number} identity - The name of the Collective Portrait that the user would like to get the registration price for.
* @param {number} years - The number of years that the user would like to register the Collective Portrait for.
* @returns {number} - The registration price of the Collective Portrait.
* @beta
* @async
*/
getPrice(identity: CollectivePortraitName | number, years: number): number {
const name =
typeof identity === 'number' ? this.getNameByTokenId(identity) : identity;
return this.portrait.portraitCollectiveContract.getPrice(name, years);
}
Last updated