CRYPTO NEWS

How to show my own contract name in Token Tracker field of an ERC1155 Contract?

I am developing an NFT Drop site contract. I want my NFT Contract to be named from ERC1155 to provide a name in the constructor. I have watched and followed many tutorials. They all work the same and so I am following them. But my Token Tracker name is ERC1155. Can Anyone please suggest to me how to solve this issue???

Here is my contract Link: https://mumbai.polygonscan.com/address/0x69A66176A9d8E5EB207CA8Ed66bdBF318f965523#code

What I am getting

enter image description here

What I should be getting

enter image description here

"Error": "Failed to decode output: Error: data out-of-bounds

I’ve got this strange error in Solidity’s Remix: "error": "Failed to decode output: Error: data out-of-bounds (length=36, offset=64, code=BUFFER_OVERRUN, version=abi/5.5.0)" It happens when i test the "searchProduct" function. The function works well if i have 0 states added, but after i append a new state to the Product, this error appears. Can anyone tell me::Listen

I’ve got this strange error in Solidity’s Remix: "error": "Failed to decode output: Error: data out-of-bounds (length=36, offset=64, code=BUFFER_OVERRUN, version=abi/5.5.0)"

It happens when i test the "searchProduct" function. The function works well if i have 0 states added, but after i append a new state to the Product, this error appears. Can anyone tell me why? I suspect that it’s caused by the array I’m trying to return in the "searchProduct" function but I’m not totally sure about that

pragma solidity ^0.8.13;  contract AssetTracker{      struct State{         string description;         address currentOwner;     }      struct Product{         address manufacturer;         string productName;         string productId;         uint256 date;         uint256 totalStates;         mapping (uint256 => State) states;     }      mapping (string => Product) allProducts;       function newItem(string memory _productId, string memory _name, uint _date) public returns (bool){          Product storage createdItem = allProducts[_productId];         createdItem.manufacturer = msg.sender;         createdItem.productName = _name;         createdItem.productId = _productId;         createdItem.date = _date;         createdItem.totalStates = 0;          return true;      }       function addState(string memory _productId, string memory info) public returns (string memory){          State memory newState = State({currentOwner: msg.sender, description: info});         uint256 currentState = allProducts[_productId].totalStates;         allProducts[_productId].states[currentState] = newState;         currentState = currentState + 1;         allProducts[_productId].totalStates = currentState;          return info;      }      function searchProduct(string memory _productId) public view returns (address manufacturer, string memory productName,      string memory productId, uint256 date, uint256 totalStates, State[] memory descriptionsArray){                  Product storage searchedProduct = allProducts[_productId];         State[] memory statesArray;          for (uint256 i=0; i<searchedProduct.totalStates; i++){             statesArray[i] = searchedProduct.states[i];         }          return (searchedProduct.manufacturer, searchedProduct.productName,          searchedProduct.productId, searchedProduct.date, searchedProduct.totalStates, statesArray);      }  } 

How to show my own contract name in Token Tracker field of an ERC1155 Contract?

Shopping cart
There are no products in the cart!
Continue shopping
0