Lack
October 22, 2021, 3:13pm
1
hey
just need help with this truffle migrate config
const ERC721 = artifacts.require("./ERC721Library/ERC721.sol");
const NFTMarketplace = artifacts.require("./NFTMarketplace.sol");
module.exports = async function (deployer, network, accounts) {
let erc721;
let nftmarketplace;
let baseuri = "https://ipfs.infura.io/";
let servicefee = 2; // in percentage
await deployer.deploy(ERC721,"Quant Hackers","QNTH")
.then(function(instance){
erc721 = instance;
});
deployer.link(ERC721, NFTMarketplace);
await deployer.deploy(NFTMarketplace, ERC721.address, baseuri, servicefee)
.then(function(instance){
nftmarketplace = instance;
});
};
I kind of want to ask; is there any IPFS Base Uri to connect instead of ipfs.infura.io
Lack
October 22, 2021, 3:51pm
3
Lack:
baseuri
I was trying to create individual IPFS base URIs and want to use https://ipfs.io/ but since I couldn't find any documentation on their website about how to go about it I was hoping to get an answer here.
Am new to Smart Contract - so patient with me
Sure. Take a look at this post:
Yes, we think most people should try to avoid setTokenURI if possible for their use case.
If you use IFPS, your baseURI wouldn’t be gateway.pinata.cloud, it would be the URI to an IPFS directory.
For example, I just uploaded a directory to Pinata at https://gateway.pinata.cloud/ipfs/QmcP9hxrnC1T5ATPmq2saFeAM1ypFX9BnAswCdHB9JCjLA/ .
I can now create an ERC721 with that URL as its baseURI (or I could use a native ipfs:// protocol URI), and mint token IDs 1 and 2.
The concatenated URI for token …