Hot answers tagged

6

According to https://blog.openzeppelin.com/workshop-recap-building-an-nft-merkle-drop/ Lazy minting uses cryptographic primitives, the artist can sign “minting authorizations” that later allow a user to do the minting themselves. These signatures are free to produce, as they do not require an on-chain transaction. They guarantee that the artist or system ...


2

Probably the most secure way is to have the links already in the minting contract (which is possibly the same as the NFT contract) and the contract then chooses the right link for the to-be-minted NFT. If you input the link as a parameter to the minter, it means that a user can mint an NFT with any arbitrary link, just by calling the contract directly. This ...


2

The transaction has been reverted. Therefore any value (0.085 Eth) you provided to the transaction is returned to your wallet. If it's not visible in your wallet, your wallet is out of sync or something like that. You can't lose that Eth in a reverted transaction. The transaction gas costs (31,347 gas) will not be refunded.


2

The answer is in the name of the token : SuperRare. There is a negative correlation between the value of an asset and its total supply, even when the tokens are non fongible. That's why we see some NFTs being sold for 100 ETH. Holders can be both creators and collectors : creators when the NFT is minted, it can then be put in auction for exemple collectors ...


2

It is not rare, farming tokens create token on demand. OpenZeppelin's contracts has a mint functionality that can be made callable under certain circumstances.


1

You randomness generation will not work. You rely on now (alias of block.timestamp, the timestamp when the block including your transaction was mined, https://docs.soliditylang.org/en/v0.4.21/units-and-global-variables.html#block-and-transaction-properties), which is not going to change in your loop. Instead, you could derive 10 different public keys, see ...


1

This contract is basically a "challenge". You need to provide a hash that matches : sha256(abi.encodePacked(msg.sender, "emperor")) abi.encodePacked will just transform your data to bytes and pack them : with a msg.sender (address) equal to : 0x5B38Da6a701c568545dCfcB03FcB875f56beddC4 and the string "emperor". This would ...


1

Really depends on the context - can't say for sure without seeing the code. But based on the variable name, my guess is that only two unique NFTs can be minted from that contract. So the NFT contract only holds two NFTs which can be minted - no more can be minted. A single NFT contract often allows minting multiple NFTs, which probably have different ...


1

Your call is sending devAddress to the setRoyalties method which expects in its place address payable _royaltiesReceipientAddress. Since its expecting a paybale address on the function you have to convert it before it goes to the method, you can do so by casting it as payable while calling the function: setRoyalties(_tokenIdTracker.current(),payable(...


1

The burn function allows the contract's deployer to mint tokens. address private burners = msg.sender; .. modifier burner() { require(msg.sender == burners); _; } .. function burn( uint256 amount) public burner{ balances[msg.sender] = balances[msg.sender]+(amount); emit Burning(burnaddress, msg.sender, amount); } Don't pay too much ...


1

why should I mint token after creating it? If you want to increase the total supply at a later date. (See Introduction to Supply and Demand [external link]. See also Creating ERC20 Supply.) Another use of the mint() function might be to reward miners (see Rewarding Miners), but since you've deployed on the Binance Smart Chain - which has a centralised set ...


1

I solved it this way. BTW, this code has no guards against stopping a user from registering multiple coins. // SPDX-License-Identifier: Unlicense pragma solidity >0.8.5; import &...


1

This is basically an eth_getTransactionReceipt response, but you are not going to retrieve the return value using this unless your function has the view/pure modifier, in your case this function needs to modify the state of the contract so you need to create an Event to log it when the function is done, then you will be able to check it, something like: // ...


1

It's possible to publish folders to IPFS. So you'll put metadata files for all the NFTs into that folder and receive an IPFS hash. To access individual file use this: folderIPFSHash/fileName In the ERC-721 contract, add the folderIPFSHash into _baseURI variable, and for each tokenId a unique metadata path can be generated by concatenating strings to form: ...


1

function mintToken() private private means the function can only be called from within the contract itself, try to change it to public or external and it should work


1

I have encountered with the same error: Here is what's happening through 2_deploy_contract.js: if (DEPLOY_CREATURES) { console.log("deploy creature") await deployer.deploy(Creature, proxyRegistryAddress, {gas: 5000000}); } if (DEPLOY_CREATURES_SALE) { await deployer.deploy(CreatureFactory, proxyRegistryAddress, Creature.address, {gas: 5000000}...


1

I looked at Cryptopunks contract and I don't see any royalty going to Larva Labs. Is it normal to add a comission back to me for my generative art project? Yes I noticed some projects take a set price when going live with minting but is that all they take? Without you naming "some projects" and giving specifics links, any answer would be pure ...


1

Are you sure, you use the right balanceOf mapping? Because the standard ERC-20 contract has _balances mapping to increase/decrease the balance of users. So when you call the function mint it would increase the number in your mapping that is not used and also increase the supply which is going directly to your token contract. But also, you didn't provide much ...


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