Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/kovan parity #57

Closed
wants to merge 17 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.idea/
artifacts/
ganache-db/
ganache-db/
parity/kovan/account.json
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be removed

parity/kovan/password
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ services:
depends_on:
- keeper-contracts
environment:
KEEPER_URL: http://keeper-contracts:8545
KEEPER_URL: http://keeper-contracts:8545
DB_HOSTNAME: mongodb
LOCAL_CONTRACTS: "true"
volumes:
Expand Down
42 changes: 42 additions & 0 deletions parity/kovan/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
[parity]
chain = "kovan"
base_path = "/parity_data"

[ui]
disable = true

[rpc]
disable = true
interface = "0.0.0.0"
cors = ["all"]
hosts = ["all"]
apis = ["web3", "eth", "net", "parity", "traces", "rpc", "personal", "parity_accounts", "signer", "parity_set"]

[ipc]
disable = true

[dapps]
disable = true

[websockets]
disable = true
port = 8546
interface = "local"
origins = ["none"]
apis = ["all"]
hosts = ["all"]

[network]
port = 30304

[ipfs]
enable = false

[snapshots]
disable_periodic = true

[secretstore]
disable = true

[account]
password = ["/etc/parity/password"]
23 changes: 21 additions & 2 deletions start_ocean.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env bash

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
# Must be set to true for the first run, change it to "false" to avoid migrating the smart contracts on each run.
export DEPLOY_CONTRACTS="true"
# Ganache specific option, these two options have no effect when not running ganache-cli
Expand All @@ -20,6 +21,12 @@ COLOR_C="\033[0;36m" # cyan
# reset
COLOR_RESET="\033[00m"

function error {
local message="$1"
echo -e "$COLOR_R$message$COLOR_RESET"
exit 1
}

function show_banner {
local output=$(cat .banner)
echo -e "$COLOR_B$output$COLOR_RESET"
Expand All @@ -32,6 +39,10 @@ show_banner
export OCEAN_VERSION=stable
COMPOSE_FILE='docker-compose.yml'

# other default values
KOVAN_ADDRESS_FILE="$DIR/parity/kovan/account.json"
KOVAN_PASSWORD_FILE="$DIR/parity/kovan/password"

while :; do
case $1 in
--latest)
Expand All @@ -43,14 +54,22 @@ while :; do
printf $COLOR_Y'Starting and reusing the database ...\n\n'$COLOR_RESET
;;
--no-pleuston)
COMPOSE_FILE='docker-compose-no-pleuston.yml'
COMPOSE_FILE="$DIR/docker-compose-no-pleuston.yml"
printf $COLOR_Y'Starting without Pleuston...\n\n'$COLOR_RESET
;;
--local-parity-node)
export KEEPER_NETWORK_NAME="ocean_poa_net_local"
COMPOSE_FILE='docker-compose-local-parity-node.yml'
COMPOSE_FILE="$DIR/docker-compose-local-parity-node.yml"
printf $COLOR_Y'Starting with local Parity node...\n\n'$COLOR_RESET
;;
--kovan-parity-node)
[ -f "$KOVAN_ADDRESS_FILE" ] || error "Kovan account json file not found in $KOVAN_ADDRESS_FILE"
[ -f "$KOVAN_PASSWORD_FILE" ] || error "Kovan account password file not found in $KOVAN_PASSWORD_FILE"
[ -z "$UNLOCK_ADDRESS" ] && error "Kovan account address must be exported in variable \$UNLOCK_ADDRESS"
COMPOSE_FILE='docker-compose-only-parity.yml'
ttmc marked this conversation as resolved.
Show resolved Hide resolved
;;
--testnet-parity-node)
;;
--) # End of all options.
shift
break
Expand Down