Using PriceFeed in Sui

for using pyth in Sui network, in the smart contract, do i always have to pass in price_info_obj obtained from calling updatePriceFeeds in TS sdk:

//in ts:
const priceInfoObjectIds = await client.updatePriceFeeds(tx, priceFeedUpdateData, priceIDs);
//in sc: 
let price_struct = pyth::get_price_no_older_than(price_info_object,clock, max_age);

In my opinion, I prefer to pass the address directly from the client TypeScript SDK and perform the address validation within the smart contract function. :hammer:

care to elaborate? there isnt much information on the website other than the default example. much appreciated thanks!

to verify the correct price feed (clock,max_age)

Price Info Object is basically something which provides the correct address for the object containing price data for that feed. Given that, the get_price_no_older_than function can tell where to fetch price data from. So, it is necessary. Theoretically you can supply it yourself but updating the feed is one way of getting the feed object IDs. As @frongrider2 said, you can just pass the address directly if you want to. But you need to know that address somehow and store it for use.