minty icon indicating copy to clipboard operation
minty copied to clipboard

Transfer to address and then transfer to another address

Open jimouris opened this issue 3 years ago • 0 comments

Hi!

Thank you for this project, it's very simple to follow and understand.

I have a question regarding transferring the NFTs. I have minted an NFT (ID 1):

❯ minty show 1     
Token ID:              1
Owner Address:         0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
Metadata Address:      ipfs://bafybeidcmv2msyphtmhvbh2q6fegddjqatnqtworntw5wm2iixeecuevvi/metadata.json
Metadata Gateway URL:  http://localhost:8080/ipfs/bafybeidcmv2msyphtmhvbh2q6fegddjqatnqtworntw5wm2iixeecuevvi/metadata.json
Asset Address:         ipfs://bafybeiaf6l4xlrmdh74zn2g6lakxyiz4r6n4u3fyybksk7enrggcpv4cca/README.md
Asset Gateway URL:     http://localhost:8080/ipfs/bafybeiaf6l4xlrmdh74zn2g6lakxyiz4r6n4u3fyybksk7enrggcpv4cca/README.md
NFT Metadata:
{
  "name": "Moon Flight #1",
  "description": "This ticket serves as proof-of-ownership of a first-class seat on a flight to the moon.",
  "image": "ipfs://bafybeiaf6l4xlrmdh74zn2g6lakxyiz4r6n4u3fyybksk7enrggcpv4cca/README.md"
}

then I transfer it to address 0x8626f6940e2eb28930efb4cef49b2d1f2c9c1199:

❯ minty transfer 1 0x8626f6940e2eb28930efb4cef49b2d1f2c9c1199
🌿 Transferred token 1 to 0x8626f6940e2eb28930efb4cef49b2d1f2c9c1199

and verify that the transfer was correct:

❯ minty show 1                                               
Token ID:              1
Owner Address:         0x8626f6940E2eb28930eFb4CeF49B2d1F2C9C1199
Metadata Address:      ipfs://bafybeidcmv2msyphtmhvbh2q6fegddjqatnqtworntw5wm2iixeecuevvi/metadata.json
Metadata Gateway URL:  http://localhost:8080/ipfs/bafybeidcmv2msyphtmhvbh2q6fegddjqatnqtworntw5wm2iixeecuevvi/metadata.json
Asset Address:         ipfs://bafybeiaf6l4xlrmdh74zn2g6lakxyiz4r6n4u3fyybksk7enrggcpv4cca/README.md
Asset Gateway URL:     http://localhost:8080/ipfs/bafybeiaf6l4xlrmdh74zn2g6lakxyiz4r6n4u3fyybksk7enrggcpv4cca/README.md
NFT Metadata:
{
  "name": "Moon Flight #1",
  "description": "This ticket serves as proof-of-ownership of a first-class seat on a flight to the moon.",
  "image": "ipfs://bafybeiaf6l4xlrmdh74zn2g6lakxyiz4r6n4u3fyybksk7enrggcpv4cca/README.md"
}

Then, I am trying to transfer it to another address but I get the following error:

❯ minty transfer 1 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266                                                                                    
ProviderError: VM Exception while processing transaction: revert ERC721: transfer caller is not owner nor approved
    at HttpProvider.request (/home/jimouris/repos/minty/node_modules/hardhat/internal/core/providers/http.js:50:23)
    at GanacheGasMultiplierProvider.request (/home/jimouris/repos/minty/node_modules/hardhat/internal/core/providers/gas-providers.js:139:38)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

I see that the error is that "the transfer caller is not the owner" which means that I'm trying to initiate the transfer as 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 instead of 0x8626f6940E2eb28930eFb4CeF49B2d1F2C9C1199. Is there a way to specify who calls the transfer each time?

Thank you!

jimouris avatar May 11 '21 16:05 jimouris