Commit f7265f9
committed
fix(deployer): check token version before V2 upgrade
Fixes #3812
Add version check at the start of upgrade_esp_token_v2() and
upgrade_esp_token_v2_multisig_owner() to fail early with a clear
error message if the token is already on V2.
Previously, attempting to upgrade an already-V2 token would result
in a cryptic 'InvalidInitialization' revert (0xf92ee8a9). Now users
get a clear message: 'EspToken is already on V2, no upgrade needed'1 parent 7c10665 commit f7265f9
2 files changed
+20
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
857 | 857 | | |
858 | 858 | | |
859 | 859 | | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
860 | 870 | | |
861 | 871 | | |
862 | 872 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
526 | 526 | | |
527 | 527 | | |
528 | 528 | | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
529 | 539 | | |
530 | 540 | | |
531 | 541 | | |
| |||
0 commit comments