Skip to content

Commit

Permalink
Merge pull request #421 from morpho-org/feat/pkg/reallocate-to
Browse files Browse the repository at this point in the history
feat(pkg): add reallocateTo
  • Loading branch information
julien-devatom authored Mar 16, 2024
2 parents d6b5f35 + 2b5ea66 commit 3adb34c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@morpho-org/morpho-blue-bundlers",
"description": "Morpho Blue Bundlers",
"license": "GPL-2.0-or-later",
"version": "1.0.0",
"version": "1.1.0",
"repository": {
"type": "git",
"url": "git+https://github.com/morpho-labs/morpho-blue-bundlers.git"
Expand Down
18 changes: 17 additions & 1 deletion pkg/BundlerAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
IAllowanceTransfer,
ERC20WrapperBundler__factory,
} from "../types";
import { AuthorizationStruct, MarketParamsStruct } from "../types/src/MorphoBundler";
import { AuthorizationStruct, MarketParamsStruct, WithdrawalStruct } from "../types/src/MorphoBundler";

export type BundlerCall = string;

Expand Down Expand Up @@ -279,6 +279,22 @@ export class BundlerAction {
]);
}

static metaMorphoReallocateTo(
publicAllocator: string,
vault: string,
value: BigNumberish,
withdrawals: WithdrawalStruct[],
supplyMarketParams: MarketParamsStruct,
): BundlerCall {
return BundlerAction.MORPHO_BUNDLER_IFC.encodeFunctionData("reallocateTo", [
publicAllocator,
vault,
value,
withdrawals,
supplyMarketParams,
]);
}

/* Universal Rewards Distributor */

static urdClaim(
Expand Down

0 comments on commit 3adb34c

Please sign in to comment.