Questions tagged [erc721]
123 questions
10
votes
2 answers
why and when is setApprovalForAll called?
I'm having a hard time understanding why and when SetApprovalForAll is called on NFT generating contracts.
Take Cool Cats, for example. And for convenience there's a screen shot of relevant transactions, below.
I've noticed that for this contract…

Doug P
- 361
- 1
- 4
- 15
4
votes
1 answer
set token URI function
I understood that setTokenURI function isn't in use anymore. How can I change the token URI of the NFT token I want to create?
for now my function createCollectible inside the smart contract looks like this:
function createCollectible(string memory…

OmerS
- 153
- 2
- 9
4
votes
3 answers
Internal JSON-RPC error with MetaMask on Polygon Blockchain. `ERC721: transfer caller is not owner nor approved.`
I am making an NFT marketplace. When I deployed my contract on the Mumbai-testnet. The createToken function might work cause it brings up the Metamask for the Gas Fee but after that, the Error occurs something regarding the ONWNERSHIP.
(Error image…

Megabyte
- 139
- 1
- 2
- 9
4
votes
1 answer
How to check if transaction is NFT using Web3j?
I'm using Web3j library to work with the blockchain. I want to resolve what tokens are transferred during specific transactions. What I have already tried:
Call Function with the name supportsInterface to check whether it supports NFT standards…

wollenS
- 67
- 5
3
votes
1 answer
Transferring ERC721 Tokens using Python/Web3.py
I can not for the life of me find any article on the entire interweb that talks about using web3.py to transfer ERC-721 tokens between wallets. Minting, yes all day long, airdrop yes all day long, but wallet to wallet transfer, nope. Am I missing…

donny90210
- 71
- 1
- 9
3
votes
1 answer
Gas efficiency of totalSupply() vs. a tokenID counter | ERC-721
I'm creating a solidity contract for an NFT and in my mint function I'm not sure if a call to totalSupply() vs using a token counter and incrementing it is better practice. Does either variation cost more gas? Is one the more standard practice? I've…

degenTy
- 340
- 1
- 9
3
votes
1 answer
Hardhat issue UNPREDICTABLE_GAS_LIMIT in a script within ethereum development of ERC-721
I have a problem that I really despair of and I think it has maybe to do with an "wait for confirmation?" issue, but I don't know how to activate this.
Issue is, that I get as result of an request against a function of my ERC-721 contract following…

Airwave
- 136
- 4
- 15
2
votes
1 answer
Goerli ValueError: Gas estimation failed: 'execution reverted'
I'm trying to deploy an NFT about Harry Potter following this tutorial: https://www.youtube.com/watch?v=p36tXHX1JD8&list=PLzmffB-8Vx5Twi0x5cRRdzyixrkJtaftJ&index=9&t=3s.
But when I run create_collectible.py I have an error:
ValueError: Gas…

PIER FRANCESCO
- 27
- 5
2
votes
1 answer
How to check whether user has any ERC1155 of specific contract in solidity?
I'm writing a staking smart-contract for ERC1155 contract (https://etherscan.io/address/0x2013ff029f9d3d31169f4fdc673c8b9fa0ce1fbd#code). When user wants to claim his reward, I need to check whether he owns any token of another ERC721 contract…

GorgeousPuree
- 331
- 3
- 10
2
votes
3 answers
What is the purpose of symbol and name in ERC721?
I'm new to ERC721 and have some question on it.
I was following some tutorial and have question on constructor.
The question parts are below.
constructor(string memory baseURI) ERC721("NFT Collectible", "NFTC") {
setBaseURI(baseURI);
}
I…

Alchemist
- 325
- 1
- 17
2
votes
1 answer
Staking multiple ERC721 NFTs at once
I have an ERC721NFT contract/collection that is already deployed.
I am asked to stake them which i did by creating a new contract and implementing the onErc721Receive function.
So far so good.
If you send a NFT from the right collection it…

Torof
- 227
- 3
- 13
2
votes
2 answers
How to call _mint() on erc721 without emit Transfer
I've read here that it is possible to mint 2^256 nfts in a single transaction. I've tried to achieve this by directly assigning _owners and _balances mappings but ofc these are private variables so i can't change them. I tried making an _mint()…

Eduardo Robles
- 495
- 1
- 5
- 7
2
votes
1 answer
What is type (like "object") in ERC721 Metadata JSON schema
According to the standard, there's a type such as "object" shown below. What is this type for and what other types can we use? Can I use like "art?"
{
"title": "Asset Metadata",
"type": "object",
"properties": {
"name": {
…

vagef53574
- 53
- 5
1
vote
1 answer
How to mint / transfer ERC1155 token to ERC6551 token bound address of ERC721 directly after mint?
Say I have a smart contract for an ERC721 NFT collection (a), an ERC6551 smart contract that deploys a token bound account for these NFTS (b), and a contract for ERC1155 tokens (c).
Here's what I want to accomplish:
Upon mint the user receives 1…

Gandarufu
- 21
- 3
1
vote
0 answers
Receiving a DeclarationError: Identifier not found or not unique while using counters using Remix
I am trying to run the code which is generating an error stating that DeclarationError: Identifier not found or not unique.
The smart contract NFTCollection is a solidity code which enables me to mint a specific number of ERC721 Tokens and to count…

andhra bullodu
- 25
- 6