简体   繁体   English

我可以仅使用代码将 NFT (erc-721) 发送到钱包吗?

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

Can I send an NFT (erc-721) from (Decentraland) to a wallet using only code (backend)?我可以仅使用代码(后端)将 NFT(erc-721)从(Decentraland)发送到钱包吗?

I am using as a provider (infura) and as a library (ethers.js).我用作提供者 (infura) 和库 (ethers.js)。

I would appreciate any additional suggestions to follow a path.我将不胜感激任何其他建议以遵循一条路径。

Yes, you can, but you will need to interact with a contract to transfer ERC721 token.是的,你可以,但你需要与合约交互才能转移 ERC721 代币。

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

at safeTransferFrom method.safeTransferFrom方法。 You can call this method from an account that has the NFT and it will transfer it to '_to' account.您可以从拥有 NFT 的帐户调用此方法,它会将其转移到“_to”帐户。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM