这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
b535637
Revert "automated duplicating imported samples modifications (#595)"
robGG1997 Sep 14, 2023
95fb832
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Sep 14, 2023
e3ab3c2
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Sep 14, 2023
a536df0
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Sep 15, 2023
c12a0de
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Sep 18, 2023
8e1ea0a
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Sep 18, 2023
1318cd7
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Sep 21, 2023
33b8e52
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Sep 22, 2023
0a205bd
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Sep 25, 2023
df4795a
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Sep 29, 2023
abc34f6
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Sep 29, 2023
031e8d3
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Oct 18, 2023
3a4bdd9
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Oct 24, 2023
67d871d
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Oct 25, 2023
3c1d099
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Oct 30, 2023
ed22cb7
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Oct 31, 2023
4c8b282
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 1, 2023
ea609de
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 2, 2023
adcb974
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 2, 2023
77dd93a
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 3, 2023
12af139
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 7, 2023
3080de3
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 8, 2023
87a1dcc
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 8, 2023
f25d202
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 9, 2023
300d906
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 14, 2023
f28d9f4
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 16, 2023
ab26fa3
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 17, 2023
c5c0cb4
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 17, 2023
a1671d7
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 20, 2023
a4755d1
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 21, 2023
0398dba
added WebGL threading patcher from - https://github.com/VolodymyrBS/W…
robGG1997 Nov 21, 2023
6ca4ea7
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 21, 2023
07cee0a
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 22, 2023
38556cc
Merge branch 'main' into rob/meta-mask-integration-517
robGG1997 Nov 22, 2023
f2bb351
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 23, 2023
b064568
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 23, 2023
02606c0
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 23, 2023
6644661
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 27, 2023
b01d623
Merge branch 'main' into rob/meta-mask-integration-517
robGG1997 Nov 28, 2023
06cb9d9
working demo and build
robGG1997 Nov 29, 2023
9d94727
Revert "working demo and build"
robGG1997 Nov 29, 2023
50b8233
first MetaMask iteration
robGG1997 Dec 4, 2023
83cd504
Auto-duplicate Packages Samples
robGG1997 Dec 4, 2023
7505fbc
Merge branch 'main' into rob/meta-mask-integration-517
robGG1997 Dec 4, 2023
656694b
added new custom dlls for Neth.MetaMask
robGG1997 Dec 4, 2023
1afb96b
Merge branch 'rob/meta-mask-integration-517' of https://github.com/Ch…
robGG1997 Dec 4, 2023
df018f1
typo and compile error fixes
robGG1997 Dec 4, 2023
c384705
Published Solution Dependencies to Package Libraries as DLLs
robGG1997 Dec 4, 2023
f678de7
sign message and sign typed data implemented and working, send transa…
robGG1997 Dec 5, 2023
8985423
Merge branch 'rob/meta-mask-integration-517' of https://github.com/Ch…
robGG1997 Dec 5, 2023
1db5064
fixed send Transaction issue
robGG1997 Dec 6, 2023
ab522af
simultaneous requests supported and fixed send transaction issue
robGG1997 Dec 6, 2023
064dc34
refactor and documentation
robGG1997 Dec 6, 2023
93e8fbe
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Dec 6, 2023
6cdf5f8
merged from main
robGG1997 Dec 6, 2023
33ea61e
Auto-duplicate Packages Samples
robGG1997 Dec 6, 2023
2c73fa8
Published Solution Dependencies to Package Libraries as DLLs
robGG1997 Dec 6, 2023
909030d
set exception if connection fails
robGG1997 Dec 6, 2023
8545dcd
added required line in index.html in WebGL template
robGG1997 Dec 7, 2023
5881543
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Dec 7, 2023
9b82f63
merged from main
robGG1997 Dec 7, 2023
c432ae5
Published Solution Dependencies to Package Libraries as DLLs
robGG1997 Dec 7, 2023
9eb00fe
Published Solution Dependencies to Package Libraries as DLLs
robGG1997 Dec 7, 2023
43b0d97
libc Dll not found exception fixed
robGG1997 Dec 8, 2023
4a6c27a
Published Solution Dependencies to Package Libraries as DLLs
robGG1997 Dec 8, 2023
a4cd6fa
Published Solution Dependencies to Package Libraries as DLLs
robGG1997 Dec 8, 2023
849d1f4
Published Solution Dependencies to Package Libraries as DLLs
robGG1997 Dec 8, 2023
aab9ddc
made requested changes
robGG1997 Dec 11, 2023
6dd42f9
Published Solution Dependencies to Package Libraries as DLLs
robGG1997 Dec 11, 2023
819b2ab
more requested changes
robGG1997 Dec 11, 2023
bf2881c
merged wallet connect extension methods
robGG1997 Dec 11, 2023
54a2bdc
Merge branch 'rob/meta-mask-integration-517' of https://github.com/Ch…
robGG1997 Dec 11, 2023
2dfdd11
Published Solution Dependencies to Package Libraries as DLLs
robGG1997 Dec 11, 2023
a2cdc0e
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Dec 11, 2023
93cd900
merged to main
robGG1997 Dec 11, 2023
78b9365
Merge branch 'rob/meta-mask-integration-517' of https://github.com/Ch…
robGG1997 Dec 11, 2023
8e090e8
Published Solution Dependencies to Package Libraries as DLLs
robGG1997 Dec 11, 2023
79b6b89
removed redundant/empty implementations of IlifeCycleParticipant
robGG1997 Dec 11, 2023
bb9dff8
Merge branch 'rob/meta-mask-integration-517' of https://github.com/Ch…
robGG1997 Dec 11, 2023
35498eb
added import statement
robGG1997 Dec 11, 2023
eefca81
Auto-duplicate Packages Samples
robGG1997 Dec 11, 2023
81c860a
Published Solution Dependencies to Package Libraries as DLLs
robGG1997 Dec 11, 2023
9d39b41
added platform dependent compilation to avoid build errors
robGG1997 Dec 11, 2023
e798abb
limited metamask libs to WebGL so it can build to other platforms
robGG1997 Dec 11, 2023
1980480
Merge branch 'rob/meta-mask-integration-517' of https://github.com/Ch…
robGG1997 Dec 11, 2023
39af188
Merge branch 'rob/meta-mask-integration-517' into rob/libc-missing-fi…
robGG1997 Dec 11, 2023
95806aa
merged from main
robGG1997 Dec 11, 2023
13d2693
Auto-duplicate Packages Samples
robGG1997 Dec 11, 2023
231097f
Published Solution Dependencies to Package Libraries as DLLs
robGG1997 Dec 11, 2023
5c42a5a
Published Solution Dependencies to Package Libraries as DLLs
robGG1997 Dec 11, 2023
9765f8d
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Dec 11, 2023
f27147b
merged to main
robGG1997 Dec 11, 2023
9391def
merged to main
robGG1997 Dec 11, 2023
efafe0e
Published Solution Dependencies to Package Libraries as DLLs
robGG1997 Dec 11, 2023
7e821cc
revert from merge
robGG1997 Dec 11, 2023
cd79fa9
Published Solution Dependencies to Package Libraries as DLLs
robGG1997 Dec 11, 2023
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
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using ChainSafe.Gaming.Evm.Transactions;
using ChainSafe.Gaming.InProcessSigner;
using ChainSafe.Gaming.InProcessTransactionExecutor;
using ChainSafe.Gaming.InProcessTransactionExecutor.Unity;
using ChainSafe.Gaming.Web3;
using ChainSafe.Gaming.Web3.Core;
using ChainSafe.Gaming.Web3.Core.Evm;
Expand Down Expand Up @@ -57,7 +58,7 @@ public async ValueTask WillStartAsync()
var signerConfig = new InProcessSignerConfig { PrivateKey = privateKey };
signer = new InProcessSigner(signerConfig);

