Move.

Beitrag

Teile dein Wissen.

DuAn.
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

1
Forever_A-gator.
Mar 14 2025, 18:24

tx.gasist 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.

Move is an executable bytecode language used to implement custom transactions and smart contracts.

148Beiträge231Antworten
Sui.X.Peera.

Verdiene deinen Anteil an 1000 Sui

Sammle Reputationspunkte und erhalte Belohnungen für deine Hilfe beim Wachstum der Sui-Community.

BelohnungskampagneJuli