Skip to main content
2 votes

Deploying a smart contract without private key

Short answer: You can't deploy on their behalf if you don't have their private key or their signed tx. You can achieve similar to what you describe by either one of the two methods: Two ...
minhhn2910's user avatar
  • 1,770
2 votes

How to retrieve all ERC721 tokens of a certain collection what a wallet ownes?

In order to do it without using the likes of Moralis. You need: An RPC node The contract address The wallet address The contract ABI Then you can write a function like this: async function ...
Filip's user avatar
  • 971
2 votes
Accepted

Getting trading data efficiently

This data is not available readily on-chain, so it becomes difficult to get this kind of data. QuickNode has this data available via their Graph API You get historical NFT Trading data, marketplace ...
Sahil - QuickNode's user avatar
2 votes
Accepted

Trying to get txn hash

You could use a WebSocket from a node provider to track the transfer event that all ERC-20 and ERC-721/1155 smart contracts emit when there is a token transfer. Check this example in ethers v6: const ...
Sahil - QuickNode's user avatar
2 votes

Calling "balanceOf" in a contract from another contract that imports it. Expected 1 Got 0

The problem is how you defined instance of nft contract in constructor. Your Code: NFT public nft; constructor (NFT _nftAddress) public { nft = _nftAddress; } Try this instead: constructor (NFT ...
Alireza's user avatar
  • 360
2 votes
Accepted

Why am I not able to deploy ERC721 contract to Avalanche Fuji?

Solidity 0.8.20 introduced the PUSH0(0x5f) opcode which is only supported on the ETH mainnet and not on any other chains. That's why other chains can't find the PUSH0(0x5f) opcode and throw this error....
Zartaj Afser's user avatar
  • 4,529
1 vote
Accepted

How can I access the 3rd argument of _safeMint?

nice to meet you. To access the data argument of an ERC721 token minted using _safeMint, you can use the following steps: Get the transaction hash of the minting transaction. Use the transaction hash ...
ProWebTech's user avatar
1 vote

How can I fix a problem with transferring ERC721 by approved contract?

There are many different ways you can implement a mechanism to buy and sell NFTs that would fit your needs. The Problem Note, this problem assumes the ERC721 and the marketplace contract are two ...
Rohan Nero's user avatar
  • 1,617
1 vote

Getting an error While uploading image folder on pinata using pinFromFS function in nodejs

Solution: Start with increasing the timeout and using the Pinata SDK. If issues persist, check network conditions and ensure your Node.js version is up-to-date. 1. Increase Timeout: Ensure your Axios ...
Awais Ahmad's user avatar
1 vote
Accepted

How to get which tokens have been transferred by a transaction using ethers or Web3?

const { ethers } = require("ethers"); const txHash = "0xabcdef123456..."; const provider = new ethers.providers.JsonRpcProvider("YOUR_INFURA_ENDPOINT"); (async () => ...
Sohail Ghafoor's user avatar
1 vote
Accepted

ERC721 Inheritance Issues

First of all, make sure you follow this initialization convention: constructor(address initialOwner) ERC721("MyToken", "MTK") Ownable(initialOwner) {} The ...
Mila A's user avatar
  • 1,264
1 vote

Deployment Issues with BasicNFT on Sepolia Network Using Foundry: Mismatched Bytecode and Successful Deployment

I have changed my compiler version to 0.8.21 and it worked for me . I don't Know how , if you are still facing same issue try it out once . If you have another solution please share with me , i don't ...
hoBabu's user avatar
  • 11
1 vote

Trying to create a soulbound token. Keep getting two errors

Seems like you are using version 5 of OZ contracts. In version 5 they have removed the _beforeTokenTransfer and _afterTokenTransfer functions. And introduced a new single function, _update. Now you ...
Zartaj Afser's user avatar
  • 4,529
1 vote
Accepted

How to get ERC 721/1155 and ERC-20 data?

You can get this data using the balanceOf function of the token smart contracts. But doing this for each token and NFT is not a nice experience. Using a solution like QuickNode, which provides two ...
Sahil - QuickNode's user avatar
1 vote
Accepted

Help with event filters

You can use QuickAlerts, an on-chain alerting tool; using that, you can set up an alert whenever a new NFT is minted. You won't have to manage the filters; just set up the alert and that's it. Even if ...
Sahil - QuickNode's user avatar
1 vote

Why require(minter == msg.sender) always throw error? I used the correct address as sender

The correct answer to the question is that the error is generated by the estimateGas function and not the send function. Based on the documentation, you need to pass the from address await tx....
GramThanos's user avatar
1 vote

How to design a smart contract that allows people to trade NFTs

This is possible and you would do this with Solidity. You would use the ERC-721 functions which would require that both users approve the smart contract to transfer (via the ERC-721 approve function) ...
Jack Antico's user avatar
1 vote

ERC1155 name and symbol

But sometimes you'd still prefer to have identifiable contract name on Etherscan, OpenSea etc. So you can declare them as strings inside contract: string public name = "StackExchange"; ...
blockson's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible