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

Commit

Permalink
feat(agave): Added Agave to Zapper (#635)
Browse files Browse the repository at this point in the history
  • Loading branch information
liz-cs authored Jun 14, 2022
1 parent 2514f5a commit f26b3bc
Show file tree
Hide file tree
Showing 23 changed files with 7,322 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,4 @@
"engines": {
"node": "16.x"
}
}
}
57 changes: 57 additions & 0 deletions src/apps/agave/agave.definition.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
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 AGAVE_DEFINITION = appDefinition({
id: 'agave',
name: 'agave',
description:
'Agave rewards depositors with passive income and lets them use their deposits as collateral to borrow and lend digital assets.',
url: 'https://agave.finance/',

groups: {
deposit: {
id: 'deposit',
type: GroupType.TOKEN,
label: 'Deposit',
},

stableBorrow: {
id: 'stable-borrow',
type: GroupType.TOKEN,
label: 'Borrow',
},

variableBorrow: {
id: 'variable-borrow',
type: GroupType.TOKEN,
label: 'Borrow',
},

claimable: {
id: 'claimable',
type: GroupType.POSITION,
label: 'Reward',
},
},

tags: [AppTag.LENDING],
keywords: [],
links: {},

supportedNetworks: {
[Network.GNOSIS_MAINNET]: [AppAction.VIEW],
},

primaryColor: '#fff',
});

@Register.AppDefinition(AGAVE_DEFINITION.id)
export class AgaveAppDefinition extends AppDefinition {
constructor() {
super(AGAVE_DEFINITION);
}
}

export default AGAVE_DEFINITION;
28 changes: 28 additions & 0 deletions src/apps/agave/agave.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { Register } from '~app-toolkit/decorators';
import { AbstractApp } from '~app/app.dynamic-module';
import { AaveV2AppModule } from '~apps/aave-v2';

import { AgaveAppDefinition, AGAVE_DEFINITION } from './agave.definition';
import { AgaveContractFactory } from './contracts';
import { GnosisAgaveBalanceFetcher } from './gnosis/agave.balance-fetcher';
import { GnosisAgaveClaimableContractPositionFetcher } from './gnosis/agave.claimable.contract-position-fetcher';
import { GnosisAgaveDepositTokenFetcher } from './gnosis/agave.deposit.token-fetcher';
import { GnosisAgaveStableBorrowTokenFetcher } from './gnosis/agave.stable-borrow.token-fetcher';
import { GnosisAgaveTvlFetcher } from './gnosis/agave.tvl-fetcher';
import { GnosisAgaveVariableBorrowTokenFetcher } from './gnosis/agave.variable-borrow.token-fetcher';

@Register.AppModule({
appId: AGAVE_DEFINITION.id,
imports: [AaveV2AppModule],
providers: [
AgaveAppDefinition,
AgaveContractFactory,
GnosisAgaveBalanceFetcher,
GnosisAgaveClaimableContractPositionFetcher,
GnosisAgaveDepositTokenFetcher,
GnosisAgaveStableBorrowTokenFetcher,
GnosisAgaveTvlFetcher,
GnosisAgaveVariableBorrowTokenFetcher,
],
})
export class AgaveAppModule extends AbstractApp() {}
Loading

0 comments on commit f26b3bc

Please sign in to comment.