codex-factory/README.md
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

45 lines
1.2 KiB
Markdown

# 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
```sh
$ ./scripts/network.sh
```
To start the blockchain, run the following command in the root directory of the project:
```sh
$ ./scripts/blockchain.sh
```
After that, it's possible to deploy Swarm smart contracts
```sh
$ 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](src/supply.js) script can fund the addresses which are defined in [bee-overlay-addresses.json](bee-overlay-addresses.json) file.
To run this script just execute
```sh
$ 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.
```sh
$ ./scripts/bee.sh start --workers=4
```