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

SPIKE: Design better API for dryrun, estimates, signing and preparation #432

Closed
jevonearth opened this issue Sep 10, 2020 · 4 comments
Closed
Assignees
Labels
ga_release Work to be done so we can remove the beta dsignation Oct
Milestone

Comments

@jevonearth
Copy link
Collaborator

jevonearth commented Sep 10, 2020

The transfer() method abstracts many underlying steps for the developer user, which is a good thing for typical usescases. When a developer user wishes to retrieve data from some particular underlying step, they use the lower-level abstractions in taquito.

If a user wishes to get the estimate for a transaction operation on a contract method, they need to prepare the call, fetch the parameters, and then call the Tezos.estimate.transfer({op...}) API.

A proposal for a new set of methods follow;

(Controversial, maybe a better way around this?) Break the api so that contract.transfer() becomes a no-op method.

Idea is to add the following new methods;

contract.transfer({ to: address, amount: amount }).send()
contract.transfer({ to: address, amount: amount }).estimate()
contract.transfer({ to: address, amount: amount }).dryrun()
contract.transfer({ to: address, amount: amount }).sign()
contract.transfer({ to: address, amount: amount }).prepare()

And for smart contract invocations, it may look like this:

contract.methods.increment(1).send()
contract.methods.increment(1).estimate()
contract.methods.increment(1).dryrun()
contract.methods.increment(1).sign()
contract.methods.increment(1).prepare() 

send will complete all steps and inject the method
estimate will return an Estimate for the operation
dryrun will return the dryrun results, including the updated storage as evaluated by the RPC server
sign will return the signed operation but not inject the operation
prepare will prepare an operation that is ready for singing.

Acceptance criteria:

  1. Prepare and agree on design
  2. Create follow-up issues to prototype(if needed) and implement
@roxaneletourneau
Copy link
Collaborator

In addition to the above; Provide the ability to obtain operation hash before sending it to the node

@Innkst Innkst added the ga_release Work to be done so we can remove the beta dsignation label Mar 30, 2021
@jevonearth jevonearth added the Oct label Apr 8, 2021
@Innkst Innkst modified the milestones: v10.2, v10.1 Jun 17, 2021
@Innkst
Copy link
Contributor

Innkst commented Aug 12, 2021

related to previous implementation #995

@Innkst Innkst changed the title Provide better API for dryrun, estimates, signing and preparation SPIKE: Design better API for dryrun, estimates, signing and preparation Aug 19, 2021
@Innkst Innkst modified the milestones: v10.2, v10.3 Sep 9, 2021
@Innkst Innkst removed this from the v11.1 milestone Dec 16, 2021
@Innkst Innkst added this to the v11.2 milestone Dec 16, 2021
@Innkst Innkst modified the milestones: v11.2, v11.3 Jan 25, 2022
@Innkst Innkst modified the milestones: v11.3, v12.1 Feb 17, 2022
@Innkst Innkst modified the milestones: v12.1, v12.2 Mar 18, 2022
@Innkst Innkst modified the milestones: v14.2, v14.1 Sep 14, 2022
@Innkst
Copy link
Contributor

Innkst commented Sep 14, 2022

We need to review the design and have a discussion again. Also, please re-confirm the follow-up tasks and let's what non-breaking changes could be implemented earlier and which ones have to wait till v15

@roxaneletourneau
Copy link
Collaborator

Created follow-up task issues 2019 and 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ga_release Work to be done so we can remove the beta dsignation Oct
Projects
Status: Done
Development

No branches or pull requests

3 participants