getNftData method
Future<({InternalAddress? collectionAddress, BigInt index, Cell? individualContent, bool init, InternalAddress? ownerAddress})>
getNftData()
Returns the NFT data from the contract as a record, wrapped in a Future:
Future<({
bool init,
BigInt index,
InternalAddress? collectionAddress,
InternalAddress? ownerAddress,
Cell? individualContent,
})>
Throws 'ContractProvider field was not initialized' if provider is null
Implementation
Future<
({
bool init,
BigInt index,
InternalAddress? collectionAddress,
InternalAddress? ownerAddress,
Cell? individualContent,
})> getNftData() async {
if (provider == null) {
throw 'ContractProvider field was not initialized';
}
final res = await provider!.get('get_nft_data', []);
var init = res.stack.readBool();
var index = res.stack.readBigInt();
var collectionAddress = res.stack.readAddressOrNull();
var ownerAddress = res.stack.readAddressOrNull();
var individualContent = res.stack.readCellOrNull();
return (
init: init,
index: index,
collectionAddress: collectionAddress,
ownerAddress: ownerAddress,
individualContent: individualContent,
);
}