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: Atlas v1.1 #428

Open
wants to merge 95 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 61 commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
a0dc8ff
fix: conditionally forward `returnData` to solvers
BenSparksCode Sep 4, 2024
b46981c
fix: enforce `userOp.gas` as userOp's gas limit
BenSparksCode Sep 4, 2024
5e05707
fix: use smaller of `userOp.gas` and `gasleft()` as limit
BenSparksCode Sep 4, 2024
4c9c5e3
chore: update Atlas license
BenSparksCode Sep 5, 2024
a448c98
chore: update Atlas license
BenSparksCode Sep 5, 2024
cf271a6
base L2 gas calculator contract
jj1980a Sep 7, 2024
f5e9dd1
contract ownable
jj1980a Sep 10, 2024
f8dbebc
introduce a customizable offset value to be added to passed call data…
jj1980a Sep 10, 2024
fd33c38
deploy script
jj1980a Sep 10, 2024
2448be0
forge update
jj1980a Sep 10, 2024
8fcf58f
back-end approach
thogard785 Sep 10, 2024
58fa483
Merge pull request #421 from FastLane-Labs/license-fix
BenSparksCode Sep 11, 2024
237be45
Merge branch 'main' into atlas-v1.1
BenSparksCode Sep 11, 2024
6da7e88
Merge branch 'atlas-v1.1' into solver-surcharge-tracking
BenSparksCode Sep 11, 2024
47bcfd8
fmt: forge fmt
BenSparksCode Sep 11, 2024
44eb8e0
fix: TrebleSwap tests to handle new surcharge rules
BenSparksCode Sep 11, 2024
392ba0e
fix: record accurate `solverSurcharge` figure
BenSparksCode Sep 12, 2024
0f749da
fix: 2 Escrow tests - metacall no longer reverts
BenSparksCode Sep 12, 2024
6f1f469
fix: FLOnline breaking tests for surcharge rule change
BenSparksCode Sep 12, 2024
c4de266
chore: Base L2 Gas Calculator deploy script tweaks
BenSparksCode Sep 13, 2024
20ac0af
Apply suggestions from code review
jj1980a Sep 13, 2024
04493e7
forge fmt
jj1980a Sep 13, 2024
bc6f32a
fix deploy script
jj1980a Sep 13, 2024
547588b
feat: add easier way to control hook failure for tests
BenSparksCode Sep 13, 2024
5605e76
test: add `forwardReturnData` config tests
BenSparksCode Sep 13, 2024
4aa7646
test: use hookShouldRevert pattern in `Escrow.t.sol`
BenSparksCode Sep 16, 2024
6109348
chore: rel import paths in DAppControl and parents
BenSparksCode Sep 16, 2024
39394d9
chore: switch to relative imports
BenSparksCode Sep 16, 2024
705e15e
chore: use relative imports in BaseTest
BenSparksCode Sep 16, 2024
5a25060
chore: use relative imports in TestAtlas
BenSparksCode Sep 16, 2024
ffba055
test: improve DummyDAppControl, Escrow tests
BenSparksCode Sep 18, 2024
9cc763f
chore: use relative imports in scripts
BenSparksCode Sep 18, 2024
ef45b27
chore: use relative imports in examples
BenSparksCode Sep 18, 2024
1c476d9
chore: remove TODO
BenSparksCode Sep 18, 2024
cca606d
Merge pull request #430 from FastLane-Labs/escrow-test-refactor
BenSparksCode Sep 18, 2024
0ba846d
chore: use relative imports in tests
BenSparksCode Sep 18, 2024
8be2960
added more specific fee tracking for the scenario in which multiple s…
thogard785 Sep 20, 2024
7ed34b9
Merge pull request #419 from FastLane-Labs/solver-returndata-fix
BenSparksCode Sep 20, 2024
966c0cf
simplified formula to balance per ben suggestion
thogard785 Sep 24, 2024
c560ce5
lower calldata premium value
jj1980a Sep 25, 2024
1dd15ac
refactor: set surcharge rates in constructor
BenSparksCode Oct 9, 2024
52cfec4
Merge pull request #440 from FastLane-Labs/set-surcharge-rates
BenSparksCode Oct 11, 2024
1744cef
Merge pull request #424 from FastLane-Labs/l2-gas-calc
BenSparksCode Oct 14, 2024
9aca697
Merge branch 'atlas-v1.1' into userOp-gas-limit
BenSparksCode Oct 15, 2024
6541891
chore: update libs
BenSparksCode Oct 15, 2024
8a4d49a
test: add userOp gas limit enforced test
BenSparksCode Oct 15, 2024
89d6554
fmt: forge fmt
BenSparksCode Oct 16, 2024
d0add4e
chore: update libs
BenSparksCode Oct 16, 2024
1f17b9d
Merge pull request #437 from FastLane-Labs/solver-surcharge-tracking-2
BenSparksCode Oct 16, 2024
a9b4cbf
feat: add `maxBundlerRefund()` helper
BenSparksCode Oct 16, 2024
74cf073
feat: apply max bundler refund if no winning solvers
BenSparksCode Oct 16, 2024
23eeb37
test: fix FLO tests for surcharge rule changes
BenSparksCode Oct 17, 2024
ae20f83
Merge pull request #420 from FastLane-Labs/userOp-gas-limit
BenSparksCode Oct 17, 2024
1fd0f79
Merge pull request #441 from FastLane-Labs/bundler-surcharge-cap
BenSparksCode Oct 17, 2024
f6f4188
Merge branch 'atlas-v1.1' into solver-surcharge-tracking
BenSparksCode Oct 17, 2024
771f801
chore: clearer syntax for AccountingMath calc
BenSparksCode Oct 17, 2024
54a6c98
Merge pull request #427 from FastLane-Labs/solver-surcharge-tracking
BenSparksCode Oct 17, 2024
c72d44c
Merge branch 'atlas-v1.1' into gh-package
BenSparksCode Oct 17, 2024
09a2ef3
chore: update libs
BenSparksCode Oct 17, 2024
f622236
Merge pull request #431 from FastLane-Labs/gh-package
BenSparksCode Oct 17, 2024
af39e04
Merge branch 'main' into atlas-v1.1
BenSparksCode Oct 17, 2024
a4f3571
chore: adjust gas check logs
BenSparksCode Oct 18, 2024
5962eee
feat: split logic out to FactoryLib contract
BenSparksCode Oct 18, 2024
1307e30
feat: bump to solc 0.8.28 for `transient` keyword
BenSparksCode Oct 18, 2024
c37e7a8
rm: FactoryLib file from different PR
BenSparksCode Oct 19, 2024
fdcdba5
refactor: `transient` keyword for Accounting vars
BenSparksCode Oct 19, 2024
0950125
refactor: make transient vars internal + `t_` prefixed
BenSparksCode Oct 19, 2024
a90b1ad
refactor: convert lock slot to `transient` syntax
BenSparksCode Oct 19, 2024
a8030e2
chore: remove unused constants
BenSparksCode Oct 19, 2024
a7cce59
test: fix Factory tests
BenSparksCode Oct 21, 2024
df97164
fix: delegatecalled create2 fn must be payable
BenSparksCode Oct 21, 2024
1227ba6
Merge pull request #443 from FastLane-Labs/factory-lib-deployed
BenSparksCode Oct 21, 2024
c7ece49
Merge branch 'size-cuts' into transient-keyword
BenSparksCode Oct 21, 2024
148049f
chore: bump Solidity version to `0.8.28`
BenSparksCode Oct 21, 2024
776fb93
ci: disable lint check as pre-req for test check
BenSparksCode Oct 21, 2024
da20385
Merge pull request #442 from FastLane-Labs/transient-keyword
BenSparksCode Oct 21, 2024
d24c7ae
Merge pull request #444 from FastLane-Labs/size-cuts
BenSparksCode Oct 28, 2024
47c3b17
fix: apply graceful return gas offset to userOp call
BenSparksCode Oct 28, 2024
17340c8
test: userOp out-of-gas graceful return case
BenSparksCode Oct 28, 2024
385ae48
Merge pull request #446 from FastLane-Labs/userOp-gas-limit-fix
BenSparksCode Nov 4, 2024
3a4972d
docs: version is Atlas v1.1 in natspec
BenSparksCode Nov 5, 2024
17e81f2
feat: add `bidAmount` to `SolverTxResult` event
BenSparksCode Nov 6, 2024
8a475a1
feat: add `bidToken` to `SolverTxResult` event
BenSparksCode Nov 7, 2024
64be23c
Merge pull request #450 from FastLane-Labs/solver-event-analytics
BenSparksCode Nov 7, 2024
6df621f
add indexed dapp control address in solver tx result event
jj1980a Nov 12, 2024
617e8e6
fix: rearrange event item order - solves stack too deep
BenSparksCode Nov 12, 2024
f837859
Merge pull request #451 from FastLane-Labs/solver-event
BenSparksCode Nov 12, 2024
4807453
feat: add surcharge settings to deploy script
BenSparksCode Nov 12, 2024
60a70b3
chore: deploy Atlas v1.1 on Polygon
BenSparksCode Nov 13, 2024
e6b1718
Merge pull request #452 from FastLane-Labs/surcharge-settings-deploy
BenSparksCode Nov 13, 2024
3d372be
add base sepolia deployment adresses
jj1980a Nov 13, 2024
c27bd76
feat: base deployment
aanand1 Nov 13, 2024
ee19471
Merge pull request #454 from FastLane-Labs/base_deployment
BenSparksCode Nov 13, 2024
3eb1d58
Merge branch 'atlas-v1.1' into base-sepolia-deployment
jj1980a Nov 13, 2024
1b7df52
Merge pull request #453 from FastLane-Labs/base-sepolia-deployment
jj1980a Nov 13, 2024
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
10 changes: 3 additions & 7 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,10 @@ Parameters

