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

Commit

Permalink
fix(apps): Add social links to all apps (#280)
Browse files Browse the repository at this point in the history
  • Loading branch information
immasandwich authored Apr 27, 2022
1 parent 6acc128 commit 0bb0453
Show file tree
Hide file tree
Showing 29 changed files with 216 additions and 63 deletions.
8 changes: 8 additions & 0 deletions src/app/app.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,14 @@ export type AppDefinitionObject = {
supportedNetworks: { [N in Network]?: ProtocolAction[] };
primaryColor?: string;
url: string;
links: {
learn?: string;
github?: string;
twitter?: string;
telegram?: string;
discord?: string;
medium?: string;
};
compatibleAddressFormat?: { [N in Network]?: AddressFormat };
token?: {
address: string;
Expand Down
11 changes: 9 additions & 2 deletions src/apps/abracadabra/abracadabra.definition.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Register } from '~app-toolkit/decorators';
import { AppDefinition } from '~app/app.definition';
import { GroupType, ProtocolAction, ProtocolTag } from '~app/app.interface';
import { AppDefinitionObject, GroupType, ProtocolAction, ProtocolTag } from '~app/app.interface';
import { Network } from '~types/network.interface';

export const ABRACADABRA_DEFINITION = {
export const ABRACADABRA_DEFINITION: AppDefinitionObject = {
id: 'abracadabra',
groups: {
stakedSpell: { id: 'staked-spell', type: GroupType.TOKEN },
Expand All @@ -13,6 +13,13 @@ export const ABRACADABRA_DEFINITION = {
name: 'Abracadabra',
description: `Abracadabra is a lending platform that uses interest-bearing tokens as collateral to borrow a USD pegged stable coin that can be used as any other stablecoin. Abracadabra provides the opportunity for users to unlock the capital of their yield.`,
url: 'https://abracadabra.money/',
links: {
github: 'https://github.com/Abracadabra-money',
twitter: 'https://twitter.com/MIM_Spell',
discord: 'https://t.co/mi8POGJUaH',
telegram: 'https://t.me/abracadabramoney',
medium: 'https://abracadabramoney.medium.com/',
},
tags: [ProtocolTag.LENDING],
supportedNetworks: {
[Network.ARBITRUM_MAINNET]: [ProtocolAction.VIEW],
Expand Down
10 changes: 8 additions & 2 deletions src/apps/aelin/aelin.definition.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Register } from '~app-toolkit/decorators';
import { AppDefinition } from '~app/app.definition';
import { GroupType, ProtocolTag, ProtocolAction } from '~app/app.interface';
import { GroupType, ProtocolTag, ProtocolAction, AppDefinitionObject } from '~app/app.interface';
import { Network } from '~types/network.interface';

export const AELIN_DEFINITION = {
export const AELIN_DEFINITION: AppDefinitionObject = {
id: 'aelin',
name: 'Aelin',
description: `Aelin is a fundraising protocol built on Ethereum and launched on Optimism.`,
Expand All @@ -13,6 +13,12 @@ export const AELIN_DEFINITION = {
farm: { id: 'farm', type: GroupType.POSITION },
},
url: 'https://aelin.xyz/',
links: {
github: 'https://github.com/AelinXYZ',
twitter: 'https://twitter.com/aelinprotocol',
discord: 'https://t.co/kG6zsC0zaR',
medium: 'https://medium.com/@aelinprotocol',
},
tags: [ProtocolTag.LENDING],
supportedNetworks: {
[Network.OPTIMISM_MAINNET]: [ProtocolAction.VIEW],
Expand Down
11 changes: 8 additions & 3 deletions src/apps/airswap/airswap.definition.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
import { Register } from '~app-toolkit/decorators';
import { AppDefinition } from '~app/app.definition';
import { GroupType, ProtocolAction, ProtocolTag } from '~app/app.interface';
import { AppDefinitionObject, GroupType, ProtocolAction, ProtocolTag } from '~app/app.interface';
import { Network } from '~types/network.interface';

export const AIRSWAP_DEFINITION = {
export const AIRSWAP_DEFINITION: AppDefinitionObject = {
id: 'airswap',
name: 'Airswap',
description:
'AirSwap is an open community of developers, designers, writers, and tinkerers building decentralized trading systems. Protocol fees are automatically distributed to contributors.',
url: 'https://airswap.io',
symbol: 'AST',
links: {
github: 'https://github.com/airswap',
twitter: 'https://twitter.com/airswap',
discord: 'https://chat.airswap.io/',
medium: 'https://airswap.medium.com/',
},
groups: {
sAST: { id: 's-ast', type: GroupType.TOKEN },
},
Expand Down
2 changes: 1 addition & 1 deletion src/apps/airswap/ethereum/airswap.s-ast.token-fetcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class EthereumAirswapSAstTokenFetcher implements PositionFetcher<AppToken
]);

const baseTokenDependencies = await this.appToolkit.getBaseTokenPrices(network);
const underlyingToken = baseTokenDependencies.find(v => v.symbol === AIRSWAP_DEFINITION.symbol);
const underlyingToken = baseTokenDependencies.find(v => v.symbol === 'AST');

if (!underlyingToken) {
return [];
Expand Down
10 changes: 8 additions & 2 deletions src/apps/curve/curve.definition.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
import { Register } from '~app-toolkit/decorators';
import { AppDefinition } from '~app/app.definition';
import { GroupType, ProtocolAction, ProtocolTag } from '~app/app.interface';
import { AppDefinitionObject, GroupType, ProtocolAction, ProtocolTag } from '~app/app.interface';
import { Network } from '~types/network.interface';

export const CURVE_DEFINITION = {
export const CURVE_DEFINITION: AppDefinitionObject = {
id: 'curve',
name: 'Curve',
description: `An exchange liquidity pool on Ethereum designed for: extremely efficient stablecoin trading, low risk, supplemental fee income for liquidity providers`,
url: 'https://curve.fi',
links: {
github: 'https://github.com/curvefi/',
twitter: 'https://twitter.com/curvefinance',
discord: 'https://discord.com/invite/rgrfS7W',
telegram: 'https://t.me/curvefi',
},
groups: {
farm: { id: 'farm', type: GroupType.POSITION },
pool: { id: 'pool', type: GroupType.TOKEN },
Expand Down
11 changes: 9 additions & 2 deletions src/apps/enzyme-finance/enzyme-finance.definition.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
import { Register } from '~app-toolkit/decorators';
import { AppDefinition } from '~app/app.definition';
import { GroupType, ProtocolAction, ProtocolTag } from '~app/app.interface';
import { AppDefinitionObject, GroupType, ProtocolAction, ProtocolTag } from '~app/app.interface';
import { Network } from '~types/network.interface';

export const ENZYME_FINANCE_DEFINITION = {
export const ENZYME_FINANCE_DEFINITION: AppDefinitionObject = {
id: 'enzyme-finance',
name: 'Enzyme Finance',
description: 'Enzyme empowers you to build and scale vaults based on the investment strategies of your choice.',
groups: {
vault: { id: 'vault', type: GroupType.TOKEN },
},
url: 'https://enzyme.finance/',
links: {
github: 'https://github.com/enzymefinance',
twitter: 'https://twitter.com/enzymefinance',
discord: 'https://discord.enzyme.finance/',
telegram: 'https://telegram.enzyme.finance/',
medium: 'https://medium.com/enzymefinance',
},
tags: [ProtocolTag.ASSET_MANAGEMENT],
supportedNetworks: {
[Network.ETHEREUM_MAINNET]: [ProtocolAction.VIEW],
Expand Down
11 changes: 9 additions & 2 deletions src/apps/illuvium/illuvium.definition.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
import { Register } from '~app-toolkit/decorators';
import { AppDefinition } from '~app/app.definition';
import { GroupType, ProtocolAction, ProtocolTag } from '~app/app.interface';
import { AppDefinitionObject, GroupType, ProtocolAction, ProtocolTag } from '~app/app.interface';
import { Network } from '~types/network.interface';

export const ILLUVIUM_DEFINITION = {
export const ILLUVIUM_DEFINITION: AppDefinitionObject = {
id: 'illuvium',
name: 'Illuvium',
description: `Illuvium is a collectible NFT RPG game and auto-battler rolled into one. There is an open-world RPG experience in the overworld, where you mine, harvest, capture, and fight Illuvials.`,
url: 'https://www.illuvium.io/',
links: {
github: 'https://github.com/illuviumgame',
twitter: 'https://twitter.com/illuviumio',
discord: 'https://discord.com/invite/illuvium',
telegram: 'https://t.me/illuvium',
medium: 'https://medium.com/illuvium',
},
tags: [ProtocolTag.GAMING],
groups: {
farm: { id: 'farm', type: GroupType.POSITION },
Expand Down
10 changes: 8 additions & 2 deletions src/apps/jpegd/jpegd.definition.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
import { Register } from '~app-toolkit/decorators';
import { AppDefinition } from '~app/app.definition';
import { GroupType, ProtocolAction, ProtocolTag } from '~app/app.interface';
import { AppDefinitionObject, GroupType, ProtocolAction, ProtocolTag } from '~app/app.interface';
import { Network } from '~types/network.interface';

export const JPEGD_DEFINITION = {
export const JPEGD_DEFINITION: AppDefinitionObject = {
id: 'jpegd',
name: 'Jpegd',
description: 'JPEGd is the leading NFT lending platform in the decentralized finance space.',
url: 'https://jpegd.io/',
links: {
twitter: 'https://twitter.com/JPEGd_69',
discord: 'https://discord.com/invite/jpegd',
telegram: 'https://t.me/jpegd',
medium: 'https://medium.com/@jpegd',
},
groups: {
pool: { id: 'pool', type: GroupType.POSITION },
bond: { id: 'bond', type: GroupType.POSITION },
Expand Down
11 changes: 9 additions & 2 deletions src/apps/keeper-dao/keeper-dao.definition.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
import { Register } from '~app-toolkit/decorators';
import { AppDefinition } from '~app/app.definition';
import { GroupType, ProtocolAction, ProtocolTag } from '~app/app.interface';
import { AppDefinitionObject, GroupType, ProtocolAction, ProtocolTag } from '~app/app.interface';
import { Network } from '~types/network.interface';

export const KEEPER_DAO_DEFINITION = {
export const KEEPER_DAO_DEFINITION: AppDefinitionObject = {
id: 'keeper-dao',
name: 'KeeperDAO',
description: `KeeperDAO is building a decentralized protocol for Keepers that will help make Ethereum a more secure, egalitarian, and profitable network for all.`,
url: 'https://www.keeperdao.com/',
links: {
github: 'https://github.com/keeperdao',
twitter: 'https://twitter.com/Keeper_DAO',
telegram: 'https://t.me/keeperdao',
discord: 'https://discord.gg/3JUgvyyNhA',
medium: 'https://medium.com/keeperdao',
},
groups: {
v2Pool: { id: 'v2-pool', type: GroupType.TOKEN },
v3Pool: { id: 'v3-pool', type: GroupType.TOKEN },
Expand Down
6 changes: 3 additions & 3 deletions src/apps/lido/ethereum/lido.steth.token-fetcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ export class EthereumLidoStethTokenFetcher implements PositionFetcher<AppTokenPo
) {}

async getPositions() {
const address = LIDO_DEFINITION.stethAddress;
const address = '0xae7ab96520de3a18e5e111b5eaab095312d7fe84';
const multicall = this.appToolkit.getMulticall(network);
const contract = this.lidoContractFactory.steth({ address: address, network });
const baseTokenDependencies = await this.appToolkit.getBaseTokenPrices(network);
const stethToken = baseTokenDependencies.find(v => v.symbol === LIDO_DEFINITION.stethSymbol)!;
const stethToken = baseTokenDependencies.find(v => v.symbol === 'stETH')!;
const [symbol, decimals, totalSupply] = await Promise.all([
multicall.wrap(contract).symbol(),
multicall.wrap(contract).decimals(),
Expand All @@ -49,7 +49,7 @@ export class EthereumLidoStethTokenFetcher implements PositionFetcher<AppTokenPo
price: stethToken.price,
type: ContractType.APP_TOKEN,
displayProps: {
label: LIDO_DEFINITION.stethSymbol,
label: symbol,
secondaryLabel: buildDollarDisplayItem(stethToken.price),
images: [getTokenImg(address, network)],
},
Expand Down
6 changes: 3 additions & 3 deletions src/apps/lido/ethereum/lido.tvl-fetcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ export class EthereumLidoTvlFetcher implements TvlFetcher {
) {}

async getTvl() {
const address = LIDO_DEFINITION.stethAddress;
const stethAddress = '0xae7ab96520de3a18e5e111b5eaab095312d7fe84';
const baseTokens = await this.appToolkit.getBaseTokenPrices(network);
const stethToken = baseTokens.find(v => v.symbol === LIDO_DEFINITION.stethSymbol)!;
const contract = this.lidoContractFactory.steth({ address: address, network });
const stethToken = baseTokens.find(v => v.symbol === 'stETH')!;
const contract = this.lidoContractFactory.steth({ address: stethAddress, network });
const multicall = this.appToolkit.getMulticall(network);
const [decimals, totalSupply] = await Promise.all([
multicall.wrap(contract).decimals(),
Expand Down
6 changes: 3 additions & 3 deletions src/apps/lido/ethereum/lido.wsteth.token-fetcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ export class EthereumLidoWstethTokenFetcher implements PositionFetcher<AppTokenP
) {}

async getPositions() {
const address = LIDO_DEFINITION.wstethAddress;
const address = '0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0';
const multicall = this.appToolkit.getMulticall(network);
const contract = this.lidoContractFactory.steth({ address: address, network });
const baseTokenDependencies = await this.appToolkit.getBaseTokenPrices(network);
const wstethToken = baseTokenDependencies.find(v => v.symbol === LIDO_DEFINITION.wstethSymbol)!;
const wstethToken = baseTokenDependencies.find(v => v.symbol === 'wstETH')!;
const [symbol, decimals, totalSupply] = await Promise.all([
multicall.wrap(contract).symbol(),
multicall.wrap(contract).decimals(),
Expand All @@ -49,7 +49,7 @@ export class EthereumLidoWstethTokenFetcher implements PositionFetcher<AppTokenP
price: wstethToken.price,
type: ContractType.APP_TOKEN,
displayProps: {
label: LIDO_DEFINITION.wstethSymbol,
label: symbol,
secondaryLabel: buildDollarDisplayItem(wstethToken.price),
images: [getTokenImg(address, network)],
},
Expand Down
15 changes: 9 additions & 6 deletions src/apps/lido/lido.definition.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
import { Register } from '~app-toolkit/decorators';
import { AppDefinition } from '~app/app.definition';
import { ProtocolAction, GroupType, ProtocolTag } from '~app/app.interface';
import { ProtocolAction, GroupType, ProtocolTag, AppDefinitionObject } from '~app/app.interface';
import { Network } from '~types/network.interface';

export const LIDO_DEFINITION = {
export const LIDO_DEFINITION: AppDefinitionObject = {
id: 'lido',
name: 'Lido',
description: 'Liquidity for staked assets',
url: 'https://lido.fi/',
stethSymbol: 'stETH',
wstethSymbol: 'wstETH',
links: {
github: 'https://github.com/lidofinance',
twitter: 'https://twitter.com/lidofinance',
discord: 'https://discord.com/invite/lido',
telegram: 'https://t.me/lidofinance',
medium: 'https://lidofinance.medium.com/',
},
groups: {
steth: { id: 'steth', type: GroupType.TOKEN },
wsteth: { id: 'wsteth', type: GroupType.TOKEN },
Expand All @@ -19,8 +24,6 @@ export const LIDO_DEFINITION = {
[Network.ETHEREUM_MAINNET]: [ProtocolAction.VIEW],
},
primaryColor: '#fff',
stethAddress: '0xae7ab96520de3a18e5e111b5eaab095312d7fe84',
wstethAddress: '0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0',
};

@Register.AppDefinition(LIDO_DEFINITION.id)
Expand Down
11 changes: 9 additions & 2 deletions src/apps/liquity/liquity.definition.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
import { Register } from '~app-toolkit/decorators';
import { AppDefinition } from '~app/app.definition';
import { GroupType, ProtocolAction, ProtocolTag } from '~app/app.interface';
import { AppDefinitionObject, GroupType, ProtocolAction, ProtocolTag } from '~app/app.interface';
import { Network } from '~types/network.interface';

export const LIQUITY_DEFINITION = {
export const LIQUITY_DEFINITION: AppDefinitionObject = {
id: 'liquity',
name: 'Liquity',
description:
'Liquity is a decentralized borrowing protocol that allows you to draw interest-free loans against Ether used as collateral.',
url: 'https://www.liquity.org/',
links: {
github: 'https://github.com/liquity',
twitter: 'https://twitter.com/LiquityProtocol',
discord: 'https://t.co/0iKGcr4kyK',
telegram: 'https://t.me/liquityprotocol',
medium: 'https://medium.com/liquity',
},
groups: {
farm: { id: 'farm', type: GroupType.POSITION },
trove: { id: 'trove', type: GroupType.POSITION },
Expand Down
11 changes: 9 additions & 2 deletions src/apps/naos/naos.definition.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
import { Register } from '~app-toolkit/decorators';
import { AppDefinition } from '~app/app.definition';
import { GroupType, ProtocolAction, ProtocolTag } from '~app/app.interface';
import { AppDefinitionObject, GroupType, ProtocolAction, ProtocolTag } from '~app/app.interface';
import { Network } from '~types/network.interface';

export const NAOS_DEFINITION = {
export const NAOS_DEFINITION: AppDefinitionObject = {
id: 'naos',
name: 'NAOS Finance',
description: `Earn competitive yield from income generating real world financial assets.`,
links: {
github: 'https://github.com/NAOS-Finance',
twitter: 'https://twitter.com/naos_finance',
discord: 'https://discord.com/invite/qThcuS7FBd',
telegram: 'https://t.me/naos_finance',
medium: 'https://naosfinance.medium.com/',
},
groups: {
farm: { id: 'farm', type: GroupType.POSITION },
},
Expand Down
11 changes: 9 additions & 2 deletions src/apps/olympus/olympus.definition.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
import { Register } from '~app-toolkit/decorators';
import { AppDefinition } from '~app/app.definition';
import { GroupType, ProtocolAction, ProtocolTag } from '~app/app.interface';
import { AppDefinitionObject, GroupType, ProtocolAction, ProtocolTag } from '~app/app.interface';
import { Network } from '~types/network.interface';

export const OLYMPUS_DEFINITION = {
export const OLYMPUS_DEFINITION: AppDefinitionObject = {
id: 'olympus',
name: 'Olympus',
description: `Olympus is a decentralized reserve currency protocol based on the OHM token. Each OHM token is backed by a basket of assets in the Olympus treasury, giving it an intrinsic value that it cannot fall below.`,
url: 'https://www.olympusdao.finance/',
links: {
github: 'https://github.com/OlympusDAO',
twitter: 'https://twitter.com/OlympusDAO',
discord: 'https://discord.gg/olympusdao',
telegram: 'https://t.me/OlympusTG',
medium: 'https://olympusdao.medium.com/',
},
tags: [ProtocolTag.ELASTIC_FINANCE],
groups: {
sOhmV1: { id: 's-ohm-v1', type: GroupType.TOKEN },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export class EthereumPickleSingleRewardPositionFetcher implements PositionFetche
.map(({ vaultAddress, gaugeAddress }) => ({
address: gaugeAddress!,
stakedTokenAddress: vaultAddress,
rewardTokenAddresses: [PICKLE_DEFINITION.token.address],
rewardTokenAddresses: [PICKLE_DEFINITION.token!.address],
})),
resolveFarmContract: ({ address }) =>
this.pickleContractFactory.pickleJarSingleRewardStaking({ network, address }),
Expand Down
Loading

0 comments on commit 0bb0453

Please sign in to comment.