Questions tagged [erc-721]
Relating to ERC-721, the standard for Non-Fungible Tokens (also known as Deeds)
847
questions
1
vote
1
answer
19
views
Minting 100+ ERC721 NFTs in Constructor
I'm looking to mint around 100 NFTs (or more if possible) in the constructor of my smart-contract.
• During deployment I'm passing in an array of 100 ETH addresses to the constructor, which then uses ...
0
votes
1
answer
26
views
Getting error in modifier while compiling. DeclarationError: Identifier not found or not unique
When I compile the erc721 contract, the following error pops up:
This is my modidier:
And here is the function that the modifier calls:
All my code:
//SPDX-License-Identifier: MIT
pragma solidity ^...
0
votes
0
answers
9
views
How does NFT lazy minting actually works?
So I am trying to understand lazy minting in NFTs and till now I have understood the whole NFT Voucher concept that we have to create vouchers offline and the user buying the NFTs will then redeem ...
0
votes
0
answers
11
views
setApprovalForAll not working
I have been going through a tutorial and it has the function approve with params tokenId and nftaddress. However I need my marketplace to approve all at once and it seems I have an error in my syntax.....
0
votes
1
answer
12
views
setApproval - nft marketplace operator rights
Does giving approval to a marketplace allow the marketplace contract deployer to move assets if they so wished?
0
votes
1
answer
26
views
What's the recommended way to allow users to mint random ERC-721 tokens, reveal metadata, and offer full transparency in 2022?
I'm writing an ERC-721 contract to launch a collection of paintings and I'm considering a few semi-generative variations to make the total supply about 1,000 tokens with multiple rarities.
I'd like to ...
0
votes
2
answers
40
views
How to call a contract within smart contract?
I need solidity analog of web3 command:
const contract = new web3.eth.Contract(contractJSON.abi, deployedAddress)
The context is:
Contract A call contract B
Contract B receives an address of ...
0
votes
0
answers
12
views
Complex multi-receiver royalties
I have a complex ERC721, where each token could contain references to another contract's NFTs.
Goal: to split royalties thru each referenced NFTs owner in the token from my contact when it sold.
...
0
votes
1
answer
20
views
Private variables with public view functions
In the Openzeppelin ERC721.sol contract, there are private variables introduced:
// Token name
string private _name;
// Token symbol
string private _symbol;
These variables are then assigned a ...
0
votes
3
answers
29
views
Is automating the withdraw of a NFT smart contract a good idea? [closed]
Just wondering out ! Something like automatic withdraw after every 24 hours or something like withdraw after every mint on the contract.
If its a good idea, sharing any ways or resources for me to do ...
0
votes
1
answer
52
views
Does an ERC721A mint call count as a "external transaction" or a "token transfer" (on etherscan)?
I'm trying to understand EOA / internal / token transfer events better because I'm using the Alchemy Notify webhooks on address activity and I want to know which type of transactions to expect.
This ...
1
vote
2
answers
29
views
ERC-721 metadata doesn't show up for rinkeby but does show up for mumbai?
This is not rendering despite .tokenURI() returning the correct JSON blob.
URI Argument:
let metadata = {
"description": "Tester",
"image": "https://upload....
0
votes
1
answer
22
views
What is "|" operator?
I have been going through the ERC998 contract and came across this:
return (ERC998_MAGIC_VALUE << 224) | bytes32(rootOwnerAddress)
What is this "|" operator?
1
vote
1
answer
21
views
Metamask API support for interacting with Ethereum contracts
Metamask stopped using web3. Their own API has no methods for interacting with ERC20, ERC721 contracts. How do I accomplish simple task of reading token balance for a wallet on an ERC721 contract?
...
1
vote
1
answer
67
views
How to set the max mint per wallet
I have a collection of 10K and i want to set the Max mint per wallet on two phases of the mint, 5k free mint with Max 3 Nfts/wallet and 5k with cost of 0.05ETH no limit.
SPDX-License-Identifier: MIT
...
0
votes
0
answers
6
views
Get all the NFT’s that are listed to sell in a marketplace?
This gonna be a good question, may be …
when you build a NFT marketplace smart contract you can sell and buy it, but how exactly you can get all the NFT’s that are listed to sell from anoters users ?, ...
0
votes
0
answers
7
views
Linking different ERC-721 contract's NFTs on OpenSea (Solidity)
I have a ERC-721 contract (call it B) that has a function which mints an NFT (call it X) and deploys another ERC-721 contract (call it C). X and C’s NFTs should be thought of as linked and I am trying ...
0
votes
1
answer
20
views
Transparent Upgradable Contract, logic ownership
I created an upgradable ERC-721 smart contract with openzeppelin, initialized the initializier when deploying with hardhat:
const instance = await upgrades.deployProxy(contract, ["ipfs://link/&...
0
votes
0
answers
21
views
How to get tokens of owner information for ERC1155 off-chain using events with the right logic / filters?
ERC-721 (Enumerable) has tokensofowner function which we can use to track ownership of NFTs. but it comes with high gas costs. and ERC1155 doesn't have this function. So I had heard about getting ...
0
votes
1
answer
75
views
How to mint NFT using ethers.js?
I'm a beginner in blockchain dev...
I'm using the famous Hashlips ERC721 smart contract (available here: https://github.com/HashLips/hashlips_nft_contract/blob/main/contract/SimpleNft_flat.sol ).
The ...
0
votes
1
answer
72
views
Autoburn NFT's after certain amount of time
how to create functionality to make NFT burn automatically when its expiry date is reached ?
while minting i am storing 2 parameters minted date and number of months to expire , so i want it to burn ...
1
vote
1
answer
60
views
Is the whole function reverted if the ERC20 or ERC721 transferFrom fails?
I'm having some security doubts and confusion about the case of reverts. As I found, the whole changes of a function are reverted if the native transfer function fails. But what about the ERC721 and ...
0
votes
0
answers
6
views
Generate series of ERC1155 tokens or rather batches of ERC721?
My idea is to allow users to create several series of tokens, like 100 tokens of 10$ and 10 tokens of 1000$ to participate in financing a project. And those who support can buy as many of these tokens....
0
votes
0
answers
32
views
MintItem function Throwing error in ERC721 Smart contract
I am trying to write a smart contract. which can store the uploaded files and later we can mint them.
There are two files one is uploads.sol
pragma solidity ^0.8.0;
contract Upload {
uint256 ...
0
votes
0
answers
30
views
Metadata not showing up in opensea testnet
I have encountered a very annoying problem for me. OpenSea and LooksRare (testnets) don't want to display my nft metadata. I'll attach pictures below.
Contract constructor:
Deploy script:
Metadata:
...
0
votes
0
answers
19
views
ERC721 Dynamic TokenURI on each tokenID
am new to solidity and would like to do some experimental on ERC721. I wish to link tokenURI for each tokenID differently based on action, and here is what i plan so far but got stuck in solidity ...
0
votes
1
answer
57
views
ERC720 token is minted to relayer contract's address instead of _msgSender() with biconomy SDK
made a simple contract that mints 721 token to an address
contract mint is ERC721URIStorage, BaseRelayRecipient {
string private greeting;
uint256 tokenId;
constructor() ERC721("GameItem", &...
0
votes
2
answers
39
views
How to Return an Array of structs from Solidity?
i'm having an issue when trying to return an array of structs from a getter function i've made.
The smart contract is an ERC721 Staking Contract.
This is the getter function:
function getNftInfo(...
0
votes
1
answer
109
views
Polygon Mumbai - transaction pending infinetly when interacting with contract
I am trying to implement a ERC721 NFT smart contract at polygon mumbai network.
First of all, contract code is here: https://github.com/Lorenzobattistela/melk-smart-contract
When I first deployed with ...
0
votes
1
answer
152
views
ERC-2981 implementation in ERC-721A contract
I am trying to implement ERC-2981 in a ERC-721A contract. The below code compiles and deploys fine. After a test mint, the transaction overview seems fine:
However, the token tracker shows no ...
0
votes
1
answer
30
views
Execute "setApprovalForAll" on behalf of deployed smart contract (Solidity)
I have deployed a contract which implements Ownable and IERC721Receiver.
The issue I am facing is that this particular contract does not implement any function to grant approval to other contracts in ...
0
votes
1
answer
52
views
Is it possible to fetch an Owner of an NFT by providing Smart Contract address and NFT ID
I am developing a smart contract which requires users to upload a specific information about their NFTs. I somehow need to verify whether they are the actual owner of that NFT before uploading ...
0
votes
0
answers
10
views
How Does a ERC-721 Smart Contract Interaction Work (BAYC example)?
I am trying to understand how most NFTs smart contracts work from start to finish. Specifically I am trying to understand how the mint function should work.
From my understanding this function ...
0
votes
1
answer
13
views
How can the smart contract auto execute the function in the Public chain eterscan testnet?
i'm using auctions in Nft-marketplace smart contract and i want auto call the fnction of widraw wheneever auction ends , and transfer bidders bidds ti thier account ?
0
votes
0
answers
25
views
Symbol in NFT contract(RL)
The team and I decided on the subject and the name of our nft project, but the question arose: are there any rights to the nft symbol? Is it possible to use any symbol without fear of being accused of ...
0
votes
2
answers
39
views
How do you pass in a variable as a string to a constructor in solidity
I'm currently working on an NFT project, using the openzeppelin ERC721 standard for the nfts.
When Inheriting the ERC721 NFT contract standard from openzeppelin you're required to pass in the "...
0
votes
1
answer
12
views
Transfer someone else's NFT asset with an approve
I got this NFT marketplace smart contract. Still at the proof of concept stage, so I got 2 options to go with, I was just wondering if someone tried, or has knowledge about it:
Here is the deal, I was ...
0
votes
0
answers
11
views
when i Fetch my NFT's in marketplace i got this , please help me out
function fetchMyNFTs () public view returns (MarketItem[] memory) {
uint totalItemCount = _tokenIds.currentId();
uint itemCount = 0;
for (uint i =0 ; i <totalItemCount ; i++) {
...
0
votes
1
answer
11
views
Fakes on OpenSea
Recently, our team faced a small problem. We made an announcement of the collection and showed several nfts. Soon, fakes of our collection and our profile appeared on OpenSea. How to resist this ? ...
0
votes
0
answers
9
views
Deployment of the Open sea contract
I want to host my nft collection on OpenSea, how do I do it? Please share guides, links or your experience) Thank you very much in advance
0
votes
1
answer
22
views
NFT tokenID question
I've got an ERC721 contract as part of a larger react dApp. My app is connected using web3 tools to the user's wallet. I need to be able to see if the address connected has a token balance for my ...
0
votes
0
answers
40
views
ERC721 - safeTransferFrom function reverts on called by approved address
In ERC721, safeTransferFrom function , we run approve() to clear the approval, if any, for the tokenId being transferred.
This function can be called by owner or operator or approved address.
But for ...
1
vote
1
answer
48
views
How to determine if a smart contract is ERC721 if it is not responding with ERC721 interfaceID
I am working on a crawler that indexes ERC721 contracts on the blockchain. The method that I found to find the ERC721 contracts is something like this:
For every transaction on the blockchain:
For ...
0
votes
0
answers
5
views
How to identify an opensea "collection" minted using the opensea contract?
This is the contract https://polygonscan.com/address/0x2953399124f0cbb46d2cbacd8a89cf0599974963
If you look at the interface https://polygonscan.com/address/0x2953399124f0cbb46d2cbacd8a89cf0599974963#...
0
votes
1
answer
149
views
ERC721A - Strings for uint256 | ERROR REMIX IDE
I'm struggling with this error, the contract is from a famous Blockchain Dev Youtuber Hashlips and i've used it months ago without error, but now when i put it into REMIX Ide it gives me this error.
...
0
votes
1
answer
54
views
How to get transaction history of ERC-721 token in Solidity
I'm trying to figure out how to get a history of values for a specific ERC721 token of known contract address.
I want to do some maths in solidity and do not want to do all that in web2; therefore, I ...
0
votes
0
answers
28
views
Getting error Erc721 : operator Query for non existent token
I am making a nft rental contract. When calling setUser or any function in the contract error is generated -- ERC721: operator query for nonexistent token.
Even if the token is minted . Any guess why? ...
0
votes
1
answer
50
views
Why require(minter == msg.sender) always throw error? I used the correct address as sender
I created an contract , source code is:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/...
1
vote
1
answer
37
views
Set a minimum price an NFT can be listed on exchanges for
Is it possible to have a minimum price for a ERC721 contract that would prevent the token being traded on exchanges if listed below that set price. (Not the mint price of the token itself)
Say an item ...
0
votes
0
answers
19
views
erc721 was created but does not appear in wallet
I am attempting to create a Factory which mints NFTs and while it seems that my transaction has completed, metamask does not register the NFT. See the screenshots of my app: https://imgur.com/a/...