This is a lightweight Unreal Engine 4 Ethereum plugin. This plugin provides basic ethereum wallet features. You can use Major Ethereum functions with Blueprint node. Or you can modify the plugin as you wish. 4.19, 4.20, 4.21 compatible.
This plugin provides:
- Make Signed Transaction
- Make Random Private Key
- Private Key to Address
There is no web3provider on this plugin. You should fetch nonce, or gasprice... using rest api(e.g. VaRest)
If you want to make smart-contract transaction, you should make data from somewhere and put it into the data field of the makeSignedTransaction node.
Maybe you want to have your random source more entrophy. See function string makeRandomPrivateKey(int seed) from Source/GameperETH/eth.cpp.
- Download this repository.
- Put this directory into the YourProject/Plugins/
- Enable GameperETH on the Unreal Plugin window.
UFUNCTION(BlueprintCallable, meta = (DisplayName = "Make Signed Transaction", Keywords = "Ethereum"), Category = "GameperETH")
static FString GameperETH_MakeSignedTransaction(
const FString& nonce,
const FString& gasPrice,
const FString& gasLimit,
const FString& value,
const FString& data,
const FString& to,
const FString& chainID,
const FString& privatekey
);
UFUNCTION(BlueprintCallable, meta = (DisplayName = "Make Random PrivateKey", Keywords = "Ethereum"), Category = "GameperETH")
static FString GameperETH_makeRandomPrivateKey(/*const uint32 seed*/);
UFUNCTION(BlueprintCallable, meta = (DisplayName = "PrivateKey To Address", Keywords = "Ethereum"), Category = "GameperETH")
static FString GameperETH_getAddress(const FString& privatekey);
Reference from