public TransactionSignedUnityRequest(string url, string privateKey, string account)
 {
     _url                       = url;
     _account                   = account;
     _privateKey                = privateKey;
     _transactionSigner         = new TransactionSigner();
     _ethSendTransactionRequest = new EthSendRawTransactionUnityRequest(_url);
     _transactionCountRequest   = new EthGetTransactionCountUnityRequest(_url);
 }
 public TransactionSignedUnityRequest(Account account, string url)
 {
     _url                        = url;
     _account                    = account;
     _transactionSigner          = new TransactionSigner();
     _ethSendTransactionRequest  = new EthSendRawTransactionUnityRequest(_url);
     _transactionCountRequest    = new EthGetTransactionCountUnityRequest(_url);
     _ethEstimateGasUnityRequest = new EthEstimateGasUnityRequest(_url);
     _ethGasPriceUnityRequest    = new EthGasPriceUnityRequest(_url);
 }
Example #3
0
 public TransactionSignedUnityRequest(string url, string privateKey)
 {
     _url                        = url;
     _account                    = EthECKey.GetPublicAddress(privateKey);
     _privateKey                 = privateKey;
     _transactionSigner          = new TransactionSigner();
     _ethSendTransactionRequest  = new EthSendRawTransactionUnityRequest(_url);
     _transactionCountRequest    = new EthGetTransactionCountUnityRequest(_url);
     _ethEstimateGasUnityRequest = new EthEstimateGasUnityRequest(_url);
     _ethGasPriceUnityRequest    = new EthGasPriceUnityRequest(_url);
 }
 public TransactionSignedUnityRequest(string url, string privateKey, BigInteger?chainId = null, Dictionary <string, string> requestHeaders = null)
 {
     _chainId                   = chainId;
     _url                       = url;
     _account                   = EthECKey.GetPublicAddress(privateKey);
     _privateKey                = privateKey;
     _transactionSigner         = new LegacyTransactionSigner();
     _ethSendTransactionRequest = new EthSendRawTransactionUnityRequest(_url);
     _ethSendTransactionRequest.RequestHeaders = requestHeaders;
     _transactionCountRequest = new EthGetTransactionCountUnityRequest(_url);
     _transactionCountRequest.RequestHeaders    = requestHeaders;
     _ethEstimateGasUnityRequest                = new EthEstimateGasUnityRequest(_url);
     _ethEstimateGasUnityRequest.RequestHeaders = requestHeaders;
     _ethGasPriceUnityRequest = new EthGasPriceUnityRequest(_url);
     _ethGasPriceUnityRequest.RequestHeaders = requestHeaders;
     Fee1559SuggestionStrategy = new SimpleFeeSuggestionUnityRequestStrategy(url, requestHeaders);
 }