Skip to content

Commit

Permalink
persist code hash reset (#2212)
Browse files Browse the repository at this point in the history
  • Loading branch information
cctdaniel authored Dec 24, 2024
1 parent 26e9d9f commit 8b3fd2c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions target_chains/ton/contracts/contracts/Pyth.fc
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,9 @@ int apply_decimal_expo(int value, int expo) {
;; Reset the upgrade code hash
upgrade_code_hash = 0;

;; Store the data to persist the reset above
store_data();

;; Throw an exception to end the current execution
;; The contract will be restarted with the new code
throw(0);
Expand Down

0 comments on commit 8b3fd2c

Please sign in to comment.