-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #177 from morpho-labs/feat/update-URD
update URDBundler
- Loading branch information
Showing
7 changed files
with
49 additions
and
43 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,5 +11,5 @@ import {ERC4626Bundler} from "./ERC4626Bundler.sol"; | |
/// @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, URDBundler, MorphoBundler { | ||
constructor(address urd, address morpho) URDBundler(urd) MorphoBundler(morpho) {} | ||
constructor(address morpho) 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 |
---|---|---|
|
@@ -12,21 +12,14 @@ import {BaseBundler} from "./BaseBundler.sol"; | |
/// @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) | ||
function claim(address distributor, address account, address reward, uint256 claimable, bytes32[] calldata proof) | ||
external | ||
payable | ||
{ | ||
require(distributor != address(0), ErrorsLib.ZERO_ADDRESS); | ||
require(account != address(0), ErrorsLib.ZERO_ADDRESS); | ||
require(account != address(this), ErrorsLib.BUNDLER_ADDRESS); | ||
|
||
URD.claim(distributionId, account, reward, claimable, proof); | ||
IUniversalRewardsDistributor(distributor).claim(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
Submodule morpho-blue
updated
from 60e6af to 084721
Submodule universal-rewards-distributor
updated
19 files
+25 −0 | .github/workflows/formatting.yml | |
+10 −17 | .github/workflows/test.yml | |
+5 −0 | .husky/post-checkout | |
+5 −0 | .husky/post-merge | |
+1 −1 | .husky/pre-commit | |
+4 −0 | .husky/prepare-commit-msg | |
+14 −0 | README.md | |
+23 −15 | foundry.toml | |
+29 −5 | package.json | |
+0 −13 | script/DeployUniversalRewardsDistributor.s.sol | |
+78 −151 | src/UniversalRewardsDistributor.sol | |
+37 −0 | src/UrdFactory.sol | |
+33 −84 | src/interfaces/IUniversalRewardsDistributor.sol | |
+1 −10 | src/libraries/ErrorsLib.sol | |
+59 −0 | src/libraries/EventsLib.sol | |
+47 −0 | test/URDFactoryTest.sol | |
+552 −0 | test/UniversalRewardsDistributorTest.sol | |
+0 −653 | test/UniversalRouterDistributor.t.sol | |
+1,603 −0 | yarn.lock |
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