New answers tagged

1

A common problem in the traditional web2 art and trading card world is the transparency of randomness and scarcity. If you buy a trading card, like a Pokémon card for example, you have no way of knowing how rare it really is without talking to the company that printed it. There is a centralized component to the scarcity of the card. They could have printed ...


1

You are in the correct path. MEV can do this for you. You can use MEV to submit two transactions with the following properties: Either both of none of them go through They should be executed in the same block, next to each other The first one adds Ethers to the wallet The second one transfers the assets out You pay the miners directly in Eth, disregarding ...


0

The Royalty fees are probably handled by the openSea Contract. And yes that is what they promote, that you will get royalty on subsequent sell. I doubt that the royalties would get applied on another exchange but if it's back to Opensea again and get sold I presume you would get the royalty since your back on Opensea.


0

The payable keyword is only useful when dealing with the blockchain's native asset/coin - in this case Ethers. You can't create own coins, you can only create your own tokens. So I assume you are meaning ERC20 tokens. If you want to associate a token price for invoking the function, you should use the two staged transfer: User approves for the contract to ...


1

Etherscan hardcoded the CryptoPunks contact to show up that way. Basically Etherscan is programmed this way: If contract is CryptoPunks handleCryptoPunksSpecially() Else If contract is CryptoKities handleCryptoKittiesSpecially() Else If contract follows ERC721() handleGenericERC721() Else itIsNotAnERC721() And this is precisely why we need standards,...


0

