Hot answers tagged

3

I kind of encountered probably the same metadata update problem. In my case it was because I rushed through the opensea docs didn't use the correct api endpoint for force updating the metadata. According to opensea docs you should use this endpoint when force updating metadata: https://testnets-api.opensea.io/api/v1/asset/<your_contract_address>/<...


2

Please specifically say which problems you are trying to solve. Fair randomization? Bot protection? Gas wars? I wrote https://github.com/AreaWorld/ethereum-contracts which solves many of these problems and is permissively licensed. I also host a public Community Service Hour to take questions live from the public on Twitch and walk through this contract and ...


2

You can use a merkle airdrop for it. Here is a starter kit which also includes links to other services which might help you do it.


2

If is usually called after a token has been transferred (in same tx). If the receiver of the token is a contract, it checks if the contract implements the onERC721Received interface. If no, it reverts the transaction. If yes, the receiver contract has a onERC721Received method. The ERC721 calls this method, and now execution goes to the receiver contract to ...


1

If you know the address of the account you want to check and a the specific id of the token you can use the balanceOf or ownerOf method of the token standards. For ERC-1155 you would use the following code: const balance = await tokenContract.methods.balanceOf(address, tokenId).call() const hasToken = balance > 0 For ERC-721 you would use the following ...


1

Neither of them were popular enough at the time they were released. This is why they were not built to be compatible. Also there were no standards available at the time, so nobody had a specific direction to build towards. Of course ERC-721 fixed the standards part. And general awareness of the new techniques is fixing new projects to come.


1

For me, I had accidentally not left a space after the - under the remappings. I had: compiler: solc: remappings: -'@aave=aave/protocol-v2@1.0.1' ... I needed: compiler: solc: remappings: # notice the space - '@aave=aave/protocol-v2@1.0.1' ...


1

Bulk minting ERC-721 is not costly. Although the implementation you are considering might be suboptimal. In fact, the very first ERC-721 NFT, Su Squares, minted 10,000 tokens in one transaction. The Su Squares smart contract is now open source, permissively licensed and is referenced in the ERC-721 document.


1

Each token in your ERC-1155 collection will have a unique ID. Could you elaborate more on the problem you're facing? Unless you're talking about nesting fungible or semi-fungible tokens as a 2nd-level structure? For example you can have ERC-1155 collection with IDs = 1, 2, 3 and then under each ID you can have 100 fractions which are fungible tokens ...


1

Here is the general model. Note that it is possible for some of the entities to be combined. The staking sponsor might be built into the ERC-20 token contract The staking sponsor might be built into the ERC-721 token contract The staking contract might be have its own tokens (no need for sponsor) The ERC-721 might contain the staking contract and also be ...


1

The Etherscan API allows you to retrieve ABIs for verified contracts. They have documentation for this exact usecase, but I don't know of any reliable way to retrieve ABIs for unverified ones.


1

The order matching information -- buy order, sell order -- is not saved or accessible on chain in a way that your contract can be read during transfers. There is some way to do what you are saying, but it is not necessarily what you want. You can disable all ERC-721 transfers in your contract unless they are initiated by your contract itself. So you create ...


1

ERC-721 already allows to return text inside your tokenURI by using a data scheme URI. There is no need to "extend" it, this is merely an implementation detail. This is a well-known technique and several projects are using it, costs be damned. One that I've seen is https://onchainmonkey.com which gets the text and the entire image data on-chain. ...


1

No. What you want is not possible. You cannot differentiate between somebody transferring an asset to themself (at zero cost, and zero royalty due) versus transferring to somebody else as the result of an auction (royalty is due). This basic idea is true on blockchains and also in the real world where cars and houses are often sold for the minimum reportable ...


1

Yes, if you encrypt it before sending it to the blockchain. In that case the blockchain can't have the decryption key, otherwise anyone can use it to read the plaintext data. But otherwise you can't really have private data in the blockchain. Well this got answered already The URL can point to whatever address. That address contains the metadata JSON. The ...


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