New answers tagged

1 vote

Don't you need centralised database to verify NFT authenthicity

Assuming that the NFT contract itself is legitimate and ERC-721 compliant (i.e. if it says that ownerOf a specific NFT is a specific address, then it is that address), then the only reliable way to ...
user avatar
  • 968
1 vote

Is it possible to fetch an Owner of an NFT by providing Smart Contract address and NFT ID

You can use the ownerOf method of the ERC721 token contract. It takes the NFT id as a parameter and returns the address of the owner 🤙
user avatar
  • 316
0 votes

Updated token metadata not refreshing on OpenSea

Entered like this: https://api.opensea.io/api/v1/asset/matic/0x7aa822b16f1c9b3110b71b3b1e830d1b83d7a5e2/1/?force_update=true Returned : {"success": false}
user avatar
0 votes

How can the smart contract auto execute the function in the Public chain eterscan testnet?

Ethereum Alarm clock might be interesting for your use case, https://ethereum-alarm-clock.readthedocs.io/en/latest/
user avatar
  • 25
0 votes

How do you pass in a variable as a string to a constructor in solidity

Lol I think I just figured out the solution to this. for anyone that might have the same issue The solution to the issues is constructor (address Dispenser, string memory _tokenName, string memory ...
user avatar
0 votes

How do you pass in a variable as a string to a constructor in solidity

Try this: string tokenName = "TokenName"; string tokenSymbol = "TKS"; address contractAddress; constructor (address Dispenser,) ERC721 ( tokenName , ...
user avatar
0 votes

How to show all ERC721 tokens in my page, like opensea or rarible?

In order to know what tokens an address owns, the only way is to keep track of all transactions of an address and keeping track of records. However, there are 3rd party services that provides that ...
user avatar
0 votes

Transfer someone else's NFT asset with an approve

Yes, you can do that. You need to get approval on the target contract. The function looks like this: approve(address to, uint256 tokenId) Approves another address to transfer the given token ID The ...
user avatar
0 votes

Is there a way to identify if an address is erc721 or erc1155?

According to the IEP-165 you can, I had a similar issue/question this article helped me. Solidity get interface id and ERC165 by Nhan Cao Hope this helps you out as well!
user avatar
1 vote

How can I get the price of NFT on Opensea using chainlink?

As I understand it you are attempting to return the price of an NFT using price feeds. priceFeed = AggregatorV3Interface(0x495f947276749Ce646f68AC8c248420045cb7b5e); This interface needs to use the ...
user avatar
0 votes
Accepted

Fakes on OpenSea

Verify the collection. You can't stop anyone from creating clones
user avatar
  • 104
1 vote

NFT tokenID question

In ERC721 standart you cannot get the what NFTs an address owns, just number of tokens. You can iterate over all tokens one by one to check their owners, or better use a 3rd party API that provides ...
user avatar
0 votes

Can We Transfer Token to The HighestBidder Automatically in NFT- MARKETPLACE Contract? i want this auto

Smart contracts can never execute by themselves. Some entity always has to call them and pay for the gas fees. That entity can either be a user of your marketplace or some backend service of yours. ...
user avatar
1 vote

How to send Uniswap V3: Positions NFT to another wallet using Node.js

You can use safeTransferFrom or transferFrom method. https://etherscan.io/address/0xc36442b4a4522e871399cd717abdd847ab11fe88#writeContract
user avatar
1 vote
Accepted

Can I delete, change or add a new metadata?

Yes, but not directly from the IPFS. Anything uploaded to IPFS cannot be altered further. However, if you want to change metadata of your NFTs you can upload updated version of your files(JSON ...
user avatar
0 votes

Can I delete, change or add a new metadata?

You need to elaborate more. How are you storing the URI in the contract? Do you want to change the URI of the directory that contains the metadata of all NFTs or just one specific NFT? Can the data be ...
user avatar
1 vote

How to find original mint transactions for crypto punks?

There's an earlier version of CryptoPunks token - https://etherscan.io/txs?a=0x6ba6f2207e343923ba692e5cae646fb0f566db8d&p=304 It was fully minted upon deployment and people who wanted to get one ...
user avatar
  • 2,445
1 vote
Accepted

How to transfer an NFT from a contract address to a wallet address

If you did not already, you should first approve your contract from your EOA to give permission. Then you should be able to transfer the ERC721 token. And transfer_out function should be: def ...
user avatar
1 vote

HardHat error: Invalid number of arguments error for constructor with no passed arguments

I think you have a typo, is address instead of adderss
user avatar
0 votes

Is there any NFT Price API available to fetch Price of a NFT from Opensea?

I have found a solution OpenSea Asset Listing API This API returns current listing price of a NFT
user avatar
  • 1
0 votes

Why isn't the following ERC721 contract detected on OpenSea?

We faced the same issue with the opensea saying "Please ensure that this is a valid ERC721 or ERC1155 contract deployed on Rinkeby and that you have already minted items on the contract". ...
user avatar
0 votes

Difference between lazy minting in OpenSea and Rarible

Opensea creates a proxy contract for every address it interacts to as to save the gas fees during lazy minting. It is one time cost. Lazy minting basically stores the NFT details into the external ...
user avatar
0 votes

How to Air Drop rewards to NFT Holders?

In the ERC721 Smart contract, there is a function called ownerOf where you can input the tokenId and get the current owner of the NFT associated with that tokenId. You can loop through all the ...
user avatar
1 vote
Accepted

Is it possible to write protect an IPFS base url?

If you are publishing to a URL that starts with ipfs://ABC then: Anybody can inspect all the files in all paths starting at ABC. Nobody can change the contents of the paths starting at ABC. This is ...
user avatar
0 votes

Add a price for minting an NFT

You can modify your mint function to accept ETH. function mint(string memory _uri) public payable { require(msg.value = _setMinimumValue, "Price too low!"); uint256 ...
user avatar
1 vote

How to create an Erc721 contract with fixed dollar price per token (eg. 1 nft should always cost 200$, irrespective of the ether price)

You can write it for example like this function getLatestPrice() public view returns (int) { ( /*uint80 roundID*/, int price, /*uint startedAt*/, ...
user avatar
  • 171
0 votes

How to create an Erc721 contract with fixed dollar price per token (eg. 1 nft should always cost 200$, irrespective of the ether price)

Consider using $DAI or $USDC for the minting payment instead of price feed from oracle.
user avatar
  • 1
0 votes

Add a price for minting an NFT

Why don't you consider using WETH instead of using ETH native token for payment? Minter has to allow WETH amount to this contract. Check out my code below. pragma solidity =0.8.14; // fix compiler ...
user avatar
  • 1
0 votes

How do I download an entire NFT collection, including metadata

You can use opensea API to fetch all the collection stats including metadata. after fetching, you can easily dump them to an excel or any program of your choice Link: https://docs.opensea.io/reference/...
user avatar
1 vote

HTML5 based NFT to reference itself with it's ID

You could create the contract before the html, put the contract address in html, store html in ipfs then update contract with the ipfs CID. Am I missing something?
user avatar
2 votes

Funds stucked in smart contract

The funds are not stuck, they are now controlled only by the creator (0x97ce82ccb3d8d6a02c87799f1d8d8af4dad77a0e). You need to contact them, asking to call again the transferOwnership function. In any ...
user avatar
0 votes

Funds stucked in smart contract

Ok, So you could use upgradeable contract, Here's the link, https://docs.openzeppelin.com/learn/upgrading-smart-contracts You can create a new function, that may would allow you to withdraw funds from ...
user avatar
0 votes

Cheaper way to mint NFTs to addresses( airdrop) by using ERC721 contract?

you can use lazy mint with signatures but if you have large airdrops you should use the Merkle tree. you get the list of the addresses and need to install merkletreejs and keccak256. https://www.npmjs....
user avatar
  • 144
0 votes

Can ERC721 NFT issuer modify onchain metadata after selling?

Well yes and no. If you use the original ERC721 you can't modify it because it's immutable. So once it's minted you can't change it in any way. But if you modify the ERC721 standard you could ...
user avatar
  • 48
2 votes
Accepted

Is there an API to fetch collection-level NFT stats from 0x orders like floor price, total volume, etc?

At the moment we don't offer this; however, some recommended tools/thoughts from our Trader.xyz team: (top pick) https://module.readme.io/reference/retrieve-collection-floor and https://api.reservoir....
user avatar
  • 121
1 vote

Updated token metadata not refreshing on OpenSea

The polygon version of this endpoint should be https://api.opensea.io/api/v1/asset/matic/<your_contract_address>/<token_id>/?force_update=true
user avatar
  • 11
0 votes
Accepted

Opensea error: 'AccountData' object has no attribute '_meta'

It appears to have been a temporary error. Opensea has already fixed it.
user avatar
  • 558
0 votes

What is the best way to iterate through mapping in solidity

this uses an iterable mapping pattern pragma solidity ^0.8.14; import "hardhat/console.sol"; contract Family { mapping (address => string) public familyMembers; // store data ...
user avatar
  • 412
0 votes

Are the assets instantly transferred in this smart contract?

It should appear immediately in the sender wallet if safeMint is completed successfully (1). function safeMint(uint256 amount) public payable { require(msg.value >= (amount * price()), "...
user avatar
  • 29.1k
0 votes

Can I re-deploy an NFT contract when the previous contract hasn't had any interactions?

This question is off-topic as it tackles a topic which isn't technical, but let's answer it regardless. By authenticating your contract on external marketplaces you are giving it credibility. I can ...
user avatar
0 votes
Accepted

How to write the NFT contract for minting specified NFT?

Yes, it can be done by creating a contract that inherits from ERC721PresetMinterPauserAutoId.sol preset. Then you can use the internal _mint(address to, uint256 tokenId) function to specify the id. If ...
user avatar
0 votes

Using a Non-Fungible token to gain access to a file

You would be probably interested in "Token Gated Access". I just had the same question and this is the answer.
user avatar
  • 101
0 votes

Is there any open source of NFT Marketplace using 0x Protocol?

At the moment at my knowledge there is no open source nft marketplace using 0x v4. I and my team are building one with support from ZRX DAO, I will be posting here later when available. For using the ...
user avatar
1 vote
Accepted

NFT mint call reverted while testing

The failed transaction calls the function with id 0xba41b0c6 which refers to the function mint(uint256 amount, bytes32[] merkleProof) But there isn't a function mint with that signature in the ...
user avatar
  • 29.1k
0 votes

Can I re-deploy an NFT contract when the previous contract hasn't had any interactions?

If your deployed contract has logic to disable minting it's ok but maybe. If not, duplicate minting could happen, which isn't right. If your deployed contract doesn't have a disable, you could self-...
user avatar
  • 412

Top 50 recent answers are included