Skip to content

Commit 12cfc36

Browse files
authored
Merge pull request #3 from aave-dao/feat/add-monad
feat: add monad
1 parent 8b71ab1 commit 12cfc36

4 files changed

Lines changed: 15 additions & 0 deletions

File tree

‎.changeset/shaggy-tools-fry.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@aave-dao/solidity-utils': patch
3+
---
4+
5+
add monad

‎Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ deploy-arbitrum :; forge script script/DeployTransparentProxyFactory.s.sol:Deplo
1717
deploy-zksync :; FOUNDRY_PROFILE=zksync forge script zksync/script/DeployTransparentProxyFactoryZkSync.s.sol:DeployZkSync --zksync --system-mode=true --rpc-url zksync --broadcast --ledger --mnemonic-indexes ${MNEMONIC_INDEX} --sender ${LEDGER_SENDER} --verify -vvvv
1818
deploy-xlayer :; forge script script/DeployTransparentProxyFactory.s.sol:DeployTransparentProxyFactory --rpc-url xlayer --broadcast --ledger --mnemonic-indexes ${MNEMONIC_INDEX} --sender ${LEDGER_SENDER} --verify --legacy -vvvv
1919
deploy-megaeth :; forge script script/DeployTransparentProxyFactory.s.sol:DeployTransparentProxyFactory --rpc-url megaeth --broadcast --ledger --mnemonic-indexes ${MNEMONIC_INDEX} --sender ${LEDGER_SENDER} --verify --legacy -vvvv --skip-simulation
20+
deploy-monad :; forge script script/DeployTransparentProxyFactory.s.sol:DeployTransparentProxyFactory --rpc-url monad --broadcast --ledger --mnemonic-indexes ${MNEMONIC_INDEX} --sender ${LEDGER_SENDER} --verify --legacy -vvvv
2021
# ---------------------------------------------- BASE SCRIPT CONFIGURATION ---------------------------------------------
2122

2223
BASE_LEDGER = --ledger --mnemonic-indexes $(MNEMONIC_INDEX) --sender $(LEDGER_SENDER)

‎foundry.toml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ soneium = "${RPC_SONEIUM}"
6666
bob = "${RPC_BOB}"
6767
xlayer = "${RPC_XLAYER}"
6868
megaeth = "${RPC_MEGAETH}"
69+
monad = "${RPC_MONAD}"
6970

7071
[fuzz]
7172
no_zksync_reserved_addresses = true

‎src/contracts/utils/ChainHelpers.sol‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ library ChainIds {
3131
uint256 internal constant XLAYER = 196;
3232
uint256 internal constant ANVIL = 31337;
3333
uint256 internal constant MEGAETH = 4326;
34+
uint256 internal constant MONAD = 143;
3435
}
3536

3637
library TestNetChainIds {
@@ -56,6 +57,7 @@ library TestNetChainIds {
5657
uint256 internal constant PLASMA_TESTNET = 9746;
5758
uint256 internal constant XLAYER_TESTNET = 1952;
5859
uint256 internal constant MEGAETH_TESTNET = 6342;
60+
uint256 internal constant MONAD_TESTNET = 10143;
5961
}
6062

6163
library ChainHelpers {
@@ -117,6 +119,8 @@ library ChainHelpers {
117119
newFork = vm.createSelectFork(vm.rpcUrl('xlayer'));
118120
} else if (chainId == ChainIds.MEGAETH) {
119121
newFork = vm.createSelectFork(vm.rpcUrl('megaeth'));
122+
} else if (chainId == ChainIds.MONAD) {
123+
newFork = vm.createSelectFork(vm.rpcUrl('monad'));
120124
} else {
121125
revert UnknownChainId();
122126
}
@@ -169,6 +173,8 @@ library ChainHelpers {
169173
networkName = 'xlayer';
170174
} else if (chainId == ChainIds.MEGAETH) {
171175
networkName = 'megaeth';
176+
} else if (chainId == ChainIds.MONAD) {
177+
networkName = 'monad';
172178
}
173179
// testnets
174180
else if (chainId == TestNetChainIds.ETHEREUM_SEPOLIA) {
@@ -211,6 +217,8 @@ library ChainHelpers {
211217
networkName = 'xlayer_testnet';
212218
} else if (chainId == TestNetChainIds.MEGAETH_TESTNET) {
213219
networkName = 'megaeth_testnet';
220+
} else if (chainId == TestNetChainIds.MONAD_TESTNET) {
221+
networkName = 'monad_testnet';
214222
} else {
215223
revert('chain id is not supported');
216224
}

0 commit comments

Comments
 (0)