-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:morpho-labs/morpho-stack into refac…
…tor/tests
- Loading branch information
Showing
17 changed files
with
173 additions
and
33 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
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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
// SPDX-License-Identifier: GPL-2.0-or-later | ||
pragma solidity 0.8.21; | ||
|
||
import {URDBundler} from "./URDBundler.sol"; | ||
import {MorphoBundler} from "./MorphoBundler.sol"; | ||
import {Permit2Bundler} from "./Permit2Bundler.sol"; | ||
import {ERC4626Bundler} from "./ERC4626Bundler.sol"; | ||
|
@@ -9,6 +10,6 @@ import {ERC4626Bundler} from "./ERC4626Bundler.sol"; | |
/// @author Morpho Labs | ||
/// @custom:contact [email protected] | ||
/// @notice Common bundler layer guaranteeing it can be deployed to the same address on all EVM-compatible chains. | ||
contract EVMBundler is Permit2Bundler, ERC4626Bundler, MorphoBundler { | ||
constructor(address morpho) MorphoBundler(morpho) {} | ||
contract EVMBundler is Permit2Bundler, ERC4626Bundler, URDBundler, MorphoBundler { | ||
constructor(address urd, address morpho) URDBundler(urd) MorphoBundler(morpho) {} | ||
} |
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,32 @@ | ||
// SPDX-License-Identifier: GPL-2.0-or-later | ||
pragma solidity 0.8.21; | ||
|
||
import {IUniversalRewardsDistributor} from "@universal-rewards-distributor/interfaces/IUniversalRewardsDistributor.sol"; | ||
|
||
import {ErrorsLib} from "./libraries/ErrorsLib.sol"; | ||
|
||
import {BaseBundler} from "./BaseBundler.sol"; | ||
|
||
/// @title URDBudnler | ||
/// @author Morpho Labs | ||
/// @custom:contact [email protected] | ||
/// @notice Bundler that allows to claim token rewards on the Universal Rewards Distributor. | ||
contract URDBundler is BaseBundler { | ||
IUniversalRewardsDistributor public immutable URD; | ||
|
||
constructor(address urd) { | ||
require(urd != address(0), ErrorsLib.ZERO_ADDRESS); | ||
|
||
URD = IUniversalRewardsDistributor(urd); | ||
} | ||
|
||
function claim(uint256 distributionId, address account, address reward, uint256 claimable, bytes32[] calldata proof) | ||
external | ||
payable | ||
{ | ||
require(account != address(this), ErrorsLib.BUNDLER_ADDRESS); | ||
require(account != address(0), ErrorsLib.ZERO_ADDRESS); | ||
|
||
URD.claim(distributionId, account, reward, claimable, proof); | ||
} | ||
} |
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
Submodule universal-rewards-distributor
added at
426ad7
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