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

Sor update 4.1.1 beta.12 #480

Merged
merged 5 commits into from
Jul 18, 2023
Merged

Sor update 4.1.1 beta.12 #480

merged 5 commits into from
Jul 18, 2023

Conversation

johngrantuk
Copy link
Member

@johngrantuk johngrantuk commented Jul 5, 2023

  • Update SOR package
  • Update onchainData for FX pools

brunoguerios
brunoguerios previously approved these changes Jul 5, 2023
@brunoguerios
Copy link
Member

A lot has changed since this PR was opened, right?! 😅
I'm trying to follow-up on everything that is pending. Specially this PR that is blocking changes made to FxPool math on SOR to be considered on the SDK.
I'm a bit unclear on this protocolPercentFee change. If we look at FxPool math on SOR, it uses epsilon as swapFee.
Can you share more context @johngrantuk ?
After that, I believe I'll be able to sync with Daniel to understand how this overlaps with the new queries contract.

@brunoguerios
Copy link
Member

I updated the PR to conform with new queries helper contract.
It extends the onChain data by performing an extra multicall step, similar to how we're doing with Gyro tokenRates.
My suggestion is to get things going with this approach and later consolidate these changes into the queries helper contract.
@danielmkm - since John is off for the next couple weeks, I was hoping you could review/approve, so we can merge and publish a new beta package that contains FX changes made to the SOR

@brunoguerios brunoguerios self-assigned this Jul 12, 2023
@brunoguerios brunoguerios dismissed their stale review July 12, 2023 20:37

Code changed significantly requiring changes to the PR


// eslint-disable-next-line @typescript-eslint/no-explicit-any
const abis: any = Object.values(
// Remove duplicate entries using their names
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you can use zipObject here

Copy link
Contributor

@lgahdl lgahdl Jul 17, 2023

Choose a reason for hiding this comment

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

Actually, forget about the zipObject, you don't even need the zipObject, Object.fromEntries and/or Object.values, you can remove duplicates using lodash uniqBy function:
const abis: any = _.uniqBy([...(FXPool__factory.abi as readonly JsonFragment[])], "name")

@brunoguerios brunoguerios changed the title Sor update 4.1.1 beta.12 Sor update 4.1.1 beta.13 Jul 17, 2023
@brunoguerios brunoguerios changed the title Sor update 4.1.1 beta.13 Sor update 4.1.1 beta.12 Jul 17, 2023
@brunoguerios brunoguerios merged commit aac90ec into develop Jul 18, 2023
@brunoguerios brunoguerios deleted the sor-update-4.1.1-beta.12 branch July 18, 2023 12:34
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.

3 participants