Skip to main content

Bulker Gateway

Github code

Function

execute


enum ActionType {
APPROVE2,
TRANSFER_FROM2,
APPROVE_MANAGER,
SUPPLY,
SUPPLY_COLLATERAL,
BORROW,
REPAY,
WITHDRAW,
WITHDRAW_COLLATERAL,
WRAP_ETH,
UNWRAP_ETH,
WRAP_ST_ETH,
UNWRAP_ST_ETH,
SKIM,
CLAIM_REWARDS
}

function execute(ActionType[] calldata actions, bytes[] calldata data) external payable;

Execute a list of actions atomically.

Parameters

NameTypeDescription
actionsenumThe list of actions to execute.
databytesThe list of data to pass to each action.
msg.valueuintThe amount of ETH to send to the MorphoAaveV3Optimizer contract.

Actions

NameDescription
APPROVE2Approve a token to be spent by the Bulker contract using permit2
TRANSFER_FROM2Transfer a token from the msg.sender to the Bulker contract using permit2
APPROVE_MANAGERApprove the bulker as manager by using a signature
SUPPLYSupply a token to the MorphoAaveV3Optimizer contract
SUPPLY_COLLATERALSupply a token as collateral to the MorphoAaveV3Optimizer contract
BORROWBorrow a token from the MorphoAaveV3Optimizer contract (need manager approval)
REPAYRepay a token to the MorphoAaveV3Optimizer contract
WITHDRAWWithdraw a token from the MorphoAaveV3Optimizer contract (need manager approval)
WITHDRAW_COLLATERALWithdraw a token from the MorphoAaveV3Optimizer contract as collateral (need manager approval)
WRAP_ETHWrap ETH into WETH
UNWRAP_ETHUnwrap WETH into ETH
WRAP_ST_ETHWrap stETH into WstETH
UNWRAP_ST_ETHUnwrap WstETH into stETH
SKIMSkim the MorphoAaveV3Optimizer contract to the sender