This commit is contained in:
2023-02-28 19:02:09 +05:30
parent 152f11b675
commit 258ac130f8
450 changed files with 51328 additions and 44 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: