# updatePriceFeeds without accessing tx.gas

**URL:** <https://dev-forum.pyth.network/t/updatepricefeeds-without-accessing-tx-gas/292>\
**Category:** Price Feeds\
**Created:** [July 11, 2025, 8:30pm UTC](https://dev-forum.pyth.network/t/updatepricefeeds-without-accessing-tx-gas/292 "2025-07-11T20:30:46Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![cos](https://avatars.discourse-cdn.com/v4/letter/c/34f0e0/32.png) [@cos](https://dev-forum.pyth.network/u/cos)\
**Post date:** [July 11, 2025, 8:30pm UTC](https://dev-forum.pyth.network/t/updatepricefeeds-without-accessing-tx-gas/292/1 "2025-07-11T20:30:46Z")

</div>

• 🔗 **Chain**  
SUI

Hi Pyth team, we are exploring sponsor gas use case by leveraging shinami gas station feature. But in order to use their gas station, they require transaction to not access tx.gas, but our use cases involve calling Pyth sui js client api of updatePriceFeeds, which we believe access tx.gas

```auto
const client = new SuiPythClient(provider, pythStateId, wormholeStateId)
await this.client.updatePriceFeeds(tx_, priceUpdateData, priceFeedIds)

```

Ask: do you have another API that does the same thing without accessing tx.gas?

---

<div class="post-metadata">

**Author:** ![darunrs](https://avatars.discourse-cdn.com/v4/letter/d/9e8a1a/32.png) [@darunrs](https://dev-forum.pyth.network/u/darunrs)\
**Post date:** [July 12, 2025, 1:49pm UTC](https://dev-forum.pyth.network/t/updatepricefeeds-without-accessing-tx-gas/292/2 "2025-07-12T13:49:31Z")

</div>

We do use the gas as part of the transaction. It seems necessary as we use it to ensure the call is able to pay the base fees for updating all the provided IDs. We generally need some way of getting the fee paid for the correct transaction. I am not aware of a method that allows a fee to be paid without accessing gas at some point.

I’ll check with the team to see what options are available. Could you also let me know what the rationale for not accessing gas is? How does the gas station play into the update price feed transaction?

---

<div class="post-metadata">

**Author:** ![cos](https://avatars.discourse-cdn.com/v4/letter/c/34f0e0/32.png) [@cos](https://dev-forum.pyth.network/u/cos)\
**Post date:** [July 12, 2025, 7:59pm UTC](https://dev-forum.pyth.network/t/updatepricefeeds-without-accessing-tx-gas/292/3 "2025-07-12T19:59:40Z")

</div>

Hi darunrs, thanks for your reply. The rationale is that we want to use Shinami’s sponsor gas feature, which will provide the necessary gas via their gas station and it’s by their design that the transaction should not access tx.gas since they will provide it from their side. Basically if you could provide an api to updatePriceFeeds without access tx.gas, then we will build this transaction and pass it to shinami so they can leverage PTB to provide the necessary gas.

---

<div class="post-metadata">

**Author:** ![darunrs](https://avatars.discourse-cdn.com/v4/letter/d/9e8a1a/32.png) [@darunrs](https://dev-forum.pyth.network/u/darunrs)\
**Post date:** [July 14, 2025, 3:10pm UTC](https://dev-forum.pyth.network/t/updatepricefeeds-without-accessing-tx-gas/292/4 "2025-07-14T15:10:26Z")

</div>

Hey, ok I looked into it some more. We _do_ have a [transaction function call](https://github.com/pyth-network/pyth-crosschain/blob/78982eb2579e890bca21111e17863cc0a1fdb2e5/target_chains/sui/contracts/sources/pyth.move#L262) which takes a SUI coin as input. This does not access gas as the coin provides the fee. However, we don’t suggest directly calling the function as contract upgrades can cause the package ID to change. You’ll end up calling an outddated contract. See the docs [here](https://docs.pyth.network/price-feeds/use-real-time-data/sui). So, we suggest using the JS SDK we provide instead, which fetches the correct contract address. If using the SDK works for you, I can provide a version of [this function](https://github.com/pyth-network/pyth-crosschain/blob/main/target_chains/sui/sdk/js/src/client.ts#L113) which also takes a coin array input, and uses that instead of gas? I think that may work. Let me know if these options might work for you?

---

<div class="post-metadata">

**Author:** ![cos](https://avatars.discourse-cdn.com/v4/letter/c/34f0e0/32.png) [@cos](https://dev-forum.pyth.network/u/cos)\
**Post date:** [July 14, 2025, 7:27pm UTC](https://dev-forum.pyth.network/t/updatepricefeeds-without-accessing-tx-gas/292/5 "2025-07-14T19:27:51Z")

</div>

Hi yes, we are using your sdk and would be great if you can provide a function that accepts coin object array as input to address this tx.gas restriction.

```auto
"@pythnetwork/pyth-sui-js": "2.1.0",

```

this is the current version we consume

---

<div class="post-metadata">

**Author:** ![cos](https://avatars.discourse-cdn.com/v4/letter/c/34f0e0/32.png) [@cos](https://dev-forum.pyth.network/u/cos)\
**Post date:** [July 17, 2025, 8:15pm UTC](https://dev-forum.pyth.network/t/updatepricefeeds-without-accessing-tx-gas/292/6 "2025-07-17T20:15:45Z")

</div>

Hi darunrs, any updates on this?

---

<div class="post-metadata">

**Author:** ![darunrs](https://avatars.discourse-cdn.com/v4/letter/d/9e8a1a/32.png) [@darunrs](https://dev-forum.pyth.network/u/darunrs)\
**Post date:** [July 22, 2025, 6:43pm UTC](https://dev-forum.pyth.network/t/updatepricefeeds-without-accessing-tx-gas/292/7 "2025-07-22T18:43:31Z")

</div>

Hey! Thank you for your patience! I’ve merged the PR just now and released v2.2.0. It contains the new function which accepts the result of splitCoins. Let me know if there’s any complications.

---

<div class="post-metadata">

**Author:** ![cos](https://avatars.discourse-cdn.com/v4/letter/c/34f0e0/32.png) [@cos](https://dev-forum.pyth.network/u/cos)\
**Post date:** [July 24, 2025, 6:16am UTC](https://dev-forum.pyth.network/t/updatepricefeeds-without-accessing-tx-gas/292/8 "2025-07-24T06:16:10Z")

</div>

thank you! now we are able to make successful sponsored gas tx with this change