transactionExecutor = new InProcessTransactionExecutor(signer, chainConfig, rpcProvider);
transactionExecutor = new InProcessTransactionExecutor(signer, chainConfig, rpcProvider, new RpcClientWrapper(chainConfig));

void Web3Auth_OnLogin(Web3AuthResponse response)
{
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
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.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<LangVersion>9.0</LangVersion>
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
<EnableNETAnalyzers>True</EnableNETAnalyzers>
<CodeAnalysisRuleSet>../../global.ruleset</CodeAnalysisRuleSet>
<Nullable>enable</Nullable>
<Configurations>Debug;Release;Test</Configurations>
<Platforms>AnyCPU</Platforms>
<RootNamespace>ChainSafe.Gaming.InProcessTransactionExecutor.Unity</RootNamespace>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\ChainSafe.Gaming.InProcessTransactionExecutor\ChainSafe.Gaming.InProcessTransactionExecutor.csproj" />
</ItemGroup>

<ItemGroup>
<Reference Include="../../libs/Nethereum-UnityAOT/Nethereum.Unity.dll" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using ChainSafe.Gaming.Web3.Build;
using ChainSafe.Gaming.Web3.Build;
using ChainSafe.Gaming.Web3.Core.Evm;
using Microsoft.Extensions.DependencyInjection;

namespace ChainSafe.Gaming.InProcessTransactionExecutor
namespace ChainSafe.Gaming.InProcessTransactionExecutor.Unity
{
/// <summary>
/// Extension methods for <see cref="InProcessTransactionExecutor"/>.
Expand All @@ -14,11 +14,14 @@ public static class InProcessTransactionExecutorExtensions
/// </summary>
/// <param name="collection">Service collection to bind implementations to.</param>
/// <returns>The same service collection that was passed in. This enables fluent style.</returns>
public static IWeb3ServiceCollection UseInProcessSigner(this IWeb3ServiceCollection collection)
public static IWeb3ServiceCollection UseInProcessTransactionExecutor(this IWeb3ServiceCollection collection)
{
collection.AssertServiceNotBound<ITransactionExecutor>();
collection.AddSingleton<ITransactionExecutor, InProcessTransactionExecutor>();

collection.AssertServiceNotBound<IRpcClientWrapper>();
collection.AddSingleton<IRpcClientWrapper, RpcClientWrapper>();
return collection;
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System;
using ChainSafe.Gaming.Web3;
using Nethereum.JsonRpc.Client;
using Nethereum.Unity.Rpc;

namespace ChainSafe.Gaming.InProcessTransactionExecutor.Unity
{
public class RpcClientWrapper : IRpcClientWrapper
{
public RpcClientWrapper(IChainConfig chainConfig)
{
Client = new UnityWebRequestRpcTaskClient(new Uri(chainConfig.Rpc));
}

public IClient Client { get; private set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
using Nethereum.JsonRpc.Client;

namespace ChainSafe.Gaming.InProcessTransactionExecutor
{
public interface IRpcClientWrapper
{
public IClient Client { get; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ public class InProcessTransactionExecutor : ITransactionExecutor
/// <param name="signer">Injected <see cref="ISigner"/>.</param>
/// <param name="chainConfig">Injected <see cref="IChainConfig"/>.</param>
/// <param name="rpcProvider">Injected <see cref="IRpcProvider"/>.</param>
/// <param name="rpcClientWrapper">Injected <see cref="IRpcClientWrapper"/>.</param>
/// <exception cref="Web3Exception">Throws exception if initializing instance fails.</exception>
public InProcessTransactionExecutor(ISigner signer, IChainConfig chainConfig, IRpcProvider rpcProvider)
public InProcessTransactionExecutor(ISigner signer, IChainConfig chainConfig, IRpcProvider rpcProvider, IRpcClientWrapper rpcClientWrapper)
{
// It should be possible to set up other signers to work with this as well.
// However, does it make sense to let a remote wallet sign a transaction, but
Expand All @@ -40,7 +41,7 @@ public InProcessTransactionExecutor(ISigner signer, IChainConfig chainConfig, IR
var account = new Account(privateKey);
if (chainConfig.Rpc is not null && !string.Empty.Equals(chainConfig.Rpc))
{
web3 = new NWeb3(account, chainConfig.Rpc);
web3 = new NWeb3(account, rpcClientWrapper.Client);
}
else if (chainConfig.Ipc is not null && !string.Empty.Equals(chainConfig.Ipc))
{
Expand Down
2 changes: 1 addition & 1 deletion src/ChainSafe.Gaming.Unity/ChainSafe.Gaming.Unity.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<ProjectReference Include="..\ChainSafe.Gaming.Debugging\ChainSafe.Gaming.Debugging.csproj" />
<ProjectReference Include="..\ChainSafe.Gaming\ChainSafe.Gaming.csproj" />
<ProjectReference Include="..\ChainSafe.Gaming.InProcessSigner\ChainSafe.Gaming.InProcessSigner.csproj" />
<ProjectReference Include="..\ChainSafe.Gaming.InProcessTransactionExecutor\ChainSafe.Gaming.InProcessTransactionExecutor.csproj" />
<ProjectReference Include="..\ChainSafe.Gaming.InProcessTransactionExecutor.Unity\ChainSafe.Gaming.InProcessTransactionExecutor.Unity.csproj" />
<ProjectReference Include="..\ChainSafe.Gaming.WalletConnect\ChainSafe.Gaming.WalletConnect.csproj" />
<ProjectReference Include="..\ChainSafe.Gaming.MetaMask.Unity\ChainSafe.Gaming.MetaMask.Unity.csproj" />
<ProjectReference Include="..\ChainSafe.Gaming.Unity.ThirdParty\ChainSafe.Gaming.Unity.ThirdParty.csproj" />
Expand Down