这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions ChainSafe.Gaming.sln
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChainSafe.Gaming.HyperPlay"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChainSafe.Gaming.Unity.EthereumWindow", "src\ChainSafe.Gaming.Unity.EthereumWindow\ChainSafe.Gaming.Unity.EthereumWindow.csproj", "{F743DE56-1650-4111-8613-96E8EC7CFD2D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChainSafe.Gaming.Mud", "src\ChainSafe.Gaming.Mud\ChainSafe.Gaming.Mud.csproj", "{084E4FCB-9376-4B29-AA8C-6871E13906E6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -153,6 +155,12 @@ Global
{F743DE56-1650-4111-8613-96E8EC7CFD2D}.Release|Any CPU.Build.0 = Release|Any CPU
{F743DE56-1650-4111-8613-96E8EC7CFD2D}.Test|Any CPU.ActiveCfg = Debug|Any CPU
{F743DE56-1650-4111-8613-96E8EC7CFD2D}.Test|Any CPU.Build.0 = Debug|Any CPU
{084E4FCB-9376-4B29-AA8C-6871E13906E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{084E4FCB-9376-4B29-AA8C-6871E13906E6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{084E4FCB-9376-4B29-AA8C-6871E13906E6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{084E4FCB-9376-4B29-AA8C-6871E13906E6}.Release|Any CPU.Build.0 = Release|Any CPU
{084E4FCB-9376-4B29-AA8C-6871E13906E6}.Test|Any CPU.ActiveCfg = Debug|Any CPU
{084E4FCB-9376-4B29-AA8C-6871E13906E6}.Test|Any CPU.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
2 changes: 2 additions & 0 deletions ChainSafe.Gaming.sln.DotSettings
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/UserDictionary/Words/=Nethereum/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
8 changes: 8 additions & 0 deletions Packages/io.chainsafe.web3-unity.mud/Runtime.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Packages/io.chainsafe.web3-unity.mud/Runtime/Libraries.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions Packages/io.chainsafe.web3-unity.mud/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "io.chainsafe.web3-unity.mud",
"version": "2.7.0",
"displayName": "web3.unity SDK MUD",
"description": "This package includes the integration of MUD, which you can use with our Gaming SDK.",
"license": "LGPL-3.0-only",
"licensesUrl": "https://github.com/ChainSafe/web3.unity/blob/main/LICENSE",
"documentationUrl": "https://docs.gaming.chainsafe.io/",
"dependencies": {
"io.chainsafe.web3-unity": "2.6.1"
},
"keywords": [
"web3",
"ethereum",
"evm",
"blockchain",
"nft",
"marketplace",
"mud"
],
"author": {
"name": "ChainSafe Gaming",
"email": "bd@chainsafe.io",
"url": "https://gaming.chainsafe.io/"
}
}
7 changes: 7 additions & 0 deletions Packages/io.chainsafe.web3-unity.mud/package.json.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,12 +1,38 @@
using System.Collections;
using System.Collections.Generic;
using System.IO;
using ChainSafe.Gaming.Web3;
using UnityEngine;

namespace ChainSafe.Gaming.UnityPackage
{
public static class ProjectConfigUtilities
{
private class LocalhostChainConfig : IChainConfig
{
public LocalhostChainConfig(string chainId, string symbol, string chain, string network, string port)
{
var localhostEndPoint = $"127.0.0.1:{port}";

ChainId = chainId;
Symbol = symbol;
Chain = chain;
Network = network;
Rpc = $"http://{localhostEndPoint}";
Ws = $"$ws://{localhostEndPoint}";
BlockExplorerUrl = $"http://{localhostEndPoint}";
}

public string ChainId { get; }
public string Symbol { get; }
public string Chain { get; }
public string Network { get; }
public string Rpc { get; }
public string Ipc => null;
public string Ws { get; }
public string BlockExplorerUrl { get; }
}

private const string AssetName = "ProjectConfigData";

public static ProjectConfigScriptableObject Load()
Expand All @@ -33,6 +59,12 @@ public static ProjectConfigScriptableObject Create(string projectId, string chai
return projectConfig;
}

public static IChainConfig BuildLocalhostConfig(string port = "8545", string chainId = "31337",
string chain = "Anvil", string symbol = "ETH", string network = "GoChain Testnet")
{
return new LocalhostChainConfig(chainId, symbol, chain, network, port);
}

#if UNITY_EDITOR
public static ProjectConfigScriptableObject CreateOrLoad()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public class WalletConnectConfigSO : ScriptableObject, IWalletConnectConfig
[field: SerializeField] public Metadata Metadata { get; set; }
[field: SerializeField] public string StoragePath { get; set; } = "wallet-connect/";
[field: SerializeField] public string OverrideRegistryUri { get; set; }
[field: SerializeField] public WalletConnectLogLevel LogLevel { get; set; } = WalletConnectLogLevel.ErrorOnly;
[SerializeField] private List<string> enabledWallets;
[SerializeField] private List<string> disabledWallets;
[SerializeField] private ConnectionHandlerProviderSO connectionHandlerProvider;
Expand Down
Binary file modified libs/Nethereum-UnityAOT/Nethereum.ABI.dll
Binary file not shown.
Binary file modified libs/Nethereum-UnityAOT/Nethereum.Accounts.dll
Binary file not shown.
Binary file modified libs/Nethereum-UnityAOT/Nethereum.BlockchainProcessing.dll
Binary file not shown.
Binary file modified libs/Nethereum-UnityAOT/Nethereum.Contracts.dll
Binary file not shown.
Binary file modified libs/Nethereum-UnityAOT/Nethereum.Hex.dll
Binary file not shown.
Binary file modified libs/Nethereum-UnityAOT/Nethereum.JsonRpc.Client.dll
Binary file not shown.
Binary file not shown.
Binary file modified libs/Nethereum-UnityAOT/Nethereum.JsonRpc.RpcClient.dll
Binary file not shown.
Binary file modified libs/Nethereum-UnityAOT/Nethereum.KeyStore.dll
Binary file not shown.
Binary file modified libs/Nethereum-UnityAOT/Nethereum.Merkle.Patricia.dll
Binary file not shown.
Binary file modified libs/Nethereum-UnityAOT/Nethereum.Merkle.dll
Binary file not shown.
Binary file modified libs/Nethereum-UnityAOT/Nethereum.Metamask.dll
Binary file not shown.
Binary file modified libs/Nethereum-UnityAOT/Nethereum.Model.dll
Binary file not shown.
Binary file not shown.
Binary file added libs/Nethereum-UnityAOT/Nethereum.Mud.dll
Binary file not shown.
Binary file modified libs/Nethereum-UnityAOT/Nethereum.RLP.dll
Binary file not shown.
Binary file modified libs/Nethereum-UnityAOT/Nethereum.RPC.dll
Binary file not shown.
Binary file modified libs/Nethereum-UnityAOT/Nethereum.Signer.EIP712.dll
Binary file not shown.
Binary file modified libs/Nethereum-UnityAOT/Nethereum.Signer.dll
Binary file not shown.
Binary file modified libs/Nethereum-UnityAOT/Nethereum.Siwe.Core.dll
Binary file not shown.
Binary file modified libs/Nethereum-UnityAOT/Nethereum.Siwe.dll
Binary file not shown.
Binary file modified libs/Nethereum-UnityAOT/Nethereum.UI.dll
Binary file not shown.
Binary file modified libs/Nethereum-UnityAOT/Nethereum.Util.dll
Binary file not shown.
Binary file modified libs/Nethereum-UnityAOT/Nethereum.Web3.dll
Binary file not shown.
6 changes: 5 additions & 1 deletion scripts/data/published_dependencies.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,8 @@ Packages/io.chainsafe.web3-unity.lootboxes/Chainlink/Runtime/Libraries/:
Chainsafe.Gaming.Chainlink.dll
ChainSafe.Gaming.Lootboxes.Chainlink.dll
Packages/io.chainsafe.web3-unity.hyperplay/Runtime/Libraries/:
ChainSafe.Gaming.HyperPlay.dll
ChainSafe.Gaming.HyperPlay.dll
Packages/io.chainsafe.web3-unity.mud/Runtime/Libraries/:
ChainSafe.Gaming.Mud.dll
Nethereum.Mud.dll
Nethereum.Mud.Contracts.dll
70 changes: 37 additions & 33 deletions scripts/debug-publish-to-unity-package.bat
Original file line number Diff line number Diff line change
@@ -1,43 +1,47 @@


SET SCRIPT_DIR=%~dp0

setlocal enabledelayedexpansion

echo Building project...
pushd "%SCRIPT_DIR%\..\src\ChainSafe.Gaming.Unity"

del obj /F /Q
del bin /F /Q
dotnet restore
dotnet publish -c debug -f netstandard2.1 /property:Unity=true
if %errorlevel% neq 0 exit /b %errorlevel%

echo Restoring non-Unity packages...

echo Moving files to Unity package...

pushd bin\debug\netstandard2.1\publish
del Newtonsoft.Json.dll
del UnityEngine.dll

if exist "..\..\..\..\..\..\Packages\io.chainsafe.web3-unity.lootboxes" (
echo Directory exists, performing actions...
rmdir /s /q "..\..\..\..\..\..\Packages\io.chainsafe.web3-unity.lootboxes\Chainlink\Runtime\Libraries"
mkdir "..\..\..\..\..\..\Packages\io.chainsafe.web3-unity.lootboxes\Chainlink\Runtime\Libraries"
copy Chainsafe.Gaming.Chainlink.dll "..\..\..\..\..\..\Packages\io.chainsafe.web3-unity.lootboxes\Chainlink\Runtime\Libraries"
copy Chainsafe.Gaming.LootBoxes.Chainlink.dll "..\..\..\..\..\..\Packages\io.chainsafe.web3-unity.lootboxes\Chainlink\Runtime\Libraries"
) else (
echo Directory does not exist, skipping actions.
rem Publish the project
dotnet publish ChainSafe.Gaming.Unity.csproj -c Debug /property:Unity=true

set PUBLISH_PATH=bin\Debug\netstandard2.1\publish

rem List generated DLLs
echo DLLs Generated
dir /b "%PUBLISH_PATH%"

set PACKAGE_LIB_PATH=

rem Read and process each line from the dependencies file
for /f "usebackq tokens=*" %%A in ("%SCRIPT_DIR%\data\published_dependencies.txt") do (

set entry=%%A

rem Check if the line ends with a colon
if "!entry:~-1!" == ":" (
set "PACKAGE_LIB_PATH=%SCRIPT_DIR%..\!entry:~0,-1!"
if exist "!PACKAGE_LIB_PATH!\" (
del /q "!PACKAGE_LIB_PATH!\*.dll"
) else (
mkdir "!PACKAGE_LIB_PATH!"
)

echo Copying to !PACKAGE_LIB_PATH!...
) else (
set "DEPENDENCY=!entry: =!"
copy /y "%PUBLISH_PATH%\!DEPENDENCY!" "!PACKAGE_LIB_PATH!"
)
)

del Chainsafe.Gaming.Chainlink.dll
del Chainsafe.Gaming.LootBoxes.Chainlink.dll

del Microsoft.CSharp.dll
if not exist ..\..\..\..\..\..\Packages\io.chainsafe.web3-unity\Runtime\Libraries mkdir ..\..\..\..\..\..\Packages\io.chainsafe.web3-unity\Runtime\Libraries\
del ..\..\..\..\..\..\Packages\io.chainsafe.web3-unity\Runtime\Libraries\* /F /Q
copy *.dll ..\..\..\..\..\..\Packages\io.chainsafe.web3-unity\Runtime\Libraries
copy *.pdb ..\..\..\..\..\..\Packages\io.chainsafe.web3-unity\Runtime\Libraries
popd

rem Restore solution
pushd "..\"
dotnet restore
popd

echo Done
echo Done
Loading