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

Jitosol #388

Merged
merged 19 commits into from
Dec 13, 2024
Merged

Jitosol #388

merged 19 commits into from
Dec 13, 2024

Conversation

bergarces
Copy link
Collaborator

No description provided.

@bergarces bergarces requested a review from jpsains as a code owner December 11, 2024 11:09
@@ -18,7 +18,7 @@ import { fetchIchiBalanceBreakdown } from './unwrap/ichi'
import { fetchPendleEquilibriaBalanceBreakdown } from './unwrap/pendle_equilibria'
import { fetchSolidlyBalanceBreakdown } from './unwrap/solidly'

export const chainIdMap: Record<Chain, string> = {
export const chainIdMap: Partial<Record<Chain, string>> = {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

If set to EvmChain it'll require changing Chain to EvmChain in every Beefy adapter using it. This is way easier.

@@ -247,6 +248,10 @@ const allTestCases: Record<Protocol, Record<string, TestCase[]>> = {
['pool']: iZiSwapPoolTestCases,
},

[Protocol.Jito]: {
['jitosol']: jitoJitosolTestCases,
},
Copy link
Collaborator Author

@bergarces bergarces Dec 11, 2024

Choose a reason for hiding this comment

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

This was added automatically by cli but snapshots are currently not supported.

@@ -52,7 +52,7 @@ export class AaveV3RewardsAdapter implements IProtocolAdapter {
includeInUnwrap: false,
}

private INCENTIVES_CONTRACT_ADDRESSES = {
private INCENTIVES_CONTRACT_ADDRESSES: Partial<Record<Chain, string>> = {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Preferable than also manually excluding Solana in the if statement below.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is just a stub for now. Needs to be implemented.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Open to suggestiongs, but this is the least disruptive way I found of adding Solana without having to do Exclude<Chain, typeof Chain.Solana> all over the place.

@@ -11,4 +11,5 @@ export const AVERAGE_BLOCKS_PER_DAY: Record<Chain, number> = {
[Chain.Arbitrum]: 320278,
[Chain.Avalanche]: 41413,
[Chain.Linea]: 42698,
[Chain.Solana]: 1, // TODO Add real blocks per day for Solana
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not needed for Solana yet as we cannot query based on block number.

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 30%)

See analysis details on SonarQube Cloud

@jpsains jpsains merged commit 7c44b6a into main Dec 13, 2024
51 of 52 checks passed
@jpsains jpsains deleted the jitosol branch December 13, 2024 14:51
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