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: add morpho quote provider #68

Merged
merged 3 commits into from
Jun 25, 2024
Merged

Conversation

janndriessen
Copy link
Collaborator

  • Adds quote provider for Morpho tokens

@janndriessen janndriessen requested a review from 0xonramp June 24, 2024 13:20
import { isSameAddress } from 'utils/addresses'
import { getRpcProvider } from 'utils/rpc-provider'

export class MorphoQuoteProvider {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In the future we might make this into a more generic quote provider since a couple of providers use this token vault standard 4626 but for now waiting what components will be added.

@@ -26,7 +26,7 @@ describe('BTC2X (mainnet)', () => {
await factory.executeTx()
})

test('can redeem with ETH', async () => {
test.skip('can redeem with ETH', async () => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fails too often because of market conditions. Will take it out for now.

isMorpho(token: string) {
return isAddressEqual(
token as Address,
'0x78Fc2c2eD1A4cDb5402365934aE5648aDAd094d0'
Copy link
Collaborator

Choose a reason for hiding this comment

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

one thought, not for this PR: we should export a constant for our tokens in tokenlists, so we can reference them directly without needing find logic...e.g. this could become: INDEX_TOKENS.HYETH.address

Copy link
Collaborator

@0xonramp 0xonramp left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@janndriessen janndriessen merged commit 31167b1 into main Jun 25, 2024
1 check passed
@janndriessen janndriessen deleted the feat/add-morpho-component-quotes branch June 25, 2024 07: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