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

feat: global refactoring #38

Merged
merged 24 commits into from
May 23, 2024
Merged

feat: global refactoring #38

merged 24 commits into from
May 23, 2024

Conversation

EnoRage
Copy link
Contributor

@EnoRage EnoRage commented Mar 21, 2024

  • namings and 3rd party APIs removed (tenderly, swagger -> openapi, cli logic removed)
  • abstract http executor interface with default impl at separate pkg (using common pkg to declare interface to split impl from usage)
  • web3 provider interface that allows to execute web3 operations and can be switched to other option
  • add Aggregation SDK as sep. package with new config and client structs
  • add Balances SDK as sep. package
  • add Spot Prices SDK as sep. package
  • add Gas Prices SDK as sep. package
  • add Broadcast Transaction SDK as sep. package
  • add NFT SDK as sep. package
  • add History SDK as sep. package
  • add Traces SDK as sep. package
  • add Tokens SDK as sep. package

Copy link
Collaborator

@Tanz0rz Tanz0rz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the Tenderly simulations removed, we will need to be more precise with our unit testing. The first thing that comes to mind after our last conversation is to do local testing for permits (and fallback to approvals when the token does not support permits or something with the permit generation fails).

I also want to note that doing real requests to the downstream APIs has provided value. Here is an example of a bug caught by sending requests to Limit Order API: https://1inch.atlassian.net/browse/DPA-914

aggregation/swap_types_test.go Outdated Show resolved Hide resolved
client/orderbook.go Outdated Show resolved Hide resolved
internal/orderbook/limitorder.go Outdated Show resolved Hide resolved
internal/validate/validate.go Outdated Show resolved Hide resolved
@EnoRage EnoRage marked this pull request as ready for review May 7, 2024 10:16
@EnoRage EnoRage requested a review from Tanz0rz May 7, 2024 10:18
Copy link
Collaborator

@Tanz0rz Tanz0rz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can merge this as it is now. There is still some important cleanup to, but this PR is getting too big and the current refactor is fully functional.

Some notes for follow-up PRs:

  • Improve codegen logic to make all query params concrete types even when they are optional
  • Cleanup example program outputs
  • Add additional APIs like Portfolio

@EnoRage EnoRage changed the title [WIP] Global refactoring feat: global refactoring May 23, 2024
@EnoRage EnoRage merged commit 037cfa7 into main May 23, 2024
2 checks passed
@EnoRage EnoRage deleted the globally-refactored-main branch May 23, 2024 09:13
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