Beitrag
Teile dein Wissen.
DuAn97
Mar 14, 2025
Experten 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
Teilen
Kommentare
Antworten
1Mar 14 2025, 18:24
tx.gas
ist in der Tat die Gaszahlungsmünze, die für die Transaktion verwendet wurde. Wenn Sie etwas verwenden wie:
const [coin] = tx.splitCoins(
tx.gas,
[100000000]
);
Es nimmt automatisch die Gasmünze entgegen, die normalerweise als bezeichnet wirdSUI
.
1
Beste Antwort
Kommentare
Weißt du die Antwort?
Bitte melde dich an und teile sie.