Post
Share your knowledge.
DuAn97
Mar 14, 2025
Expert Q&A
Understanding `tx.gas` in ts-sdk transactions
I'm trying to understand what tx.gas
represents in the ts-sdk. Specifically, is tx.gas
related to the coin set when using the setGasPayment()
function while working with a Transaction
object in TypeScript?
- Move CLI
1
1
Share
Comments
Answers
1Mar 14 2025, 18:24
tx.gas
is indeed the gas payment coin used for the transaction. If you employ something like:
const [coin] = tx.splitCoins(
tx.gas,
[100000000]
);
It will automatically take the gas coin, typically referred to as SUI
.
1
Best Answer
Comments
Do you know the answer?
Please log in and share it.
Move is an executable bytecode language used to implement custom transactions and smart contracts.
148Posts231Answers

Reward CampaignJune
- ... SUIderiss+5
- ... SUIRamirez+5
- ... SUIElvin CLONE +5
- ... SUI
- ... SUI
- ... SUI
- ... SUIBritain+2
Bounty Posts