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
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?
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.
Hey, ok I looked into it some more. We do have a transaction function call 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. 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 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?
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.
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.