Skip to content

Commit 04dd925

Browse files
committed
chore: add plasma and soneium
1 parent 2709efc commit 04dd925

File tree

12 files changed

+5085
-7543
lines changed

12 files changed

+5085
-7543
lines changed

.prettierrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
{
2+
"plugins": ["prettier-plugin-solidity"],
23
"overrides": [
34
{
45
"files": "*.sol",
56
"options": {
7+
"parser": "solidity-parse",
68
"printWidth": 100,
79
"tabWidth": 2,
810
"useTabs": false,

foundry.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"lib/aave-helpers": {
66
"branch": {
77
"name": "main",
8-
"rev": "0e4b0ebef286cdd5bd85b99523cfa3e29245a2b2"
8+
"rev": "4f4a6631248c19e895997b072302776b6381dd9b"
99
}
1010
}
1111
}

foundry.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ zksync = "${RPC_ZKSYNC}"
5656
linea = "${RPC_LINEA}"
5757
sonic = "${RPC_SONIC}"
5858
celo = "${RPC_CELO}"
59+
soneium = "${RPC_SONEIUM}"
60+
plasma = "${RPC_PLASMA}"
5961

6062
[etherscan]
6163
mainnet = { key="${ETHERSCAN_API_KEY_MAINNET}", chainId=1 }
@@ -74,5 +76,7 @@ zksync = { key="${ETHERSCAN_API_KEY_ZKSYNC}", chainId= 324 }
7476
linea = { key="${ETHERSCAN_API_KEY_LINEA}", chain = 59144 }
7577
sonic = { key="${ETHERSCAN_API_KEY_SONIC}", chain = 146 }
7678
celo = { key="${ETHERSCAN_API_KEY_CELO}", chain = 42220 }
79+
soneium = { key="any", chainId=1868, url='https://soneium.blockscout.com/api' }
80+
plasma = { key="any", chainId=9745 }
7781

7882
# See more config options https://github.com/gakonst/foundry/tree/master/config

generator/cli.ts

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,15 @@ import path from 'path';
33
import {Command, Option} from 'commander';
44
import {CHAIN_TO_CHAIN_ID, getDate, getPoolChain, pascalCase} from './common';
55
import {input, checkbox} from '@inquirer/prompts';
6-
import {
7-
ConfigFile,
8-
Options,
9-
POOLS,
10-
PoolCache,
11-
PoolConfigs,
12-
PoolIdentifier,
13-
} from './types';
6+
import {ConfigFile, Options, POOLS, PoolCache, PoolConfigs, PoolIdentifier} from './types';
147
import {capsUpdates} from './features/capsUpdates';
158
import {rateUpdatesV3} from './features/rateUpdates';
169
import {collateralsUpdates} from './features/collateralsUpdates';
1710
import {eModeUpdates} from './features/eModeUpdates';
1811
import {lstPriceCapsUpdates} from './features/lstPriceCapsUpdates';
1912
import {stablePriceCapsUpdates} from './features/stablePriceCapsUpdates';
2013
import {generateFiles, writeFiles} from './generator';
21-
import {getClient} from '@bgd-labs/rpc-env';
14+
import {getClient} from '@bgd-labs/toolbox';
2215
import {getBlockNumber} from 'viem/actions';
2316

2417
const program = new Command();
@@ -45,7 +38,7 @@ const FEATURE_MODULES_V3 = [
4538
collateralsUpdates,
4639
lstPriceCapsUpdates,
4740
stablePriceCapsUpdates,
48-
eModeUpdates
41+
eModeUpdates,
4942
];
5043

5144
async function generateDeterministicPoolCache(pool: PoolIdentifier): Promise<PoolCache> {

generator/common.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ import {
1515
linea,
1616
sonic,
1717
celo,
18+
soneium,
19+
plasma,
1820
} from 'viem/chains';
1921

2022
export const AVAILABLE_CHAINS = [
@@ -34,6 +36,8 @@ export const AVAILABLE_CHAINS = [
3436
'Linea',
3537
'Sonic',
3638
'Celo',
39+
'Soneium',
40+
'Plasma',
3741
] as const;
3842

3943
export function getAssets(pool: PoolIdentifier): string[] {
@@ -123,6 +127,8 @@ export const CHAIN_TO_CHAIN_ID = {
123127
Linea: linea.id,
124128
Sonic: sonic.id,
125129
Celo: celo.id,
130+
Soneium: soneium.id,
131+
Plasma: plasma.id,
126132
};
127133

128134
export function flagAsRequired(message: string, required?: boolean) {

generator/types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ export const V3_POOLS = [
2424
'AaveV3Linea',
2525
'AaveV3Sonic',
2626
'AaveV3Celo',
27+
'AaveV3Soneium',
28+
'AaveV3Plasma',
2729
] as const satisfies readonly (keyof typeof addressBook)[];
2830

2931
export const POOLS = [...V3_POOLS] as const satisfies readonly (keyof typeof addressBook)[];

0 commit comments

Comments
 (0)