-
Notifications
You must be signed in to change notification settings - Fork 102
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
feat(twap): twap order creation services #2504
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
cc13f47
to
1a230be
Compare
1a230be
to
efdde8d
Compare
efdde8d
to
631e928
Compare
… feature/create-twap
|
||
if (!context) return null | ||
|
||
return settleTwapOrder(order, context) |
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.
Usage example
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.
|
||
const createOrderTx = { | ||
to: COMPOSABLE_COW_ADDRESS[chainId], | ||
data: composableCowContract.interface.encodeFunctionData('create', [creationParams, true]), |
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.
Suggestion for a different way of creating the tx data, which uses the types and parameters more in a TS fashion https://github.com/cowprotocol/cowswap/blob/ed50eb839629d7df29a404a5d4663b56330d1900/src/modules/operations/bundle/buildPresignTx.ts#L12-L11
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.
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.
Cool, didn't know
I don't mind also to use this version.
Then, do you think we should update the method I linked?
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.
Just to make it synchronous - yes, it make sense
5b4819b
to
51f005c
Compare
Summary
The process follows common pattern: collect context -> execute logic.
Usage example.