Skip to content

Commit 889fbc5

Browse files
committed
Cleanup usings / add ThirdwebNativeCurrency
1 parent 7112341 commit 889fbc5

10 files changed

+11
-31
lines changed

Assets/Thirdweb/Core/Scripts/AccountAbstraction/Core/SmartWallet.cs

-4
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,13 @@
55
using Nethereum.Hex.HexTypes;
66
using Nethereum.JsonRpc.Client.RpcMessages;
77
using Nethereum.RPC.Eth.DTOs;
8-
using Nethereum.Signer;
98
using Nethereum.Web3;
10-
using Nethereum.Web3.Accounts;
119
using Newtonsoft.Json;
12-
using Newtonsoft.Json.Linq;
1310
using AccountContract = Thirdweb.Contracts.Account.ContractDefinition;
1411
using EntryPointContract = Thirdweb.Contracts.EntryPoint.ContractDefinition;
1512
using FactoryContract = Thirdweb.Contracts.AccountFactory.ContractDefinition;
1613
using UnityEngine;
1714
using Nethereum.Contracts;
18-
using Nethereum.Hex.HexConvertors.Extensions;
1915

2016
namespace Thirdweb.AccountAbstraction
2117
{

Assets/Thirdweb/Core/Scripts/AccountAbstraction/Core/UserOpUtils.cs

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using System.Threading.Tasks;
22
using Nethereum.Hex.HexTypes;
33
using Nethereum.Signer;
4-
using Nethereum.Web3;
54
using EntryPointContract = Thirdweb.Contracts.EntryPoint.ContractDefinition;
65

76
namespace Thirdweb.AccountAbstraction

Assets/Thirdweb/Core/Scripts/AccountAbstraction/Nethereum/SmartWalletAccount.cs

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
using Nethereum.RPC.AccountSigning;
44
using Nethereum.RPC.NonceServices;
55
using Nethereum.RPC.TransactionManagers;
6-
using Nethereum.Signer.EIP712;
76

87
namespace Thirdweb.AccountAbstraction
98
{

Assets/Thirdweb/Core/Scripts/AccountAbstraction/Nethereum/SmartWalletClient.cs

-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
using System;
2-
using System.Collections.Generic;
32
using System.Linq;
43
using System.Threading.Tasks;
54
using Nethereum.JsonRpc.Client;
65
using Nethereum.JsonRpc.Client.RpcMessages;
7-
using Newtonsoft.Json;
8-
using Newtonsoft.Json.Linq;
96

107
namespace Thirdweb.AccountAbstraction
118
{

Assets/Thirdweb/Core/Scripts/AccountAbstraction/Nethereum/SmartWalletNEthereumExtensions.cs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
using MetaMask.Unity;
2-
using Nethereum.Web3;
1+
using Nethereum.Web3;
32

43
namespace Thirdweb.AccountAbstraction
54
{

Assets/Thirdweb/Core/Scripts/AccountAbstraction/Nethereum/SmartWalletTransactionManager.cs

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
using Nethereum.RPC.TransactionManagers;
2-
3-
namespace Thirdweb.AccountAbstraction
1+
namespace Thirdweb.AccountAbstraction
42
{
53
public class SmartWalletTransactionManager : Nethereum.RPC.TransactionManagers.TransactionManager
64
{

Assets/Thirdweb/Core/Scripts/ThirdwebSession.cs

+9-11
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,11 @@
1-
using System;
21
using System.Collections.Generic;
32
using System.Numerics;
43
using System.Threading.Tasks;
5-
using link.magic.unity.sdk;
6-
using MetaMask.NEthereum;
7-
using MetaMask.Unity;
84
using Nethereum.Hex.HexConvertors.Extensions;
95
using Nethereum.JsonRpc.Client;
106
using Nethereum.Siwe;
117
using Nethereum.Web3;
12-
using Nethereum.Web3.Accounts;
138
using UnityEngine;
14-
using WalletConnectSharp.Core.Models.Ethereum;
15-
using WalletConnectSharp.NEthereum.Client;
16-
using WalletConnectSharp.Unity;
17-
using Thirdweb.AccountAbstraction;
189
using Thirdweb.Wallets;
1910

2011
namespace Thirdweb
@@ -170,7 +161,7 @@ private ThirdwebChainData FetchChainData()
170161
blockExplorerUrls = explorerUrls.ToArray(),
171162
chainName = currentNetwork.name ?? ThirdwebManager.Instance.GetCurrentChainIdentifier(),
172163
iconUrls = new string[] { "ipfs://QmdwQDr6vmBtXmK2TmknkEuZNoaDqTasFdZdu3DRw8b2wt" },
173-
nativeCurrency = new NativeCurrency()
164+
nativeCurrency = new ThirdwebNativeCurrency()
174165
{
175166
name = currentNetwork.nativeCurrency?.name ?? "Ether",
176167
symbol = currentNetwork.nativeCurrency?.symbol ?? "ETH",
@@ -189,7 +180,7 @@ public class ThirdwebChainData : ThirdwebChain
189180
public string[] blockExplorerUrls;
190181
public string chainName;
191182
public string[] iconUrls;
192-
public NativeCurrency nativeCurrency;
183+
public ThirdwebNativeCurrency nativeCurrency;
193184
public string[] rpcUrls;
194185
}
195186

@@ -198,6 +189,13 @@ public class ThirdwebChain
198189
public string chainId;
199190
}
200191

192+
public class ThirdwebNativeCurrency
193+
{
194+
public string name;
195+
public string symbol;
196+
public int decimals;
197+
}
198+
201199
[System.Serializable]
202200
public class ChainIDNetworkData
203201
{

Assets/Thirdweb/Core/Scripts/TransactionManager.cs

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
using Newtonsoft.Json;
99
using Thirdweb.Contracts.Forwarder.ContractDefinition;
1010
using Nethereum.RPC.Eth.Transactions;
11-
using Nethereum.Hex.HexTypes;
1211
using Nethereum.Web3;
1312

1413
namespace Thirdweb

Assets/Thirdweb/Core/Scripts/Wallet.cs

-4
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,9 @@
99
using Nethereum.ABI.EIP712;
1010
using Nethereum.Signer.EIP712;
1111
using Newtonsoft.Json.Linq;
12-
using Nethereum.RPC.Eth.Transactions;
13-
using Nethereum.RPC.Eth.DTOs;
1412
using Nethereum.Hex.HexTypes;
1513
using Nethereum.Web3;
1614

17-
//using WalletConnectSharp.NEthereum;
18-
1915
namespace Thirdweb
2016
{
2117
/// <summary>

Assets/Thirdweb/Core/Scripts/Wallets/ThirdwebSmartWallet.cs

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using System.Threading.Tasks;
22
using Nethereum.Web3;
33
using Thirdweb.AccountAbstraction;
4-
using Nethereum.JsonRpc.Client.RpcMessages;
54
using Nethereum.Web3.Accounts;
65

76
namespace Thirdweb.Wallets

0 commit comments

Comments
 (0)