Skip to content

Commit 5403b3f

Browse files
author
Getty Hill
committed
Merge branch 'main' into feat/etherlink - keeping both Etherlink and new chains (TAC, Lisk)
2 parents 93c6b56 + 5c72d5d commit 5403b3f

File tree

6 files changed

+75
-9
lines changed

6 files changed

+75
-9
lines changed

.github/workflows/test.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@ jobs:
2020
node-version-file: .nvmrc
2121
cache: pnpm
2222

23-
# - name: Restore Foundry cache
24-
# uses: actions/cache/restore@v3
25-
# with:
26-
# path: ~/.foundry/cache/rpc
27-
# key: ${{ runner.os }}-foundry-chain-fork-${{ github.job }}-${{ github.sha }}
28-
# restore-keys: ${{ runner.os }}-foundry-chain-fork-${{ github.job }}-
23+
- name: Restore Foundry cache
24+
uses: actions/cache/restore@v4
25+
with:
26+
path: ~/.foundry/cache/rpc
27+
key: foundry-${{ github.job }}-${{ github.sha }}
28+
restore-keys: foundry-${{ github.job }}-
2929

3030
- uses: foundry-rs/foundry-toolchain@v1
3131
with:
32-
cache: false
32+
cache: false # Disable built-in cache to always save it.
3333

3434
- run: pnpm install --frozen-lockfile
3535

@@ -40,7 +40,7 @@ jobs:
4040

4141
- name: Save Foundry cache
4242
if: always()
43-
uses: actions/cache/save@v3
43+
uses: actions/cache/save@v4
4444
with:
4545
path: ~/.foundry/cache/rpc
46-
key: ${{ runner.os }}-foundry-chain-fork-${{ github.job }}-${{ github.sha }}
46+
key: foundry-${{ github.job }}-${{ github.sha }}

packages/blue-sdk/src/addresses.ts

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,36 @@ const _addressesRegistry = {
412412

413413
wNative: "0xc9B53AB2679f573e480d01e0f49e2B5CFB7a3EAb",
414414
},
415+
[ChainId.TacMainnet]: {
416+
morpho: "0x918B9F2E4B44E20c6423105BB6cCEB71473aD35c",
417+
bundler3: {
418+
bundler3: "0x84b189823D0f84c36728Bb3335dD8C833564e72f",
419+
generalAdapter1: "0x6D94E7dCA6d8FAE2CF954633C2Cf9c286258E0af",
420+
},
421+
adaptiveCurveIrm: "0x7E82b16496fA8CC04935528dA7F5A2C684A3C7A3",
422+
publicAllocator: "0x414247afcf1fE3b94C617e7E3A7adB81D8D3208F",
423+
metaMorphoFactory: "0xcDA78f4979d17Ec93052A84A12001fe0088AD734",
424+
chainlinkOracleFactory: "0xbf10eD52dD60C60E901BF022c3675303ad4a56b1",
425+
preLiquidationFactory: "0x5851C1e423A2F93aFb821834a63cA052D19ae4Ef",
426+
427+
wNative: "0xB63B9f0eb4A6E6f191529D71d4D88cc8900Df2C9",
428+
},
429+
[ChainId.LiskMainnet]: {
430+
morpho: "0x00cD58DEEbd7A2F1C55dAec715faF8aed5b27BF8",
431+
bundler3: {
432+
bundler3: "0xD96E5e02580C4EAfE15B5537b25eE3dEe5861e00",
433+
generalAdapter1: "0x76cFE4BF840C7b461772fE7CDE399f58c4173584",
434+
},
435+
adaptiveCurveIrm: "0x5576629f21D528A8c3e06C338dDa907B94563902",
436+
publicAllocator: "0xb1E5B1De2a54ab55C412B5ee1E38e46799588103",
437+
metaMorphoFactory: "0x01dD876130690469F685a65C2B295A90a81BaD91",
438+
chainlinkOracleFactory: "0x2eb4D17C2AAf1EA62Bf83Fb49Dd1128b14AF4D93",
439+
preLiquidationFactory: "0xF2c325F26691b6556e6f66451bb38bDa37FEbaa7",
440+
441+
wNative: "0x4200000000000000000000000000000000000006",
442+
// Must implement USDC permit version 2 (otherwise breaks permit signatures).
443+
usdc: "0xF242275d3a6527d877f2c927a82D9b057609cc71",
444+
},
415445
} as const;
416446

