EVM.AllErc721 and EVM.AllErc1155 not working
Describe the bug I've managed to execute methods like ERC721.OwnerOf and ERC721.BalanceOf, but when I try to use EVM.AllErc721 it returns an empty array. "[]"
I tested using the mainnet (ERC721) and testnets (ERC1155)
To Reproduce Steps to reproduce the behavior:
- import v1.0.14 on unity
- import the AllErc721 prefab to the scene
- Fill the fields:
string chain = "ethereum";
string network = "mainnet"; // mainnet ropsten kovan rinkeby goerli
string account = "0xAb5634C69dd424bE66f21Dd661A3E90B5e867B42";
string contract = "";
It is not clear if the contract should be filled or not. I tried with both scenarios. 4. save the file and run the scene on unity. 5. It returns: Error: "[]"
Expected behavior It should print information from the first found item that this address has.
Desktop (please complete the following information):
- OS: Windows 10
- Unity 2021.1.11f1
Additional context This is the ERC721 that I expect to return: https://opensea.io/assets/0x91673149ffae3274b32997288395d07a8213e41f/1142
This code runs just fine, and returns the expected URI
string chain = "ethereum";
string network = "mainnet";
string contract = "0x91673149FFae3274b32997288395D07A8213e41F";
string tokenId = "1142";
string uri = await ERC721.URI(chain, network, contract, tokenId);
print(uri);
This is noted as we are seeing this on some of our synched indexers. Leaving this issue open until indexers are fully synched and this issue should be resolved.
i tried to use EVM.allerc1155 but didn't get expected result
- it only shows 27 token IDs but i have more than 80
- it shows balance 0 or -1 can you tell me how can i fix this problem?
Are you working on mainnet/testnet and also what chain are you working with Ethereum/BSC etc.
Any idea on when the synched indexers thing will be resolved? Still getting the original bug happening. Working with ethereum on mainnet. The rinkeby example seems to be working fine.
I am working on rinkeby network. Chain is ethereum
@matt-heavy https://thegraph.com/hosted-service/subgraph/ryry79261/mainnet-erc721-erc1155/
rinkeby should be synced
Hi everybody! The original bug is happening as well in binance mainnet. Is it because of the sync too?
Thanks
@Miki-84 correct https://thegraph.com/hosted-service/subgraph/ryry79261/bsc-erc721-erc1155/
@leon-do how often are these synch issues likely to crop up? I assume we're waiting until 100% for ethereum main net to work?
@Heavy-io It's a one time sync. Once it's 100%, it'll stay synced indefinitely
mainnet Ethereum is fully synced now. closing this issue.
@vmunhoz I tried with this code and I did not got the error. But when I put a space before or after the address I got the same error as you.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Newtonsoft.Json;
public class AllErc721Example : MonoBehaviour
{
private class NFTs
{
public string contract { get; set; }
public string tokenId { get; set; }
public string uri { get; set; }
public string balance { get; set; }
}
async void Start()
{
string chain = "ethereum";
string network = "mainnet"; // mainnet ropsten kovan rinkeby goerli
string account = "0xAb5634C69dd424bE66f21Dd661A3E90B5e867B42";
string contract = "";
int first = 500;
int skip = 0;
string response = await EVM.AllErc721(chain, network, account, contract, first, skip);
try
{
NFTs[] erc721s = JsonConvert.DeserializeObject<NFTs[]>(response);
print(erc721s[0].contract);
print(erc721s[0].tokenId);
print(erc721s[0].uri);
print(erc721s[0].balance);
}
catch
{
print("Error: " + response);
}
}
}