Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Commit

Permalink
feat(arrakis): Extract Gelato from Zapper API, rename to Arrakis, and…
Browse files Browse the repository at this point in the history
… support Polygon/Ethereum (#713)
  • Loading branch information
immasandwich authored Jun 22, 2022
1 parent bb43a76 commit 7d9d870
Show file tree
Hide file tree
Showing 22 changed files with 7,205 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Inject } from '@nestjs/common';

import { Register } from '~app-toolkit/decorators';
import { ARRAKIS_DEFINITION } from '~apps/arrakis/arrakis.definition';
import { SynthetixSingleStakingFarmContractPositionHelper } from '~apps/synthetix/helpers/synthetix.single-staking-farm-contract-position-helper';
import { PositionFetcher } from '~position/position-fetcher.interface';
import { ContractPosition } from '~position/position.interface';
Expand Down Expand Up @@ -37,7 +38,7 @@ export class OptimismAelinFarmContractPositionFetcher implements PositionFetcher
appId,
groupId,
network,
dependencies: [{ appId: 'sorbet', groupIds: ['pool'], network }],
dependencies: [{ appId: ARRAKIS_DEFINITION.id, groupIds: [ARRAKIS_DEFINITION.groups.pool.id], network }],
farmDefinitions: FARMS,
});
}
Expand Down
43 changes: 43 additions & 0 deletions src/apps/arrakis/arrakis.definition.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import { Register } from '~app-toolkit/decorators';
import { AppDefinition, appDefinition } from '~app/app.definition';
import { AppAction, AppTag, GroupType } from '~app/app.interface';
import { Network } from '~types/network.interface';

export const ARRAKIS_DEFINITION = appDefinition({
id: 'arrakis',
name: 'Arrakis Finance',
description: `Arrakis is a protocol that specializes in concentrated & active management. By creating a curated strategies.`,
url: 'https://arrakis.finance/',

groups: {
pool: {
id: 'pool',
type: GroupType.TOKEN,
label: 'Pools',
},
},

tags: [AppTag.LIQUIDITY_POOL],
keywords: [],

links: {
discord: 'https://discord.gg/arrakisfinance',
github: 'https://github.com/arrakisfinance',
medium: 'https://medium.com/arrakis-finance',
telegram: 'https://t.me/arrakisfinance',
twitter: 'https://twitter.com/ArrakisFinance',
},

supportedNetworks: {
[Network.ETHEREUM_MAINNET]: [AppAction.VIEW],
[Network.OPTIMISM_MAINNET]: [AppAction.VIEW],
[Network.POLYGON_MAINNET]: [AppAction.VIEW],
},
});

@Register.AppDefinition(ARRAKIS_DEFINITION.id)
export class ArrakisAppDefinition extends AppDefinition {
constructor() {
super(ARRAKIS_DEFINITION);
}
}
33 changes: 33 additions & 0 deletions src/apps/arrakis/arrakis.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import { Register } from '~app-toolkit/decorators';
import { AbstractApp } from '~app/app.dynamic-module';
import { UniswapV2AppModule } from '~apps/uniswap-v2';

import { ArrakisAppDefinition, ARRAKIS_DEFINITION } from './arrakis.definition';
import { ArrakisContractFactory } from './contracts';
import { EthereumArrakisBalanceFetcher } from './ethereum/arrakis.balance-fetcher';
import { EthereumArrakisPoolTokenFetcher } from './ethereum/arrakis.pool.token-fetcher';
import { ArrakisPoolTokenHelper } from './helpers/arrakis.pool.token-helper';
import { OptimismArrakisBalanceFetcher } from './optimism/arrakis.balance-fetcher';
import { OptimismArrakisPoolTokenFetcher } from './optimism/arrakis.pool.token-fetcher';
import { PolygonArrakisBalanceFetcher } from './polygon/arrakis.balance-fetcher';
import { PolygonArrakisPoolTokenFetcher } from './polygon/arrakis.pool.token-fetcher';

@Register.AppModule({
appId: ARRAKIS_DEFINITION.id,
imports: [UniswapV2AppModule],
providers: [
ArrakisAppDefinition,
ArrakisContractFactory,
ArrakisPoolTokenHelper,
// Ethereum
EthereumArrakisPoolTokenFetcher,
EthereumArrakisBalanceFetcher,
// Optimism
OptimismArrakisPoolTokenFetcher,
OptimismArrakisBalanceFetcher,
// Polygon
PolygonArrakisPoolTokenFetcher,
PolygonArrakisBalanceFetcher,
],
})
export class ArrakisAppModule extends AbstractApp() {}
Loading

0 comments on commit 7d9d870

Please sign in to comment.