Skip to content

Commit 6002cbe

Browse files
committed
set gas price for examples
1 parent 879e80d commit 6002cbe

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

examples/constants.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,6 @@ export const USDC_COIN_TYPE = "0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942
1818
export const WAL_COIN_TYPE = "0x356a26eb9e012a68958082340d4c4116e7f55615cf27affcff209cf0ae544f59::wal::WAL";
1919
// Decimals
2020
export const DEEP_DECIMALS = 6;
21+
22+
// Gas price
23+
export const GAS_PRICE = 750;

examples/multisig/buildAndLogMultisigTransaction.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,19 @@ import { Transaction } from "@mysten/sui/transactions";
22
import { toBase64 } from "@mysten/sui/utils";
33
import { provider } from "../provider";
44
import { MULTISIG_CONFIG } from "./multisig";
5+
import { GAS_PRICE } from "../constants";
56

67
/**
78
* Handles the boilerplate of building, dry running, and logging a multisig transaction.
89
* @param tx - The transaction block to process.
910
*/
10-
export async function buildAndLogMultisigTransaction(tx: Transaction, sender = MULTISIG_CONFIG.address): Promise<void> {
11+
export async function buildAndLogMultisigTransaction(
12+
tx: Transaction,
13+
sender = MULTISIG_CONFIG.address,
14+
gasPrice = GAS_PRICE,
15+
): Promise<void> {
1116
tx.setSender(sender);
17+
tx.setGasPrice(gasPrice);
1218

1319
const transactionBytes = await tx.build({ client: provider });
1420
const base64TxBytes = toBase64(transactionBytes);

0 commit comments

Comments
 (0)