Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
krau5 committed Oct 13, 2023
1 parent 1e2180d commit c9a815f
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion 01-wallet/test/npmton/step7.expected.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
kQCJRglfvsQzAIF0UAhkYH6zkdGPFxVNYMH1nPTN_UpDqEFK
kQBqDnstKfW_YP0YN6kt3uMzSwH1FT_UM7cFyhuw6my3c3Id
workchain: 0
6 changes: 3 additions & 3 deletions 01-wallet/test/npmton/step7.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { mnemonicToWalletKey } from "@ton/crypto";
import { WalletContractV4 } from "@ton/ton";

async function main() {
// open wallet v4 (notice the correct wallet version here)
const mnemonic = process.env.MNEMONIC;; // your 24 secret words (replace ... with the rest of the words)
// Update step7.expected.txt before running the test, since it depends on your wallet address
const mnemonic = process.env.MNEMONIC; // your 24 secret words (replace ... with the rest of the words)
const key = await mnemonicToWalletKey(mnemonic!.split(" "));
const wallet = WalletContractV4.create({ publicKey: key.publicKey, workchain: 0 });

Expand All @@ -17,4 +17,4 @@ async function main() {
console.log("workchain:", wallet.address.workChain);
}

main();
main();
2 changes: 1 addition & 1 deletion 01-wallet/test/tonweb/step7.expected.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
kQCJRglfvsQzAIF0UAhkYH6zkdGPFxVNYMH1nPTN_UpDqEFK
kQBqDnstKfW_YP0YN6kt3uMzSwH1FT_UM7cFyhuw6my3c3Id
workchain: 0
1 change: 1 addition & 0 deletions 01-wallet/test/tonweb/step7.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { mnemonicToKeyPair } from "tonweb-mnemonic";
import TonWeb from "tonweb";

async function main() {
// Update step7.expected.txt before running the test, since it depends on your wallet address
const mnemonic = process.env.MNEMONIC; // your 24 secret words (replace ... with the rest of the words)
const key = await mnemonicToKeyPair(mnemonic!.split(" "));

Expand Down
2 changes: 1 addition & 1 deletion 02-contract/test/index.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ npm install ts-node
npm install @ton-community/func-js
npm install ton ton-core ton-crypto
npm install @orbs-network/ton-access
npx func-js stdlib.fc counter.fc --boc counter.cell
npx func-js counter.fc --boc counter.cell
npx ts-node deploy.step8.ts > deploy.step8.output.txt
COUNTER_ADDRESS=`cut -d : -s -f 2 < deploy.step8.output.txt` npx ts-node step9.ts > step9.output.txt
diff step9.output.txt step9.expected.txt
Expand Down

0 comments on commit c9a815f

Please sign in to comment.