You can't really charge the gas fees from the user if the user's wallet is not activated (or the user doesn't even have a wallet). Unless you plan to ask the payment in some other format (such as in fiat). Otherwise, it's possible to use a central backend wallet for generating and issuing the transactions. Then the backend wallet pays for gas and the users ...


1

I would say it's not a good arch design. you cannot control how long would transaction stay in mempool. It could be seconds, hours, days. if user has a pending transaction, it cannot create a new one. It's because of nonce, which has to be uninterruptedly incremental. For it to keep using your on-chain service, it would have to cancel the pending ...


0

Yes, it should be there. Ctrl+Shift+F and then search for CONTRACT_ADDRESS. It is usually stored like that


0

Please see the smart contract for https://tenthousandsu.com. This includes: Mints 10,000 NFTs All at once And supports ERC-721 Enumerable Su Squares is the first ERC-721 contract, it is mentioned in the ERC-721 specification as a demo, and it was recently re-released as fully open source so you can copy away!


0

the owner is the public key but read the code all metadata may be are in that url and could be changed or are in IPFS that could not be changed. read the code if you mean changing metadata? it depends to previous answer no the ethereum block chain does not let you do. you could only deploy another one. test all your logic in Rinkeby network


0

You should understand that by default, there is no such thing as "ownership" in contracts. When you deploy a contract, it only has the functionality written in its source code - no extra functionality. So if you want ownership functionality, it has to be present in the source code. So: Probably if you mint it to an address, that address becomes ...


1

you just own or transfer to someone else wallet or use the contracts to sell your integer which represents the cryptopunk number on the "marketplace". they released the whole image hash of all cryptopunks in the blockhain. But it's a proof concept, not an nft. Now, if you have this whole image it's not that hard to "extract" the related ...


1

I am not totally sure I understand your question, and what you can and can not change, and what is the difference between snaToken and myToken. You are checking the balance of snaToken but then sending myToken - what exactly is happening there? But anyway, do you know of the allowance mechanism? (functions .approve and .transferFrom) You can use it to do ...


1

you should use tx.origin instead ofmsg.sender, If there are multiple function invocations on multiple contracts, tx.origin will always refer to the account that started the transaction irrespective of the stack of contracts invoked. However, msg.sender will refer to the one that called the contract, could be a smart contract address.


2

As you may have learned, Metamask cancels a transaction that has not been mined by replacing it with a transaction where you send 0 ETH to yourself. This method works for cancelling any transaction, including NFT minting transactions that have not been confirmed in a block. If you want to replace a transaction yourself by manually setting the nonce of your ...


0

With 1 WETH you can make an unlimited amount of bids (on different NFT's) for max 1 WETH, the moment one of the bids get traded the rest will automatically be pulled. With ETH this is not possible. So, this is to encourage bots and gives a seemingly higher liquidity on OpenSea.


0

This path does not actually exist when I tried on the website mentioned: /nft/wallet/{owner_address}. I tried another: /nft/{address}/{tokenid} with an NFT I minted on opensea, moralis.io DOES NOT return any meta data for it.Actual return from queuing moralis.io: { "message": "No metadata found! Try again later" }. To be clear: when ...


0

I don't have answer to all of your questions but can provide for the 5th one. You don't need to have such a contract now but when you do you would have redeployed the solution on-chain again.


0

Recommend deleting the node modules folder. Build it again. it should resolve the error. It did for me. Hope it works.


0

I just encountered the same error, what should fix it is the python package python-dotenv. Once you install it python should be able to read those .env files.


0

yes indeed. Here's a small example of how we do it: function mint(uint _parentTokenIndex) public payable { require(msg.value >= NFT_PRICE, "Not enough ETH sent."); require(!_assetExists[_parentTokenIndex], "The asset does not meet the unique constraint."); _mint(msg.sender, _id); _setTokenURI(_id, METADATA_URL); ...


0

Since the transaction is "written" on the blockchain you cannot update it. You would have to mint it again


0

There can only be one "first batch". There is a common understanding that only the first batch, which can be provably shown to be the first thanks to the blockchain time-stamping and public addresses, has meaningful value. The marginal costs related to production and distribution are irrelevant for high value objects.


0

Have you read about any products in the NFT market?What they usually do is they give the user the option of choosing a platform-specific NFT contract, or you can choose to deploy a proprietary contract in which you create the NFT!What you need to know is that the latter usually costs a little more GAS, that's all.


2

Opensea did not supports the BSC network. But you can mint the NFTs on Polygon for cheaper fees. Polygon is supported by Opensea platform. Reference: Which blockchains does OpenSea support?


2

Probably the most secure way is to have the links already in the minting contract (which is possibly the same as the NFT contract) and the contract then chooses the right link for the to-be-minted NFT. If you input the link as a parameter to the minter, it means that a user can mint an NFT with any arbitrary link, just by calling the contract directly. This ...


1

I suspect this has nothing to do with Solidity versions. The safeTransferFrom function in Solidity really means keccak256("safeTransferFrom(address,address,uint256)") for the Ethereum Virtual Machine. But let's not get lost with details. When you call safeTransferFrom, the caller of this function needs to have been approved via the approve function,...


0

1ETH = 1WETH. Here's an explanation why WETH even exists: The ERC-20 standard defined certain mandatory rules for every token contract such as totalSupply, balanceOf, transfer, transferFrom, approve and allowance. The ERC-20 standard was developed after the native token ETH was released, and ETH in its original form does not conform to its own ERC-20 ...


0

You can code a generic contract with multiple type of minting. You can ask user to add attributes on his taste and mint.


1

You can simply write an interface with the 0.7.6 version. The interface doesn't care with what Solidity version the target contract is compiled with - it simply states what functionality the target contract has. You can basically write the interface in any version you want (although best to write it with a version which explicitly supports interfaces). I ...


1

It appears you are very early in the design process and are still studying existing solutions. So I'll reply here with just some broad concepts. Good luck on your journey! Fully off-chain This is the approach OpenSea uses. Everybody with a token needs to approve or, more likely, approveForAll their tokens to the OpenSea marketplace contract. Commitments are ...


0

It seems like my setContractURI function had one encodepacket too much. it looks like it is working now on OpenSea. function setContractURI(string memory contractURI_) public onlyOwner() { _contractURI = string(abi.encodePacked( "data:application/json;base64,", Base64.encode( bytes( ...


1

According to etherium.org All smart contracts and state changes on the Ethereum blockchain are executed by transactions. https://ethereum.org/en/developers/docs/ethereum-stack/ Therefore the creation of the NFT must be the result of a transaction. Additionally Transactions are cryptographically signed instructions from accounts. They also define the ...


0

It's depending on the minting process defined in the contract. But in most case yes. These function often provide a "to" address argument. this mean that you can mint an NFT for another address. No transaction will require your private key.Ever. At least not in the front end since your connecting using Metamask and they provide the connection to ...


0

Found out that the value should be string hex.


0

Here is a list of the most popular NFT platforms. OpenSea. OpenSea bills itself as the world's largest NFT marketplace, with everything from where to sell NFT art to virtual reality, sports, and trading sharp corners cards & collectibles available . Opensea Website >>> https://opensea.io/ Nifty Gateway >> https://niftygateway.com ...


0

All these functions are using unsigned integer, uint, So the value can only be positive. In the other hand, msg.value / tokenPrice There are more chances that your value will be decimals represented in WEI but it could never be less than 0. If for a reason the result is negative. your code will revert with underflow error. Because a uint can't be negative. ...


1

I found the answer to my problem. The clone factory was missing the transferOwnership of the token contract which prevented the caller to call the functions of the clonable contract. function createNFTContract(bytes32 salt,string calldata name, string calldata symbol,string calldata _tokenURI)external isRegisteredUser returns(address){ NFT ...


1

my guess would be that you're hitting this require statement require(supply + _mintAmount <= maxSupply);, what are you doing exactly? calling the mint function with your address and 5000 as arguments? Or are you just trying to deploy the contract? if so you're probably hitting the gas limit


0

It seems there are not may solutions that provides a comprehensive view of the NFT price history. I could find an application named BitQuery that is offering a GraphQL based NFT metrics like NFT transfers, NFT senders, NFT transactions etc. Hope it would be helpful.


1

Nothing. That's one of the reasons why services such as IPFS are preferred. With IPFS you can't change the contents while keeping the same URL.


1

Yes you can One way to do it would be to override the mint function or create your own function to create an NFT. function create(uint256 id_) external payable { require(msg.value == mintingFees, 'No fees provided'); _safeMint(msg.sender,id_); } The override statement will prevent the call from going to original erc721 mint ...


0

This is 30 millions gas unit. This is the limit per block. Maybe this could work if your the only transaction in a block. Otherwise you will bust the gas limit. A final important note is that blocks themselves are bounded in size. Each block has a target size of 15 million gas but the size of blocks will increase or decrease in accordance with network ...


Top 50 recent answers are included