codex-factory/scripts/blockchain.sh
nugaon d38a2551a8
feat: init (#1)
* chore: add package.json and package.lock to the project

* build: add truffle configuration for contract deployment

* feat: init swarm contracts and define migration script

* feat: init bash scripts that orchestrate docker containers

* fix: change auto-mining to progressing blockchain in order to satisfy bee ts check

* chore: add npm command definitions and downgrade openzeppelin for solc ^0.6.0

* build: set solc compiler configuration similar to the original swarm deployment

* chore: generate bee keys until 5 nodes

* refactor: import erc20 logic from openzeppelin and remove sw3 contract because cannot produce same bytecode

* chore: add trimmed single-swap-factory bytecode (without token address param)

* feat: deploy erc20 and single swap factory contracts that bee also accepts

* feat: bee.sh and blockchain.sh

* feat: add supply script to fund bee overlay addresses

* docs: amend README

* docs: fix bee start command

* fix: bee.sh datadir path

* docs: add network script to the usage description

* fix: solc compiler truffle config
2021-04-23 16:16:35 +02:00

17 lines
549 B
Bash
Executable File

#!/bin/bash
NAME=swarm-test-blockchain
CONTAINER_IN_DOCKER=`docker container ls -qaf name=$NAME`
if [ -z "$CONTAINER_IN_DOCKER" ]; then
# necessary "-b 1" because anyway the Bee throws Error: waiting backend sync: Post "http://swarm-test-blockchain:9545": EOF
docker run \
-p 127.0.0.1:9545:9545 \
--network swarm-test-network \
--name swarm-test-blockchain -d \
trufflesuite/ganache-cli ganache-cli \
-d -i 4020 -h 0.0.0.0 -p 9545 \
-b 1 \
--db swarm-testchain --gasLimit 6721975
else
docker start $NAME
fi