Unity Libraries
Nethereum is a .NET integration library for Ethereum, enabling developers to interact with EVM chains and smart contracts using the C# programming language. It provides a set of APIs and utilities to facilitate communication with the Ethereum blockchain.
The main features of this web3 library are:
- JSON RPC / IPC Ethereum core methods
- Simplified smart contract interaction for deployment, function calling, transaction and event filtering and decoding of topics
- Unity 3d integration
- ABI to .Net type encoding and decoding, including attribute-based for complex object serialization
- Libraries for standard contracts Token, ENS and Uport
- Key storage using Web3 storage standard, compatible with Geth and Parity.
Implementation Example
The Nethereum.Unity library is a Nethereum specific Unity library and api which provides support for UnityWebRequest to interact with Ethereum using RPC over Http.
All Nethereum releases can be found here.
The following example showcases how to get the current balance of a wallet.
Get Balance Example
Nethereum Playground
In order to quickly experiment Nethereum library and it’s capabilities, it was created a platform where developers can learn and run predefined examples that show how to make some requests. It can be useful to help developers deciding if Nethereum is a good fit for their project. To try it out check https://playground.nethereum.com/.
Additional Nethereum Documentation
Click here for the official documentation.
When some platforms or frameworks don't have any quality web3 library or SDK, there's always the possibility to make the blockchain calls directly to the JSON-RPC methods supported by the chain.
Some of the JSON-RPC methods supported by SKALE chains are:
- eth_getBalance
- eth_blockNumber
- eth_getTransactionCount
- eth_sendTransaction
- eth_call
Implementation Example
Get Balance
Additional JSON-RPC Calls Documentation
Click here for the official documentation.
An optimized c++ implementation for mining sFUEL (Skale gas) in Unity3D, developed by Cryptopia. This library provides an efficient and minimal API for managing the POW gas mining processes tailored for the Skale network.
The main features of this library are:
- Optimized Mining: Designed specifically for Unity3D to mine sFUEL efficiently.
- Precompiled Binaries: Ready-to-use binaries for quick integration.
- Unity Integration: Minimal effort required to get started within Unity projects.
Getting Started
Using Precompiled Binaries (Recommended)
-
Download Binaries:
- Download the latest Cryptopia.SkaleGasMiner binaries from the Release Page.
-
Add to Unity Project:
- Copy the
.dll
(for Windows) and/or.bundle
(for macOS) into your Unity project’sAssets/Plugins
folder.
- Copy the
-
Use in Unity Scripts:
- Create C# scripts to interact with the miner as described below.
Integration with Unity
To use the Cryptopia.SkaleGasMiner
binary in a Unity project, follow these steps:
-
Import the DLL: Copy the
Cryptopia.SkaleGasMiner.dll
(or.bundle
for macOS) files into your Unity project’sAssets/Plugins
folder. -
Create a C# Script: In your Unity project, create a C# script to interface with the DLL. Use
[DllImport]
to import the functions from the DLL. -
Implement Function Wrappers: Write C# wrapper functions that call the imported DLL functions:
-
Call Function Wrappers: Use the C# wrapper functions. For example:
-
Stop Mining: Call the
_Stop()
function to halt mining operations:
Repository
The source code for the Cryptopia.SkaleGasMiner is available at the GitHub Repository.
Additional Cryptopia.SkaleGasMiner Documentation
Click here for the official documentation.