Check mintTranfer Method
The checkMintTransfer() is a public method that allows users to check whether the given TPA names are available for purchase or have already been minted. It takes two input parameters: _names, an array of bytes32 representing the TPA names to be checked, and _amounts, an array of uint32 representing the amount of TPAs to be checked.
function checkMintTransfer(bytes32[] _names, uint32[] _amounts) public view returns(bool)Input & Output
_names: an array ofbytes32representing the TPA names to be checked._amounts: an array ofuint32representing the amount of TPAs to be checked. The length of this array should be the same as the length of the_namesarray, and all elements should be set to 1.This function returns a boolean value indicating whether the given TPAs are available for purchase (
true) or have already been minted (false).
Usage
For example:
const result = await stageMetaContract.checkMintTransfer(
[
ethers.utils.formatBytes32String("aaa-000"),
ethers.utils.formatBytes32String("bbb-000")
],
[1, 1]);
console.log("check result:", result);Last updated