Questions tagged [erc721]

123 questions
0
votes
1 answer

Brownie compile ValueError: Invalid NPM block with OpenZeppelin

*****top lines of my .sol file // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; contract ParcelAsset is ERC721 { ******command line VScode brownie compile contracts\ParcelAsset.sol I…
0
votes
1 answer

how to call a ERC20 contract fucntion inside ERC721 contract

what I am trying to accomplish is calling a function defined in ERC20 contract from ERC721 contract as shown below, specifically transferFrom function from ERC20 contract inside the same function in ERC721. This does not compile. what it ultimately…
Nayana
  • 1,513
  • 3
  • 24
  • 39
0
votes
2 answers

ERC 1155 Token Standard

I have read about ERC 1155 that how it can be used to mint both fungible(ERC20) and non-fungible(ERC721) tokens. So my question is: Fungible tokens that we mint using ERC1155 will have exact same functions as a token minted from ERC20 contract will…
ZSA
  • 85
  • 1
  • 13
-1
votes
1 answer

Execution reverted: ERC721: caller is not token owner or approved

Can someone help me figure out what I'm missing in this contract below. I get this error Execution reverted: ERC721: caller is not token owner or approved when I run the createMarketItem function. The wallet holds 2 nfts and I want to put one for…
Jossif Elefteriadis
  • 167
  • 1
  • 2
  • 12
-1
votes
1 answer

Solidity two mint functions or one?

I have an ERC721 contract that has a whitelistEnabled property which, if enabled, requires the user to pass a merkleproof to the minting function. Currently, I have two functions: mint() {...} and mintWhitelist(merkleproof) {...}. Both functions…
tomvis1984
  • 85
  • 2
  • 7
-1
votes
1 answer

How to call a function from smart contract A on a token ID received from smart contract B?

I have two ERC721 smart contracts A and B. I have successfully minted a token ID on contract A and transferred it to contract B address (to transfer it to a contract address and not a wallet address I used IERC721Receiver). From here, is there a way…
-1
votes
1 answer

ERC721 Invalid token id

I am building a NFT Marketplace I use 2 smart contracts to : first, mint the token then, call setApprovalForAll() to authorize the marketplace contract to transfer the token strangely, the owner is address(0) when it should be the msg.sender…
user9958772
  • 147
  • 2
  • 9
-1
votes
1 answer

ParserError: Source "project:/src/contracts/Interfaces/Libraries/IERC165.sol" not found

I have an error. I am trying to import my 'IERC165.sol' file to my 'ERC165.sol' and to my 'ERC721'. And I am receiving this error a long with two more error's that are the same just with different files. I also made sure that the file was in the…
Koruma
  • 9
  • 6
-1
votes
1 answer

Is there a way to check if msg.sender owns some collection?

Is there a way to do the following: function registerCollection(address __collection) public { require(msg.sender == IERC721(__collection).owner), "Does not own contract"); ...[rest of function]... } Is there a way, within solidity,…
JUNIOR
  • 1
  • 1
-1
votes
2 answers

Call smart contract function by connecting contract address in hardhat (ethers)

Background of Problem: I am developing an NFT Marketplace. In its workflow, the admin (deployer of the smart contract) adds NFTs to the marketplace, and at that time these NFTs are owned by the Marketplace smart contract. Now when a user comes to…
Rizwan Amjad
  • 329
  • 4
  • 11
-1
votes
1 answer

Create own NFTs only can be sold on own marketplace

I'm facing a challenge with my NFT marketplace project. How I can create NFTs with the rule that those NFTs can only be sold on our own platform but others. Technically is possible, however, I need some help here. Thank you.
David
  • 607
  • 1
  • 6
  • 19
-1
votes
2 answers

Problem creating NFT "erc721" (name, symbol)

I am trying to create an NFT creation site (ERC721) where any user could upload an NFT he wants he just needs to fill in details of "name","symbol" and "url". I'm having a problem I can't change the "name" and "symbol". After the first creation each…
-2
votes
1 answer

Set approveForAll from a contract on another contract

I have two smart contracts (A, B), which are extended from ERC721. Is it possible to create a function in B to call setApprovalForAll on A from a user Z? this is in contract B: testApprove(A) as user Z function testApprove(address _contract)…
-2
votes
1 answer

How to mint unique NFTs

I'm working on a NFT project using ERC721 smart contract (with ERC721URIStorage extension) where user can mint unique NFTs. I have uploaded NFT's json metadata's (used for TokenURIs) to IPFS. In the dapp (using react), there will be a mint button…
user123
  • 387
  • 1
  • 4
  • 13
-2
votes
1 answer

How to burn erc721 token?

I am trying to burn erc721 token. I have inherited ERC721Burnable contract,but the transaction gets failed.While debugging I found that in ERC721URIStorage contract,it reverts back at: if (bytes(_tokenURIs[tokenId]).length != 0) { delete…
Udit Yadav
  • 99
  • 1
  • 7
1 2 3
8
9