-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'atlas-v1.1' into userOp-gas-limit
- Loading branch information
Showing
45 changed files
with
712 additions
and
328 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule forge-std
updated
28 files
+6 −12 | .github/workflows/ci.yml | |
+3 −1 | .github/workflows/sync.yml | |
+2 −2 | foundry.toml | |
+1 −1 | package.json | |
+1 −1 | src/StdAssertions.sol | |
+21 −8 | src/StdChains.sol | |
+2 −2 | src/StdCheats.sol | |
+18 −3 | src/StdInvariant.sol | |
+104 −0 | src/StdJson.sol | |
+1 −1 | src/StdStorage.sol | |
+104 −0 | src/StdToml.sol | |
+1 −1 | src/StdUtils.sol | |
+321 −51 | src/Vm.sol | |
+401 −382 | src/console.sol | |
+1 −1,555 | src/console2.sol | |
+1 −5 | src/mocks/MockERC721.sol | |
+693 −4 | src/safeconsole.sol | |
+1 −1 | test/StdAssertions.t.sol | |
+26 −19 | test/StdChains.t.sol | |
+11 −11 | test/StdCheats.t.sol | |
+12 −12 | test/StdError.t.sol | |
+1 −1 | test/StdJson.t.sol | |
+4 −14 | test/StdMath.t.sol | |
+13 −5 | test/StdStorage.t.sol | |
+1 −1 | test/StdStyle.t.sol | |
+1 −1 | test/StdToml.t.sol | |
+12 −12 | test/StdUtils.t.sol | |
+2 −2 | test/Vm.t.sol |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
// SPDX-License-Identifier: UNLICENSED | ||
pragma solidity 0.8.25; | ||
|
||
import "forge-std/Test.sol"; | ||
|
||
import { DeployBaseScript } from "script/base/deploy-base.s.sol"; | ||
import { BaseGasCalculator } from "src/contracts/gasCalculator/BaseGasCalculator.sol"; | ||
|
||
contract DeployGasCalculatorScript is DeployBaseScript { | ||
// NOTE: Adjust the constructor parameters as needed here: | ||
// - BASE_GAS_PRICE_ORACLE: The address of the gas price oracle contract | ||
// - BASE_CALLDATA_LENGTH_OFFSET: The offset to be applied to the calldata length (can be negative or positive) | ||
// ----------------------------------------------------------------------------------------------- | ||
address constant BASE_GAS_PRICE_ORACLE = address(0x420000000000000000000000000000000000000F); | ||
int256 constant BASE_CALLDATA_LENGTH_OFFSET = 0; // can be negative or positive | ||
// ----------------------------------------------------------------------------------------------- | ||
|
||
function run() external { | ||
console.log("\n=== DEPLOYING GasCalculator ===\n"); | ||
|
||
console.log("Deploying to chain: \t\t", _getDeployChain()); | ||
|
||
uint256 deployerPrivateKey = vm.envUint("GOV_PRIVATE_KEY"); | ||
address deployer = vm.addr(deployerPrivateKey); | ||
|
||
console.log("Deployer address: \t\t", deployer); | ||
|
||
uint256 chainId = block.chainid; | ||
address deploymentAddr; | ||
|
||
vm.startBroadcast(deployerPrivateKey); | ||
|
||
if (chainId == 8453 || chainId == 84_532) { | ||
// Base or Base Sepolia | ||
BaseGasCalculator gasCalculator = new BaseGasCalculator({ | ||
gasPriceOracle: BASE_GAS_PRICE_ORACLE, | ||
calldataLenOffset: BASE_CALLDATA_LENGTH_OFFSET | ||
}); | ||
deploymentAddr = address(gasCalculator); | ||
} else { | ||
revert("Error: Chain ID not supported"); | ||
} | ||
|
||
vm.stopBroadcast(); | ||
|
||
_writeAddressToDeploymentsJson("L2_GAS_CALCULATOR", deploymentAddr); | ||
|
||
console.log("\n"); | ||
console.log("-------------------------------------------------------------------------------"); | ||
console.log("| Contract | Address |"); | ||
console.log("-------------------------------------------------------------------------------"); | ||
console.log("| L2_GAS_CALCULATOR (Base) | ", address(deploymentAddr), " |"); | ||
console.log("-------------------------------------------------------------------------------"); | ||
console.log("\n"); | ||
console.log("You can find a list of contract addresses from the latest deployment in deployments.json"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.