-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
452ecea
commit 08a9cb8
Showing
9 changed files
with
47 additions
and
24 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 morpho-blue-bundlers
deleted from
97ecc8
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// SPDX-License-Identifier: GPL-2.0-or-later | ||
pragma solidity >=0.5.0; | ||
|
||
interface IERC20WrapperBundler { | ||
function erc20WrapperDepositFor(address wrapper, uint256 amount) external; | ||
} |
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,12 @@ | ||
// SPDX-License-Identifier: GPL-2.0-or-later | ||
pragma solidity >=0.5.0; | ||
|
||
/// @title IMulticall | ||
/// @author Morpho Labs | ||
/// @custom:contact security@morpho.org | ||
/// @notice Interface of Multicall. | ||
interface IMulticall { | ||
/// @notice Executes an ordered batch of delegatecalls to this contract. | ||
/// @param data The ordered array of calldata to execute. | ||
function multicall(bytes[] calldata data) external payable; | ||
} |
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,6 @@ | ||
// SPDX-License-Identifier: GPL-2.0-or-later | ||
pragma solidity ^0.8.0; | ||
|
||
interface ITransferBundler { | ||
function erc20TransferFrom(address asset, uint256 amount) external; | ||
} |
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,15 @@ | ||
// SPDX-License-Identifier: GPL-2.0-or-later | ||
pragma solidity ^0.8.0; | ||
|
||
import {IERC20WrapperBundler} from "../interfaces/IERC20WrapperBundler.sol"; | ||
import {ITransferBundler} from "../interfaces/ITransferBundler.sol"; | ||
|
||
library EncodeLib { | ||
function _erc20WrapperDepositFor(address asset, uint256 amount) internal pure returns (bytes memory) { | ||
return abi.encodeCall(IERC20WrapperBundler.erc20WrapperDepositFor, (asset, amount)); | ||
} | ||
|
||
function _erc20TransferFrom(address asset, uint256 amount) internal pure returns (bytes memory) { | ||
return abi.encodeCall(ITransferBundler.erc20TransferFrom, (asset, amount)); | ||
} | ||
} |