Skip to content

Commit e68bd9e

Browse files
chore: add plasma and soneium (aave-dao#57)
* chore: add plasma and soneium * chore: fix snapshot * chore: fix readme * chore: fix ci
1 parent 2709efc commit e68bd9e

20 files changed

+5093
-7555
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ on:
1010
jobs:
1111
test-solidity:
1212
uses: bgd-labs/github-workflows/.github/workflows/foundry-test.yml@main
13+
with:
14+
compareLcov: false
1315
secrets: inherit
1416
test-js:
1517
uses: bgd-labs/github-workflows/.github/workflows/test-node.yml@main

.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,

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ The `AaveStewardsInjector` contract also introduces an `EXPIRATION_PERIOD` to di
106106

107107
```sh
108108
cp .env.example .env
109-
npm install
109+
pnpm install
110110
forge install
111111
```
112112

@@ -124,12 +124,12 @@ forge test
124124

125125
### How to I use the generator tooling to bootstrap the update?
126126

127-
Run `npm run generate` on your terminal in order to start the generator. The generator is a CLI tool which will generate the required helper contract which can be then run to submit updates to the risk steward. The generator will generate the helper contract in the `src/contracts/updates` directory.
127+
Run `pnpm run generate` on your terminal in order to start the generator. The generator is a CLI tool which will generate the required helper contract which can be then run to submit updates to the risk steward. The generator will generate the helper contract in the `src/contracts/updates` directory.
128128

129-
To get a full list of available commands run `npm run generate --help`
129+
To get a full list of available commands run `pnpm run generate --help`
130130

131131
```sh
132-
npm run generate --help
132+
pnpm run generate --help
133133
$ tsx generator/cli --help
134134
Usage: proposal-generator [options]
135135

@@ -148,10 +148,10 @@ Options:
148148
-h, --help display help for command
149149
```
150150

151-
Running `npm run generate` you should be able to do the risk updates:
151+
Running `pnpm run generate` you should be able to do the risk updates:
152152

153153
```bash
154-
npm run generate
154+
pnpm run generate
155155

156156
$ tsx generator/cli
157157
? Chains this proposal targets AaveV3Ethereum

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/features/__snapshots__/capUpdates.spec.ts.snap

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ pragma solidity ^0.8.0;
2929
import {AaveV3EthereumAssets} from 'aave-address-book/AaveV3Ethereum.sol';
3030
import {RiskStewardsEthereum} from '../../../../scripts/networks/RiskStewardsEthereum.s.sol';
3131
import {IAaveV3ConfigEngine} from 'aave-v3-origin/src/contracts/extensions/v3-config-engine/IAaveV3ConfigEngine.sol';
32-
3332
/**
3433
* @title test
3534
* @author test

generator/features/__snapshots__/collateralUpdates.spec.ts.snap

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ import {AaveV3EthereumAssets} from 'aave-address-book/AaveV3Ethereum.sol';
4141
import {RiskStewardsEthereum} from '../../../../scripts/networks/RiskStewardsEthereum.s.sol';
4242
import {EngineFlags} from 'aave-v3-origin/src/contracts/extensions/v3-config-engine/EngineFlags.sol';
4343
import {IAaveV3ConfigEngine} from 'aave-v3-origin/src/contracts/extensions/v3-config-engine/IAaveV3ConfigEngine.sol';
44-
4544
/**
4645
* @title test
4746
* @author test

generator/features/__snapshots__/eModeUpdates.spec.ts.snap

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ import {AaveV3EthereumEModes} from 'aave-address-book/AaveV3Ethereum.sol';
4040
import {RiskStewardsEthereum} from '../../../../scripts/networks/RiskStewardsEthereum.s.sol';
4141
import {EngineFlags} from 'aave-v3-origin/src/contracts/extensions/v3-config-engine/EngineFlags.sol';
4242
import {IAaveV3ConfigEngine} from 'aave-v3-origin/src/contracts/extensions/v3-config-engine/IAaveV3ConfigEngine.sol';
43-
4443
/**
4544
* @title test
4645
* @author test

0 commit comments

Comments
 (0)