-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Local Dev Env / Setup all UTXOs for Planet A (#36)
* setup all UTXOs * fund earth conract * make 9_gameCondition to be a recipe * move run.js into src * allow to run as a loca lenv or as integration tests Either: `yarn test` — run as integration tests as usual `yarn start` — run local env `yarn start planetA` — run local env with recipe * add Air to the mix * alternative coctail * basic docker container
- Loading branch information
1 parent
47ad33d
commit 08a99d9
Showing
22 changed files
with
764 additions
and
3,997 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.travis.yml | ||
docker-compose.yml | ||
Dockerfile | ||
out/ | ||
build/ | ||
.github/ | ||
.node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
node_modules | ||
build/* | ||
out | ||
out | ||
process.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM node:lts-alpine | ||
ARG BUILD_DEPS="git g++ cmake make python2 bash" | ||
|
||
WORKDIR /opt/leap-local-env | ||
|
||
COPY . /opt/leap-local-env | ||
|
||
RUN apk add --no-cache --update --virtual build_deps $BUILD_DEPS | ||
RUN yarn | ||
RUN yarn build | ||
|
||
EXPOSE 7000 | ||
EXPOSE 8545 | ||
|
||
ENTRYPOINT ["yarn", "start"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
const getEnv = require('../getEnv'); | ||
|
||
async function run(name) { | ||
console.log('Applying recipe: ', name); | ||
const { contracts, nodes, accounts, wallet, plasmaWallet } = await getEnv(); | ||
|
||
await require(`../../tests/recipies/${name}`)(contracts, nodes, accounts, wallet, plasmaWallet); | ||
process.exit(0); | ||
} | ||
|
||
function onException (e) { | ||
console.error(e); | ||
process.exit(1); | ||
} | ||
|
||
process.on('uncaughtException', onException); | ||
process.on('unhandledRejection', onException); | ||
|
||
run(process.argv[2]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
const startNetwork = require('../run'); | ||
|
||
async function run(name) { | ||
const { contracts, nodes, accounts, wallet, plasmaWallet } = await startNetwork(); | ||
if (name) { | ||
await require(`../../tests/recipies/${name}`)(contracts, nodes, accounts, wallet, plasmaWallet); | ||
} | ||
} | ||
|
||
function onException (e) { | ||
console.error(e); | ||
process.exit(1); | ||
} | ||
|
||
process.on('uncaughtException', onException); | ||
process.on('unhandledRejection', onException); | ||
|
||
run(process.argv[2]); |
Oops, something went wrong.