-
Notifications
You must be signed in to change notification settings - Fork 116
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
swapped simulate() to use simulateOp instead of runOp and added tests #2581
Conversation
✅ Deploy Preview for taquito-test-dapp ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
New packages have been deployed to the preview repository at https://npm.preview.tezostaquito.io/. Published packages:
|
A new deploy preview is available on Netlify at https://b9076a5--tezostaquito.netlify.app |
@@ -100,7 +100,7 @@ export class RPCEstimateProvider extends Provider implements EstimationProvider | |||
opbytes, | |||
opOb: { branch, contents }, | |||
} = await this.forge(op); | |||
const operation: RPCRunOperationParam = { | |||
const operation: RPCSimulateOperationParam = { | |||
operation: { branch, contents, signature: SIGNATURE_STUB }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will we consider removing signature_stub when simulating?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point, removed.
async simulateOperation( | ||
op: RPCSimulateOperationParam, | ||
{ block }: RPCOptions = defaultRPCOptions | ||
): Promise<PreapplyResponse> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
surprised to see PreapplyReponse here, but understand if it's returning the same object
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PreapplyResponse is basically just content
so I guess it was just reusing the type. It was the same for run_operation so I just followed suit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm 🙌
closes #2548
simulateOperation
RPC endpointsimulate()
inProvider.ts
to usesimulateOperation()
instead ofrunOperation()
Thank you for your contribution to Taquito.
Before submitting this PR, please make sure:
In this PR, please also make sure:
closes #TICKETNUMBER
in the description box (when applicable)Release Note Draft Snippet
If relevant, please write a summary of your change that will be suitable for
inclusion in the Release Notes for the next Taquito release.