Skip to content

Commit f15de0b

Browse files
author
Getty Hill
committed
feat: add etherlink support
Add Etherlink mainnet (42793) support across SDKs with deployment addresses and chain configuration.
1 parent 59ba43e commit f15de0b

File tree

3 files changed

+28
-1
lines changed

3 files changed

+28
-1
lines changed

packages/blue-sdk/src/addresses.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ const _addressesRegistry = {
245245
chainlinkOracleFactory: "0x39d8622C607A691D7705E8842fbB12E3c38dCD41",
246246
preLiquidationFactory: "0xe3cE2051a24e58DBFC0eFBe4c2d9e89c5eAe4695",
247247

248-
wNative: "0xfc00000000000000000000000000000000000006",
248+
wNative: "0xFC00000000000000000000000000000000000006",
249249
},
250250
[ChainId.ScrollMainnet]: {
251251
morpho: "0x2d012EdbAdc37eDc2BC62791B666f9193FDF5a55",
@@ -398,6 +398,20 @@ const _addressesRegistry = {
398398

399399
wNative: "0xEE7D8BCFb72bC1880D0Cf19822eB0A2e6577aB62",
400400
},
401+
[ChainId.EtherlinkMainnet]: {
402+
morpho: "0xbCE7364E63C3B13C73E9977a83c9704E2aCa876e",
403+
bundler3: {
404+
bundler3: "0x69dc8086191437b55775b79C730BB3876397e7D1",
405+
generalAdapter1: "0xEabdAC78A7f0a9B3dF0e23D69A5a5fF7f580a910",
406+
},
407+
adaptiveCurveIrm: "0xC1523BE776e66ba07b609b1914D0925278f21FE5",
408+
publicAllocator: "0x8b8B1bd41d36c06253203CD21463994aB752c1e6",
409+
metaMorphoFactory: "0x997a79c3C04c5B9eb27d343ae126bcCFb5D74781",
410+
chainlinkOracleFactory: "0x12FA40f687a35611720E1DcB59976B6e51247298",
411+
preLiquidationFactory: "0xd1c37fDd941256FC184eF3A07Be540a90b81Ec21",
412+
413+
wNative: "0xc9B53AB2679f573e480d01e0f49e2B5CFB7a3EAb",
414+
},
401415
} as const;
402416

403417
export type AddressLabel = DottedKeys<(typeof _addressesRegistry)[ChainId]>;

packages/blue-sdk/src/chain.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export enum ChainId {
1616
PlumeMainnet = 98866,
1717
CampMainnet = 123420001114,
1818
KatanaMainnet = 747474,
19+
EtherlinkMainnet = 42793,
1920
}
2021

2122
export interface ChainMetadata {
@@ -167,5 +168,12 @@ export namespace ChainUtils {
167168
explorerUrl: "https://explorer.katanarpc.com",
168169
identifier: "katana",
169170
},
171+
[ChainId.EtherlinkMainnet]: {
172+
name: "Etherlink",
173+
id: ChainId.EtherlinkMainnet,
174+
nativeCurrency: { name: "Tezos", symbol: "XTZ", decimals: 18 },
175+
explorerUrl: "https://explorer.etherlink.com",
176+
identifier: "etherlink",
177+
},
170178
};
171179
}

packages/liquidation-sdk-viem/src/addresses.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ export const midasConfigs: Record<ChainId, Record<Address, MidasConfig>> = {
120120
[ChainId.PlumeMainnet]: {},
121121
[ChainId.CampMainnet]: {},
122122
[ChainId.KatanaMainnet]: {},
123+
[ChainId.EtherlinkMainnet]: {},
123124
};
124125

125126
export const preLiquidationFactoryConfigs: Record<
@@ -194,4 +195,8 @@ export const preLiquidationFactoryConfigs: Record<
194195
address: addressesRegistry[ChainId.KatanaMainnet].preLiquidationFactory,
195196
startBlock: 2741993n,
196197
},
198+
[ChainId.EtherlinkMainnet]: {
199+
address: addressesRegistry[ChainId.EtherlinkMainnet].preLiquidationFactory,
200+
startBlock: 21047448n,
201+
},
197202
};

0 commit comments

Comments
 (0)