Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Simulate / Estimate Fees for a set of operations #179

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

keefertaylor
Copy link
Owner

Addresses #171

@codecov
Copy link

codecov bot commented Mar 8, 2020

Codecov Report

❗ No coverage uploaded for pull request base (master@021532a). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            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.

@simonmcl
Copy link
Collaborator

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] )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants