Hot answers tagged

2

This answer is just Python implementation of @MidnightLightning's accepted answer above. I have used Web3.py. from web3.auto import w3 def _ipfs_to_bytes32(hash_str: str): """Ipfs hash is converted into bytes32 format.""" bytes_array = base58.b58decode(hash_str) b = bytes_array[2:] return binascii.hexlify(b).decode("utf-8") def ...


2

Set your _baseURI as "ipfs://" and put the content hash into _tokenURI. The relevant code is at https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC721/ERC721.sol#L141-L144 The result is your tokenURI(tokenID) will be the full IPFS URI.


1

From the SuperRare page you can see the history of the NFT, the first entry being the creation. You can view the transaction in Etherscan by clicking the link. This is the creation transaction: https://etherscan.io/tx/0xcbe836b09b0483cf552b5671ce1f6bf7cb6270cec4a65c8b53df96fc7c0a078f From Etherscan you can see it's an ERC-721 token with an ID of 23896. You ...


1

Along the lines of the "Don't Trust. Verify.™" maxim, you can verify the IPFS hash yourself through a known, trustworthy IPFS gateway. For example, the following URL routes through an IPFS node hosted by Cloudflare, which may or may not be trustworthy (it is, but let's pretend it might not be): https://cloudflare-ipfs.com/ipfs/...


1

IPFS uses peer-to-peer communication using the libp2p library which uses multiaddress(multiaddr). multiaddr is a way of communication using multiple protocols. The JS version of the libp2p library allows you to configure Transports which are used to communicate between peers. Here's a list of supported transports as shown on the configuration guide. libp2p/...


1

According to this recent post by Infura on September 23, 2020: https://blog.infura.io/part-2-getting-started-with-ipfs-on-infura/ Data is currently pinned until it’s been 6 months since it was last used, so as long as you’re accessing your data within that time frame, it’ll be there for you!


Only top voted, non community-wiki answers of a minimum length are eligible