Skip to content

Commit

Permalink
feat(ct): add helper function on ChugSplashManager to execute entire …
Browse files Browse the repository at this point in the history
…bundle in one transaction
  • Loading branch information
sam-goldman committed Apr 9, 2023
1 parent 35125af commit 34790fa
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/perfect-numbers-switch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@chugsplash/contracts': minor
---

Add helper function on ChugSplashManager to execute entire bundle in one transaction
12 changes: 12 additions & 0 deletions packages/contracts/contracts/ChugSplashManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,18 @@ contract ChugSplashManager is OwnableUpgradeable, ReentrancyGuardUpgradeable {
_payExecutorAndProtocol(initialGasLeft);
}

function executeEntireBundle(
ChugSplashTarget[] memory _targets,
bytes32[][] memory _targetProofs,
ChugSplashAction[] memory _actions,
uint256[] memory _actionIndexes,
bytes32[][] memory _actionProofs
) external {
initiateBundleExecution(_targets, _targetProofs);
executeActions(_actions, _actionIndexes, _actionProofs);
completeBundleExecution(_targets, _targetProofs);
}

/**
* @notice **WARNING**: Cancellation is a potentially dangerous action and should not be
* executed unless in an emergency.
Expand Down

0 comments on commit 34790fa

Please sign in to comment.