Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added script for scroll and zkevm #211

Merged
merged 1 commit into from
Jan 8, 2024
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: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ RPC_HARMONY=https://api.harmony.one
RPC_METIS=https://andromeda.metis.io/?owner=1088
RPC_BASE=https://base.llamarpc.com
RPC_BNB=https://binance.llamarpc.com
RPC_GNOSIS=https://rpc.gnosischain.com
RPC_ZKEVM=https://polygon-zkevm.drpc.org
RPC_SCROLL=https://rpc.scroll.io

# Testnet rpc_endpoints
RPC_SEPOLIA=wss://ethereum-sepolia.publicnode.com
Expand Down
2 changes: 1 addition & 1 deletion lib/aave-address-book
Submodule aave-address-book updated 48 files
+7 −0 CHANGELOG.md
+1 −1 package.json
+12 −0 scripts/configs/governance/scroll.ts
+13 −0 scripts/configs/networks/scroll.ts
+1 −1 scripts/configs/pools/arbitrum.ts
+2 −2 scripts/configs/pools/avalanche.ts
+1 −1 scripts/configs/pools/base.ts
+1 −1 scripts/configs/pools/bnb.ts
+3 −3 scripts/configs/pools/ethereum.ts
+1 −1 scripts/configs/pools/gnosis.ts
+1 −1 scripts/configs/pools/optimism.ts
+2 −2 scripts/configs/pools/polygon.ts
+24 −0 scripts/configs/pools/scroll.ts
+6 −1 scripts/generateAddresses.ts
+1 −0 scripts/generator/chains.ts
+8 −0 scripts/generator/clients.ts
+3 −0 src/AaveAddressBook.sol
+2 −2 src/AaveV2Avalanche.sol
+2 −2 src/AaveV2Ethereum.sol
+2 −2 src/AaveV2EthereumAMM.sol
+2 −2 src/AaveV2Polygon.sol
+2 −2 src/AaveV3Arbitrum.sol
+2 −2 src/AaveV3Avalanche.sol
+2 −2 src/AaveV3BNB.sol
+2 −2 src/AaveV3Base.sol
+2 −2 src/AaveV3Ethereum.sol
+2 −2 src/AaveV3Gnosis.sol
+2 −2 src/AaveV3Optimism.sol
+2 −2 src/AaveV3Polygon.sol
+92 −0 src/AaveV3Scroll.sol
+23 −0 src/GovernanceV3Scroll.sol
+11 −0 src/MiscScroll.sol
+3 −0 src/ts/AaveAddressBook.ts
+2 −2 src/ts/AaveV2Avalanche.ts
+2 −2 src/ts/AaveV2Ethereum.ts
+2 −2 src/ts/AaveV2EthereumAMM.ts
+2 −2 src/ts/AaveV2Polygon.ts
+2 −2 src/ts/AaveV3Arbitrum.ts
+2 −2 src/ts/AaveV3Avalanche.ts
+2 −2 src/ts/AaveV3BNB.ts
+2 −2 src/ts/AaveV3Base.ts
+2 −2 src/ts/AaveV3Ethereum.ts
+2 −2 src/ts/AaveV3Gnosis.ts
+2 −2 src/ts/AaveV3Optimism.ts
+2 −2 src/ts/AaveV3Polygon.ts
+76 −0 src/ts/AaveV3Scroll.ts
+14 −0 src/ts/GovernanceV3Scroll.ts
+6 −0 src/ts/MiscScroll.ts
3 changes: 3 additions & 0 deletions src/ChainIds.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ library ChainIds {
uint256 internal constant GNOSIS = 100;
uint256 internal constant SEPOLIA = 11155111;
uint256 internal constant HARMONY = 1666600000;
uint256 internal constant SCROLL = 534352;
}

library ChainHelpers {
Expand Down Expand Up @@ -54,6 +55,8 @@ library ChainHelpers {
newFork = vm.createSelectFork(vm.rpcUrl('sepolia'));
} else if (chainId == ChainIds.HARMONY) {
newFork = vm.createSelectFork(vm.rpcUrl('harmony'));
} else if (chainId == ChainIds.SCROLL) {
newFork = vm.createSelectFork(vm.rpcUrl('scroll'));
} else {
revert UnknownChainId();
}
Expand Down
8 changes: 8 additions & 0 deletions src/ScriptUtils.sol
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,14 @@ abstract contract GnosisScript is WithChainIdValidation {
constructor() WithChainIdValidation(ChainIds.GNOSIS) {}
}

abstract contract ScrollScript is WithChainIdValidation {
constructor() WithChainIdValidation(ChainIds.SCROLL) {}
}

abstract contract ZkEVMScript is WithChainIdValidation {
constructor() WithChainIdValidation(ChainIds.ZK_EVM) {}
}

abstract contract SepoliaScript is WithChainIdValidation {
constructor() WithChainIdValidation(ChainIds.SEPOLIA) {}
}
Expand Down