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

Redstone OEV dAppControl update #435

Merged
merged 7 commits into from
Sep 24, 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
2 changes: 1 addition & 1 deletion lib/openzeppelin-contracts
2 changes: 1 addition & 1 deletion lib/openzeppelin-contracts-upgradeable
2 changes: 1 addition & 1 deletion lib/redstone-oracles-monorepo
2 changes: 1 addition & 1 deletion lib/solady
Submodule solady updated 120 files
4 changes: 1 addition & 3 deletions src/contracts/atlas/Factory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,7 @@ abstract contract Factory {
/// @param userOp The user operation containing details about the user and the DAppControl contract.
/// @return executionEnvironment The address of the execution environment that was found or created.
/// @return dConfig The DAppConfig for the execution environment, specifying how operations should be handled.
function _getOrCreateExecutionEnvironment(
UserOperation calldata userOp
)
function _getOrCreateExecutionEnvironment(UserOperation calldata userOp)
internal
returns (address executionEnvironment, DAppConfig memory dConfig)
{
Expand Down
4 changes: 1 addition & 3 deletions src/contracts/atlas/Storage.sol
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,7 @@ contract Storage is AtlasEvents, AtlasErrors, AtlasConstants {
return S_bondedTotalSupply;
}

function accessData(
address account
)
function accessData(address account)
external
view
returns (
Expand Down
8 changes: 2 additions & 6 deletions src/contracts/common/ExecutionEnvironment.sol
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ contract ExecutionEnvironment is Base {
/// corresponding `preOpsCall` function.
/// @param userOp The UserOperation struct.
/// @return preOpsData Data to be passed to the next call phase.
function preOpsWrapper(
UserOperation calldata userOp
)
function preOpsWrapper(UserOperation calldata userOp)
external
validUser(userOp)
onlyAtlasEnvironment
Expand All @@ -64,9 +62,7 @@ contract ExecutionEnvironment is Base {
/// with `userOp.data` as calldata, depending on the the needsDelegateUser flag.
/// @param userOp The UserOperation struct.
/// @return returnData Data to be passed to the next call phase.
function userWrapper(
UserOperation calldata userOp
)
function userWrapper(UserOperation calldata userOp)
external
payable
validUser(userOp)
Expand Down
8 changes: 2 additions & 6 deletions src/contracts/dapp/DAppControl.sol
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,7 @@ abstract contract DAppControl is DAppControlTemplate, ExecutionBase {
/// @notice The preOpsCall hook which may be called before the UserOperation is executed.
/// @param userOp The UserOperation struct.
/// @return data Data to be passed to the next call phase.
function preOpsCall(
UserOperation calldata userOp
)
function preOpsCall(UserOperation calldata userOp)
external
payable
validControl
Expand Down Expand Up @@ -164,9 +162,7 @@ abstract contract DAppControl is DAppControlTemplate, ExecutionBase {
/// @notice Returns the DAppConfig struct of this DAppControl contract.
/// @param userOp The UserOperation struct.
/// @return dConfig The DAppConfig struct of this DAppControl contract.
function getDAppConfig(
UserOperation calldata userOp
)
function getDAppConfig(UserOperation calldata userOp)
external
view
mustBeCalled
Expand Down
4 changes: 1 addition & 3 deletions src/contracts/examples/ex-post-mev-example/V2ExPost.sol
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ contract V2ExPost is DAppControl {

event GiftedGovernanceToken(address indexed user, address indexed token, uint256 amount);

constructor(
address _atlas
)
constructor(address _atlas)
DAppControl(
_atlas,
msg.sender,
Expand Down
4 changes: 1 addition & 3 deletions src/contracts/examples/gas-filler/Filler.sol
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,7 @@ contract Filler is DAppControl {
delete prepaid;
}

function _decodeRawData(
bytes calldata data
)
function _decodeRawData(bytes calldata data)
internal
pure
returns (uint256 gasNeeded, ApprovalTx memory approvalTx)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ contract SwapIntentDAppControl is DAppControl {
uint256 public constant USER_CONDITION_GAS_LIMIT = 20_000;
uint256 public constant MAX_USER_CONDITIONS = 5;

constructor(
address _atlas
)
constructor(address _atlas)
DAppControl(
_atlas,
msg.sender,
Expand Down
8 changes: 2 additions & 6 deletions src/contracts/examples/intents-example/V4SwapIntent.sol
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,7 @@ contract V4SwapIntentControl is DAppControl {
}

// selector 0x04e45aaf
function exactInputSingle(
ExactInputSingleParams calldata params
)
function exactInputSingle(ExactInputSingleParams calldata params)
external
payable
verifyCall(params.tokenIn, params.tokenOut, params.amountIn)
Expand Down Expand Up @@ -133,9 +131,7 @@ contract V4SwapIntentControl is DAppControl {
}

// selector 0x5023b4df
function exactOutputSingle(
ExactOutputSingleParams calldata params
)
function exactOutputSingle(ExactOutputSingleParams calldata params)
external
payable
verifyCall(params.tokenIn, params.tokenOut, params.amountInMaximum)
Expand Down
4 changes: 1 addition & 3 deletions src/contracts/examples/oev-example/ChainlinkAtlasWrapper.sol
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,7 @@ contract ChainlinkAtlasWrapper is Ownable, IChainlinkAtlasWrapper {
}

// Pass-through call to base oracle's `getRoundData()` function
function getRoundData(
uint80 _roundId
)
function getRoundData(uint80 _roundId)
external
view
override
Expand Down
4 changes: 1 addition & 3 deletions src/contracts/examples/oev-example/ChainlinkDAppControl.sol
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@ contract ChainlinkDAppControl is DAppControl {
event SignerRemovedForBaseFeed(address indexed baseFeed, address indexed signer);
event ObservationsQuorumSet(uint256 oldQuorum, uint256 newQuorum);

constructor(
address _atlas
)
constructor(address _atlas)
DAppControl(
_atlas,
msg.sender,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,7 @@ contract ChainlinkDAppControl is DAppControl {
event SignerAddedForBaseFeed(address indexed baseFeed, address indexed signer);
event SignerRemovedForBaseFeed(address indexed baseFeed, address indexed signer);

constructor(
address _atlas
)
constructor(address _atlas)
DAppControl(
_atlas,
msg.sender,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ interface AggregatorV3Interface {
// getRoundData and latestRoundData should both raise "No data present"
// if they do not have data to report, instead of returning unset values
// which could be misinterpreted as actual reported values.
function getRoundData(
uint80 _roundId
)
function getRoundData(uint80 _roundId)
external
view
returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);
Expand Down
4 changes: 1 addition & 3 deletions src/contracts/examples/redstone-oev/RedstoneDAppControl.sol
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ contract RedstoneDAppControl is DAppControl {
mapping(address bundler => bool isWhitelisted) public bundlerWhitelist;
uint32 public NUM_WHITELISTED_BUNDLERS = 0;

constructor(
address _atlas
)
constructor(address _atlas)
DAppControl(
_atlas,
msg.sender,
Expand Down
Loading
Loading