codex-factory/scripts/blockchain.sh
nugaon 9e366130b8
feat: 0.6.0 Bee (#4)
* feat: postage stamp

* chore: remove empty postage stamp sol

* fix: start the nodes with the new '--full-node' flag

* chore: blockchain image 1.1.1 - updated factory bin (#29)

* fix: add network id to the bee statup params

* fix: change payment treshold limit to the possible min value

* feat: add port-maps to the environment sh

* fix: specify the same chainId as the networkId

* feat: expose blockchain 9545 port to localhost

* feat: extended postage stamp contract

* refactor: remove price oracle setups

* feat: updated the gen-traffic to work with postage stamps (#28)

* feat: updated the gen-traffic to work with postage stamps

* chore: update to latest bee-js version

Co-authored-by: Vojtech Simetka <vojtech@simetka.cz>
2021-05-20 17:41:57 +02:00

25 lines
752 B
Bash
Executable File

#!/bin/bash
MY_PATH=$(dirname "$0")
MY_PATH=$( cd "$MY_PATH" && pwd )
# Check used system variable set
BEE_ENV_PREFIX=$("$MY_PATH/utils/env-variable-value.sh" BEE_ENV_PREFIX)
NETWORK="$BEE_ENV_PREFIX-network"
NAME="$BEE_ENV_PREFIX-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 $NETWORK \
--name $NAME -d \
trufflesuite/ganache-cli ganache-cli \
-d -i 4020 -h 0.0.0.0 -p 9545 \
-b 1 \
--chainId 4020 \
--db swarm-testchain --gasLimit 6721975
else
docker start $NAME
fi