New answers tagged

1

ERC20 and ERC721 are, by definition, interfaces. You cannot attach extra data to the prescribed functions, e.g. transfer() because that will break compatibility with the standard interface. You didn't say what you want to achieve so it's not possible to be specific about the solution. Two common approaches spring to mind. ERC20 is for fungible assets - ...


0

Interesting question, you are describing something similar to a time-based resource, like a ticket to an event or a calendar appointment, that has value before a certain deadline and becomes worthless afterwards (except as proof of attendance). Your own token does not have to use the standard OpenZeppelin contracts for ERC20 or ERC721, but still meet the ...


0

ERC-721 includes this event emitting requirement: /// @dev This emits when ownership of any NFT changes by any mechanism. /// This event emits when NFTs are created (`from` == 0) and destroyed /// (`to` == 0). Exception: during contract creation, any number of NFTs /// may be created and assigned without emitting Transfer. At the time of ...


0

It's not possible to make it auto-burnable because every action inside Ethereum blockchain requires transaction. In case of erc721 burn - you need to call specific burn function. Everything you can do is to add some identifier (status) for every unique token and create a public view function which returns status(active/expired for example) based on your TTL ...


0

In web3 v0.20 there's a utility function that will convert its parameter to BigNumber. For example in your case : const myTokenId = web3.toBigNumber('122164239941406260'); var tx = await nft.mintUniqueTokenTo( receipientAddress, myTokenId, // <- tokenId tokenURI, { from: coinbase } );


0

using bignumber.toFixed is a better method.


Top 50 recent answers are included