Browse Source

Glitch fixes

master
Tal Kol 3 years ago
parent
commit
78691c0fff
  1. 8
      README.md
  2. 6
      build/deploy.ts
  3. 6
      package.json

8
README.md

@ -45,7 +45,13 @@ To setup your local machine for development, please make sure you have the follo
* A decent IDE with FunC and TypeScript support
* We recommend using [Visual Studio Code](https://code.visualstudio.com/) with the [FunC plugin](https://marketplace.visualstudio.com/items?itemName=tonwhales.func-vscode) installed
Alternatively, you can ignore the above requirements and develop in your web browser with an online IDE and zero setup. Simply open this repo inside [Glitch](https://glitch.com/) without installing anything.
Alternatively, you can ignore the above requirements and develop in your web browser with an online IDE and zero setup. Simply open this repo inside [Glitch](https://glitch.com/) without installing anything:
* Open the link: https://glitch.com/edit/#!/remix/tonstarter-contracts
* This will create a brand new Glitch project just for you (similar to a git fork)
* Edit your contract files and tests in the online IDE
* To run terminal commands like `npm run test` click the "TERMINAL" button of the online IDE
* It's a bit slow.. run on a local machine if you want a much faster experience
## Development instructions

6
build/deploy.ts

@ -38,7 +38,7 @@ async function main() {
// make sure we have a wallet mnemonic to deploy from (or create one if not found)
const deployConfigEnv = ".env";
let deployerMnemonic;
if (!fs.existsSync(deployConfigEnv)) {
if (!fs.existsSync(deployConfigEnv) || !process.env.DEPLOYER_MNEMONIC) {
console.log(`\n* Config file '${deployConfigEnv}' not found, creating a new wallet for deploy..`);
deployerMnemonic = (await mnemonicNew(24)).join(" ");
const deployWalletEnvContent = `DEPLOYER_WALLET=${deployerWalletType}\nDEPLOYER_MNEMONIC="${deployerMnemonic}"\n`;
@ -46,10 +46,6 @@ async function main() {
console.log(` - Created new wallet in '${deployConfigEnv}' - keep this file secret!`);
} else {
console.log(`\n* Config file '${deployConfigEnv}' found and will be used for deployment!`);
if (!process.env.DEPLOYER_MNEMONIC) {
console.log(` - ERROR: '${deployConfigEnv}' does not contain key 'DEPLOYER_MNEMONIC'`);
process.exit(1);
}
deployerMnemonic = process.env.DEPLOYER_MNEMONIC;
}

6
package.json

@ -37,6 +37,10 @@
"require": [
"chai",
"ts-node/register"
]
],
"timeout": 10000
},
"engines": {
"node": ">=14.0.0"
}
}

Loading…
Cancel
Save