Skip to content

Commit

Permalink
Merge pull request #7 from cometh-game/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
Krayt78 authored Oct 25, 2023
2 parents 1043308 + ce43de1 commit 7fa0c39
Show file tree
Hide file tree
Showing 83 changed files with 1,019 additions and 282 deletions.
63 changes: 14 additions & 49 deletions Assets/ComethSDK/Examples/Scenes/Connect-Example.unity

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion Assets/ComethSDK/Examples/Scripts/ExampleScripts.asmdef
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
"GUID:9180fc10182395d41bacb05e43007847",
"GUID:20ff5bdc0066ab04a80b5c6707f10371",
"GUID:0022c094e0c7f481288196a6d3e9ce33",
"GUID:7dd4f8caf82c243428d2e7006f515400"
"GUID:7dd4f8caf82c243428d2e7006f515400",
"GUID:a624b62300d14c788d1e3cedda57dc69",
"GUID:66ce3b4eab902fe469aa1f5b8634d609"
],
"includePlatforms": [],
"excludePlatforms": [],
Expand Down
15 changes: 6 additions & 9 deletions Assets/ComethSDK/Examples/Scripts/TestConnectWallet.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using ComethSDK.Scripts.Adapters;
using ComethSDK.Scripts.Core;
using ComethSDK.Scripts.Services;
using ComethSDK.Scripts.Tools;
using ComethSDK.Scripts.Types;
using Nethereum.Web3;
using TMPro;
using UnityEngine;
Expand All @@ -28,7 +28,10 @@ private void Start()
public async void Connect()
{
PrintInConsole("Connecting...");
await _wallet.Connect(walletAddress);
if(string.IsNullOrEmpty(walletAddress))
await _wallet.Connect();
else
await _wallet.Connect(walletAddress);
PrintInConsole("Connected");
}

Expand Down Expand Up @@ -133,7 +136,7 @@ private async void EstimateGasAndShow(string to, string value, string data)
var web3 = new Web3(Constants.GetNetworkByChainID(authAdaptor.ChainId).RPCUrl);
var nonce = await Utils.GetNonce(web3, _wallet.GetAddress());

var gas = await _wallet.CalculateMaxFees(to, value, data, nonce);
var gas = await GasService.CalculateMaxFees(_wallet.GetAddress(), to, value, data, nonce, web3);
PrintInConsole("Estimated max gas: " + gas);
}

Expand All @@ -153,11 +156,5 @@ private void PrintInConsole(string str)
{
console.text += str + "\n";
}

private void PrintUserInfosInConsole(UserInfos userInfos)
{
PrintInConsole("walletAddress: " + userInfos.walletAddress);
PrintInConsole("ownerAddress: " + userInfos.ownerAddress);
}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using ComethSDK.Scripts.Adapters;
using ComethSDK.Scripts.Core;
using ComethSDK.Scripts.Services;
using ComethSDK.Scripts.Tools;
using ComethSDK.Scripts.Types;
using Nethereum.Web3;
Expand Down Expand Up @@ -108,7 +109,7 @@ private async void EstimateGasAndShow(string to, string value, string data)
{
var web3 = new Web3(Constants.GetNetworkByChainID(authWithJwtAdaptor.ChainId).RPCUrl);
var nonce = await Utils.GetNonce(web3, _wallet.GetAddress());
var gas = await _wallet.CalculateMaxFees(to, value, data, nonce);
var gas = await GasService.CalculateMaxFees(_wallet.GetAddress(), to, value, data, nonce, web3);
PrintInConsole("Estimated max gas: " + gas);
}

Expand Down
Binary file not shown.

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

20 changes: 20 additions & 0 deletions Assets/ComethSDK/Plugins/NethereumLib/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
The MIT License (MIT)

Copyright (c) 2015-2023 Nethereum.com (Juan Blanco) , Logo by Cass (https://github.com/c055)

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or ANY portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
7 changes: 7 additions & 0 deletions Assets/ComethSDK/Plugins/NethereumLib/LICENSE.md.meta

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

Binary file not shown.
33 changes: 33 additions & 0 deletions Assets/ComethSDK/Plugins/NethereumLib/NBitcoin.dll.meta

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

Binary file modified Assets/ComethSDK/Plugins/NethereumLib/Nethereum.ABI.dll
Binary file not shown.
Binary file modified Assets/ComethSDK/Plugins/NethereumLib/Nethereum.Accounts.dll
Binary file not shown.
Binary file not shown.
33 changes: 33 additions & 0 deletions Assets/ComethSDK/Plugins/NethereumLib/Nethereum.Besu.dll.meta

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

Binary file not shown.
Binary file modified Assets/ComethSDK/Plugins/NethereumLib/Nethereum.Contracts.dll
Binary file not shown.
Binary file not shown.
33 changes: 33 additions & 0 deletions Assets/ComethSDK/Plugins/NethereumLib/Nethereum.EVM.dll.meta

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

Binary file not shown.
33 changes: 33 additions & 0 deletions Assets/ComethSDK/Plugins/NethereumLib/Nethereum.Geth.dll.meta

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

Binary file modified Assets/ComethSDK/Plugins/NethereumLib/Nethereum.GnosisSafe.dll
Binary file not shown.
Binary file not shown.
33 changes: 33 additions & 0 deletions Assets/ComethSDK/Plugins/NethereumLib/Nethereum.HdWallet.dll.meta

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

Binary file modified Assets/ComethSDK/Plugins/NethereumLib/Nethereum.Hex.dll
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified Assets/ComethSDK/Plugins/NethereumLib/Nethereum.KeyStore.dll
Binary file not shown.
Binary file not shown.
Binary file modified Assets/ComethSDK/Plugins/NethereumLib/Nethereum.Merkle.dll
Binary file not shown.
Binary file modified Assets/ComethSDK/Plugins/NethereumLib/Nethereum.Metamask.dll
Binary file not shown.
Binary file modified Assets/ComethSDK/Plugins/NethereumLib/Nethereum.Model.dll
Binary file not shown.
Binary file not shown.
33 changes: 33 additions & 0 deletions Assets/ComethSDK/Plugins/NethereumLib/Nethereum.Optimism.dll.meta

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

Binary file modified Assets/ComethSDK/Plugins/NethereumLib/Nethereum.RLP.dll
Binary file not shown.
Binary file modified Assets/ComethSDK/Plugins/NethereumLib/Nethereum.RPC.dll
Binary file not shown.
Binary file not shown.
Binary file modified Assets/ComethSDK/Plugins/NethereumLib/Nethereum.Signer.dll
Binary file not shown.
Binary file modified Assets/ComethSDK/Plugins/NethereumLib/Nethereum.Siwe.Core.dll
Binary file not shown.
Binary file modified Assets/ComethSDK/Plugins/NethereumLib/Nethereum.Siwe.dll
Binary file not shown.
Binary file modified Assets/ComethSDK/Plugins/NethereumLib/Nethereum.UI.dll
Binary file not shown.
Binary file not shown.
Binary file modified Assets/ComethSDK/Plugins/NethereumLib/Nethereum.Unity.dll
Binary file not shown.
Binary file modified Assets/ComethSDK/Plugins/NethereumLib/Nethereum.Util.dll
Binary file not shown.
Binary file modified Assets/ComethSDK/Plugins/NethereumLib/Nethereum.Web3.dll
Binary file not shown.
Loading

0 comments on commit 7fa0c39

Please sign in to comment.