Licensor: Fastlane Labs

Licensed Work: FastLane Protocol
The Licensed Work is (c) 2023 Fastlane Labs
Licensed Work: Atlas Protocol
The Licensed Work is (c) 2024 Fastlane Labs

Additional Use Grant: Any uses listed and defined at
fastlane-protocol-license.fastlane.finance

Change Date: The earlier of 2025-07-01 or a date specified at
fastlane-protocol-license.fastlane.finance
Change Date: 2026-07-01

Change License: GNU General Public License v2.0 or later

Expand Down
2 changes: 1 addition & 1 deletion lib/forge-std
2 changes: 1 addition & 1 deletion lib/solady
Submodule solady updated 42 files
+11 −10 .github/workflows/ci-all-via-ir.yml
+49 −22 .github/workflows/ci.yml
+4 −1 README.md
+1 −1 foundry.toml
+1 −1 package.json
+58 −0 prep/gen-globalized-libs.js
+2 −0 src/Milady.sol
+2 −2 src/accounts/Pod.sol
+292 −0 src/auth/EnumerableRoles.sol
+164 −40 src/tokens/ERC20.sol
+458 −0 src/tokens/ERC20Votes.sol
+497 −150 src/utils/DynamicArrayLib.sol
+6 −2 src/utils/EnumerableSetLib.sol
+156 −40 src/utils/LibClone.sol
+112 −1 src/utils/LibSort.sol
+350 −355 src/utils/LibString.sol
+3 −3 src/utils/SSTORE2.sol
+50 −68 src/utils/SafeTransferLib.sol
+990 −0 src/utils/g/DynamicArrayLib.sol
+1,317 −0 src/utils/g/DynamicBufferLib.sol
+739 −0 src/utils/g/EnumerableSetLib.sol
+819 −0 src/utils/g/JSONParserLib.sol
+240 −0 src/utils/g/LibBitmap.sol
+318 −0 src/utils/g/LibMap.sol
+505 −0 src/utils/g/LibPRNG.sol
+387 −0 src/utils/g/LibRLP.sol
+572 −0 src/utils/g/MinHeapLib.sol
+721 −0 src/utils/g/RedBlackTreeLib.sol
+254 −2 test/DynamicArrayLib.t.sol
+80 −0 test/ERC20.t.sol
+584 −0 test/ERC20Votes.t.sol
+304 −0 test/EnumerableRoles.t.sol
+50 −0 test/EnumerableSetLib.t.sol
+88 −5 test/LibClone.t.sol
+3 −0 test/LibSort.t.sol
+178 −0 test/LibString.t.sol
+58 −21 test/SafeTransferLib.t.sol
+15 −0 test/utils/TestPlus.sol
+16 −0 test/utils/mocks/MockERC20ForPermit2.sol
+41 −0 test/utils/mocks/MockERC20Votes.sol
+67 −0 test/utils/mocks/MockEnumerableRoles.sol
+4 −0 test/utils/mocks/MockPod.sol
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@
"solver-deposit": "source .env && forge script script/solver-deposit.s.sol:SolverAtlasDepositScript --fork-url http://localhost:8545 --broadcast --non-interactive",
"setup-demo": "npm run deploy-atlas-swap-intent-tx-builder && npm run deploy-solver && npm run solver-deposit",

