Commit 10d0bd7
feat(money-account-upgrade-controller): persist upgrade status and add retry
Track fully upgraded accounts in persisted controller state, keyed by
lowercased address and fingerprinted against the active upgrade config,
so upgradeAccount skips the step sequence once an account is recorded
as upgraded and re-runs it when the config changes.
Add upgradeAccountWithRetry, retrying failed attempts with capped
exponential backoff (10s/20s/40s/60s, 5 attempts by default) and
AbortSignal cancellation. Failures that cannot resolve by retrying
(account delegated to a third-party EIP-7702 implementation, or
unexpected on-chain code) are marked terminal via TerminalUpgradeError
and are not retried.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent 621fbe4 commit 10d0bd7
9 files changed
Lines changed: 819 additions & 13 deletions
File tree
- packages/money-account-upgrade-controller
- src
- steps
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
10 | 19 | | |
11 | 20 | | |
| 21 | + | |
12 | 22 | | |
13 | 23 | | |
14 | 24 | | |
| |||
packages/money-account-upgrade-controller/src/MoneyAccountUpgradeController-method-action-types.ts
Lines changed: 29 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
16 | 22 | | |
17 | 23 | | |
18 | 24 | | |
19 | 25 | | |
20 | 26 | | |
21 | 27 | | |
22 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
23 | 50 | | |
24 | 51 | | |
25 | 52 | | |
26 | 53 | | |
27 | | - | |
| 54 | + | |
| 55 | + | |
0 commit comments