Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
url = https://github.com/bgd-labs/aave-capo
[submodule "lib/aave-helpers"]
path = lib/aave-helpers
url = https://github.com/bgd-labs/aave-helpers
url = https://github.com/bgd-labs/aave-helpers
branch = main
5 changes: 5 additions & 0 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ evm_version = 'london'
[profile.sonic]
evm_version = 'cancun'

[profile.celo]
evm_version = 'paris'

[rpc_endpoints]
mainnet = "${RPC_MAINNET}"
optimism = "${RPC_OPTIMISM}"
Expand All @@ -52,6 +55,7 @@ scroll = "${RPC_SCROLL}"
zksync = "${RPC_ZKSYNC}"
linea = "${RPC_LINEA}"
sonic = "${RPC_SONIC}"
celo = "${RPC_CELO}"

[etherscan]
mainnet = { key="${ETHERSCAN_API_KEY_MAINNET}", chainId=1 }
Expand All @@ -69,5 +73,6 @@ scroll = { key="${ETHERSCAN_API_KEY_SCROLL}", chainId= 534352 }
zksync = { key="${ETHERSCAN_API_KEY_ZKSYNC}", chainId= 324 }
linea = { key="${ETHERSCAN_API_KEY_LINEA}", chain = 59144 }
sonic = { key="${ETHERSCAN_API_KEY_SONIC}", chain = 146 }
celo = { key="${ETHERSCAN_API_KEY_CELO}", chain = 42220 }

# See more config options https://github.com/gakonst/foundry/tree/master/config
3 changes: 3 additions & 0 deletions generator/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
zkSync,
linea,
sonic,
celo,
} from 'viem/chains';

export const AVAILABLE_CHAINS = [
Expand All @@ -32,6 +33,7 @@ export const AVAILABLE_CHAINS = [
'ZkSync',
'Linea',
'Sonic',
'Celo',
] as const;

export function getAssets(pool: PoolIdentifier): string[] {
Expand Down Expand Up @@ -117,6 +119,7 @@ export const CHAIN_TO_CHAIN_ID = {
ZkSync: zkSync.id,
Linea: linea.id,
Sonic: sonic.id,
Celo: celo.id,
};

export function flagAsRequired(message: string, required?: boolean) {
Expand Down
1 change: 1 addition & 0 deletions generator/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export const V3_POOLS = [
'AaveV3ZkSync',
'AaveV3Linea',
'AaveV3Sonic',
'AaveV3Celo',
] as const satisfies readonly (keyof typeof addressBook)[];

export const POOLS = [...V3_POOLS] as const satisfies readonly (keyof typeof addressBook)[];
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"prettier": "2.8.7",
"prettier-plugin-solidity": "1.1.3",
"vitest": "^2.0.4",
"@bgd-labs/aave-address-book": "^4.12.0",
"@bgd-labs/aave-address-book": "^4.16.1",
"@bgd-labs/aave-cli": "^1.1.12",
"@bgd-labs/js-utils": "^1.4.7",
"@inquirer/prompts": "^3.3.0",
Expand Down
16 changes: 16 additions & 0 deletions scripts/deploy/DeployStewards.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ import {AaveV3Linea} from 'aave-address-book/AaveV3Linea.sol';
import {GovernanceV3Linea} from 'aave-address-book/GovernanceV3Linea.sol';
import {AaveV3Sonic} from 'aave-address-book/AaveV3Sonic.sol';
import {GovernanceV3Sonic} from 'aave-address-book/GovernanceV3Sonic.sol';
import {AaveV3Celo} from 'aave-address-book/AaveV3Celo.sol';
import {GovernanceV3Celo} from 'aave-address-book/GovernanceV3Celo.sol';
import {IOwnable} from 'aave-address-book/common/IOwnable.sol';
import {RiskSteward, IRiskSteward, IPoolDataProvider, IEngine} from '../../src/contracts/RiskSteward.sol';

Expand Down Expand Up @@ -273,3 +275,17 @@ contract DeploySonic is SonicScript {
vm.stopBroadcast();
}
}

// make deploy-ledger contract=scripts/deploy/DeployStewards.s.sol:DeployCelo chain=celo
contract DeployCelo is SonicScript {
function run() external {
vm.startBroadcast();
DeployRiskStewards._deployRiskStewards(
address(AaveV3Celo.AAVE_PROTOCOL_DATA_PROVIDER),
AaveV3Celo.CONFIG_ENGINE,
0xd85786B5FC61E2A0c0a3144a33A0fC70646a99f6, // celo-risk-council
GovernanceV3Celo.EXECUTOR_LVL_1
);
vm.stopBroadcast();
}
}
11 changes: 11 additions & 0 deletions scripts/networks/RiskStewardsCelo.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {AaveV3Celo} from 'aave-address-book/AaveV3Celo.sol';
import {RiskStewardsBase} from '../RiskStewardsBase.s.sol';

abstract contract RiskStewardsCelo is RiskStewardsBase {
constructor()
RiskStewardsBase(address(AaveV3Celo.POOL), AaveV3Celo.RISK_STEWARD)
{}
}
Loading