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

🧠 Brain Dump on 2.0 SDK Review (low prio) #117

Open
3 of 12 tasks
anxolin opened this issue Mar 31, 2023 · 0 comments
Open
3 of 12 tasks

🧠 Brain Dump on 2.0 SDK Review (low prio) #117

anxolin opened this issue Mar 31, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@anxolin
Copy link
Contributor

anxolin commented Mar 31, 2023

The new version of the SDK is great. I really like the examples and seems easy to use.

Just some notes on things we could improve or consider. We should give more prio to any feedback we receive from people integrating it. In principle, I consider all of these low prios unless we see projects taking interest on having it, or we see potential.

Pending

Docs

Review of https://docs.cow.fi/cow-sdk/getting-started-with-the-sdk

OrderBookApi - provides the ability to retrieve orders and trades from the CowSap order-book, as well as add and cancel them

I think i mentioned in on PR, but probably lost.

  • order-book don't have a hyphen
  • I would mention you can post orders too, since the most important you can do with the order book :)

OrderSigningUtils - serves to sign orders and cancel them using EIP-712

Why limited to EIP712, shouldn't this util facilitate also pre-sign?

Pre-sign Flow

Ideally, we would add this flow to make it super easy.

One more thing, I think the util that pre-sign, should send the pre-sign using the provider, but also provide a version which returns the call-data so an integration could use it on their own stack (like use it for proposing a multisig, etc)

Not sure: Should we include Wrap/Unwrap/Approval

To have a fully fledge API, we might want to add either to SigniningUtil or export a new Util, for Wraps/Unwraps or token approvals

Polling to await for execution (maybe even emit some intermediate events!)

It would be nice to have a utility that provides a simple interface (return Promise), and maybe even combines with an event emitter too (https://www.jpwilliams.dev/using-eventemitters-to-resolve-promises-from-afar-in-nodejs) just to get some intermediate events (like partial fills)

See:
#83

List of tokens

It might be convenient to give easy access the list of tokens.

Would be nice to explore the options, but one low-hanging is to return https://files.cow.fi/tokens/CowSwap.json wrapped by a fetch method and give some nice types to it.

If we implement a API, also nice to consider exposing it here.

Eth Flow

I guess is missing for now.

What would be the plan to add it?

  • will OrderSigningUtils have something there?

Smart quote

We might want to consider moving the smart quote here. Alternatively we can move it to some other central module to reuse in the explorer

Gnosis Safe / Multisigs considerations

Maybe is nice to add some additional methods that would be tailored for Multisigs.

We could explore this possibility.

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

No branches or pull requests

2 participants