Skip to content

Commit

Permalink
Adding Linea testnet deposit checks & update forge
Browse files Browse the repository at this point in the history
  • Loading branch information
eloi010 committed Nov 10, 2023
1 parent 1da64f7 commit befc8a8
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/forge-std
Submodule forge-std updated 2 files
+3 −0 src/Vm.sol
+1 −1 test/Vm.t.sol
9 changes: 8 additions & 1 deletion script/OpenfortForksConfig.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {Script} from "forge-std/Script.sol";
*/
abstract contract OpenfortForksConfig is Script {
address internal immutable entryPoint = vm.envAddress("ENTRY_POINT_ADDRESS");
uint256 internal constant NUM_ACCEPTED_CHAINS = 16;
uint256 internal constant NUM_ACCEPTED_CHAINS = 17;

enum Forks {
GoerliFork, // 0
Expand All @@ -24,6 +24,7 @@ abstract contract OpenfortForksConfig is Script {
BaseGoerliFork,
BeamTestnetFork,
ChiadoFork,
LineaTestnetFork,
// Mainnets
PolygonFork,
AvalancheFork,
Expand All @@ -49,6 +50,7 @@ abstract contract OpenfortForksConfig is Script {
uint256 internal constant BASE_MAIN = 8453;
uint256 internal constant ARBITRUM_MAIN = 42161;
uint256 internal constant ARBITRUM_NOVA = 42170;
uint256 internal constant BEAM_MAIN = 4337;

constructor() {
/*//////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -116,6 +118,11 @@ abstract contract OpenfortForksConfig is Script {
paymasterOwnerAddresses[uint256(Forks.ChiadoFork)] = openfortPaymasterOwnerTestnet;
paymasterAddresses[uint256(Forks.ChiadoFork)] = openfortPaymasterV2Testnet;

// Fork: Linea testnet
vm.createFork(vm.envString("LINEA_TEST_RPC"));
paymasterOwnerAddresses[uint256(Forks.LineaTestnetFork)] = openfortPaymasterOwnerTestnet;
paymasterAddresses[uint256(Forks.LineaTestnetFork)] = openfortPaymasterV2Testnet;

/*//////////////////////////////////////////////////////////////////////////
MAINNET FORKS
//////////////////////////////////////////////////////////////////////////*/
Expand Down
11 changes: 10 additions & 1 deletion script/checkDeposits.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@ contract CheckDeposits is OpenfortForksConfig {
if (paymasterDeposit < 0.1 ether) {
console.log("ALERT: deposit too low on chain ID %s! Deposit: %s\n", block.chainid, paymasterDeposit);
}
} else {
}
else if (block.chainid == BEAM_MAIN) {
if (paymasterDeposit < 4 ether) {
console.log("ALERT: deposit too low on chain ID %s! Deposit: %s\n", block.chainid, paymasterDeposit);
}
}
else {
if (paymasterDeposit < 1 ether) {
console.log("ALERT: deposit too low on chain ID %s! Deposit: %s\n", block.chainid, paymasterDeposit);
}
Expand Down Expand Up @@ -96,6 +102,9 @@ contract CheckDeposits is OpenfortForksConfig {
console.log("Checking Paymaster and PaymasterOwner on Gnosis Chiado testnet:");
checkPaymasterDepositAndOwnerBalance(uint256(Forks.ChiadoFork));

console.log("Checking Paymaster and PaymasterOwner on Linea testnet:");
checkPaymasterDepositAndOwnerBalance(uint256(Forks.LineaTestnetFork));

console.log("----------------");
console.log("----Mainnets----");
console.log("----------------");
Expand Down

0 comments on commit befc8a8

Please sign in to comment.