Skip to content

Commit

Permalink
add dotenv comment
Browse files Browse the repository at this point in the history
  • Loading branch information
gkaravatski committed Nov 28, 2024
1 parent 0db2e80 commit 4dbdb49
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions 02-contract/test/deploy.step8.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import dotenv from "dotenv";
dotenv.config({ path: "../../.env" });

import * as fs from "fs";
import { mnemonicToWalletKey } from "@ton/crypto";
import { TonClient, Cell, WalletContractV4 } from "@ton/ton";
Expand All @@ -20,6 +23,7 @@ export async function run() {
}

// open wallet v4 (notice the correct wallet version here)
// const mnemonic = process.env.MNEMONIC; // could be used mnemonic from .env file instead
const mnemonic =
'table jungle security cargo adjust barrel dance net permit pig soap simple rabbit upgrade unique update firm between deer minor ship thought ride physical';
const key = await mnemonicToWalletKey(mnemonic!.split(" "));
Expand Down
4 changes: 4 additions & 0 deletions 02-contract/test/sendIncrement.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import dotenv from "dotenv";
dotenv.config({ path: "../../.env" });

import { mnemonicToWalletKey } from "@ton/crypto";
import { TonClient, WalletContractV4, Address } from "@ton/ton";
import Counter from "./counter.step10"; // this is the interface class we just implemented
Expand All @@ -7,6 +10,7 @@ export async function run() {
const client = new TonClient({ endpoint: "https://testnet.toncenter.com/api/v2/jsonRPC", apiKey: "f20ff0043ded8c132d0b4b870e678b4bbab3940788cbb8c8762491935cf3a460" });

// open wallet v4 (notice the correct wallet version here)
// const mnemonic = process.env.MNEMONIC; // could be used mnemonic from .env file instead
const mnemonic =
'table jungle security cargo adjust barrel dance net permit pig soap simple rabbit upgrade unique update firm between deer minor ship thought ride physical';
const key = await mnemonicToWalletKey(mnemonic!.split(" "));
Expand Down

0 comments on commit 4dbdb49

Please sign in to comment.