You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| <Argrequired={true}type=" &mut PriceInfoObject">price_info_object</Arg> | <Inputid="price_info_object"format={InputFormats.BigInt}/> | PriceInfoObject is a shared Sui object containing the price feed to be updated. |
| <Argrequired={true}type=" &Clock">clock</Arg> | <Inputid="clock"format={InputFormats.BigInt}/> | clock is a Sui shared object used to tell time and record timestamps |
| <Argrequired={true}type=" &mut PriceInfoObject">price_info_object</Arg> | <Inputid="price_info_object"format={InputFormats.BigInt}/> | PriceInfoObject is a shared Sui object containing the price feed to be updated. |
| <Argrequired={true}type=" &Clock">clock</Arg> | <Inputid="clock"format={InputFormats.BigInt}/> | clock is a Sui shared object used to tell time and record timestamps |
33
+
33
34
</div>
34
35
35
36
# Warning: do not hardcode price feed updates in your contract
36
-
`update_single_price_feed` is meant to be called in a chain of programmable transactions, rather than hardcoded in a contract. This is because when a Sui contract upgrades, the upgraded version lives at a different address. When this happens the previous callsite gets bricked, or becomes un-callable. It is up to the user to use the correct call-site (we also have a helper function for finding the latest call-site given the Pyth state object ID, which is unchanged between upgrades).
37
+
38
+
`update_single_price_feed` is meant to be called in a chain of programmable transactions, rather than hardcoded in a contract. This is because when a Sui contract upgrades, the upgraded version lives at a different address. When this happens the previous callsite gets bricked, or becomes un-callable. It is up to the user to use the correct call-site (we also have a helper function for finding the latest call-site given the Pyth state object ID, which is unchanged between upgrades).
37
39
38
40
<Examples>
39
41
<Example
@@ -52,6 +54,7 @@ Reverts if the required fee is not paid, or the `update_data` is incorrectly sig
0 commit comments