Skip to content

Commit

Permalink
chore: environment update (#608)
Browse files Browse the repository at this point in the history
* chore: environment update

* chore: changeset

* feat: change aEthEthx price feed
  • Loading branch information
iherger authored Dec 21, 2024
1 parent e70d60e commit 2e60023
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/warm-cats-love.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@enzymefinance/environment": patch
---

Change ETHx price feed
8 changes: 4 additions & 4 deletions packages/environment/src/assets/ethereum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@ export default defineAssetList(Network.ETHEREUM, [
type: AssetType.AAVE_V3,
underlying: "0xa35b1b31ce002fbf2058d22f30f95d405200a15b",
priceFeed: {
type: PriceFeedType.PRIMITIVE_REDSTONE_NON_STANDARD_PRECISION,
aggregator: "0x8c7fe497fcd0c4f75da39aef3c69e024915f4239",
type: PriceFeedType.PRIMITIVE_CHAINLINK_LIKE_ETHX,
aggregator: "0x75c4dc3201015c78a60dbe673fc7247549527c1b",
rateAsset: RateAsset.ETH,
},
},
Expand Down Expand Up @@ -3463,8 +3463,8 @@ export default defineAssetList(Network.ETHEREUM, [
symbol: "ETHx",
type: AssetType.PRIMITIVE,
priceFeed: {
type: PriceFeedType.PRIMITIVE_REDSTONE_NON_STANDARD_PRECISION,
aggregator: "0x8c7fe497fcd0c4f75da39aef3c69e024915f4239",
type: PriceFeedType.PRIMITIVE_CHAINLINK_LIKE_ETHX,
aggregator: "0x75c4dc3201015c78a60dbe673fc7247549527c1b",
rateAsset: RateAsset.ETH,
},
},
Expand Down
14 changes: 14 additions & 0 deletions packages/environment/src/price-feeds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export enum PriceFeedType {
NONE = "NONE",
WETH = "WETH",
PRIMITIVE_CHAINLINK = "PRIMITIVE_CHAINLINK",
PRIMITIVE_CHAINLINK_LIKE_ETHX = "PRIMITIVE_CHAINLINK_LIKE_ETHX",
PRIMITIVE_CHAINLINK_LIKE_WSTETH = "PRIMITIVE_CHAINLINK_LIKE_WSTETH",
PRIMITIVE_CHAINLINK_LIKE_YNETH = "PRIMITIVE_CHAINLINK_LIKE_YNETH",
PRIMITIVE_REDSTONE = "PRIMITIVE_REDSTONE",
Expand All @@ -27,6 +28,7 @@ export enum PriceFeedType {

export const primitivePriceFeeds = [
PriceFeedType.PRIMITIVE_CHAINLINK,
PriceFeedType.PRIMITIVE_CHAINLINK_LIKE_ETHX,
PriceFeedType.PRIMITIVE_CHAINLINK_LIKE_WSTETH,
PriceFeedType.PRIMITIVE_CHAINLINK_LIKE_YNETH,
PriceFeedType.PRIMITIVE_REDSTONE,
Expand Down Expand Up @@ -59,6 +61,7 @@ export type PriceFeed =
| NoPriceFeed
| WethPriceFeed
| PrimitiveChainlinkPriceFeed
| PrimitiveChainlinkLikeEthxPriceFeed
| PrimitiveChainlinkLikeWstEthPriceFeed
| PrimitiveChainlinkLikeYnEthPriceFeed
| PrimitiveRedstonePriceFeed
Expand Down Expand Up @@ -127,6 +130,17 @@ export interface PrimitiveChainlinkLikeYnEthPriceFeed extends PriceFeedBase {
*/
readonly rateAsset: RateAsset.ETH;
}
export interface PrimitiveChainlinkLikeEthxPriceFeed extends PriceFeedBase {
readonly type: PriceFeedType.PRIMITIVE_CHAINLINK_LIKE_ETHX;
/**
* Aggregator address
*/
readonly aggregator: Address;
/**
* Rate Asset (ETH = 0, USD = 1)
*/
readonly rateAsset: RateAsset.ETH;
}

export interface PrimitiveRedstonePriceFeed extends PriceFeedBase {
readonly type: PriceFeedType.PRIMITIVE_REDSTONE;
Expand Down
2 changes: 2 additions & 0 deletions packages/environment/test/assets/price-feed.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ suite.each(assets)("$symbol ($name): $id", (asset) => {
}

case PriceFeedType.PRIMITIVE_CHAINLINK:
case PriceFeedType.PRIMITIVE_CHAINLINK_LIKE_ETHX:
case PriceFeedType.PRIMITIVE_CHAINLINK_LIKE_WSTETH:
case PriceFeedType.PRIMITIVE_CHAINLINK_LIKE_YNETH:
case PriceFeedType.PRIMITIVE_REDSTONE:
Expand Down Expand Up @@ -216,6 +217,7 @@ suite.each(assets)("$symbol ($name): $id", (asset) => {
case PriceFeedType.NONE:
case PriceFeedType.WETH:
case PriceFeedType.PRIMITIVE_CHAINLINK:
case PriceFeedType.PRIMITIVE_CHAINLINK_LIKE_ETHX:
case PriceFeedType.PRIMITIVE_CHAINLINK_LIKE_WSTETH:
case PriceFeedType.PRIMITIVE_CHAINLINK_LIKE_YNETH:
case PriceFeedType.PRIMITIVE_REDSTONE:
Expand Down

0 comments on commit 2e60023

Please sign in to comment.