> For the complete documentation index, see [llms.txt](https://dg-market.gitbook.io/dg-live/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dg-market.gitbook.io/dg-live/developer-resources/smart-contract-reference/methods/buyforgift.md).

# BuyForGift

**Description:** This function allows a user to buy multiple NFTs listed for sale and gift them to another address.<br>

**Method header:**

```solidity

function buyForGift(address _nftAddress, uint256[] calldata _tokenIds, address _transferTo) public nonReentrant

```

**Parameters:**

| Parameter Type      | Parameter Name | Parameter Description                                        |
| ------------------- | -------------- | ------------------------------------------------------------ |
| address             | \_nftAddress   | The address of the NFT contract.                             |
| uint256\[] calldata | \_tokenIds     | An array of NFT IDs to be purchased.                         |
| address             | \_transferTo   | The address to which the purchased NFTs will be transferred. |