417447
export type AddressLabel = DottedKeys<(typeof _addressesRegistry)[ChainId]>;
@@ -503,6 +533,12 @@ const _unwrappedTokensMapping: Record<number, Record<Address, Address>> = {
503533
[ChainId.EtherlinkMainnet]: {
504534
[_addressesRegistry[ChainId.EtherlinkMainnet].wNative]: NATIVE_ADDRESS,
505535
},
536+
[ChainId.TacMainnet]: {
537+
[_addressesRegistry[ChainId.TacMainnet].wNative]: NATIVE_ADDRESS,
538+
},
539+
[ChainId.LiskMainnet]: {
540+
[_addressesRegistry[ChainId.LiskMainnet].wNative]: NATIVE_ADDRESS,
541+
},
506542
};
507543

508544
export function getUnwrappedToken(wrappedToken: Address, chainId: number) {

packages/blue-sdk/src/chain.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ export enum ChainId {
1717
CampMainnet = 123420001114,
1818
KatanaMainnet = 747474,
1919
EtherlinkMainnet = 42793,
20+
TacMainnet = 239,
21+
LiskMainnet = 1135,
2022
}
2123

2224
export interface ChainMetadata {
@@ -175,5 +177,19 @@ export namespace ChainUtils {
175177
explorerUrl: "https://explorer.etherlink.com",
176178
identifier: "etherlink",
177179
},
180+
[ChainId.TacMainnet]: {
181+
name: "TAC",
182+
id: ChainId.TacMainnet,
183+
nativeCurrency: { name: "TAC", symbol: "TAC", decimals: 18 },
184+
explorerUrl: "https://explorer.tac.build/",
185+
identifier: "tac",
186+
},
187+
[ChainId.LiskMainnet]: {
188+
name: "Lisk",
189+
id: ChainId.LiskMainnet,
190+
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
191+
explorerUrl: "https://blockscout.lisk.com",
192+
identifier: "lisk",
193+
},
178194
};
179195
}

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ export const midasConfigs: Record<ChainId, Record<Address, MidasConfig>> = {
121121
[ChainId.CampMainnet]: {},
122122
[ChainId.KatanaMainnet]: {},
123123
[ChainId.EtherlinkMainnet]: {},
124+
[ChainId.TacMainnet]: {},
125+
[ChainId.LiskMainnet]: {},
124126
};
125127

126128
export const preLiquidationFactoryConfigs: Record<
@@ -199,4 +201,12 @@ export const preLiquidationFactoryConfigs: Record<
199201
address: addressesRegistry[ChainId.EtherlinkMainnet].preLiquidationFactory,
200202
startBlock: 21047448n,
201203
},
204+
[ChainId.TacMainnet]: {
205+
address: addressesRegistry[ChainId.TacMainnet].preLiquidationFactory,
206+
startBlock: 978967n,
207+
},
208+
[ChainId.LiskMainnet]: {
209+
address: addressesRegistry[ChainId.LiskMainnet].preLiquidationFactory,
210+
startBlock: 15731595n,
211+
},
202212
};

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@ import { parseEther } from "viem";
44
export const collateralUsdThreshold: Record<number, bigint> = {
55
[ChainId.EthMainnet]: parseEther("1000"),
66
[ChainId.BaseMainnet]: parseEther("2"),
7+
[ChainId.PolygonMainnet]: parseEther("2"),
8+
[ChainId.ArbitrumMainnet]: parseEther("2"),
79
};

packages/liquidation-sdk-viem/src/tokens/spectra.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ export namespace Spectra {
88
return "https://app.spectra.finance/api/v1/MAINNET/pools";
99
case ChainId.BaseMainnet:
1010
return "https://app.spectra.finance/api/v1/BASE/pools";
11+
case ChainId.ArbitrumMainnet:
12+
return "https://app.spectra.finance/api/v1/ARBITRUM/pools";
1113
default:
1214
return undefined;
1315
}

0 commit comments

Comments
 (0)