This commit is contained in:
2023-11-28 11:36:18 +05:30
commit 3fe8517bab
482 changed files with 54087 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
using System.Numerics;
using UnityEngine;
using Web3Unity.Scripts.Library.ETHEREUEM.EIP;
public class AllErc1155 : MonoBehaviour
{
string account;
public string tokenIdHex;
public string[] nftContracts;
async void Start()
{
// This is the account taken from the user login scene
account = PlayerPrefs.GetString("Account");
// Searches through your listed contracts for balance and uri of the chosen tokenId
foreach (string contract in nftContracts)
{
BigInteger balance = await ERC1155.BalanceOf(contract, account, tokenIdHex);
Debug.Log("Balance of contract " + contract + ": " + balance);
string uri = await ERC1155.URI(contract, tokenIdHex);
Debug.Log("Token URI: " + uri);
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 1cdc6d760edc9764399a0b3206fdd6c1
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: