Skip to content

Commit

Permalink
armada staking new platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
opptylabs committed Feb 12, 2025
1 parent 2fa0b90 commit 47b345d
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 4 deletions.
29 changes: 27 additions & 2 deletions packages/plugins/src/plugins/armada-staking/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ export const armadaPlatform: Platform = {
name: 'Armada',
defiLlamaId: 'armada-staking',
image: 'https://sonar.watch/img/platforms/armada.webp',
website: 'https://www.armadafi.so/',
twitter: 'https://twitter.com/ArmadaFi',
};

export const flowmaticPlatformId = 'flowmatic';
Expand Down Expand Up @@ -81,6 +79,30 @@ export const geckoPlatform: Platform = {
twitter: 'https://twitter.com/GeckCoin',
};

export const brawlPlatformId = 'brawl';
export const brawlPlatform: Platform = {
id: brawlPlatformId,
name: 'Brawl AI',
image: 'https://sonar.watch/img/platforms/brawl.webp',
website: 'https://staking.brawlailayer.org/',
};

export const akumaPlatformId = 'akuma';
export const akumaPlatform: Platform = {
id: akumaPlatformId,
name: 'Akuma',
image: 'https://sonar.watch/img/platforms/akuma.webp',
website: 'https://staking.theakuma.xyz',
};

export const gofursPlatformId = 'gofurs';
export const gofurslatform: Platform = {
id: gofursPlatformId,
name: 'Gofurs',
image: 'https://sonar.watch/img/platforms/gofurs.webp',
website: 'https://stake.gofursdelsol.com/',
};

export const platformByMint = new Map([
['BDssJun8XSPmWq7VkoahyozsvJwKEZBkWE6YBrFHjbii', kishuPlatformId],
['AqEHVh8J2nXH9saV2ciZyYwPpqWFRfD2ffcq5Z8xxqm5', yakuPlatformId],
Expand All @@ -90,4 +112,7 @@ export const platformByMint = new Map([
['8c71AvjQeKKeWRe8jtTGG1bJ2WiYXQdbjqFbUfhHgSVk', garyPlatformId],
['6CNHDCzD5RkvBWxxyokQQNQPjFWgoHF94D7BmC73X6ZK', geckoPlatformId],
['SHARKSYJjqaNyxVfrpnBN9pjgkhwDhatnMyicWPnr1s', sharkyPlatformId],
['5mdBkZ4dTP94SE7PyiuWseTDAd1kYxSk6oYaWB7186s7', brawlPlatformId],
['AKUjRM9ZcE8t4mQWGX8ToroNjrTSYvNR3bBfFMzY7ahb', akumaPlatformId],
['4xnxNjLkeVoJEAUFjj5xTvkdTLGYHtrdyyXThGDFhwmr', gofursPlatformId],
]);
6 changes: 6 additions & 0 deletions packages/plugins/src/plugins/armada-staking/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ import {
garyPlatform,
geckoPlatform,
orePlatform,
brawlPlatform,
gofurslatform,
akumaPlatform,
} from './constants';
import poolsJob from './poolsJob';
import stakingFetcher from './stakingFetcher';
Expand All @@ -23,6 +26,9 @@ export const platforms: Platform[] = [
garyPlatform,
geckoPlatform,
orePlatform,
brawlPlatform,
gofurslatform,
akumaPlatform,
];
export const jobs: Job[] = [poolsJob];
export const fetchers: Fetcher[] = [stakingFetcher];
10 changes: 8 additions & 2 deletions packages/plugins/src/plugins/armada-staking/stakingFetcher.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import { NetworkId } from '@sonarwatch/portfolio-core';
import { Cache } from '../../Cache';
import { Fetcher, FetcherExecutor } from '../../Fetcher';
import { platformByMint, platformId, poolsKey, stakePid } from './constants';
import {
armadaPlatformId,
platformByMint,
platformId,
poolsKey,
stakePid,
} from './constants';
import { getParsedProgramAccounts } from '../../utils/solana';
import { StakeDepositReceiptStruct } from './structs';
import { stakeFilters } from './filters';
Expand Down Expand Up @@ -37,7 +43,7 @@ const executor: FetcherExecutor = async (owner: string, cache: Cache) => {
const mint = mintByPool.get(stakeAccount.stakePool.toString());
if (!mint) continue;

const platform = platformByMint.get(mint);
const platform = platformByMint.get(mint) || armadaPlatformId;
if (!platform) continue;

const element = elementRegistry.addElementMultiple({
Expand Down

0 comments on commit 47b345d

Please sign in to comment.