New answers tagged

0 votes

Best ERC-721 wallet for polygon chain technophobes

I couldn't actually find one that wasn't chock full of subtle ads regarding buying crypto so I made my own web app in the end. It auto-generates a key-pair and saves the pub key to the web client. As ...
Richard Green's user avatar
0 votes

Trying to create a soulbound token. Keep getting two errors

If OpenZeppelin Version V4. // SPDX-License-Identifier: MIT pragma solidity >=0.4.17 <0.9.0; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; contract SoulboundToken is ...
EthanOK's user avatar
  • 391
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
  • 2,150
0 votes

Best approach to simplify phantom array logic (ERC721 Enumerable) [HARD]

It's still not simpler, but it works as an implementation: /// SPDX-License-Identifier: MIT pragma solidity ^0.8.21; contract PhantomIndex { address payable public immutable THIS; ...
Ashraile's user avatar
0 votes

Can ERC-721 accept ERC-20 Tokens as a payment method

Look into the source code for fractional NFTs like TheDogeNFT. If you're only mapping only one ERC721 to one ERC20: pragma solidity ^0.8.21; abstract contract ERC20 is IERC20, IERC20Metadata {} // ...
Ashraile's user avatar
3 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
  • 2,150

Top 50 recent answers are included