Skip to content

Commit 37a2ce5

Browse files
Fix all tests and examples for increased default max gas (2M)
- Increase FUND_AMOUNT from 100M to 1B octas in tests/unit/helper.ts and tests/e2e/api/account.test.ts - Fix hardcoded signing message byte arrays for new max gas - Fix transactionBuilder.test.ts expected default max gas (200000n -> 2000000n) - Fix account.test.ts hardcoded balance assertions to use FUND_AMOUNT - Increase funding in transactionSubmission, customClient, aptosRequest tests - Increase all example funding amounts from 100M to 1B octas across typescript, typescript-esm, javascript, deno-test, bun-test, web-test Co-authored-by: Greg Nazario <greg@gnazar.io>
1 parent 4a2516f commit 37a2ce5

36 files changed

+62
-62
lines changed

examples/bun-test/simple_sponsored_transaction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { Account, Aptos, AptosConfig, Network, NetworkToNetworkName } from "@apt
1111

1212
// Alice needs funds to transfer, Bob (sponsor) pays the gas
1313
const ALICE_INITIAL_BALANCE = 100; // Just enough to transfer
14-
const BOB_INITIAL_BALANCE = 100_000_000;
14+
const BOB_INITIAL_BALANCE = 1_000_000_000;
1515
const TRANSFER_AMOUNT = 10;
1616

1717
// Default to devnet, but allow for overriding

examples/bun-test/simple_transfer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import {
1818
} from "@aptos-labs/ts-sdk";
1919

2020
const APTOS_COIN = "0x1::aptos_coin::AptosCoin";
21-
const ALICE_INITIAL_BALANCE = 100_000_000;
21+
const ALICE_INITIAL_BALANCE = 1_000_000_000;
2222
const BOB_INITIAL_BALANCE = 100;
2323
const TRANSFER_AMOUNT = 100;
2424

examples/deno-test/simple_sponsored_transaction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { Account, Aptos, AptosConfig, Network, NetworkToNetworkName } from "@apt
99

1010
// Alice needs funds to transfer, Bob (sponsor) pays the gas
1111
const ALICE_INITIAL_BALANCE = 100; // Just enough to transfer
12-
const BOB_INITIAL_BALANCE = 100_000_000;
12+
const BOB_INITIAL_BALANCE = 1_000_000_000;
1313
const TRANSFER_AMOUNT = 10;
1414

1515
// Default to devnet, but allow for overriding

examples/deno-test/simple_transfer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import {
1616
} from "@aptos-labs/ts-sdk";
1717

1818
const APTOS_COIN = "0x1::aptos_coin::AptosCoin";
19-
const ALICE_INITIAL_BALANCE = 100_000_000;
19+
const ALICE_INITIAL_BALANCE = 1_000_000_000;
2020
const BOB_INITIAL_BALANCE = 100;
2121
const TRANSFER_AMOUNT = 100;
2222

examples/javascript/simple_sponsored_transaction.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ const dotenv = require("dotenv");
66
dotenv.config();
77
const { Account, Aptos, AptosConfig, NetworkToNetworkName, Network } = require("@aptos-labs/ts-sdk");
88

9-
const ALICE_INITIAL_BALANCE = 100_000_000;
10-
const SPONSOR_INITIAL_BALANCE = 100_000_000;
9+
const ALICE_INITIAL_BALANCE = 1_000_000_000;
10+
const SPONSOR_INITIAL_BALANCE = 1_000_000_000;
1111
const BOB_INITIAL_BALANCE = 0;
1212
const TRANSFER_AMOUNT = 10;
1313
// Default to devnet, but allow for overriding

examples/javascript/simple_transfer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const {
1515
} = require("@aptos-labs/ts-sdk");
1616

1717
const APTOS_COIN = "0x1::aptos_coin::AptosCoin";
18-
const ALICE_INITIAL_BALANCE = 100_000_000;
18+
const ALICE_INITIAL_BALANCE = 1_000_000_000;
1919
const BOB_INITIAL_BALANCE = 100;
2020
const TRANSFER_AMOUNT = 100;
2121
const APTOS_NETWORK = NetworkToNetworkName[process.env.APTOS_NETWORK] || Network.DEVNET;

examples/typescript-esm/multisig_v2.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@ const getSignatureThreshold = async (): Promise<void> => {
8888
};
8989

9090
const fundOwnerAccounts = async () => {
91-
await aptos.fundAccount({ accountAddress: owner1.accountAddress, amount: 100_000_000 });
92-
await aptos.fundAccount({ accountAddress: owner2.accountAddress, amount: 100_000_000 });
93-
await aptos.fundAccount({ accountAddress: owner3.accountAddress, amount: 100_000_000 });
91+
await aptos.fundAccount({ accountAddress: owner1.accountAddress, amount: 1_000_000_000 });
92+
await aptos.fundAccount({ accountAddress: owner2.accountAddress, amount: 1_000_000_000 });
93+
await aptos.fundAccount({ accountAddress: owner3.accountAddress, amount: 1_000_000_000 });
9494
console.log(`owner1: ${owner1.accountAddress.toString()}`);
9595
console.log(`owner2: ${owner2.accountAddress.toString()}`);
9696
console.log(`owner3: ${owner3.accountAddress.toString()}`);
@@ -140,7 +140,7 @@ const settingUpMultiSigAccount = async () => {
140140
const fundMultiSigAccount = async () => {
141141
console.log("Funding the multisig account...");
142142
// Fund the multisig account for transfers.
143-
await aptos.fundAccount({ accountAddress: multisigAddress, amount: 100_000_000 });
143+
await aptos.fundAccount({ accountAddress: multisigAddress, amount: 1_000_000_000 });
144144
};
145145

146146
const createMultiSigTransferTransaction = async () => {

examples/typescript-esm/simple_digital_asset.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { Account, Aptos, AptosConfig, Network, NetworkToNetworkName } from "@apt
99

1010
dotenv.config();
1111

12-
const INITIAL_BALANCE = 100_000_000;
12+
const INITIAL_BALANCE = 1_000_000_000;
1313

1414
// Set up the client
1515
const APTOS_NETWORK: Network = NetworkToNetworkName[process.env.APTOS_NETWORK] || Network.DEVNET;

examples/typescript-esm/simple_transfer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ dotenv.config();
1919

2020
// TODO: There currently isn't a way to use the APTOS_COIN in the COIN_STORE due to a regex
2121
const APTOS_COIN = "0x1::aptos_coin::AptosCoin";
22-
const ALICE_INITIAL_BALANCE = 100_000_000;
22+
const ALICE_INITIAL_BALANCE = 1_000_000_000;
2323
const BOB_INITIAL_BALANCE = 100;
2424
const TRANSFER_AMOUNT = 100;
2525

examples/typescript-esm/sponsored_transactions/server_as_sponsor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import {
2222

2323
dotenv.config();
2424

25-
const INITIAL_BALANCE = 100_000_000;
25+
const INITIAL_BALANCE = 1_000_000_000;
2626
const TRANSFER_AMOUNT = 100;
2727

2828
// Default to devnet, but allow for overriding

0 commit comments

Comments
 (0)