William Entriken
  • Member for 4 years, 1 month
  • Last seen this week
How to delete a mapping?
15 votes

All problems in computer science can be solved by another level of indirection. pragma solidity ^0.4.20; contract DeletableMapping { // Input is keccak256(uint32 mappingVersion, string carVIN) ...

View answer
Updating ERC-721 Token's Metadata after it was Minted
Accepted answer
11 votes

Is it possible to somehow update an existing ERC-721 Token's MetaData after it was already minted? Yes. This is not disallowed by the standard and so you are free to do this. The official ...

View answer
Efficient approach to delete element from array in Solidity
9 votes

Source: https://github.com/su-squares/ethereum-contract/blob/master/contracts/SuNFT.sol Here you go: Algorithm: uint[] assets; mapping(uint=>uint) indexOfAsset; function removeAssetFromArray(uint ...

View answer
Store ERC721 token metadata
7 votes

You have a lot of questions in there. Let's find the relevant references first. Specification The standard is specified at https://eips.ethereum.org/EIPS/eip-721 The specifications are the tokenURI ...

View answer
ERC20 vs ERC721
Accepted answer
7 votes

We are still writing the ERC-721 standard. 721 is about deeds. 20 is about tokens. Here is some draft language in the specification that explains the difference "Deed" word choice The noun deed is ...

View answer
Why are all NFTs created from Null Address on Opensea?
Accepted answer
6 votes

Because the standard says so. https://eips.ethereum.org/EIPS/eip-721 /// @dev This emits when ownership of any NFT changes by any mechanism. /// This event emits when NFTs are created (`from` == 0) ...

View answer
How can I find NFTS and their metadata?
4 votes

First, you can't do this in a general way. In my speech presented at NFT.nyc, I deployed on Ethereum Mainnet a smart contract which created 2^255 NFTs using the ERC-721 protocol. (Thank you, work ...

View answer
Is this possible ti pay for ERC721 token with other tokens not eth?
4 votes

Yes this is possible. I have published a project showing exactly how to do this, including full documentation and walkthrough. It is at https://github.com/fulldecent/spend-ERC20-create-ERC721 Here is ...

View answer
How is the ERC721TokenReceiver.onERC721Received data parameter used in practice?
Accepted answer
4 votes

The original thought was this would be used mainly for passing a price to a marketplace contract. Everyone using it (just a few people) are using it for that. I don't know of any wallets that support ...

View answer
How to show erc721 NFT card images in compatible wallets?
4 votes

Just create a JSON file following the "ERC721 Metadata JSON Schema" specified at https://eips.ethereum.org/EIPS/eip-721 Here is one simple example that meets the specification: { "...

View answer
ERC-2309 Minting Multiple ERC-721 Tokens in one Transaction
4 votes

Anyone know how to work with ERC-2309? Yes. The standard is fully specified at https://eips.ethereum.org/EIPS/eip-2309. That is how you work with it. super._mint(msg.sender, tempColorCounter); This ...

View answer
List holders and tokens for an ERC-721 contract
4 votes

Problem We are considering how to query the Ethereum blockchain using the Web3 JS API to collect events, summarizing this data to find the most recent recipient of each ERC-721 token. Running your ...

View answer
How to detect Ethereum ERC721 token
4 votes

ERC-721 is a standard, published in the Ethereum EIPs project. Cryptokitties, cryptohorse, cryptotitties, etc. all went live BEFORE the standard. Therefore they are not ERC-721. Many people will ...

View answer
Execution of ERC721 Token
Accepted answer
4 votes

This is the reference implementation noted from the standard: https://github.com/0xcert/ethereum-erc721/blob/master/src/contracts/tokens/nf-token.sol It is simply the ERC721 interface and it does ...

View answer
How to get value history from ERC721 Token
Accepted answer
4 votes

This must be done off-chain for standard tokens. The ERC-721 standard specification -- http://eips.ethereum.org/EIPS/eip-721 -- does not provide an interface to query historical ownership of a token. ...

View answer
Why we can not add erc721 tokens in wallet?
4 votes

Etherscan, MetaMask and other wallets do not currently support the ERC-721 standard. The actual standard was just passed last week. We are hosting a conference this weekend in Dallas to discuss ...

View answer
Minting more than one NFT in a single transaction ( ERC721 )
Accepted answer
3 votes

In one transaction: To mint one item, use _mint(...). To mint up to 20 items, use _mint(...) in a for-loop. To mint up to 500 items, use the "ghost minting" technique. Please see the Area ...

View answer
What is the point of the non-upgradability of Smart Contracts?
3 votes

It is a matter of jurisdiction and recourse as well as expectations and reasonableness of expectations. Example: a bank (assuming paper cash, physically deposited) If you put money in a bank, you hope ...

View answer
Given an ETH wallet address - Fetch all ERC721 tokens currently owned
Accepted answer
3 votes

Cheap/simple -- use the OpenSea API. Robust/exhaustive -- you'll need to write your own client. 0xcert has one we might be able to share. And it will monopolize a full server to run + stay synced.

View answer
Storing ERC721 metadata on IPFS
Accepted answer
3 votes

Set your _baseURI as "ipfs://" and put the content hash into _tokenURI. The relevant code is at https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC721/...

View answer
How to guarantee IPFS file access based on Non Fungible Token ownership (or security)?
Accepted answer
3 votes

No, this is not possible. Here is a more general explanation which is relevant and then application to your specific instance. ENTRIKEN'S LAW: Your ownership of assets on a ledger is only as valid ...

View answer
Is there a reason why minting is excluded in erc721 interface?
Accepted answer
3 votes

The standard was designed so as to minimize the number of required functionalities. (Not joking.) At the time it was finalized (June 2018), minting with that interface was not implemented in the vast ...

View answer
ERC721: Interface ID Registration
Accepted answer
3 votes

Interface support is advertised using ERC-165. This is documented in https://eips.ethereum.org/EIPS/eip-165 There are two cases where this is useful and these reasons motivated adding the feature as ...

View answer
Can you add a link to a ERC-721
3 votes

Yes, the ERC-721 specification specifically allows attaching a document to each token. Please see the metadata extension in the standard at https://eips.ethereum.org/EIPS/eip-721 One caveat, and ...

View answer
Transfer an ERC721 Token from another contract
3 votes

Here is an example contract which can deposit tokens and then auction them off. All the while it records which person originally deposited it. Here is the setup. First we have to import the ERC-721 ...

View answer
Should I checkAndCallSafeTransfer while creating NFT?
3 votes

Problem statement We want to know if it is required and/or best practice to call onERC721Received on the receiving contract when creating ("minting") a new token. Literature review The ERC-721 ...

View answer
In solidity, how can you set a bytes variable to empty
3 votes

delete data; Source http://solidity.readthedocs.io/en/develop/types.html delete a assigns the initial value for the type to a. I.e. for integers it is equivalent to a = 0, but it can also be used ...

View answer
Bulk Distribution of NFTs to Wallets with Varying Quotas
2 votes

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 ...

View answer
How can Opensea and Etherscan understand that CryptoPunks are NFTs if the contract does not implement ERC20, ERC721 nor ERC1155?
Accepted answer
2 votes

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 ...

View answer
Are the limits on "limited edition" NFTs enforced by ERC 721?
Accepted answer
2 votes

Maybe. A contract CAN enforce some limit on a specific usage pattern of token identifiers. The standard does not include this by default. But don't forget, nothing stops somebody from creating a new ...

View answer
1
2 3 4 5