PatrickAlphaC / dungeons-and-dragons-nft

#chainlink #nft
MIT License
633 stars 278 forks source link

Not transferring NFT smart contract to test opensea via setTokenURI and metadata file #10

Closed interzone2 closed 2 years ago

interzone2 commented 2 years ago

Hi - thanks for this great resource it has been extremely useful in helping me build NFT smart contracts.

I have made it through every step but am having trouble at the last part - transferring to OpenSea.

scripts/set-token-uri.js works and produces the below output:

Let's set the tokenURI of your characters
{
  tx: '0xcc0bc3d1734b5af8d17cdb35db372e66b861933ba8c0531d4021655a4cdd5169',
  receipt: {
    blockHash: '0xc631dfd809ac2220649398301e77f79ecdafc9852695a38fce23479f63d6a1b1',
    blockNumber: 9107658,
    contractAddress: null,
    cumulativeGasUsed: 1761662,
    effectiveGasPrice: '0x3b9aca09',
    from: '0x03485453f0b0511dd6bd4173ad05093b1e0313de',
    gasUsed: 49245,
    logs: [],
    logsBloom: '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
    status: true,
    to: '0xc2c90f5b3a757625c55635901542c3b488cc9788',
    transactionHash: '0xcc0bc3d1734b5af8d17cdb35db372e66b861933ba8c0531d4021655a4cdd5169',
    transactionIndex: 14,
    type: '0x0',
    rawLogs: []
  },
  logs: []
}
0xcc0bc3d1734b5af8d17cdb35db372e66b861933ba8c0531d4021655a4cdd5169
Truffle v5.4.0 (core: 5.4.0)
Node v12.22.4

However when I plugin what I think is the smart contract address for OpenSea test net at 'to:0xc2c90f5b3a757625c55635901542c3b488cc9788' above.. the page that results at OpenSea finally doesn't hold any content?[https://testnets.opensea.io/assets/0xc2c90f5b3a757625c55635901542c3b488cc9788/0](https://testnets.opensea.io/assets/0xc2c90f5b3a757625c55635901542c3b488cc9788/0)

Also the contractAddress field is null ?

I feel i may need to go back a step or two. The .json metadata file and the image file are both at IPFS and pinned.

Any ideas much appreciated. Thank you!

PatrickAlphaC commented 2 years ago

Hi!

Thanks for making the issue here.

https://rinkeby.etherscan.io/address/0xc2c90f5b3a757625c55635901542c3b488cc9788#readContract

I'm looking at the tokenURI and for index 0 I get this:

https://ipfs.io/ipfs/QmfVmgGFMc3vobFBhjXahaUxbripXMiK2SUA2q6sCJN9by?filename=DeusIrae-crop.json

I can't seem to be able to access this metadata though. Can you see the information if you pop this into your browser?

interzone2 commented 2 years ago

Seems the local IPFS was down. I've now also pinned to Pinata. Should be viewable now!

interzone2 commented 2 years ago

Got it working now. I think previous unlined IPFS data was due to either IPFS issue, or mismatch between the tokenID's set in set-token-uri.js - also metadata refreshing at OpenSea.

Though a few items seems to be delayed in updating such as 'description' and 'levels'- i.e. they've been updated in a new .json file at IPFS but don't display - the new image DOES display.. odd.

PatrickAlphaC commented 2 years ago

Nice!

Yeah a bit odd, glad you got it though!