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

feat: Migrate Beethoven-x to Studio #374

Merged
merged 1 commit into from
May 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions src/apps/beethoven-x/beethoven-x.definition.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { Register } from '~app-toolkit/decorators';
import { appDefinition, AppDefinition } from '~app/app.definition';
import { GroupType, AppTag, AppAction } from '~app/app.interface';
import { Network } from '~types/network.interface';

export const BEETHOVEN_X_DEFINITION = appDefinition({
id: 'beethoven-x',
name: 'Beethoven-X',
description: `Beethoven X enables secure and efficient - high speed, low cost - trading. Start trading immediately, no registration required. Just connect your wallet and you’re good to go.`,
groups: {
pool: { id: 'pool', type: GroupType.TOKEN },
farm: { id: 'farm', type: GroupType.POSITION },
fBeets: { id: 'fBEETS', type: GroupType.TOKEN },
},
url: 'https://app.beets.fi/',
links: {
github: 'https://github.com/beethovenxfi',
twitter: 'https://twitter.com/beethoven_x',
discord: 'https://discord.com/invite/jedS4zGk28',
medium: 'https://beethovenxio.medium.com',
learn: 'https://docs.beets.fi',
},
tags: [AppTag.YIELD_AGGREGATOR],
supportedNetworks: { [Network.FANTOM_OPERA_MAINNET]: [AppAction.VIEW] },
token: {
address: '0xf24bcf4d1e507740041c9cfd2dddb29585adce1e',
network: Network.FANTOM_OPERA_MAINNET,
},
});

@Register.AppDefinition(BEETHOVEN_X_DEFINITION.id)
export class BeethovenXAppDefinition extends AppDefinition {
constructor() {
super(BEETHOVEN_X_DEFINITION);
}
}
30 changes: 30 additions & 0 deletions src/apps/beethoven-x/beethoven-x.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { Register } from '~app-toolkit/decorators';
import { AbstractApp } from '~app/app.dynamic-module';
import { BalancerV2AppModule } from '~apps/balancer-v2';

import { BeethovenXAppDefinition, BEETHOVEN_X_DEFINITION } from './beethoven-x.definition';
import { BeethovenXContractFactory } from './contracts';
import { FantomBeethovenXBalanceFetcher } from './fantom/beethoven-x.balance-fetcher';
import { FantomBeethovenXFBeetsTokenFetcher } from './fantom/beethoven-x.f-beets.token-fetcher';
import { FantomBeethovenXFarmContractPositionFetcher } from './fantom/beethoven-x.farm.contract-position-fetcher';
import { FantomBeethovenXPoolTokenFetcher } from './fantom/beethoven-x.pool.token-fetcher';
import { FantomBeethovenXTvlFetcher } from './fantom/beethoven-x.tvl-fetcher';
import { BeethovenXTheGraphPoolTokenDataStrategy } from './helpers/beethoven-x.the-graph.pool-token-address-strategy';

@Register.AppModule({
appId: BEETHOVEN_X_DEFINITION.id,
imports: [BalancerV2AppModule],
providers: [
BeethovenXAppDefinition,
BeethovenXContractFactory,
// Fantom
FantomBeethovenXFarmContractPositionFetcher,
FantomBeethovenXPoolTokenFetcher,
FantomBeethovenXFBeetsTokenFetcher,
FantomBeethovenXBalanceFetcher,
FantomBeethovenXTvlFetcher,
// Helpers
BeethovenXTheGraphPoolTokenDataStrategy,
],
})
export class BeethovenXAppModule extends AbstractApp() {}
Loading