* 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
Bee Factory
This project builds up a test environment with Bee clients and with a test blockchain. The created environment is runnable on local machine as well.
All services run in Docker containers only.
Currently, the repository supports running Bee nodes up to 5 by default.
Usage
You can setup the whole environment that Bee needs by running some scripts
Create the common Docker network for the environment with
$ ./scripts/network.sh
To start the blockchain, run the following command in the root directory of the project:
$ ./scripts/blockchain.sh
After that, it's possible to deploy Swarm smart contracts
$ npm run migrate:chequebook
Before you start the Bee nodes with the deployed Swap Factory, you have to fund your overlay addresses of your Bee nodes for the successful start. The supply.js script can fund the addresses which are defined in bee-overlay-addresses.json file. To run this script just execute
$ npm run supply
and the configured accounts will get 1 ether and 100 BZZ Token.
After all above went successfully you can start the Bee nodes.
$ ./scripts/bee.sh start --workers=4