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

Commit

Permalink
fix(kyberswap-elastic): Update addresses and abis (#2758)
Browse files Browse the repository at this point in the history
  • Loading branch information
wpoulin authored Jun 19, 2023
1 parent b791228 commit 685746a
Show file tree
Hide file tree
Showing 20 changed files with 745 additions and 1,143 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ import { KyberswapElasticFarmContractPositionFetcher } from '../common/kyberswap
export class ArbitrumKyberswapElasticFarmContractPositionFetcher extends KyberswapElasticFarmContractPositionFetcher {
groupLabel = 'Farms';

kyberswapElasticLmAddress = '0xbdec4a045446f583dc564c0a227ffd475b329bf0';
kyberswapElasticLmAddress = '0x7d5ba536ab244aaa1ea42ab88428847f25e3e676';
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export class ArbitrumKyberswapElasticLiquidityContractPositionFetcher extends Ky
groupLabel = 'Pools';

subgraphUrl = 'https://api.thegraph.com/subgraphs/name/kybernetwork/kyberswap-elastic-arbitrum-one';
positionManagerAddress = '0x2b1c7b41f6a8f2b2bc45c3233a5d5fb3cd6dc9a8';
factoryAddress = '0x5f1dddbf348ac2fbe22a163e30f99f9ece3dd50a';
positionManagerAddress = '0xe222fbe074a436145b255442d919e4e3a6c6a480';
factoryAddress = '0xc7a590291e07b9fe9e64b86c58fd8fc764308c4a';
blockSubgraphUrl = 'https://arbitrum-graph.kyberengineering.io/subgraphs/name/kybernetwork/arbitrum-blocks';
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ import { KyberswapElasticFarmContractPositionFetcher } from '../common/kyberswap
export class AvalancheKyberswapElasticFarmContractPositionFetcher extends KyberswapElasticFarmContractPositionFetcher {
groupLabel = 'Farms';

kyberswapElasticLmAddress = '0xbdec4a045446f583dc564c0a227ffd475b329bf0';
kyberswapElasticLmAddress = '0x7d5ba536ab244aaa1ea42ab88428847f25e3e676';
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export class AvalancheKyberswapElasticLiquidityContractPositionFetcher extends K
groupLabel = 'Pools';

subgraphUrl = 'https://api.thegraph.com/subgraphs/name/kybernetwork/kyberswap-elastic-avalanche';
positionManagerAddress = '0x2b1c7b41f6a8f2b2bc45c3233a5d5fb3cd6dc9a8';
factoryAddress = '0x5f1dddbf348ac2fbe22a163e30f99f9ece3dd50a';
positionManagerAddress = '0xe222fbe074a436145b255442d919e4e3a6c6a480';
factoryAddress = '0xc7a590291e07b9fe9e64b86c58fd8fc764308c4a';
blockSubgraphUrl = 'https://api.thegraph.com/subgraphs/name/kybernetwork/avalanche-blocks';
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator';

import { KyberswapElasticFarmContractPositionFetcher } from '../common/kyberswap-elastic.farm.contract-position-fetcher';

@PositionTemplate()
export class BinanceSmartChainKyberswapElasticFarmContractPositionFetcher extends KyberswapElasticFarmContractPositionFetcher {
groupLabel = 'Farms';

kyberswapElasticLmAddress = '0x7d5ba536ab244aaa1ea42ab88428847f25e3e676';
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export class BinanceSmartChainKyberswapElasticLiquidityContractPositionFetcher e
groupLabel = 'Pools';

subgraphUrl = 'https://api.thegraph.com/subgraphs/name/kybernetwork/kyberswap-elastic-bsc';
positionManagerAddress = '0x2b1c7b41f6a8f2b2bc45c3233a5d5fb3cd6dc9a8';
factoryAddress = '0x5f1dddbf348ac2fbe22a163e30f99f9ece3dd50a';
positionManagerAddress = '0xe222fbe074a436145b255442d919e4e3a6c6a480';
factoryAddress = '0xc7a590291e07b9fe9e64b86c58fd8fc764308c4a';
blockSubgraphUrl = 'https://bsc-graph.kyberengineering.io/subgraphs/name/kybernetwork/bsc-blocks';
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ type KyberswapElasticLiquidityContractPositionHelperParams = {
};

export class KyberswapElasticFarmContractPositionBuilder {
managerAddress = '0x2b1c7b41f6a8f2b2bc45c3233a5d5fb3cd6dc9a8';
factoryAddress = '0x5f1dddbf348ac2fbe22a163e30f99f9ece3dd50a';
positionManagerAddress = '0xe222fbe074a436145b255442d919e4e3a6c6a480';
factoryAddress = '0xc7a590291e07b9fe9e64b86c58fd8fc764308c4a';

constructor(
@Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit,
Expand All @@ -52,7 +52,7 @@ export class KyberswapElasticFarmContractPositionBuilder {
collapseClaimable,
kyberswapElasticLmAddress,
}: KyberswapElasticLiquidityContractPositionHelperParams) {
const positionManager = this.contractFactory.positionManager({ address: this.managerAddress, network });
const positionManager = this.contractFactory.positionManager({ address: this.positionManagerAddress, network });
const factoryContract = this.contractFactory.factory({ address: this.factoryAddress, network });
const elasticLmContract = this.contractFactory.kyberswapElasticLm({ address: kyberswapElasticLmAddress, network });
const position = await multicall.wrap(positionManager).positions(positionId);
Expand Down Expand Up @@ -145,8 +145,8 @@ export class KyberswapElasticFarmContractPositionBuilder {

const balance: ContractPositionBalance<KyberswapElasticLiquidityPositionDataProps> = {
type: ContractType.POSITION,
address: this.managerAddress,
appId: 'kyberswap',
address: this.positionManagerAddress,
appId: 'kyberswap-elastic',
groupId: 'farm',
network,
tokens,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ export abstract class KyberswapElasticFarmContractPositionFetcher extends Custom

return {
address: this.kyberswapElasticLmAddress,
poolAddress: poolInfos.poolAddress,
poolAddress: poolInfos.poolAddress.toLowerCase(),
token0Address: token0Raw.toLowerCase(),
token1Address: token1Raw.toLowerCase(),
rewardTokenAddresses: poolInfos.rewardTokens,
rewardTokenAddresses: poolInfos.rewardTokens.map(x => x.toLowerCase()),
feeTier: feeTier,
};
}),
Expand Down
Loading

0 comments on commit 685746a

Please sign in to comment.