-
Notifications
You must be signed in to change notification settings - Fork 5
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
Conversation
janndriessen
commented
Jun 24, 2024
- Adds quote provider for Morpho tokens
import { isSameAddress } from 'utils/addresses' | ||
import { getRpcProvider } from 'utils/rpc-provider' | ||
|
||
export class MorphoQuoteProvider { |
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.
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 () => { |
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.
Fails too often because of market conditions. Will take it out for now.
isMorpho(token: string) { | ||
return isAddressEqual( | ||
token as Address, | ||
'0x78Fc2c2eD1A4cDb5402365934aE5648aDAd094d0' |
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.
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
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.
LGTM 👍