"deploy-gas-calculator-base": "source .env && forge script script/deploy-gas-calculator.s.sol:DeployGasCalculatorScript --rpc-url ${BASE_RPC_URL} --broadcast --etherscan-api-key ${ETHERSCAN_API_KEY} --verify",

"atlas-addr": "echo 'ATLAS:' && jq -r '.ATLAS' deployments.json",
"swap-intent-addr": "echo 'SWAP INTENT DAPP CONTROL:' && jq -r '.SWAP_INTENT_DAPP_CONTROL' deployments.json",
"tx-builder-addr": "echo 'TX BUILDER:' && jq -r '.TX_BUILDER' deployments.json",
Expand Down
18 changes: 9 additions & 9 deletions script/base/deploy-base.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ import "forge-std/StdJson.sol";

import { IERC20 } from "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol";

import { Atlas } from "src/contracts/atlas/Atlas.sol";
import { AtlasVerification } from "src/contracts/atlas/AtlasVerification.sol";
import { SwapIntentDAppControl } from "src/contracts/examples/intents-example/SwapIntentDAppControl.sol";
import { TxBuilder } from "src/contracts/helpers/TxBuilder.sol";
import { Simulator } from "src/contracts/helpers/Simulator.sol";
import { Sorter } from "src/contracts/helpers/Sorter.sol";
import { SimpleRFQSolver } from "test/SwapIntent.t.sol";

