@@ -109,7 +109,49 @@ public Task<string> SendTransactionAsync(string addressTo, BigInteger value, str
109109
110110 return SendTransactionAsyncCore ( addressTo , value , data ) ;
111111 }
112+
113+
114+ // -- Send Raw Transaction ------------------------------------
115+
116+ public Task < string > SendRawTransactionAsync ( string signedTransaction )
117+ {
118+ if ( string . IsNullOrWhiteSpace ( signedTransaction ) )
119+ throw new ArgumentNullException ( nameof ( signedTransaction ) ) ;
120+
121+ return SendRawTransactionAsyncCore ( signedTransaction ) ;
122+ }
123+
124+
125+ // -- Estimate Gas --------------------------------------------
126+
127+ public Task < BigInteger > EstimateGasAsync ( string addressTo , BigInteger value , string data = null )
128+ {
129+ if ( string . IsNullOrWhiteSpace ( addressTo ) )
130+ throw new ArgumentNullException ( nameof ( addressTo ) ) ;
112131
132+ return EstimateGasAsyncCore ( addressTo , value , data ) ;
133+ }
134+
135+ public Task < BigInteger > EstimateGasAsync ( string contractAddress , string contractAbi , string methodName , BigInteger value = default , params object [ ] arguments )
136+ {
137+ if ( string . IsNullOrWhiteSpace ( contractAddress ) )
138+ throw new ArgumentNullException ( nameof ( contractAddress ) ) ;
139+ if ( string . IsNullOrWhiteSpace ( contractAbi ) )
140+ throw new ArgumentNullException ( nameof ( contractAbi ) ) ;
141+ if ( string . IsNullOrWhiteSpace ( methodName ) )
142+ throw new ArgumentNullException ( nameof ( methodName ) ) ;
143+
144+ return EstimateGasAsyncCore ( contractAddress , contractAbi , methodName , value , arguments ) ;
145+ }
146+
147+
148+ // -- Gas Price ------------------------------------------------
149+
150+ public Task < BigInteger > GetGasPriceAsync ( )
151+ {
152+ return GetGasPriceAsyncCore ( ) ;
153+ }
154+
113155 protected abstract Task InitializeAsyncCore ( ) ;
114156 protected abstract Task < BigInteger > GetBalanceAsyncCore ( string address ) ;
115157 protected abstract Task < string > SignMessageAsyncCore ( string message ) ;
@@ -119,5 +161,9 @@ public Task<string> SendTransactionAsync(string addressTo, BigInteger value, str
119161 protected abstract Task < TReturn > ReadContractAsyncCore < TReturn > ( string contractAddress , string contractAbi , string methodName , object [ ] arguments = null ) ;
120162 protected abstract Task < string > WriteContractAsyncCore ( string contractAddress , string contractAbi , string methodName , BigInteger value = default , BigInteger gas = default , params object [ ] arguments ) ;
121163 protected abstract Task < string > SendTransactionAsyncCore ( string addressTo , BigInteger value , string data = null ) ;
164+ protected abstract Task < string > SendRawTransactionAsyncCore ( string signedTransaction ) ;
165+ protected abstract Task < BigInteger > EstimateGasAsyncCore ( string addressTo , BigInteger value , string data = null ) ;
166+ protected abstract Task < BigInteger > EstimateGasAsyncCore ( string contractAddress , string contractAbi , string methodName , BigInteger value = default , params object [ ] arguments ) ;
167+ protected abstract Task < BigInteger > GetGasPriceAsyncCore ( ) ;
122168 }
123169}
0 commit comments