Questions tagged [erc1155]

16 questions
3
votes
1 answer

Getting ERC1155 Wallet Balance Using Java Web3J

Since Web3J doesn't currently support ERC1155, is there a way to get the balance for a wallet? My guess is to use a function for this, but I can't seem to figure out how to get it to work. Function function = new Function( "balancedOf", …
juminoz
  • 3,168
  • 7
  • 35
  • 52
2
votes
0 answers

How to mint a collection of NFTs using mintBatch function of ERC1155 with custom URI for each collection?

I'm trying to mint multiple NFTs using mintBatch from the ERC1155 contract. However, I want to use a custom URI whenever I call mintBatch function. Example: I mint collection1 of 10 NFTs by calling the mintBatch function with a URI. This URI will be…
Yahya
  • 318
  • 3
  • 11
2
votes
1 answer

How to check whether user has any ERC1155 of specific contract in solidity?

I'm writing a staking smart-contract for ERC1155 contract (https://etherscan.io/address/0x2013ff029f9d3d31169f4fdc673c8b9fa0ce1fbd#code). When user wants to claim his reward, I need to check whether he owns any token of another ERC721 contract…
GorgeousPuree
  • 331
  • 3
  • 10
1
vote
1 answer

How to mint / transfer ERC1155 token to ERC6551 token bound address of ERC721 directly after mint?

Say I have a smart contract for an ERC721 NFT collection (a), an ERC6551 smart contract that deploys a token bound account for these NFTS (b), and a contract for ERC1155 tokens (c). Here's what I want to accomplish: Upon mint the user receives 1…
Gandarufu
  • 21
  • 3
1
vote
1 answer

Is it possible to somehow get copy #2 in the ERC 1155 NFT contract under ID 1?

For example: I released NFT with ID 1 in the amount of 100 pieces. Someone bought 2 copies. Can I somehow get a copy under #2 ? I am using nodeJS and web3. I can only get the total number of copies with const nftId =…
1
vote
1 answer

Opensea not picking up metadata for ERC-1155 contract

I have an ERC-1155 smart contract deployed to the Goerli testnet. My contract inherits from the OpenZeppelin ERC1155 contract and uses its uri function. The URI I initiated the contract with is of the format https://token-cdn-domain/{id}.json as…
0xED0
  • 53
  • 5
1
vote
0 answers

How do I pass arguments to a mint function for the ERC155 smart contract?

I am trying to write a handleMint() function in my React app using Ethers.js. My smart contract uses the ERC1155 standard. I'm having trouble writing the handleMint() function so that it passes the necessary arguments to my smart contract's mint…
Damon
  • 21
  • 3
1
vote
1 answer

Can you make an ERC1155 contract receive an ERC721 token?

I've got an ERC1155 contract and I want it to receive an ERC721 token and give other tokens in exchange for that. Can I somehow add ERC721 Receiver interface?
kar
  • 13
  • 4
0
votes
0 answers

transfer goeth to a contract address failed

We are testing our contracts on Goerli, and our contract A ( e.g address 0xAAAAAA )is internally calling another contract B ( e.g address 0xBBBBBB ). To pay the gas fee for that internal call, we need to add funds to 0xAAAAAA, but the transfer…
kingsley
  • 21
  • 1
  • 2
0
votes
0 answers

Insufficient balance when transferring token from another address, after migrating the data from old contract to new contract

I create a migration data function to transfer the data from old contract to the new one, in case we need to update the contract. The function is working properly, I have checked the all the data has been moved to the new contract. But when I run…
0391
  • 3
  • 2
0
votes
1 answer

TypeError: Member "length" not found or not visible after argument-dependent lookup in mapping(address => mapping(uint256 => uint256))

I am new in this smart contract area. So what I am learning right now is that when we are deploying a new contract then the data from the old contract will not be automatically moved to the new contract and we need to create a migration function by…
0391
  • 3
  • 2
0
votes
0 answers

DAO based on ERC1155 norm

I am building a project in which i will have a list of fractional NFT's. NFT1 --> 10 Parts. NFT2 --> 20 Parts. ... NFTN --> X Parts. i want people who ones Parts of the NFT1 to be able to vote to decide what are we going to do with it. a small DAO…
EL HACHIMI
  • 17
  • 6
0
votes
0 answers

How to pass tokenID to queryFilter provided by ethers in ERC1155 standard?

I want to get all the transfers from block_B to block_B but for specific token. I have faced similar issue while trying to get ERC721 transfers. It looked like this: const contract = new ethers. const filter = contract.filters.Transfer(); const…
rsb
  • 1
  • 2
0
votes
1 answer

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

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…
bbusdriver
  • 1,577
  • 3
  • 26
  • 58
0
votes
2 answers

ERC 1155 Token Standard

I have read about ERC 1155 that how it can be used to mint both fungible(ERC20) and non-fungible(ERC721) tokens. So my question is: Fungible tokens that we mint using ERC1155 will have exact same functions as a token minted from ERC20 contract will…
ZSA
  • 85
  • 1
  • 13
1
2