-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: zoeTools.localTransfer error paths (#9902)
closes: #9925 refs: #9193 ## Description - This PR primarily hardens the `zoeTools` implementation for orchestrated async-flows by: - ensuring payments handled in `zoeTools.localTransfer` are recovered to the original seat in the event of failure or partial failure - providing a `zoeTools.withdrawFromSeat` retriable function to facilitate withdrawing funds from a LocalChainAccount to a User seat. Ensures all changes are rolled back in the event of partial failure. - using `asVow` instead of `retriable` since these operations are not idempotent - Creates `src/fixtures/zoe-tools.contract.js` to facilitate testing error paths - To facilitate the change, `vowTools.allVowsSettled` was implemented in `@agoric/vow`. See #10077 which this PR depends on ### Security Considerations Improves safety around Payment handling in async-flow contracts in `@agoric/orchestration` ### Scaling Considerations n/a ### Documentation Considerations Updates jsdoc strings for `localTransfer` and `withdrawToSeat`. As maintainer notes for considerations around `asVow` and promptness. ### Testing Considerations Includes tests with different failure paths previously unaccounted for. ### Upgrade Considerations Unreleased code that will be part of an npm release
- Loading branch information
Showing
19 changed files
with
1,075 additions
and
68 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
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
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
Oops, something went wrong.