import { Utilities } from "src/contracts/helpers/Utilities.sol";
import { Atlas } from "../../src/contracts/atlas/Atlas.sol";
import { AtlasVerification } from "../../src/contracts/atlas/AtlasVerification.sol";
import { SwapIntentDAppControl } from "../../src/contracts/examples/intents-example/SwapIntentDAppControl.sol";
import { TxBuilder } from "../../src/contracts/helpers/TxBuilder.sol";
import { Simulator } from "../../src/contracts/helpers/Simulator.sol";
import { Sorter } from "../../src/contracts/helpers/Sorter.sol";
import { SimpleRFQSolver } from "../../test/SwapIntent.t.sol";

import { Utilities } from "../../src/contracts/helpers/Utilities.sol";

contract DeployBaseScript is Script {
using stdJson for string;
Expand Down
8 changes: 4 additions & 4 deletions script/create-oev-demo-positions.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import "forge-std/Test.sol";

import { DeployBaseScript } from "script/base/deploy-base.s.sol";

import { ChainlinkDAppControl } from "src/contracts/examples/oev-example/ChainlinkDAppControl.sol";
import { ChainlinkAtlasWrapper } from "src/contracts/examples/oev-example/ChainlinkAtlasWrapper.sol";
import { ChainlinkDAppControl } from "../src/contracts/examples/oev-example/ChainlinkDAppControl.sol";
import { ChainlinkAtlasWrapper } from "../src/contracts/examples/oev-example/ChainlinkAtlasWrapper.sol";

import { Token } from "src/contracts/helpers/DemoToken.sol";
import { DemoLendingProtocol } from "src/contracts/helpers/DemoLendingProtocol.sol";
import { Token } from "../src/contracts/helpers/DemoToken.sol";
import { DemoLendingProtocol } from "../src/contracts/helpers/DemoLendingProtocol.sol";

// Sets up a few liquidatable positions in the Lending Protocol. ETH for gas fees distributed by Lending Gov.
contract CreateOEVDemoPositionsScript is DeployBaseScript {
Expand Down
22 changes: 14 additions & 8 deletions script/deploy-atlas.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,20 @@ pragma solidity 0.8.25;
import "forge-std/Script.sol";
import "forge-std/Test.sol";

import { DeployBaseScript } from "script/base/deploy-base.s.sol";
import { DeployBaseScript } from "./base/deploy-base.s.sol";

import { Atlas } from "src/contracts/atlas/Atlas.sol";
import { AtlasVerification } from "src/contracts/atlas/AtlasVerification.sol";
import { TxBuilder } from "src/contracts/helpers/TxBuilder.sol";
import { Simulator } from "src/contracts/helpers/Simulator.sol";
import { Sorter } from "src/contracts/helpers/Sorter.sol";
import { ExecutionEnvironment } from "src/contracts/common/ExecutionEnvironment.sol";
import { Atlas } from "../src/contracts/atlas/Atlas.sol";
import { AtlasVerification } from "../src/contracts/atlas/AtlasVerification.sol";
import { TxBuilder } from "../src/contracts/helpers/TxBuilder.sol";
import { Simulator } from "../src/contracts/helpers/Simulator.sol";
import { Sorter } from "../src/contracts/helpers/Sorter.sol";
import { ExecutionEnvironment } from "../src/contracts/common/ExecutionEnvironment.sol";

contract DeployAtlasScript is DeployBaseScript {
uint256 ESCROW_DURATION = 64;
uint256 ATLAS_SURCHARGE_RATE = 1_000_000; // 10%
uint256 BUNDLER_SURCHARGE_RATE = 1_000_000; // 10%

function run() external {
console.log("\n=== DEPLOYING Atlas ===\n");

Expand All @@ -37,7 +41,9 @@ contract DeployAtlasScript is DeployBaseScript {

ExecutionEnvironment execEnvTemplate = new ExecutionEnvironment(expectedAtlasAddr);
atlas = new Atlas({
escrowDuration: 64,
escrowDuration: ESCROW_DURATION,
atlasSurchargeRate: ATLAS_SURCHARGE_RATE,
bundlerSurchargeRate: BUNDLER_SURCHARGE_RATE,
verification: expectedAtlasVerificationAddr,
simulator: expectedSimulatorAddr,
executionTemplate: address(execEnvTemplate),
Expand Down
10 changes: 5 additions & 5 deletions script/deploy-demo-tokens.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import "forge-std/Test.sol";

import { DeployBaseScript } from "script/base/deploy-base.s.sol";

import { Atlas } from "src/contracts/atlas/Atlas.sol";
import { AtlasVerification } from "src/contracts/atlas/AtlasVerification.sol";
import { V2RewardDAppControl } from "src/contracts/examples/v2-example-router/V2RewardDAppControl.sol";
import { IUniswapV2Router02 } from "src/contracts/examples/v2-example-router/interfaces/IUniswapV2Router.sol";
import { Atlas } from "../src/contracts/atlas/Atlas.sol";
import { AtlasVerification } from "../src/contracts/atlas/AtlasVerification.sol";
import { V2RewardDAppControl } from "../src/contracts/examples/v2-example-router/V2RewardDAppControl.sol";
import { IUniswapV2Router02 } from "../src/contracts/examples/v2-example-router/interfaces/IUniswapV2Router.sol";

import { Token } from "src/contracts/helpers/DemoToken.sol";
import { Token } from "../src/contracts/helpers/DemoToken.sol";
import { WETH } from "solady/tokens/WETH.sol";

// Deploy 3 stablecoin tokens (DAI, USDA, USDB) - all 18 decimals
Expand Down
4 changes: 2 additions & 2 deletions script/deploy-exec-env.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ pragma solidity 0.8.25;
import "forge-std/Script.sol";
import "forge-std/Test.sol";

import { DeployBaseScript } from "script/base/deploy-base.s.sol";
import { DeployBaseScript } from "./base/deploy-base.s.sol";

import { ExecutionEnvironment } from "src/contracts/common/ExecutionEnvironment.sol";
import { ExecutionEnvironment } from "../src/contracts/common/ExecutionEnvironment.sol";

contract DeployExecEnvScript is DeployBaseScript {
ExecutionEnvironment public execEnv;
Expand Down
8 changes: 4 additions & 4 deletions script/deploy-fl-online-control.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ pragma solidity 0.8.25;
import "forge-std/Script.sol";
import "forge-std/Test.sol";

import { DeployBaseScript } from "script/base/deploy-base.s.sol";
import { DeployBaseScript } from "./base/deploy-base.s.sol";

import { Atlas } from "src/contracts/atlas/Atlas.sol";
import { AtlasVerification } from "src/contracts/atlas/AtlasVerification.sol";
import { FastLaneOnlineOuter } from "src/contracts/examples/fastlane-online/FastLaneOnlineOuter.sol";
import { Atlas } from "../src/contracts/atlas/Atlas.sol";
import { AtlasVerification } from "../src/contracts/atlas/AtlasVerification.sol";
import { FastLaneOnlineOuter } from "../src/contracts/examples/fastlane-online/FastLaneOnlineOuter.sol";

contract DeployFLOnlineControlScript is DeployBaseScript {
FastLaneOnlineOuter flOnline;
Expand Down
57 changes: 57 additions & 0 deletions script/deploy-gas-calculator.s.sol
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");
}
}
14 changes: 7 additions & 7 deletions script/deploy-oev-demo.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ pragma solidity 0.8.25;
import "forge-std/Script.sol";
import "forge-std/Test.sol";

import { DeployBaseScript } from "script/base/deploy-base.s.sol";
import { DeployBaseScript } from "./base/deploy-base.s.sol";

import { Atlas } from "src/contracts/atlas/Atlas.sol";
import { AtlasVerification } from "src/contracts/atlas/AtlasVerification.sol";
import { ChainlinkDAppControl } from "src/contracts/examples/oev-example/ChainlinkDAppControl.sol";
import { ChainlinkAtlasWrapper } from "src/contracts/examples/oev-example/ChainlinkAtlasWrapper.sol";
import { Atlas } from "../src/contracts/atlas/Atlas.sol";
import { AtlasVerification } from "../src/contracts/atlas/AtlasVerification.sol";
import { ChainlinkDAppControl } from "../src/contracts/examples/oev-example/ChainlinkDAppControl.sol";
import { ChainlinkAtlasWrapper } from "../src/contracts/examples/oev-example/ChainlinkAtlasWrapper.sol";

import { Token } from "src/contracts/helpers/DemoToken.sol";
import { DemoLendingProtocol } from "src/contracts/helpers/DemoLendingProtocol.sol";
import { Token } from "../src/contracts/helpers/DemoToken.sol";
import { DemoLendingProtocol } from "../src/contracts/helpers/DemoLendingProtocol.sol";

contract DeployOEVDemoScript is DeployBaseScript {
address public constant CHAINLINK_ETH_USD = 0x694AA1769357215DE4FAC081bf1f309aDC325306; // on Sepolia
Expand Down
4 changes: 2 additions & 2 deletions script/deploy-sorter.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ pragma solidity 0.8.25;
import "forge-std/Script.sol";
import "forge-std/Test.sol";

import { DeployBaseScript } from "script/base/deploy-base.s.sol";
import { DeployBaseScript } from "./base/deploy-base.s.sol";

import { Sorter } from "src/contracts/helpers/Sorter.sol";
import { Sorter } from "../src/contracts/helpers/Sorter.sol";

contract DeploySorterScript is DeployBaseScript {
function run() external {
Expand Down
12 changes: 6 additions & 6 deletions script/deploy-swap-intent-control.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ pragma solidity 0.8.25;
import "forge-std/Script.sol";
import "forge-std/Test.sol";

import { DeployBaseScript } from "script/base/deploy-base.s.sol";
import { DeployBaseScript } from "./base/deploy-base.s.sol";

import { Atlas } from "src/contracts/atlas/Atlas.sol";
import { AtlasVerification } from "src/contracts/atlas/AtlasVerification.sol";
import { SwapIntentDAppControl } from "src/contracts/examples/intents-example/SwapIntentDAppControl.sol";
import { TxBuilder } from "src/contracts/helpers/TxBuilder.sol";
import { Simulator } from "src/contracts/helpers/Simulator.sol";
import { Atlas } from "../src/contracts/atlas/Atlas.sol";
import { AtlasVerification } from "../src/contracts/atlas/AtlasVerification.sol";
import { SwapIntentDAppControl } from "../src/contracts/examples/intents-example/SwapIntentDAppControl.sol";
import { TxBuilder } from "../src/contracts/helpers/TxBuilder.sol";
import { Simulator } from "../src/contracts/helpers/Simulator.sol";

contract DeploySwapIntentControlScript is DeployBaseScript {
function run() external {
Expand Down
10 changes: 5 additions & 5 deletions script/deploy-tx-builder.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ pragma solidity 0.8.25;
import "forge-std/Script.sol";
import "forge-std/Test.sol";

import { DeployBaseScript } from "script/base/deploy-base.s.sol";
import { DeployBaseScript } from "./base/deploy-base.s.sol";

import { Atlas } from "src/contracts/atlas/Atlas.sol";
import { AtlasVerification } from "src/contracts/atlas/AtlasVerification.sol";
import { TxBuilder } from "src/contracts/helpers/TxBuilder.sol";
import { Simulator } from "src/contracts/helpers/Simulator.sol";
import { Atlas } from "../src/contracts/atlas/Atlas.sol";
import { AtlasVerification } from "../src/contracts/atlas/AtlasVerification.sol";
import { TxBuilder } from "../src/contracts/helpers/TxBuilder.sol";
import { Simulator } from "../src/contracts/helpers/Simulator.sol";

contract DeployTxBuilderScript is DeployBaseScript {
function run() external {
Expand Down
8 changes: 4 additions & 4 deletions script/deploy-v2-reward-control.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ pragma solidity 0.8.25;
import "forge-std/Script.sol";
import "forge-std/Test.sol";

import { DeployBaseScript } from "script/base/deploy-base.s.sol";
import { DeployBaseScript } from "./base/deploy-base.s.sol";

import { Atlas } from "src/contracts/atlas/Atlas.sol";
import { AtlasVerification } from "src/contracts/atlas/AtlasVerification.sol";
import { V2RewardDAppControl } from "src/contracts/examples/v2-example-router/V2RewardDAppControl.sol";
import { Atlas } from "../src/contracts/atlas/Atlas.sol";
import { AtlasVerification } from "../src/contracts/atlas/AtlasVerification.sol";
import { V2RewardDAppControl } from "../src/contracts/examples/v2-example-router/V2RewardDAppControl.sol";

contract DeployV2RewardControlScript is DeployBaseScript {
V2RewardDAppControl v2RewardControl;
Expand Down
4 changes: 2 additions & 2 deletions script/mint-demo-tokens.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ pragma solidity 0.8.25;
import "forge-std/Script.sol";
import "forge-std/Test.sol";

import { DeployBaseScript } from "script/base/deploy-base.s.sol";
import { Token } from "src/contracts/helpers/DemoToken.sol";
import { DeployBaseScript } from "./base/deploy-base.s.sol";
import { Token } from "../src/contracts/helpers/DemoToken.sol";
import { WETH } from "solady/tokens/WETH.sol";

contract MintDemoTokensScript is DeployBaseScript {
Expand Down
10 changes: 5 additions & 5 deletions script/set-oev-demo-signers.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ pragma solidity 0.8.25;
import "forge-std/Script.sol";
import "forge-std/Test.sol";

import { DeployBaseScript } from "script/base/deploy-base.s.sol";
import { DeployBaseScript } from "./base/deploy-base.s.sol";

import { ChainlinkDAppControl } from "src/contracts/examples/oev-example/ChainlinkDAppControl.sol";
import { ChainlinkAtlasWrapper } from "src/contracts/examples/oev-example/ChainlinkAtlasWrapper.sol";
import { ChainlinkDAppControl } from "../src/contracts/examples/oev-example/ChainlinkDAppControl.sol";
import { ChainlinkAtlasWrapper } from "../src/contracts/examples/oev-example/ChainlinkAtlasWrapper.sol";

import { Token } from "src/contracts/helpers/DemoToken.sol";
import { DemoLendingProtocol } from "src/contracts/helpers/DemoLendingProtocol.sol";
import { Token } from "../src/contracts/helpers/DemoToken.sol";
import { DemoLendingProtocol } from "../src/contracts/helpers/DemoLendingProtocol.sol";

// For the Chainlink OEV demo, when its difficult to find a real `transmit()` tx with a low enough ETH price.
// We replace the real Sepolia Chainlink ETH/USD signers with a set of test signers, in ChainlinkDAppControl.
Expand Down
4 changes: 2 additions & 2 deletions script/solver-deposit.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import "forge-std/Script.sol";
import "forge-std/Test.sol";
import "forge-std/StdJson.sol";

import { DeployBaseScript } from "script/base/deploy-base.s.sol";
import { DeployBaseScript } from "./base/deploy-base.s.sol";

import { Atlas } from "src/contracts/atlas/Atlas.sol";
import { Atlas } from "../src/contracts/atlas/Atlas.sol";

// NOTE: When handling JSON with StdJson, prefix keys with '.' e.g. '.ATLAS'

Expand Down
16 changes: 13 additions & 3 deletions src/contracts/atlas/AtlETH.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,30 @@ pragma solidity 0.8.25;

import { SafeTransferLib } from "solady/utils/SafeTransferLib.sol";
import { SafeCast } from "openzeppelin-contracts/contracts/utils/math/SafeCast.sol";
import { Permit69 } from "src/contracts/atlas/Permit69.sol";
import "src/contracts/types/EscrowTypes.sol";
import { Permit69 } from "./Permit69.sol";
import "../types/EscrowTypes.sol";

/// @author FastLane Labs
/// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it.
abstract contract AtlETH is Permit69 {
constructor(
uint256 escrowDuration,
uint256 atlasSurchargeRate,
uint256 bundlerSurchargeRate,
address verification,
address simulator,
address initialSurchargeRecipient,
address l2GasCalculator
)
Permit69(escrowDuration, verification, simulator, initialSurchargeRecipient, l2GasCalculator)
Permit69(
escrowDuration,
atlasSurchargeRate,
bundlerSurchargeRate,
verification,
simulator,
initialSurchargeRecipient,
l2GasCalculator
)
{ }

/*//////////////////////////////////////////////////////////////
Expand Down
Loading
Loading