File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,9 @@ export default class Account{
46
46
getPendingRawTxByHash ( txHash ) {
47
47
return getPendingRawTxByHash ( this . host , txHash )
48
48
}
49
+ getGasPrice ( ) {
50
+ return getGasPrice ( this . host )
51
+ }
49
52
}
50
53
51
54
@@ -273,11 +276,25 @@ export function getPendingRawTxByHash(host,txHash) {
273
276
body . params = params ;
274
277
body . id = id ( ) ;
275
278
body . jsonrpc = '2.0' ;
276
- return request ( {
279
+ return request ( host , {
277
280
method : 'post' ,
278
281
body,
279
282
} )
280
283
}
281
284
285
+ /**
286
+ * Get network gasPrice that relay computes
287
+ * @returns {Promise }
288
+ */
289
+ export async function getGasPrice ( host ) {
290
+ let body = { } ;
291
+ body . method = 'loopring_getEstimateGasPrice' ;
292
+ body . params = [ { } ] ;
293
+ return request ( host , {
294
+ method :'post' ,
295
+ headers,
296
+ body,
297
+ } )
298
+ }
282
299
283
300
You can’t perform that action at this time.
0 commit comments