Can erc20 type in erc1155 be listed on uniswap or exchanges?

333 Views Asked by At

An example from Alchemy,

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";

contract AwesomeGame is ERC1155 {
    uint256 public constant GOLD = 0;
    uint256 public constant SWORD = 1;
    uint256 public constant CROWN = 2;

    constructor() ERC1155("https://awesomegame.com/assets/{id}.json") {
        _mint(msg.sender, GOLD, 10**18, "");
        _mint(msg.sender, SWORD, 1000, "");
        _mint(msg.sender, CROWN, 1, "");
    }
}

Here, GOLD is an erc20 type and just wondering if it can have some monetary value like erc20 and be listed on uniswap or exchanges? and two side questions,

_mint(msg.sender, GOLD, 10**18, "");

  1. is this minting only 1 token?
  2. is SWORD still NFT? I think it's fungible with 1k quantity and it should not be non-fungible token (NFT)
1

There are 1 best solutions below

0
On BEST ANSWER

First of all, you have to understand why ERC-1155 was introduced in the first place. In short, it was introduced to cater to the need for in-game currency and items.

  1. Yes it will but why would you be needing that many decimals for GOLD? I've seen people setting 4 at max.
    1. As per ethereum.org, If the supply is only 1, treat it as NFT.

and to answer your main question No you can't add it. You can see more detail discussion on forum.openzeppelin.