Can I send an NFT (erc-721) to a wallet using only code?

382 Views Asked by At

Can I send an NFT (erc-721) from (Decentraland) to a wallet using only code (backend)?

I am using as a provider (infura) and as a library (ethers.js).

I would appreciate any additional suggestions to follow a path.

1

There are 1 best solutions below

0
On BEST ANSWER

Yes, you can, but you will need to interact with a contract to transfer ERC721 token.

Look here https://docs.openzeppelin.com/contracts/3.x/api/token/erc721

at safeTransferFrom method. You can call this method from an account that has the NFT and it will transfer it to '_to' account.