diff --git a/01-wallet/test/npmton/step7.ts b/01-wallet/test/npmton/step7.ts index 6238eb7..9af5bf8 100644 --- a/01-wallet/test/npmton/step7.ts +++ b/01-wallet/test/npmton/step7.ts @@ -5,11 +5,16 @@ import { mnemonicToWalletKey } from "@ton/crypto"; import { WalletContractV4 } from "@ton/ton"; async function main() { - // GH Actions tests use GH secret as mnemonic - // to run this test locally, you should create the file .env in the project root - // with your mnemonic phrase (according to repo README) - // and change step7.expected wallet address to yours - const mnemonic = process.env.MNEMONIC; + // Notice: + // Due to limitations in GitHub Actions, we are unable to use secrets to + // store a secure mnemonic for the wallet during the testing of pull + // requests from forked repositories by our contributors. + // As a result, we are currently using a public wallet with an exposed mnemonic in + // our test files when running tests in GH Actions. + // const mnemonic = process.env.MNEMONIC ; + 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'; + // open wallet v4 (notice the correct wallet version here) const key = await mnemonicToWalletKey(mnemonic!.split(" ")); diff --git a/01-wallet/test/npmton/step8.ts b/01-wallet/test/npmton/step8.ts index da98785..dc03a95 100644 --- a/01-wallet/test/npmton/step8.ts +++ b/01-wallet/test/npmton/step8.ts @@ -6,7 +6,15 @@ import { mnemonicToWalletKey } from "@ton/crypto"; import { WalletContractV4, TonClient, fromNano } from "@ton/ton"; async function main() { - const mnemonic = process.env.MNEMONIC; + // Notice: + // Due to limitations in GitHub Actions, we are unable to use secrets to + // store a secure mnemonic for the wallet during the testing of pull + // requests from forked repositories by our contributors. + // As a result, we are currently using a public wallet with an exposed mnemonic in + // our test files when running tests in GH Actions. + // const mnemonic = process.env.MNEMONIC; + 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(" ")); const wallet = WalletContractV4.create({ publicKey: key.publicKey, workchain: 0 }); diff --git a/01-wallet/test/npmton/step9.ts b/01-wallet/test/npmton/step9.ts index c3c4b26..dd1fe81 100644 --- a/01-wallet/test/npmton/step9.ts +++ b/01-wallet/test/npmton/step9.ts @@ -6,8 +6,16 @@ import { mnemonicToWalletKey } from "@ton/crypto"; import { TonClient, WalletContractV4, internal } from "@ton/ton"; async function main() { - - const mnemonic = process.env.MNEMONIC; + // Notice: + // Due to limitations in GitHub Actions, we are unable to use secrets to + // store a secure mnemonic for the wallet during the testing of pull + // requests from forked repositories by our contributors. + // As a result, we are currently using a public wallet with an exposed mnemonic in + // our test files when running tests in GH Actions. + // const mnemonic = process.env.MNEMONIC; + 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(" ")); const wallet = WalletContractV4.create({ publicKey: key.publicKey, workchain: 0 }); diff --git a/01-wallet/test/tonweb/step7.ts b/01-wallet/test/tonweb/step7.ts index c716ed3..5d38b07 100644 --- a/01-wallet/test/tonweb/step7.ts +++ b/01-wallet/test/tonweb/step7.ts @@ -5,11 +5,16 @@ import { mnemonicToKeyPair } from "tonweb-mnemonic"; import TonWeb from "tonweb"; async function main() { - // GH Actions tests use GH secret as mnemonic - // to run this test locally, you should create the file .env in the project root - // with your mnemonic phrase (according to repo README) - // and change step7.expected wallet address to yours - const mnemonic = process.env.MNEMONIC; + // Notice: + // Due to limitations in GitHub Actions, we are unable to use secrets to + // store a secure mnemonic for the wallet during the testing of pull + // requests from forked repositories by our contributors. + // As a result, we are currently using a public wallet with an exposed mnemonic in + // our test files when running tests in GH Actions. + // const mnemonic = process.env.MNEMONIC; + 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 mnemonicToKeyPair(mnemonic!.split(" ")); // open wallet v4 (notice the correct wallet version here) diff --git a/01-wallet/test/tonweb/step8.ts b/01-wallet/test/tonweb/step8.ts index 1691c67..70f37f9 100644 --- a/01-wallet/test/tonweb/step8.ts +++ b/01-wallet/test/tonweb/step8.ts @@ -6,7 +6,16 @@ import { mnemonicToKeyPair } from "tonweb-mnemonic"; import TonWeb from "tonweb"; async function main() { - const mnemonic = process.env.MNEMONIC; + // Notice: + // Due to limitations in GitHub Actions, we are unable to use secrets to + // store a secure mnemonic for the wallet during the testing of pull + // requests from forked repositories by our contributors. + // As a result, we are currently using a public wallet with an exposed mnemonic in + // our test files when running tests in GH Actions. + // const mnemonic = process.env.MNEMONIC; + 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 mnemonicToKeyPair(mnemonic!.split(" ")); // initialize ton rpc client on testnet diff --git a/01-wallet/test/tonweb/step9.ts b/01-wallet/test/tonweb/step9.ts index afb7d12..b57cc85 100644 --- a/01-wallet/test/tonweb/step9.ts +++ b/01-wallet/test/tonweb/step9.ts @@ -6,7 +6,16 @@ import { mnemonicToKeyPair } from "tonweb-mnemonic"; import TonWeb from "tonweb"; async function main() { - const mnemonic = process.env.MNEMONIC; + // Notice: + // Due to limitations in GitHub Actions, we are unable to use secrets to + // store a secure mnemonic for the wallet during the testing of pull + // requests from forked repositories by our contributors. + // As a result, we are currently using a public wallet with an exposed mnemonic in + // our test files when running tests in GH Actions. + // const mnemonic = process.env.MNEMONIC; + 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 mnemonicToKeyPair(mnemonic!.split(" ")); // initialize ton rpc client on testnet diff --git a/02-contract/test/counter.fc b/02-contract/test/counter.fc index bc7d0cd..23d51cb 100644 --- a/02-contract/test/counter.fc +++ b/02-contract/test/counter.fc @@ -1,4 +1,4 @@ -#include "stdlib.fc"; +#include "imports/stdlib.fc"; ;; =============== storage ============================= diff --git a/02-contract/test/stdlib.fc b/02-contract/test/imports/stdlib.fc similarity index 100% rename from 02-contract/test/stdlib.fc rename to 02-contract/test/imports/stdlib.fc diff --git a/02-contract/test/index.sh b/02-contract/test/index.sh index 8c63198..f6ac97f 100755 --- a/02-contract/test/index.sh +++ b/02-contract/test/index.sh @@ -5,7 +5,7 @@ npm install ts-node npm install @ton-community/func-js npm install @ton/ton @ton/core @ton/crypto npm install @orbs-network/ton-access -npx func-js stdlib.fc counter.fc --boc counter.cell +npx func-js ./imports/stdlib.fc 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 getCounter.ts > getCounter.output.txt diff getCounter.output.txt getCounter.expected.txt diff --git a/README.md b/README.md index d6a53d2..1bf8c22 100644 --- a/README.md +++ b/README.md @@ -46,3 +46,9 @@ > The official mnemonic appears in Github repo secrets since it's also used in CI. This should be the 24 word mnemonic for a deployed testnet v4 wallet that contains at least 1 TON. - Run `./build.sh` - Resulting files will be created in the `docs/` directory, ready for Github Pages + +### Notice + +> Due to limitations in GitHub Actions, we are unable to use secrets to store a secure mnemonic for the wallet during the testing of pull requests from forked repositories by our contributors. +> As a result, we are currently using a public wallet with an exposed mnemonic in our test files when running tests in GH Actions. + diff --git a/docs/assets/helpers.js b/docs/assets/helpers.js index b0d1b46..3bd9ff7 100644 --- a/docs/assets/helpers.js +++ b/docs/assets/helpers.js @@ -16,8 +16,8 @@ const getTutorialLinks = () => document.querySelectorAll("[data=tutorial-link]") const setSelectedTutorialLink = () => { getTutorialLinks().forEach((tutorialLink) => { - if(tutorialLink.href === window.location.href) { - tutorialLink.classList.add("selected"); + if (`${tutorialLink.href}/` === window.location.href) { + tutorialLink.classList.add('selected'); } }); }; diff --git a/docs/assets/styles.css b/docs/assets/styles.css index 32c680b..a1a6440 100644 --- a/docs/assets/styles.css +++ b/docs/assets/styles.css @@ -24,11 +24,6 @@ a { border-bottom: 0.75px solid rgba(0, 136, 204, 0.6); } -a.selected { - text-decoration: underline; - pointer-events: none; -} - /* http://meyerweb.com/eric/tools/css/reset/ v2.0 | 20110126 License: none (public domain) @@ -602,6 +597,10 @@ a.alogo:hover, a.alogo:visited, a.alogo:link, a.alogo:active { font-size: 14px; text-decoration: unset; } +.more ul a.selected { + text-decoration: underline; + pointer-events: none; +} .needhelp { margin-top: 40px; diff --git a/docs/assets/styles.css.map b/docs/assets/styles.css.map index 0ec523d..01d3a61 100644 --- a/docs/assets/styles.css.map +++ b/docs/assets/styles.css.map @@ -1 +1 @@ -{"version":3,"sourceRoot":"","sources":["../../styles.scss"],"names":[],"mappings":"AACQ;AAMR;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE,WAfW;EAgBX;;;AAEF;EACE;EACA;;;AAGF;EACE,OArBW;EAsBX;;;AAGF;EACE;EACA;;;AAGF;AAAA;AAAA;AAAA;AAKA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EAiFE;EACA;EACA;EACA;EACA;EACA;;;AAEF;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EAWE;;;AAEF;EACE;EACE;;;AAEJ;AAAA;EAEE;;;AAEF;AAAA;EAEE;;;AAEF;AAAA;AAAA;AAAA;EAIE;EACA;;;AAEF;EACE;EACA;;;AAGF;EACE;;;AAGF;EACE,aA1KU;EA2KV,OAzKW;;;AA4Kb;EACE;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA,YAhMM;EAiMN;EACA;EACA;EACA;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;EACA;EACA;EACA;;AAGJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;AACA;EACE;;AAGJ;EACE;EACA;EACA;EACA;;AACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEF;EACE;;AAGJ;AAAA;AAAA;EACE;EACA;;AAEF;EACE;EACA;EACA;;AAEF;EACE;EACA;EACA;;AAEF;EACE;EACA;EACA;;AAEF;AAAA;EAEE;EACA;EAEA;EACA;EACA;;AACA;AAAA;EAEE;EACA;EACA;EACA;;AAIJ;EACE;;AAEF;EACE;;AAIN;EACE;;AACA;EACE;EACA;EACA;EACA;;;AAKN;EACE;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;;AAEE;EACE;EACA;;AACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAIN;EACE;EACA;;AACA;EACE;;AAGJ;EACE;;AAEF;EACE;;AAEF;EACE;EACA;;AAEF;EACE;;AAEF;EACE;;AAEF;EACE;;AAEF;EAEE;;AAEF;EACE;EACA;EACA;;AAEF;EACE;EACA;EACA;EACA;;AAEF;EACE;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;EACA;EACA;;AAEF;EACE;EACA;EACA;;AAEF;EACE,OA7ZO;EA8ZP;;AACA;EACE;EACA;;AAON;EACE,YA1aM;EA2aN;EACA;EACA;EAEA;EACA;EACA;EACA;;AAEF;EACE;EACA;EACA;EACA,YAxbM;EAybN;EACA;;AACA;EACE;;AAEF;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEF;EACE,YA1dE;EA4dF;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAIF;EACE;;AAIN;EACE;EACA;EAEA;;AAEF;EACE;;AAEF;EACE;;AAEF;EACE;;AAEF;EACE;EACA;EACA;EACA;;AAGA;EACE;;;AAMR;EACE;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;;;AAGF;EACE,OAriBW;EAsiBX;;;AAGF;EACE;EACA;EACA;EACA;;AACA;EACE;;AAEF;EACE;EACA;EACA;EACA;;;AAIJ;EACE,WA3jBW;EA4jBX;EACA;EACA;EAEA;;;AAEF;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE,YAtlBQ;EAulBR;EACA;;;AAGF;EACE;EACA;;AACA;EACE;EACA;EACA;;AAEF;EACE;EACA;EACA;;AACA;EACE;EACA;;;AAKN;EACE;EACA;;AACA;EACE;EACA;;;AAIJ;EACE;IACE;;EAEF;IACE;;EAEF;IACE;IACA;;EAEF;IACE;IACA;IACA;IACA;IACA;;EAEF;IACE;IACA;IACA;;EAEF;IACE;IACA;;EAGA;IACE;IACA;;EAEF;IACE;IACA;IACA;;EAEF;IACE;IACA","file":"styles.css"} \ No newline at end of file +{"version":3,"sourceRoot":"","sources":["../../styles.scss"],"names":[],"mappings":"AACQ;AAMR;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE,WAfW;EAgBX;;;AAEF;EACE;EACA;;;AAGF;EACE,OArBW;EAsBX;;;AAGF;AAAA;AAAA;AAAA;AAKA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EAiFE;EACA;EACA;EACA;EACA;EACA;;;AAEF;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EAWE;;;AAEF;EACE;EACE;;;AAEJ;AAAA;EAEE;;;AAEF;AAAA;EAEE;;;AAEF;AAAA;AAAA;AAAA;EAIE;EACA;;;AAEF;EACE;EACA;;;AAGF;EACE;;;AAGF;EACE,aArKU;EAsKV,OApKW;;;AAuKb;EACE;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA,YA3LM;EA4LN;EACA;EACA;EACA;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;EACA;EACA;EACA;;AAGJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;AACA;EACE;;AAGJ;EACE;EACA;EACA;EACA;;AACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEF;EACE;;AAGJ;AAAA;AAAA;EACE;EACA;;AAEF;EACE;EACA;EACA;;AAEF;EACE;EACA;EACA;;AAEF;EACE;EACA;EACA;;AAEF;AAAA;EAEE;EACA;EAEA;EACA;EACA;;AACA;AAAA;EAEE;EACA;EACA;EACA;;AAIJ;EACE;;AAEF;EACE;;AAIN;EACE;;AACA;EACE;EACA;EACA;EACA;;;AAKN;EACE;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;;AAEE;EACE;EACA;;AACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAIN;EACE;EACA;;AACA;EACE;;AAGJ;EACE;;AAEF;EACE;;AAEF;EACE;EACA;;AAEF;EACE;;AAEF;EACE;;AAEF;EACE;;AAEF;EAEE;;AAEF;EACE;EACA;EACA;;AAEF;EACE;EACA;EACA;EACA;;AAEF;EACE;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;EACA;EACA;;AAEF;EACE;EACA;EACA;;AAEF;EACE,OAxZO;EAyZP;;AACA;EACE;EACA;;AAON;EACE,YAraM;EAsaN;EACA;EACA;EAEA;EACA;EACA;EACA;;AAEF;EACE;EACA;EACA;EACA,YAnbM;EAobN;EACA;;AACA;EACE;;AAEF;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEF;EACE,YArdE;EAudF;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAIF;EACE;;AAIN;EACE;EACA;EAEA;;AAEF;EACE;;AAEF;EACE;;AAEF;EACE;;AAEF;EACE;EACA;EACA;EACA;;AAGA;EACE;;;AAMR;EACE;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;;;AAGF;EACE,OAhiBW;EAiiBX;;;AAGF;EACE;EACA;EACA;EACA;;AACA;EACE;;AAEF;EACE;EACA;EACA;EACA;;;AAIJ;EACE,WAtjBW;EAujBX;EACA;EACA;EAEA;;;AAEF;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE,YAjlBQ;EAklBR;EACA;;;AAGF;EACE;EACA;;AACA;EACE;EACA;EACA;;AAEF;EACE;EACA;EACA;;AACA;EACE;EACA;;AAEF;EACE;EACA;;;AAKN;EACE;EACA;;AACA;EACE;EACA;;;AAIJ;EACE;IACE;;EAEF;IACE;;EAEF;IACE;IACA;;EAEF;IACE;IACA;IACA;IACA;IACA;;EAEF;IACE;IACA;IACA;;EAEF;IACE;IACA;;EAGA;IACE;IACA;;EAEF;IACE;IACA;IACA;;EAEF;IACE;IACA","file":"styles.css"} \ No newline at end of file diff --git a/scripts/assets/helpers.js b/scripts/assets/helpers.js index b0d1b46..3bd9ff7 100644 --- a/scripts/assets/helpers.js +++ b/scripts/assets/helpers.js @@ -16,8 +16,8 @@ const getTutorialLinks = () => document.querySelectorAll("[data=tutorial-link]") const setSelectedTutorialLink = () => { getTutorialLinks().forEach((tutorialLink) => { - if(tutorialLink.href === window.location.href) { - tutorialLink.classList.add("selected"); + if (`${tutorialLink.href}/` === window.location.href) { + tutorialLink.classList.add('selected'); } }); }; diff --git a/styles.scss b/styles.scss index b5f33ba..f045a23 100644 --- a/styles.scss +++ b/styles.scss @@ -29,11 +29,6 @@ a { border-bottom: .75px solid #08c9; } -a.selected { - text-decoration: underline; - pointer-events: none; -} - /* http://meyerweb.com/eric/tools/css/reset/ v2.0 | 20110126 License: none (public domain) @@ -617,6 +612,10 @@ a.alogo:hover, a.alogo:visited, a.alogo:link, a.alogo:active { font-size: 14px; text-decoration: unset; } + a.selected { + text-decoration: underline; + pointer-events: none; + } } }