Questions tagged [erc721]
123 questions
1
vote
2 answers
How to get the final value from Chainlink Data feeds in decimals?
Was writing a NFT contract where to mint a single token requires ETH equivalent to 40000 USD. So figured out to use ChainLink data feeds for conversion. Apparently they return the value in whole numbers which is not required.
Here's the code
//…

Ameya Hatangadi
- 11
- 1
1
vote
0 answers
I tried using interface to get owner address from another NFT smart contract (ERC721), what have I done wrong?
I tried using interface to get the owner address from another NFT smart contract (ERC721) like this:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
interface INft {
function owner() external view returns (address); //doesn't work
…

Tan Han Wei
- 11
- 1
1
vote
1 answer
How to decode and parse ERC721 tokenURI in solidity smart contract?
I'm calling tokenURI(tokenId) in a smart contract to get my ERC721 metadata, and I get back the encoded response. Is there a way to decode and parse that in a solidity smart contract function so that I can access the metadata in the smart contract?…

jaredcohe
- 378
- 1
- 3
- 11
1
vote
1 answer
Hardhat Compiling Error (_safeMint 'Undeclared identifier')
hello I'm writing a contract and got this error in my function.
function mintCardNFT(uint _cardIndex) external {
uint256 newItemId = _tokenIds.current();
_safeMint(msg.sender, newItemId);
nftHolderAttributes[newItemId] = CardAttributes({
…

plastik
- 23
- 1
- 6
1
vote
0 answers
NFT drop marketplace Smart Contract and show collections by type
New to NFT and solidity, and want to know how we can get NFTs grouped by collection type.
e.g.
collections =>
[
art => [nft1, nft2, ...],
music => [nft1, nft2, ...]
]
So that users can see collections and buy a random NFT from it.
My…

Afraz Ahmad
- 5,193
- 28
- 38
1
vote
1 answer
My "Buy" function in smart contract file keep making error
This is my solidity file for NFT marketplace.
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import…

Ryan
- 23
- 3
1
vote
1 answer
How to get a contract by a transaction uising web3j?
I need to check if a transaction is a ERC721/ERC1155 transaction and fetch information like receiving address, token address, value, etc. If I understand correctly, I have to load a contract for the transaction and check if it inherits ERC165 in…

Sasha Shpota
- 9,436
- 14
- 75
- 148
1
vote
2 answers
is two different ERC721 contract can mint same NFT
I'm learning blockchain development recently and I'm
implementing ERC721 contract to mint NFT and store the mapping of ownership. What if I deploy a second contract which mints NFT using same characteristics, does it have different NFTs or it will…

Kunal Zanke
- 19
- 1
1
vote
1 answer
Etherscan API: get the list of the Non-Fungible Token Transfers with API
this https://etherscan.io/tokentxns-nft can be a good example of what I would get from Etherscan API, a list with all the transfers related to a specific NFT collection. Moreover, I would include the ETH exchanged for every transfer, a list of…

SWeC
- 165
- 2
- 15
1
vote
1 answer
Guarantee a contract can only receive one type of ERC721 nft
Creating a contract for a privateSale fo ERC721 NFTs, first I mint some inventory to the privateSale contract address implementing onErc721Received(...)
what I want to guarantee is that this privateSaleContract does only receive ERC721 tokens from…

Char
- 925
- 2
- 10
- 24
1
vote
2 answers
Use external packages in eth-brownie?
I am trying open a ERC721 smart contract in Brownie on VSCode and loop through the token ids and set the URI of each in each iteration. I execute the script with brownie run scripts/parcel_asset/testpyodbc.py. I am trying to use an ODBC driver named…

werkhardor
- 53
- 5
1
vote
1 answer
Burning Deployed ERC Tokens In an NFT Mint Function - Compiles, but Transaction Fails
I am very new to Solidity, and have recently been working on trying to learn the ropes. For reference, I have been using code from this video (https://www.youtube.com/watch?v=tBMk1iZa85Y) as a primer after having gone through the basic crypto…

brandonman
- 17
- 3
1
vote
1 answer
What are the valid image formats for Solana NFTs?
Every tutorial I've seen and every single example in the doc shows PNG files. But I can't find any documentation that explicitly states that this is the only supported format. Is it possible to mint an NFT with a JPG file or something else?

emersonthis
- 32,822
- 59
- 210
- 375
0
votes
1 answer
Is it possible to call another contract function by msg.sender and change state variable on that contract?
I wanted to call the mint function which is in ERC721 Contract by factory contract. when i called, The factory contract address is taking as msg.sender.
And i also tried by delegate call. but am not able to update the state variables in ERC721.
Is…

Naveen-Arali
- 13
- 3
0
votes
1 answer
Transfer from unknown account: revert ERC721: caller is not token owner or approved
I'm trying to implement a functionality in my smart contract in which a token owner (ERC721) transfers that token to a buyer. The buyer is the one that makes the call, after paying the requested amount. There is no marketplace involved. So I can't…

nacho
- 531
- 9
- 26