{"id":14968434,"url":"https://github.com/moralisweb3/unity-web3-game-kit","last_synced_at":"2025-04-04T13:11:45.338Z","repository":{"id":37767061,"uuid":"428227670","full_name":"MoralisWeb3/unity-web3-game-kit","owner":"MoralisWeb3","description":"Unity Web3 Game Kit is the fastest way to connect and build games for Web3. It provides a single workflow for building high performance dapps. Fully compatible with your favourite platform.","archived":false,"fork":false,"pushed_at":"2022-10-03T15:12:14.000Z","size":388571,"stargazers_count":545,"open_issues_count":0,"forks_count":219,"subscribers_count":21,"default_branch":"main","last_synced_at":"2025-04-04T12:59:50.938Z","etag":null,"topics":["avalanche","binance","blockchain","boilerplate","crypto","dapps","defi","ethereum","evm","metamask","moralis","nft","p2e","polygon","solana","unity","unity3d","walletconnect","web3"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MoralisWeb3.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-11-15T10:59:52.000Z","updated_at":"2025-04-01T03:12:14.000Z","dependencies_parsed_at":"2022-08-08T22:00:40.561Z","dependency_job_id":null,"html_url":"https://github.com/MoralisWeb3/unity-web3-game-kit","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MoralisWeb3%2Funity-web3-game-kit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MoralisWeb3%2Funity-web3-game-kit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MoralisWeb3%2Funity-web3-game-kit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MoralisWeb3%2Funity-web3-game-kit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MoralisWeb3","download_url":"https://codeload.github.com/MoralisWeb3/unity-web3-game-kit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247182401,"owners_count":20897381,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["avalanche","binance","blockchain","boilerplate","crypto","dapps","defi","ethereum","evm","metamask","moralis","nft","p2e","polygon","solana","unity","unity3d","walletconnect","web3"],"created_at":"2024-09-24T13:39:53.930Z","updated_at":"2025-04-04T13:11:45.318Z","avatar_url":"https://github.com/MoralisWeb3.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Unity Web3 Game Kit\n\n\u003e Web3 Game Kit is the fastest way to connect and build games for Web3. It provides a single workflow for building high performance dapps. Fully compatible with your favourite platform.\n\nThis kit is built on [Moralis Web3 Unity SDK](https://github.com/MoralisWeb3/web3-unity-sdk) and [Moralis](https://moralis.io?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=ethereum-boilerplate). \n\nPlease check the [official documentation of Moralis](https://docs.moralis.io/#user) for all the functionalities of Moralis.\n\n![Demo](gifs/moralis-unity-boilerplate_2.gif)\n\n# ⭐️ `Star us`\nIf this kit helps you build dapps faster - please star this project, every star makes us very happy!\n\n# :city_sunrise: `Community`\nThe best thing about Moralis is the super active community ready to help at any time! We help each other.\n## 🤝 `Need help?`\nIf you need help with setting up the kit or have other questions - don't hesitate to write in our community forum and we will check asap. [Forum link](https://forum.moralis.io/t/ethereum-unity3d-boilerplate-questions/4553). \n## Discord\nBecome a Moralis Mage - join the [Moralis DAO Discord](https://moralis.io/mage)\n## Feedback\nTo give feedback, ask a question or make a feature request, you can either use the [Forum](https://forum.moralis.io/) or the [game-dev](https://discordapp.com/channels/819584798443569182/918645175562145822) Discord thread.\n\nBugs are logged using the github issue system. To report a bug, simply open a new issue.\n\n# 🚀 Quick Start\n\n## :warning: Please read this before updating your project\nThe 1.2.0 release represents a major reworking of the project and includes namespace and structural changes in addition to functionality changes. Please be cautious when migrating from previous versions to 1.2.0. See the [CHANGELOG](CHANGELOG.md) for more information.\n\n💿 Install all dependencies:\n- [Unity Hub](https://unity3d.com/get-unity/download)\n- [Visual Studio](https://visualstudio.microsoft.com/) or other Unity supported development platforms.\n\n1. Using Unity 2020.3 or higher, create a new game project.\n2. Download and install the latest package.\n![Add Package](gifs/moralis_package_setup.gif)\n3. Enter your Moralis Server information in the Setup Wizard.\n![insertvalues](gifs/moralis_server_setup.gif)\n4. Open and run the demo scene.\n\nThis kit has been tested with the following Unity3D Releases:\n1. 2020.3.34f1\n2. 2021.3.3f1\n\n# 🧭 Table of contents\n\n- [`Moralis Web3 for Unity Boilerplate`](#moralis-web3-for-unity-boilerplate)\n- [🚀 Quick Start](#-quick-start)\n- [🧭 Table of contents](#-table-of-contents)\n- [🧰 Moralis Web3 Unity SDK](#-moralis-web3-unity-sdk)\n    - [`Client`](#client)\n    - [`Authentication`](#authentication)  \n    - [`Queries`](#queries)  \n    - [`Live Queries`](#live-queries)\n    - [`Custom Objects`](custom-objects)\n    - [`User Object`](#user-object)\n    - [`Authentication Data`](#authentication-data)\n    - [`HostManifestData`](#hostmanifestdata)\n    - [`ServerConnectionData`](#server-connectiondata)\n- [Web3](#web3)\n- [WebGL](#webgl)\n- [🏗 Ethereum Web3Api Methods](#-ethereum-web3api-methods)\n    - [`Web3Api Notes`](#web3api-notes)\n    - [`Chains`](#chains)\n    - [`Account`](#account)\n        - [`GetNativeBalance`](#getnativebalance)\n        - [`GetNFTs`](#getnfts)\n        - [`GetNFTsForContract`](#getnftsforcontract)\n        - [`GetNFTTransfers`](#getnfttransfers)\n        - [`GetTokenBalances`](#gettokenbalances)\n        - [`GetTokenTransfers`](#gettokentransfers)\n        - [`GetTransactions`](#gettransactions)\n    - [`Defi`](#defi)\n        - [`GetPairAddress`](#getpairaddress)\n        - [`GetPairReserves`](#getpairreserves)\n    - [`Native`](#native)\n        - [`GetBlock`](#GetBlock)\n        - [`GetContractEvents`](#GetContractEvents)\n        - [`GetDateToBloc`](#GetDateToBloc)\n        - [`GetLogsByAddress`](#GetLogsByAddress)\n        - [`GetNFTTransfersByBlock`](#GetNFTTransfersByBlock)\n        - [`GetTransaction`](#GetTransaction)\n        - [`RunContractFunction`](#RunContractFunction)\n    - [`Resolve`](#resolve)\n        - [`ResolveDomain`](#resolvedomain)\n    - [`Storage`](#erc20balance)\n    - [`Token`](#erc20transfers)\n        - [`GetAllTokenIds`](#getalltokenids)\n        - [`GetContractNFTTransfers`](#getcontractnfttransfers)\n        - [`GetNFTLowestPrice`](#getnftlowestprice)\n        - [`GetNFTMetadata`](#getnftmetadata)\n        - [`GetNFTOwners`](#getnftowners)\n        - [`GetNFTTrades`](#getnfttrades)\n        - [`GetNftTransfersFromToBlock`](#getnfttransfersfromtoblock)\n        - [`GetTokenAdressTransfers`](#gettokenaddrestransfers)\n        - [`GetTokenAllowance`](#gettokenallowance)\n        - [`GetTokenIdMetadata`](#gettokenidmetadata)\n        - [`GetTokenIdOwners`](#gettokenidowners)\n        - [`GetTokenMetadata`](#gettokenmetadata)\n        - [`GetTokenMetadataBySymbol`](#gettokenmetadatabysymbol)\n        - [`GetTokenPrice`](#gettokenprice)\n        - [`GetWalletTokenIdTransfers`](#getwallettokenidtransfers)\n        - [`SearchNFTs`](#searchnfts)\n- [🏗 Solana Api Methods](#-solana-api-methods)\n    - [Solana Account](#solana-account)\n        - [`Solana Balance`](#solana-balance)\n        - [`Solana GetNFTs`](#solana-getnfts)\n        - [`Solana GetPortfolio`](solana-getportfolio)\n        - [`Solana GetSplTokens`](solana-getspltokens)\n    - [Solana NFT](#solana-nft)\n        - [`Solana GetNFTMetadata`](#solana-getnftmetadata)\n- [Helpful Tools](#helpful-tools)\n  \n# 🏗 Moralis Web3 Unity SDK\n  The Moralis Web3 Unity SDK provides easy to use methods that make integrating your application with Moralis a snap. You will find that the.NET SDK works much the same as in JavaScript. For use in Unity3D, we have added additional quick start objects for integrating the Moralis Web3 Unity SDK in a Unity3D application. \n  For the examples that follow we provide examples of how to use the Moralis Web3 Unity SDK using the provided Moralis Unity3D quick start tools.\n  \n## `Client`\n  The Moralis Web3 Unity SDK Client provides a way to easily interact with Moralis database and the Web3API. For Unity3D we have provided a singleton wrapper named *Moralis* that makes it easy to initialize the MoralisClient and then access it from anywhere in your Unity3D application. \n  \n### SDK Client Initialization\nWe have provided the AuthenticationKit prefab to make authenticating to Moralis with your crypto wallet a snap. \n\nJust drag the prefab from _Packages\\io.moralis.web3-unity-sdk\\Runtime\\Kits\\AuthenticationKit\\Prefabs_ into your authentication screen. That is all you need to do to get started. The AuthenticationKit.prefab is not needed anywhere else in your game.\n\n**Initialize Client**\nYou do not have to use the AuthenticationKit. You can create a completely custom authentication process if you wish and initialize Moralis at the place and time of your choosing.\n```\nMoralisClient moralis = new MoralisClient(new ServerConnectionData() { ApplicationID = \"YOUR_APPLICATION_ID_HERE\", ServerURI = \"YOUR_SERER_URL_HERE\"}, new Web3ApiClient());\n```\n_note: The **new Web3ApiClient()** parameter is optional and should be included only when you will be using functionality from the Moralis Web3API REST service._\n\n### Unity3D Client Initialization\n**Initialize Client**\n```\nMoralis.Initialize(MoralisApplicationId, MoralisServerURI, hostManifestData);\n```\n_note: For the **hostManifestData** parameter see [`HostManifestData`](#hostmanifestdata). This is required for Unity3D applications._\n_note: See [`User Object`](#userobject) for information about initializing the Moralis Client for a custom User Object._\n\n## `Authentication`\nAuthentication is handled in a similar manner in both the SDK and the Unity3d. There is no direct manner to interact securely with a wallet in a .NET application so the Moralis Web3 Unity SDK interacts with wallets in a loosely coupled manner. For the Unity3D boilerplate application, and the other examples we provide, we use Wallet Connect to facilitate interaction with wallets. \n\n### Basic Moralis Authentication\n```\nMoralisUser user = await Moralis.LogInAsync(authentication-Data);\n```\n_note: See [`Authentication Data`](#authentication-data) for information about the authenticationData parameter._\n\n#### Wallet Connect Authentication Example\n```\npublic async void WalletConnect_OnConnectedEventSession(WCSessionData wcSessionData)\n{\n     // Extract wallet address from the Wallet Connect Session data object.\n    string address = wcSessionData.accounts[0].ToLower();\n    string appId = Moralis.DappId;\n    long serverTime = 0;\n\n    // Retrieve server time from Moralis Server for message signature\n    Dictionary\u003cstring, object\u003e serverTimeResponse = await Moralis.Cloud\n        .RunAsync\u003cDictionary\u003cstring, object\u003e\u003e(\"getServerTime\", new Dictionary\u003cstring, object\u003e());\n\n    if (serverTimeResponse == null || !serverTimeResponse.ContainsKey(\"dateTime\") ||\n        !long.TryParse(serverTimeResponse[\"dateTime\"].ToString(), out serverTime))\n    {\n        Debug.LogError(\"Failed to retrieve server time from Moralis Server!\");\n    }\n\n    string signMessage = $\"Moralis Authentication\\n\\nId: {appId}:{serverTime}\";\n\n    string signature = null;\n\n    signature = await _walletConnect.Session.EthPersonalSign(address, signMessage);\n\n    // Create Moralis auth data from message signing response.\n    Dictionary\u003cstring, object\u003e authData = new Dictionary\u003cstring, object\u003e\n    {\n        { \"id\", address }, { \"signature\", signature }, { \"data\", signMessage }\n    };\n\n    // Attempt to login user.\n    MoralisUser user = await Moralis.LogInAsync(authData, wcSessionData.chainId.Value);\n}\n```\n\n#### WebGL Authentication Example\n```\nstring address = Web3GL.Account().ToLower();\nstring appId = Moralis.DappId;\nlong serverTime = 0;\n\n// Retrieve server time from Moralis Server for message signature\nDictionary\u003cstring, object\u003e serverTimeResponse =\n    await Moralis.Cloud.RunAsync\u003cDictionary\u003cstring, object\u003e\u003e(\"getServerTime\", new Dictionary\u003cstring, object\u003e());\n\nif (serverTimeResponse == null || !serverTimeResponse.ContainsKey(\"dateTime\") ||\n    !long.TryParse(serverTimeResponse[\"dateTime\"].ToString(), out serverTime))\n{\n    Debug.LogError(\"Failed to retrieve server time from Moralis Server!\");\n}\n\nstring signMessage = $\"Moralis Authentication\\n\\nId: {appId}:{serverTime}\";\n                \nstring signature = null;\n                \nsignature = await Web3GL.Sign(signMessage);\n                \n// Create Moralis auth data from message signing response.\nDictionary\u003cstring, object\u003e authData = new Dictionary\u003cstring, object\u003e\n{\n    { \"id\", address }, { \"signature\", signature }, { \"data\", signMessage }\n};\n\n// Get chain Id\nint chainId = Web3GL.ChainId();\n\n// Attempt to login user.\nMoralisUser user = await Moralis.LogInAsync(authData, chainId);\n```\n\n## `Queries`\nQueries provide a way to retrieve information from your Moralis database.\n\nThe following example will return all Hero records where 'Level' is equal to 3.\n### Query Example\n```\nMoralisQuery\u003cHero\u003e q = await Moralis.Query\u003cHero\u003e();\nq = q.WhereEqualTo(\"Level\", 3);\nIEnumerable\u003cHero\u003e result = await q.FindAsync();\n```\n\nThe Moralis Web3 for Unity SDK supports the same query methods as the JS SDK. For example creating 'OR', 'AND', and 'NOR' queries.\nFor this example we will take a base query and construct an 'OR' query that returns records where Level is greater or equal to '3' OR the hero's name is 'Zuko'.\nFurthermore we will sort (order) the result set by the hero's strength, descending.\n### Compound Query Example\n```\nMoralisQuery\u003cPlayerData\u003e q = await Moralis.Query\u003cPlayerData\u003e();\nMoralisQuery\u003cPlayerData\u003e q1 = q.WhereGreaterThanOrEqualTo(\"Level\", 2);\nMoralisQuery\u003cPlayerData\u003e q2 = q.WhereEqualTo(\"Name\", \"Zuko\");\nMoralisQuery\u003cPlayerData\u003e q3 = Moralis.BuildOrQuery\u003cPlayerData\u003e(new MoralisQuery\u003cPlayerData\u003e[] { q1, q2 }).OrderByDescending(\"Strength\");\nIEnumerable\u003cPlayerData\u003e result = await q3.FindAsync();\n```\n\n## `Live Queries`\nLive Queries are queries that include a subscription that provide updates whenever the data targeted by the query are updated.\nA Live Query subscription emits events that indicate the state of the client and changes to the data. For more information please see\nthe [docs](https://docs.moralis.io/moralis-server/database/live-queries).\n\nThe following examples use the [query example from above](#queries)\n### Live Query Example\nSince Unity3d is mainly used to create games, Unity3D apps generaly have life cycle events you do not usually need to worray about in a normal program.\nWe have created a special Live Query wrapper object that automatically handles your subscriptions for pause, unpause, close, etc.\nThis example shows how to create your subscription using this wrapper class.\n```\nMoralisQuery\u003cHero\u003e q = Moralis.Query\u003cHero\u003e();\nMoralisLiveQueryController.AddSubscription\u003cHero\u003e(\"Hero\", q, callbacks);\n```\n_note: the **callbacks** parameter is optional. Please see [Callbacks Explained](#live-query-callbacks-explained) bellow.\n\nThe _**MoralisLiveQueryController**_ is a singleton object and so is available anywhere within your application.\nThe first parameter (\"Hero\" above\") is a key that you can use to retrieve a subscription (to check its status for example) or to remove a subscription.\n\nBy using the The _**MoralisLiveQueryController**_ object you do not need to worry about properly closing or disposing of your subscriptions as this wrapper object handles all of that for you.\n\n### Live Query Callbacks Explained.\nCallbacks are used to handle the events emitted by a subscription. You can set the callbacks directly against a subscription. However it is usually cleaner to \nseparate these from the main code. To facilitate this we have included the _**MoralisLiveQueryCallbacks**_ object. This optional object can be passed to the subscription.\n#### Example MoralisLiveQueryCallbacks Use\n```\nMoralisLiveQueryCallbacks\u003cHero\u003e callbacks = new MoralisLiveQueryCallbacks\u003cHero\u003e();\ncallbacks.OnConnectedEvent += (() =\u003e { Debug.Log(\"Connection Established.\"); });\ncallbacks.OnSubscribedEvent += ((requestId) =\u003e { Debug.Log($\"Subscription {requestId} created.\"); });\ncallbacks.OnUnsubscribedEvent += ((requestId) =\u003e { Debug.Log($\"Unsubscribed from {requestId}.\"); });\ncallbacks.OnErrorEvent += ((ErrorMessage em) =\u003e\n{\n    Debug.Log($\"ERROR: code: {em.code}, msg: {em.error}, requestId: {em.requestId}\");\n});\ncallbacks.OnCreateEvent += ((item, requestId) =\u003e\n{\n    Debug.Log($\"Created hero: name: {item.Name}, level: {item.Level}, strength: {item.Strength} warcry: {item.Warcry}\");\n});\ncallbacks.OnUpdateEvent += ((item, requestId) =\u003e\n{\n    Debug.Log($\"Updated hero: name: {item.Name}, level: {item.Level}, strength: {item.Strength} warcry: {item.Warcry}\");\n});\ncallbacks.OnDeleteEvent += ((item, requestId) =\u003e\n{\n    Debug.Log($\"Hero {item.Name} has been defeated and removed from the roll!\");\n});\ncallbacks.OnGeneralMessageEvent += ((text) =\u003e\n{\n    Debug.Log($\"Websocket message: {text}\");\n});\n```\n\n## `Custom Object`\nCreating your own objects to support NPCs, characters, and game objects is as simple as creating a Plain Old C# Object (POCO). The only stipulation is that your custom object must be a child of Moralis Object and when you create an instance of the object it should be made via _**moralis.Create**_ method. This associates some extensions to your object that enable you to perform Moralis functions such as _Save_ directly on the object.\n**Note:** Inclusion of _base([OBJECT NAME]) is important for proper database handling.\n#### Sample Object\n``` \npublic class Hero : MoralisObject\n{\n    public int Strength { get; set; }\n    public int Level { get; set; }\n    public string Name { get; set; }\n    public string Warcry { get; set; }\n    public List\u003cstring\u003e Bag { get; set; }\n\n    public Hero() : base(\"Hero\") \n    {\n        Bag = new List\u003cstring\u003e();\n    }\n}\n```\n#### Create and Save Instance of Object\n```\nHero h = Moralis.Create\u003cHero\u003e();\nh.Name = \"Zuko\";\nh.Strength = 50;\nh.Level = 15;\nh.Warcry = \"Honor!!!\";\nh.Bag.Add(\"Leather Armor\");\nh.Bag.Add(\"Crown Prince Hair clip.\");\n\nawait h.SaveAsync();\n```\n\n## `User Object`\nThe user object contains information about the currently logged in user. Upon successful login, the user is stored in local storage until logout. This allows a user to log in once and not login again until their session expires or they logout.\n\nIf you need to create an instance of MoralisUser for any reason (**example**: to SignUp with _username_ and _password_) you should do so in this manner:\n```\nMoralisUser user = Moralis.Create\u003cMoralisUser\u003e();\n```\nUsing this method instead of the default constructor of MoralisUser ensures that the MoralisUser object created is associated with the Moralis instance. This means that several methods of the object will not work problerly (such as _SaveAsync_, _SignUpAsync_, etc.).\n\nIf you create a custom user object it must inherit from MoralisUser.\n\nSince C# is a typed language the compiler must know what types are used at compile time. Due to this, since the MoralisUser is integral to internal functions in the Moralis Web3 Unity SDK, when you create a custom User Object you must initialize the Moralis client using your custom User Object. After this step you can use the Moralis Client as usual.\n\n#### Initialize Moralis Client with Custom User Object\n```\nMoralisClient\u003cYourUserObject\u003e moralis = new MoralisClient\u003cYourUserObject\u003e(new ServerConnectionData() { ApplicationID = \"YOUR_APPLICATION_ID_HERE\", ServerURI = \"YOUR_SERER_URL_HERE\"}, new Web3ApiClient());\n```\n_note: for Unity3D you will need to make the above change in the **Moralis.Initialize** object. You will also need to replace the MoralisUser object elsewhere in the Boilerplate code._\n_**WARNING** do not make any replacements to any files under the MoralisDtoNet folder_\n\n## `Authentication Data`\nAuthentication data is a _**Dictionary\u003cstring, string\u003e**_ object that contains the information required by Moralis to authenticate a user.\nAs a minimum the authentication data dictionary must contain the following entries:\n1. **id** The wallet address of the wallet used to sign the message.\n2. **signature** The signature data returned by the Sign request sent to the wallet.\n3. **data** The message that was sent to the wallet to be signed.\n#### Example\n```\nDictionary\u003cstring, object\u003e authData = new Dictionary\u003cstring, object\u003e { { \"id\", \"ADDRESS_HERE\".ToLower() }, { \"signature\", \"SIGNATURE_DATA_HERE\" }, { \"data\", \"MESSAGE_HERE\" } };\n```\n\n## `HostManifestData`\nIn Unity3D applications the HostManifestData object is used to pass information to Moralis that is usually autogenerated from Windows system variables. Since Unity3D supports multiple platforms this information is not always available. \n\n## `ServerConnectionData`\nDescription here\n\n# Web3\nThe Web3 object is used for executing Evm RPC calls, meaning transactions directly against the chain. While the [Web3Api](#-ethereum-web3api-methods) is more efficient for most Web3 calls, the Web3Api does not support state changes or transactions. The Web3 object does allow state change and transactions against the change.\n\nFor Web3 support, an [Nethereum](https://nethereum.com/) Web3 object is exposed in the **Moralis**. Developers can use the Web3 object directly.\n\n**IMPORTANT** Before it can be used, the Web3 object must be initialized, unfortunetly this cannot be done until a connection to the wallet is established.\n```\n    private void InitializeWeb3()\n    {\n        Moralis.SetupWeb3();\n    } \n\n    /// \u003csummary\u003e\n    /// Must be referenced by the WalletConnect Game object\n    /// \u003c/summary\u003e\n    /// \u003cparam name=\"session\"\u003e\u003c/param\u003e\n    public void WalletConnectSessionEstablished(WalletConnectUnitySession session)\n    {\n        InitializeWeb3();\n    }\n```\n\nTo make Web3 calls easier we have included a few tools.\n\nFirst, a EvmContractManager object (currently not available for WebGL) provides an easy way to set up contracts that are reflected across several chains. The Contract andits functions can be easily retrieved from any where in your code via Moralis.\n\nTo setup a contract instance use InsertContractInstance:\n```\nMoralis.InsertContractInstance(\"Rewards\", GameAwardContractAbi(), \"mumbai\", \"0x05af21b57d2E378F90106B229E717DC96c7Bb5e2\");\n```\nIn this example a contract with key \"Rewards\" is created using the contract ABI (as json), the main chain the contract is on, and the address of the contract on that chain. For a live example please see the _MainMenuScript.cs_ file.\n\nBy calling _Moralis.AddContractChainAddress([CONTRACT KEY], [CHAIN ID], [CONTRACT ADDRESS])_ you can create multiple chain specific instances of the same contract using the ABI originally added with [CONTRACT KEY].\n\nTo retrieve an Nethereum contract instance call:\n```\nContract c = Moralis.EvmContractInstance([CONTRACT KEY], [CHAIN ID]);\n```\n\nRetrieve an Nethereum contract function instance:\n```\nFunction f = Moralis.EvmContractFunctionInstance([CONTRACT KEY], [CHAIN ID], [FUNCTION NAME]);\n```\n\nCall function with no parameters\n```\n// No parameters\nobject[] pars = new object[0];\nstring jsonResult = await f.CallAsync(pars);\n\n```\n\nCall function with parameters\n```\nobject[] pars = {\"My string\", 2};\nstring jsonResult = await f.CallAsync(pars);\n```\n\nCall function with parameters, specify from, gas, and value.\n```\nstring playerAddress = \"0x37bd48252f4dcE15C7147eA82b31978a00750f81\";\nobject[] pars = {\"My string\", 2};\nNethereum.Hex.HexTypes.HexBigInteger g = new Nethereum.Hex.HexTypes.HexBigInteger(80);\nNethereum.Hex.HexTypes.HexBigInteger wei = new Nethereum.Hex.HexTypes.HexBigInteger(1000);\nstring jsonResult = await func.CallAsync(playerAddress, new Nethereum.Hex.HexTypes.HexBigInteger(80), new Nethereum.Hex.HexTypes.HexBigInteger(1000), pars);\n```\n\nFor other call function varients see the Nethereum [documentation](https://nethereum.com/).\n\nTo execute a transaction you can also call _Moralis.SendEvmTransactionAsync_ or _Moralis.SendTransactionAndWaitForReceiptAsync_. These functions represent only a couple of the variants available from the _Nethereum.Contracts.Function_ object.\n\n# WebGL \nDue to the way WebGL works, for security reasons, it does not support outbound calls or multi-threading. The Moralis Web3 Unity SDK depends heavily on both. For most functionality the switch between other build types and WebGL should be seemless.\n\n- **IMPORTANT** In Player Settings change the WebGL template to the Moralis WebGL Template\n\nWhen you have a file that is used for both WebGL and non-WebGL builds use the __UNITY_WEBGL__ pre-processor statement to seperate the code that will be used for each type of build. As example here is part of the using statement from the *TokenListController.cs* file from the Boilerplate Example:\n```\n#if UNITY_WEBGL\n// WebGL specific code here\n#else\n// Non WebGL code here\n#endif\n```\n\n### `Loading External Resources`\nUnder the hood, WebGL loads external resources similar to javascript using AJAX. This means that you can run into CORs issues in the client browser when loading external resources. The prescribed method to solve this issue (as settings for CORS are on the server side) is to create a proxy service. \n\nAs part of the WebGL solution example, the *TokenListController.cs* file shows how to use a Moralis Cloud function as a proxy for loading external resources. To successfully display the images of tokens in the wallet example you will need to create the following cloud function in your Moralis server.\n1. Log into Moralis, select and expand your Server instance.\n2. Click on the \"Cloud Functions\" button.\n3. Copy the following code into your Cloud Functions\n```\nMoralis.Cloud.define(\"loadResource\", async (request) =\u003e {\n  const logger = Moralis.Cloud.getLogger();\n  \n  return await Moralis.Cloud.httpRequest({\n    url: request.params.url\n  }).then(function(httpResponse) {\n    let resp = {status: httpResponse.status, headers: httpResponse.headers, data: JSON.stringify(httpResponse.buffer)};\n    return resp;\n  },function(httpResponse) {\n    // Error occurred\n    logger.error('Request failed with response code ' + httpResponse.status);\n    return httpResponse;\n  });\n}, {\n\tfields : [\"url\"]\n});\n```\n4. Click on the \"Save\" button.\n\n# 🏗 Ethereum Web3Api Methods\n\n## `Web3Api Notes`\nThe complete Moralis Web3API schema including endpoints, operations and models, can be found by logging in to your Moralis Server and selecting **Web3 API***\n\nFor use with either Moralis Web3 Unity SDK or in Unity3d, the following using statements are required:\n\n## `Chains`\nUse the code snippet below to retrieve a list of EVM chains supported in the Moralis Web3API. This list can be used for populating dropdown lists etc.\n#### Example\n```\nList\u003cChainEntry\u003e chains = Moralis.SupportedChains;\n```\n\n## `Account`\nCode examples demonstrating how to use the Moralis Web3API Account endpoint and operations.\n\n### `GetNativeBalance`\nGets native balance for a specific address\n- **address** _string_ REQUIRED Target address\n- **chain** _ChainList_ REQUIRED The chain to query\n- **providerUrl** _string_ OPTIONAL web3 provider url to user when using local dev chain\n- **toBlock** _string_ OPTIONAL The maximum block number from where to get the logs.\n#### Example\n```\nNativeBalance balance = await Moralis.Web3Api.Account.GetNativeBalance(address.ToLower(), ChainList.eth);\nDebug.Log($\"GetNativeBalance Balance: {balance.Balance}\");\n```\n\n### `GetNFTs`\nGets NFTs owned by the given address\n- **address** _string_ REQUIRED Target address\n- **chain** _ChainList_ REQUIRED The chain to query\n- **format** _string_ OPTIONAL The format of the token id\n- **offset** _integer_ OPTIONAL Offset\n- **limit** _integer_ OPTIONAL Limit\n- **order** _string_ OPTIONAL The field(s) to order on and if it should be ordered in ascending or descending order. Specified by: fieldName1.order,fieldName2.order. Example 1: \"name\", \"name.ASC\", \"name.DESC\", Example 2: \"Name and Symbol\", \"name.ASC,symbol.DESC\"\n#### Example\n```\nNftOwnerCollection nftCollection = await Moralis.Web3Api.Account.GetNFTs(userAddress, chainId);\n\nif (nftCollection.Total \u003c 1)\n{\n    Debug.Log($\"User {userAddress} does not have any NFTs on chain {chainId.ToString()}\");\n}\nelse\n{\n    Debug.Log($\"Nfts for User {userAddress}\");\n\n    foreach (NftOwner nft in nftCollection.Result)\n    {\n        Debug.Log($\"TokenId: {nft.TokenId}, Name: {nft.Name}, Balance: {nft.Amount}\");\n    }\n}\n```\n\n### `GetNFTsForContract`\nGets NFTs owned by the given address\n- **address** _string_ REQUIRED Target address\n- **tokenAddress** _string_ REQUIRED Address of the contract\n- **chain** _ChainList_ REQUIRED The chain to query\n- **format** _string_ OPTIONAL The format of the token id\n- **offset** _integer_ OPTIONAL Offset\n- **limit** _integer_ OPTIONAL Limit\n- **order** _string_ OPTIONAL The field(s) to order on and if it should be ordered in ascending or descending order. Specified by: fieldName1.order,fieldName2.order. Example 1: \"name\", \"name.ASC\", \"name.DESC\", Example 2: \"Name and Symbol\", \"name.ASC,symbol.DESC\"\n#### Example\n```\nNftOwnerCollection resp = await Moralis.Web3Api.Account.GetNFTsForContract(address.ToLower(), \"0x06012c8cf97BEaD5deAe237070F9587f8E7A266d\", ChainList.eth);\nDebug.Log($\"GetNFTsForContract Count: {resp.Total}\");\n```\n\n### `GetNFTTransfers`\nGets the transfers of the tokens matching the given parameters\n- **address** _string_ REQUIRED Target address\n- **chain** _ChainList_ REQUIRED The chain to query\n- **format** _string_ OPTIONAL The format of the token id\n- **direction** _string_ OPTIONAL The transfer direction\n- **offset** _integer_ OPTIONAL Offset\n- **limit** _integer_ OPTIONAL Limit\n- **order** _string_ OPTIONAL The field(s) to order on and if it should be ordered in ascending or descending order. Specified by: fieldName1.order,fieldName2.order. Example 1: \"name\", \"name.ASC\", \"name.DESC\", Example 2: \"Name and Symbol\", \"name.ASC,symbol.DESC\"\n#### Example\n```\nNftTransferCollection balance = await Moralis.Web3Api.Account.GetNFTTransfers(address.ToLower(), ChainList.eth);\nDebug.Log($\"GetNFTTransfers Matches: {balance.Total}\");\n```\n\n### `GetTokenBalances`\nGets token balances for a specific address\n- **address** _string_ REQUIRED Target address\n- **chain** _ChainList_ REQUIRED The chain to query\n- **subdomain** _string_ OPTIONAL The subdomain of the moralis server to use (Only use when selecting local devchain as chain)\n- **toBlock** _string_ OPTIONAL The maximum block number from where to get the logs.\n#### Example\n```\nList\u003cErc20TokenBalance\u003e balance = await Moralis.Web3Api.Account.GetTokenBalances(address.ToLower(), ChainList.eth);\nDebug.Log($\"GetTokenBalances Count: {balance.Count}\");\n```\n\n### `GetTokenTransfers`\nGets ERC20 token transactions in descending order based on block number\n- **address** _string_ REQUIRED Target address\n- **chain** _ChainList_ REQUIRED The chain to query\n- **subdomain** _string_ OPTIONAL The subdomain of the moralis server to use (Only use when selecting local devchain as chain)\n- **fromBlock** _string_ OPTIONAL The minimum block number from where to get the logs.\n- **toBlock** _string_ OPTIONAL The maximum block number from where to get the logs.\n- **fromDate** _string_ OPTIONAL The date from where to get the logs (any format that is accepted by momentjs).\n- **toDate** _string_ OPTIONAL Get the logs to this date (any format that is accepted by momentjs)\n- **offset** _integer_ OPTIONAL Offset\n- **limit** _integer_ OPTIONAL Limit\n#### Example\n```\nErc20TransactionCollection balance = await Moralis.Web3Api.Account.GetTokenTransfers(address.ToLower(), ChainList.eth);\nDebug.Log($\"GetTokenTransfers Count: {balance.Total}\");\n```\n\n### `GetTransactions`\nGets native transactions in descending order based on block number\n- **address** _string_ REQUIRED Target address\n- **chain** _ChainList_ REQUIRED The chain to query\n- **subdomain** _string_ OPTIONAL The subdomain of the moralis server to use (Only use when selecting local devchain as chain)\n- **fromBlock** _string_ OPTIONAL The minimum block number from where to get the logs.\n- **toBlock** _string_ OPTIONAL The maximum block number from where to get the logs.\n- **fromDate** _string_ OPTIONAL The date from where to get the logs (any format that is accepted by momentjs).\n- **toDate** _string_ OPTIONAL Get the logs to this date (any format that is accepted by momentjs)\n- **offset** _integer_ OPTIONAL Offset\n- **limit** _integer_ OPTIONAL Limit\n#### Example\n```\nTransactionCollection balance = await Moralis.Web3Api.Account.GetTransactions(address.ToLower(), ChainList.eth);\nDebug.Log($\"GetTransactions Count: {balance.Total}\");\n```\n\n## `Defi`\nCode examples demonstrating how to use the Moralis Web3API Defi endpoint and operations.\n\n### `GetPairAddress`\nFetches and returns pair data of the provided token0+token1 combination. The token0 and token1 options are interchangable (ie. there is no different outcome in \"token0=WETH and token1=USDT\" or \"token0=USDT and token1=WETH\")\n- **exchange** _string_ REQUIRED The factory name or address of the token exchange\n- **token0Address** _string_ REQUIRED Token0 address\n- **token1Address** _string_ REQUIRED Token1 address\n- **chain** _ChainList_ REQUIRED The chain to query\n- **toBlock** _string_ OPTIONAL The maximum block number from where to get the logs.\n- **toDate** _string_ OPTIONAL Get the logs to this date (any format that is accepted by momentjs)\n#### Example\n```\nReservesCollection nftTransers = Moralis.Web3Api.Defi.GetPairAddress(exchange, token0Address, token1Address, ChainList.eth);\n```\n\n### `GetPairReserves`\nGet the liquidity reserves for a given pair address\n- **pairAddress** _string_ REQUIRED Liquidity pair address\n- **chain** _ChainList_ REQUIRED The chain to query\n- **toBlock** _string_ OPTIONAL The maximum block number from where to get the logs.\n- **toDate** _string_ OPTIONAL Get the logs to this date (any format that is accepted by momentjs)\n- **providerUrl** _string_ OPTIONAL web3 provider url to user when using local dev chain\n#### Example\n```\nReservesCollection nftTransers = Moralis.Web3Api.Defi.GetPairReserves(pairAddress, ChainList.eth);\n```\n\n## `Native`\nCode examples demonstrating how to use the Moralis Web3API Native endpoint and operations.\n\n### `GetBlock`\nGets the contents of a block by block hash\n- **blockNumberOrHash** _string_ REQUIRED The block hash or block number\n- **chain** _ChainList_ REQUIRED The chain to query\n- **subdomain** _string_ OPTIONAL The subdomain of the moralis server to use (Only use when selecting local devchain as chain)\n#### Example\n```\nBlock block = Moralis.Web3Api.Native.GetBlock(blockNumberOrHash, ChainList.eth);\n```\n\n### `GetContractEvents`\nGets events in descending order based on block number\n- **address** _string_ REQUIRED Target address\n- **topic** _string_ REQUIRED The topic of the event. This is the hash of the function\n- **abi** _object_ REQUIRED ABI of the event being searched for. See example below for object format.\n- **chain** _ChainList_ REQUIRED The chain to query\n- **subdomain** _string_ OPTIONAL The subdomain of the moralis server to use (Only use when selecting local devchain as chain)\n- **providerUrl** _string_ OPTIONAL web3 provider url to user when using local dev chain\n- **fromBlock** _string_ OPTIONAL The minimum block number from where to get the logs.\n- **toBlock** _string_ OPTIONAL The maximum block number from where to get the logs.\n- **fromDate** _string_ OPTIONAL The date from where to get the logs (any format that is accepted by momentjs).\n- **toDate** _string_ OPTIONAL Get the logs to this date (any format that is accepted by momentjs)\n- **offset** _integer_ OPTIONAL Offset\n- **limit** _integer_ OPTIONAL Limit\n#### Example\n```\n    // Event ABI input parameters\n    object[] inputParams = new object[3];\n    inputParams[0] = new { indexed = true, internalType = \"bytes32\", name = \"role\", type = \"bytes32\" };\n    inputParams[1] = new { indexed = true, internalType = \"address\", name = \"account\", type = \"address\" };\n    inputParams[2] = new { indexed = true, internalType = \"address\", name = \"sender\", type = \"address\" };\n    // Event ABI\n    object abi = new { anonymous = false, inputs = inputParams, name = \"RoleGranted\", type = \"event\" };\n\n    List\u003cLogEvent\u003e logEvents = await Moralis.Web3Api.Native.GetContractEvents(\"0x698d7D745B7F5d8EF4fdB59CeB660050b3599AC3\", \"0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d\", abi, ChainList.mumbai);\n\n    Debug.Log($\"Contract Function returned {logEvents.Count} events\");\n```\n\n### `GetDateToBlock`\nGets the closest block of the provided date\n- **data** _string_ REQUIRED Unix date in miliseconds or a datestring (any format that is accepted by momentjs)\n- **chain** _ChainList_ REQUIRED The chain to query\n- **providerUrl** _string_ OPTIONAL web3 provider url to user when using local dev chain\n#### Example\n```\nstring blockNumberOrHash = \"25509457\";\nBlock block = await Moralis.Web3Api.Native.GetBlock(blockNumberOrHash, chainId);\nDebug.Log($\"GetBlock BlockNumber: {block.Number}, Transaction Count: {block.TransactionCount}\");\n```\n\n### `GetLogsByAddress`\nGets the logs from an address\n- **address** _string_ REQUIRED Target address\n- **chain** _ChainList_ REQUIRED The chain to query\n- **subdomain** _string_ OPTIONAL The subdomain of the moralis server to use (Only use when selecting local devchain as chain)\n- **blockNumber** _string_ OPTIONAL The block number.\n- **fromBlock** _string_ OPTIONAL The minimum block number from where to get the logs.\n- **toBlock** _string_ OPTIONAL The maximum block number from where to get the logs.\n- **fromDate** _string_ OPTIONAL The date from where to get the logs (any format that is accepted by momentjs).\n- **toDate** _string_ OPTIONAL Get the logs to this date (any format that is accepted by momentjs)\n- **topic0** _string_ OPTIONAL \n- **topic1** _string_ OPTIONAL \n- **topic2** _string_ OPTIONAL \n- **topic3** _string_ OPTIONAL \n#### Example\n```\nLogEventByAddress logEvents = await Moralis.Web3Api.Native.GetLogsByAddress(userAddress, chainId);\nDebug.Log($\"GetLogsByAddress BlockNumber: {logEvents.BlockNumber}, Transaction Count: {logEvents.Data}\");\n```\n\n### `GetNFTTransfersByBlock`\nGets NFT transfers by block number or block hash\n- **blockNumberOrHash** _string_ REQUIRED The block hash or block number\n- **chain** _ChainList_ REQUIRED The chain to query\n- **subdomain** _string_ OPTIONAL The subdomain of the moralis server to use (Only use when selecting local devchain as chain)\n#### Example\n```\nNftTransferCollection nftTransfers = await Moralis.Web3Api.Native.GetNFTTransfersByBlock(\"500000\", chainId);\nDebug.Log($\"GetNFTTransfersByBlock Nfts returned: {nftTransfers.Result.Count}\");\n```\n\n### `GetTransaction`\nGets the contents of a block transaction by hash\n- **transactionHash** _string_ REQUIRED The transaction hash\n- **chain** _ChainList_ REQUIRED The chain to query\n- **subdomain** _string_ OPTIONAL The subdomain of the moralis server to use (Only use when selecting local devchain as chain)\n#### Example\n```\nstring transactionHash = \"0xe1ec2dd9964f4dc59b53dce083917abfb5ab5191a37cb1e21566969caa614fcd\";\nBlockTransaction blockTransaction = await Moralis.Web3Api.Native.GetTransaction(transactionHash, ChainList.mumbai);\nDebug.Log($\"Block transaction BlackNumber: {blockTransaction.BlockNumber}, from Address: {blockTransaction.FromAddress}\");\n```\n\n### `RunContractFunction`\nRuns a given function of a contract abi and returns readonly data\n- **address** _string_ REQUIRED Target address\n- **abi** _object_ REQUIRED Abi of the Function being called - see example for format.\n- **chain** _ChainList_ REQUIRED The chain to query\n- **functionName** _string_ REQUIRED Function name of the target function.\n- **subdomain** _string_ OPTIONAL The subdomain of the moralis server to use (Only use when selecting local devchain as chain)\n- **providerUrl** _string_ OPTIONAL web3 provider url to user when using local dev chain\n#### Example\n```\n// Function ABI input parameters\nobject[] inputParams = new object[1];\ninputParams[0] = new { internalType = \"uint256\", name = \"id\", type = \"uint256\" };\n// Function ABI Output parameters\nobject[] outputParams = new object[1];\noutputParams[0] = new { internalType = \"string\", name = \"\", type = \"string\" };\n// Function ABI\nobject[] abi = new object[1];\nabi[0] = new { inputs = inputParams, name = \"uri\", outputs = outputParams, stateMutability = \"view\", type = \"function\" };\n\n// Define request object\nRunContractDto rcd = new RunContractDto()\n{\n    Abi = abi,\n    Params = new { id = \"15310200874782\" }\n};\n\nstring resp = await Moralis.Web3Api.Native.RunContractFunction(\"0x698d7D745B7F5d8EF4fdB59CeB660050b3599AC3\", \"uri\", rcd, ChainList.mumbai);\n\nDebug.Log($\"Contract Function returned: {resp}\");\n```\n\n## `Resolve`\nCode examples demonstrating how to use the Moralis Web3API Resolve endpoint and operations.\n\n### `ResolveDomain`\nResolves an Unstoppable domain and returns the address\n- **domain** _string_ REQUIRED Domain to be resolved\n- **currency** _string_ OPTIONAL The currency to query.\n#### Example\n```\nResolve resp = await Moralis.Web3Api.Resolve.ResolveDomain(\"brad.crypto\");\nDebug.Log($\"ResolveDomain Address: {resp.Address}\");\n```\n\n### `ResolveAddress`\nResolves an ETH address and find the ENS name\n- **address** _string_ REQUIRED The wallet address to perform reverse lookup on.\n#### Example\n```\nEns resp = await Moralis.Web3Api.Resolve.ResolveAddress(\"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045\");\nDebug.Log($\"ResolveAddress Name: {resp.Name}\");\n```\n\n## `Storage`\nCode examples demonstrating how to use the Moralis Web3API Storage endpoint and operations.\n\n### UploadFolder\nResolves an ETH address and find the ENS name\n- **request** _List\u003cIpfsFileRequest\u003e_ REQUIRED Upload Data\n#### Example\n``` \n// Define file information.\nIpfsFileRequest req = new IpfsFileRequest()\n{\n\tPath = \"moralis/logo.jpg\",\n\tContent = \"iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAApgAAAKYB3X3\"\n};\n\n// Multiple requests can be sent via a List so define the request list.\nList\u003cIpfsFileRequest\u003e reqs = new List\u003cIpfsFileRequest\u003e();\n\n// Add requests to request list.\nreqs.Add(req);\n\nList\u003cIpfsFile\u003e resp = web3Api.Storage.UploadFolder(reqs);\n```\n\n## `Token`\nCode examples demonstrating how to use the Moralis Web3API Token endpoint and operations.\n\n### `GetAllTokenIds`\nGets data, including metadata (where available), for all token ids for the given contract address.\n- **address** _string_ REQUIRED Target address\n- **chain** _ChainList_ REQUIRED The chain to query\n- **foramt** _string_ OPTIONAL The format of the token id\n- **offset** _integer_ OPTIONAL Offset\n- **limit** _integer_ OPTIONAL Limit\n- **order** _string_ OPTIONAL If the order should be Ascending or Descending based on the blocknumber on which the NFT was minted. Allowed values: \"ASC\", \"DESC\"\n#### Example\n```\nNftCollection resp = await Moralis.Web3Api.Token.GetAllTokenIds(\"0x06012c8cf97BEaD5deAe237070F9587f8E7A266d\", ChainList.eth, null, 0, 10);\nDebug.Log($\"GetAllTokenIds returned {resp.Total} Nfts\");\n```\n\n### `GetContractNFTTransfers`\nGets the transfers of the tokens matching the given parameters\n- **address** _string_ REQUIRED Target address\n- **chain** _ChainList_ REQUIRED The chain to query\n- **foramt** _string_ OPTIONAL The format of the token id\n- **offset** _integer_ OPTIONAL Offset\n- **limit** _integer_ OPTIONAL Limit\n- **order** _string_ OPTIONAL If the order should be Ascending or Descending based on the blocknumber on which the NFT was minted. Allowed values: \"ASC\", \"DESC\"\n#### Example\n```\nNftTransferCollection resp = await Moralis.Web3Api.Token.GetContractNFTTransfers(\"0x06012c8cf97BEaD5deAe237070F9587f8E7A266d\", ChainList.eth, null, 0, 10);\nDebug.Log($\"GetContractNFTTransfers returned {resp.Total} Nft transfer entries\");\n```\n\n### `GetNFTLowestPrice`\nGet the lowest price found for a nft token contract for the last x days (only trades paid in ETH)\n- **address** _string_ REQUIRED Target address\n- **chain** _ChainList_ REQUIRED The chain to query\n- **days** _integer_ OPTIONAL Offset\n- **providerUrl** _string_ OPTIONAL web3 provider url to user when using local dev chain\n- **marketplace** _string_ OPTIONAL web3 marketplace from where to get the trades (only opensea is supported at the moment)\n#### Example\n```\nTrade resp = await Moralis.Web3Api.Token.GetNFTLowestPrice(\"0x06012c8cf97BEaD5deAe237070F9587f8E7A266d\", ChainList.eth, 2000);\nDebug.Log($\"GetNFTLowestPrice Price: {resp.Price}\");\n```\n\n### `GetNFTMetadata`\nGets the contract level metadata (name, symbol, base token uri) for the given contract\n- **address** _string_ REQUIRED Target address\n- **chain** _ChainList_ REQUIRED The chain to query\n#### Example\n```\nNftContractMetadata resp = await Moralis.Web3Api.Token.GetNFTMetadata(\"0x06012c8cf97BEaD5deAe237070F9587f8E7A266d\", ChainList.eth);\nDebug.Log($\"GetNFTMetadata Name: {resp.Name}, TokenAddress: {resp.TokenAddress}\");\n```\n\n### `GetNFTOwners`\nGets all owners of NFT items within a given contract collection\n- **address** _string_ REQUIRED Target address\n- **chain** _ChainList_ REQUIRED The chain to query\n- **format** _string_ OPTIONAL The format of the token id\n- **offset** _integer_ OPTIONAL Offset\n- **limit** _integer_ OPTIONAL Limit\n- **order** _string_ OPTIONAL If the order should be Ascending or Descending based on the blocknumber on which the NFT was minted. Allowed values: \"ASC\", \"DESC\"\n#### Example\n```\nNftOwnerCollection resp = await Moralis.Web3Api.Token.GetNFTOwners(\"0x06012c8cf97BEaD5deAe237070F9587f8E7A266d\", ChainList.eth, null, 0, 10);\nDebug.Log($\"GetNFTOwners returned {resp.Total} Nft Owner records\");\n```\n\n### `GetNFTTrades`\nGet the nft trades for a given contracts and marketplace\n- **address** _string_ REQUIRED Target address\n- **chain** _ChainList_ REQUIRED The chain to query\n- **fromBlock** _string_ OPTIONAL The minimum block number from where to get the logs.\n- **toBlock** _string_ OPTIONAL The maximum block number from where to get the logs.\n- **fromDate** _string_ OPTIONAL The date from where to get the logs (any format that is accepted by momentjs).\n- **toDate** _string_ OPTIONAL Get the logs to this date (any format that is accepted by momentjs)\n- **providerUrl** _string_ OPTIONAL web3 provider url to user when using local dev chain\n- **marketplace** _string_ OPTIONAL web3 marketplace from where to get the trades (only opensea is supported at the moment)\n- **offset** _integer_ OPTIONAL Offset\n- **limit** _integer_ OPTIONAL Limit\n#### Example\n```\nTradeCollection resp = await Moralis.Web3Api.Token.GetNFTTrades(\"0x06012c8cf97BEaD5deAe237070F9587f8E7A266d\", ChainList.eth, null, null, null, null, null, null, 0, 10);\nDebug.Log($\"GetNFTTrades returned {resp.Total} Nft trades\");\n```\n\n### `GetNftTransfersFromToBlock`\nGets the transfers of the tokens from a block number to a block number\n- **chain** _ChainList_ REQUIRED The chain to query\n- **fromBlock** _string_ OPTIONAL The minimum block number from where to get the logs.\n- **toBlock** _string_ OPTIONAL The maximum block number from where to get the logs.\n- **fromDate** _string_ OPTIONAL The date from where to get the logs (any format that is accepted by momentjs).\n- **toDate** _string_ OPTIONAL Get the logs to this date (any format that is accepted by momentjs)\n- **format** _string_ OPTIONAL The format of the token id\n- **offset** _integer_ OPTIONAL Offset\n- **limit** _integer_ OPTIONAL Limit\n- **order** _string_ OPTIONAL If the order should be Ascending or Descending based on the blocknumber on which the NFT was minted. Allowed values: \"ASC\", \"DESC\"\n#### Example\n```\nNftTransferCollection resp = await Moralis.Web3Api.Token.GetNftTransfersFromToBlock(ChainList.eth, 99999, 25999999, null, null, null, 0, 10);\nDebug.Log($\"GetNftTransfersFromToBlock returned {resp.Total} Nft Transfers\");\n```\n\n### `GetTokenAddressTransfers`\nGets ERC20 token contract transactions in descending order based on block number\n- **address** _string_ REQUIRED Target address\n- **chain** _ChainList_ REQUIRED The chain to query\n- **subdomain** _string_ OPTIONAL The subdomain of the moralis server to use (Only use when selecting local devchain as chain)\n- **fromBlock** _string_ OPTIONAL The minimum block number from where to get the logs.\n- **toBlock** _string_ OPTIONAL The maximum block number from where to get the logs.\n- **fromDate** _string_ OPTIONAL The date from where to get the logs (any format that is accepted by momentjs).\n- **toDate** _string_ OPTIONAL Get the logs to this date (any format that is accepted by momentjs)\n- **offset** _integer_ OPTIONAL Offset\n- **limit** _integer_ OPTIONAL Limit\n#### Example\n```\nErc20TransactionCollection resp = await Moralis.Web3Api.Token.GetTokenAddressTransfers(\"0x06012c8cf97BEaD5deAe237070F9587f8E7A266d\", ChainList.eth, null, null, null, null, null, 0, 10);\nDebug.Log($\"GetTokenAddressTransfers returned {resp.Total} transfer entries\");\n```\n\n### `GetTokenAllowance`\nGets the amount which the spender is allowed to withdraw from the spender\n- **address** _string_ REQUIRED Target address\n- **ownerAddress** _string_ REQUIRED Target address\n- **spenderAddress** _string_ REQUIRED Target address\n- **chain** _ChainList_ REQUIRED The chain to query\n- **providerUrl** _string_ OPTIONAL web3 provider url to user when using local dev chain\n#### Example\n```\nErc20Allowance allowance = Moralis.Web3Api.Token.GetTokenAllowance(address, ownerAddress, spenderAddress, ChainList.eth);\n```\n\n### `GetTokenIdMetadata`\nGets data, including metadata (where available), for the given token id of the given contract address.\n- **address** _string_ REQUIRED Target address\n- **tokenId** _string_ REQUIRED The id of the token\n- **chain** _ChainList_ REQUIRED The chain to query\n- **foramt** _string_ OPTIONAL The format of the token id\n#### Example\n```\nNft resp = await Moralis.Web3Api.Token.GetTokenIdMetadata(\"0x06012c8cf97BEaD5deAe237070F9587f8E7A266d\", \"10\", ChainList.eth);\nDebug.Log($\"GetTokenIdMetadata Name: {resp.Name}, Amount: {resp.Amount}\");\n```\n\n### `GetTokenIdOwners`\nGets all owners of NFT items within a given contract collection\n- **address** _string_ REQUIRED Target address\n- **tokenId** _string_ REQUIRED The id of the token\n- **chain** _ChainList_ REQUIRED The chain to query\n- **foramt** _string_ OPTIONAL The format of the token id\n- **offset** _integer_ OPTIONAL Offset\n- **limit** _integer_ OPTIONAL Limit\n- **order** _string_ OPTIONAL If the order should be Ascending or Descending based on the blocknumber on which the NFT was minted. Allowed values: \"ASC\", \"DESC\"\n#### Example\n```\nNftOwnerCollection resp = await Moralis.Web3Api.Token.GetTokenIdOwners(\"0x06012c8cf97BEaD5deAe237070F9587f8E7A266d\", \"10\", ChainList.eth, null, 0, 10);\nDebug.Log($\"GetTokenIdOwners returned {resp.Total} Nfts\");\n```\n\n### `GetTokenMetadata`\nReturns metadata (name, symbol, decimals, logo) for a given token contract address.\n- **address** _List\u003cstring\u003e_ REQUIRED Target address\n- **chain** _ChainList_ REQUIRED The chain to query\n- **subdomain** _string_ OPTIONAL The subdomain of the moralis server to use (Only use when selecting local devchain as chain)\n- **providerUrl** _string_ OPTIONAL web3 provider url to user when using local dev chain\n#### Example\n```\nList\u003cstring\u003e addresses = new List\u003cstring\u003e();\naddresses.Add(\"0x6b175474e89094c44da98b954eedeac495271d0f\");\nList\u003cErc20Metadata\u003e resp = await Moralis.Web3Api.Token.GetTokenMetadata(addresses, ChainList.eth);\nDebug.Log($\"GetTokenMetadata returned {resp.Count} entries.\");\n```\n\n### `GetTokenMetadataBySymbol`\nReturns metadata (name, symbol, decimals, logo) for a given token contract address.\n- **symbols** _List\u003cstring\u003e_ REQUIRED Target address\n- **chain** _ChainList_ REQUIRED The symbols to get metadata for\n- **subdomain** _string_ OPTIONAL The subdomain of the moralis server to use (Only use when selecting local devchain as chain)\n#### Example\n```\nList\u003cstring\u003e symbols = new List\u003cstring\u003e();\nsymbols.Add(\"DAI\");\nList\u003cErc20Metadata\u003e resp = await Moralis.Web3Api.Token.GetTokenMetadataBySymbol(symbols, ChainList.eth);\nDebug.Log($\"GetTokenMetadataBySymbol returned {resp.Count} entries.\");\n```\n\n### `GetTokenPrice`\nReturns the price nominated in the native token and usd for a given token contract address.\n- **address** _string_ REQUIRED Target address\n- **chain** _ChainList_ REQUIRED The chain to query\n- **providerUrl** _string_ OPTIONAL web3 provider url to user when using local dev chain\n- **exchange** _string_ OPTIONAL The factory name or address of the token exchange\n- **toBlock** _string_ OPTIONAL The maximum block number from where to get the logs.\n#### Example\n```\nErc20Price resp = await Moralis.Web3Api.Token.GetTokenPrice(\"0x6b175474e89094c44da98b954eedeac495271d0f\", ChainList.eth);\nDebug.Log($\"GetTokenPrice Price: {resp.UsdPrice} USD\");\n```\n\n### `GetWalletTokenIdTransfers`\nGets the transfers of the tokens matching the given parameters\n- **address** _string_ REQUIRED Target address\n- **tokenId** _string_ REQUIRED The id of the token\n- **chain** _ChainList_ REQUIRED The chain to query\n- **foramt** _string_ OPTIONAL The format of the token id\n- **offset** _integer_ OPTIONAL Offset\n- **limit** _integer_ OPTIONAL Limit\n- **order** _string_ OPTIONAL If the order should be Ascending or Descending based on the blocknumber on which the NFT was minted. Allowed values: \"ASC\", \"DESC\"\n#### Example\n```\nNftTransferCollection resp = await Moralis.Web3Api.Token.GetWalletTokenIdTransfers(\"0x06012c8cf97BEaD5deAe237070F9587f8E7A266d\", \"10\", ChainList.eth, null, 0, 10);\nDebug.Log($\"GetWalletTokenIdTransfers returned {resp.Total} Nfts\");\n```\n\n### `SearchNFTs`\nGets NFTs that match a given metadata search.\n- **q** _string_ REQUIRED The search string\n- **chain** _ChainList_ REQUIRED The chain to query\n- **foramt** _string_ OPTIONAL The format of the token id\n- **filter** _string_ OPTIONAL What fields the search should match on. To look into the entire metadata set the value to 'global'. To have a better response time you can look into a specific field like name. Available values : name, description, attributes, global, name,description, name,attributes, description,attributes, name,description,attributes\n- **fromBlock** _string_ OPTIONAL The minimum block number from where to get the logs.\n- **toBlock** _string_ OPTIONAL The maximum block number from where to get the logs.\n- **fromDate** _string_ OPTIONAL The date from where to get the logs (any format that is accepted by momentjs).\n- **toDate** _string_ OPTIONAL Get the logs to this date (any format that is accepted by momentjs)\n- **offset** _integer_ OPTIONAL Offset\n- **limit** _integer_ OPTIONAL Limit\n#### Example\n```\nNftMetadataCollection resp = await Moralis.Web3Api.Token.SearchNFTs(\"Apes\", ChainList.eth, null, null, null, null, null, null, 0, 10);\nDebug.Log($\"SearchNFTs returned {resp.Total} Nfts\");\n```\n\n# 🏗 Solana Api Methods\n\n## Solana Account\n\n### `Solana Balance`\n```\nNativeBalance bal = await Moralis.SolanaApi.Account.Balance(NetworkTypes.mainnet, \"6XU36wCxWobLx5Rtsb58kmgAJKVYmMVqy4SHXxENAyAe\");\n```\n\n### `Solana GetNFTs`\n```\nList\u003cSplNft\u003e bal = await Moralis.SolanaApi.Account.GetNFTs(NetworkTypes.mainnet, \"6XU36wCxWobLx5Rtsb58kmgAJKVYmMVqy4SHXxENAyAe\");\n```\n\n### `Solana GetPortfolio`\n```\nPortfolio bal = await Moralis.SolanaApi.Account.GetPortfolio(NetworkTypes.mainnet, \"6XU36wCxWobLx5Rtsb58kmgAJKVYmMVqy4SHXxENAyAe\");\n```\n\n### `Solana GetSplTokens`\n```\nList\u003cSplTokenBalanace\u003e bal = await Moralis.SolanaApi.Account.GetSplTokens(NetworkTypes.mainnet, \"6XU36wCxWobLx5Rtsb58kmgAJKVYmMVqy4SHXxENAyAe\");\n```\n\n## Solana NFT\n\n### `Solana GetNFTMetadata`\n```\nNftMetadata bal = await Moralis.SolanaApi.Nft.GetNFTMetadata(NetworkTypes.mainnet, \"6XU36wCxWobLx5Rtsb58kmgAJKVYmMVqy4SHXxENAyAe\");\n```\n\n# Helpful Tools\n1. [Unity3d Assets](https://assetstore.unity.com/)\n    The best place to find Unity3d Assets for a range of budgets.\n2. [The Gimp](https://www.gimp.org/)\n    Open source image editing tool\n3. [Blender](https://www.blender.org/)\n    Open source tool for creating 3D models, animations, textures, and everything else you need for game characters and objects.\n4. [Maximo](https://www.mixamo.com/)\n    Free to use (with registration) Animations for humanoid rigged models.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoralisweb3%2Funity-web3-game-kit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoralisweb3%2Funity-web3-game-kit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoralisweb3%2Funity-web3-game-kit/lists"}