TezosKit
TezosKit copied to clipboard
[WIP] Simulate / Estimate Fees for a set of operations
Addresses #171
Codecov Report
:exclamation: No coverage uploaded for pull request base (
master@021532a
). Click here to learn what that means. The diff coverage isn/a
.
@@ Coverage Diff @@
## master #179 +/- ##
=========================================
Coverage ? 55.49%
=========================================
Files ? 100
Lines ? 4125
Branches ? 0
=========================================
Hits ? 2289
Misses ? 1836
Partials ? 0
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 021532a...5304918. Read the comment docs.
This looks great. I think you need to expose a FeeEstimator
instance from TezosNodeClient
so this estimate: []
method can be called without having to instantiate a simulation service and a network client etc. as they are all internal too.
I can't test it properly as I need too much code from my other "orignate_smart-contract" branch
This would be useful as for all of my use cases i've had to stop using the action methods like tezosNodeClient.send(amount: ....)
and rely on arrays of operations for everything so I can display confirmation screens. After this it would become much simpler to do
// Generate operations array from tezosNodeClient.operationFactory() // Estimate fees from tezosNodeClient.feeEstimator.estimate( [operations] ) and update screen when done // On confirm, send with tezosNodeClient.send( [operations] )