Bundle Storage
Record of all the Bundles created
/// @dev Group of strategies bundled together so user can sub to multiple strategies at once
/// @param creator Address of the user who created the bundle
/// @param strategyIds Array of strategy ids stored in StrategyStorage
struct StrategyBundle {
address creator;
uint64[] strategyIds;
}contract BundleStorage {
/// @notice Adds a new bundle to array
/// @dev Can only be called by auth addresses if it's not open to public
/// @dev Strategies need to have the same number of triggers and ids exists
/// @param _strategyIds Array of strategyIds that go into a bundle
function createBundle(
uint64[] memory _strategyIds
) public onlyAuthCreators sameTriggers(_strategyIds) returns (uint256);
/// @notice Switch to determine if bundles can be created by anyone
/// @dev Callable only by the owner
/// @param _openToPublic Flag if true anyone can create bundles
function changeEditPermission(bool _openToPublic) public onlyOwner;
////////////////////////////// VIEW METHODS /////////////////////////////////
function getStrategyId(uint256 _bundleId, uint256 _strategyIndex) public view returns (uint256);
function getBundle(uint _bundleId) public view returns (StrategyBundle memory);
function getBundleCount() public view returns (uint256);
function getPaginatedBundles(uint _page, uint _perPage) public view returns (StrategyBundle[] memory);
}Last updated