diff --git a/compose-files/ganache.yml b/compose-files/ganache.yml index 3faa970..d601c48 100644 --- a/compose-files/ganache.yml +++ b/compose-files/ganache.yml @@ -7,4 +7,4 @@ services: networks: backend: ipv4_address: 172.15.0.3 - entrypoint: ["node","/app/dist/node/cli.js","--database.dbPath", "./ganache_cache","--chain.chainId","0x2324","--chain.networkId","0x2324","-l","10000000000","-g","1","--chain.hardfork","istanbul","--miner.blockTime","0","--miner.instamine", "eager","--wallet.mnemonic","${GANACHE_MNEMONIC}", "-e","1000000"] + entrypoint: ["node","/app/dist/node/cli.js","--database.dbPath", "./ganache_cache","--chain.chainId","0x2324","--chain.networkId","0x2324","-l","10000000000","-g","1","--chain.hardfork","${GANACHE_FORK}","--miner.blockTime","${GANACHE_BLOCKTIME}","--miner.instamine","${GANACHE_INSTAMINE}","--wallet.mnemonic","${GANACHE_MNEMONIC}", "-e","1000000"] diff --git a/start_ocean.sh b/start_ocean.sh index 6fd2bd4..1e27566 100755 --- a/start_ocean.sh +++ b/start_ocean.sh @@ -63,8 +63,13 @@ else fi export NETWORK_RPC_PORT="8545" export NETWORK_RPC_URL="http://"${NETWORK_RPC_HOST}:${NETWORK_RPC_PORT} + # Use this seed on ganache to always create the same wallets export GANACHE_MNEMONIC=${GANACHE_MNEMONIC:-"taxi music thumb unique chat sand crew more leg another off lamp"} +export GANACHE_INSTAMINE=${GANACHE_INSTAMINE:-"eager"} +export GANACHE_BLOCKTIME=${GANACHE_BLOCKTIME:-0} +export GANACHE_FORK=${GANACHE_FORK:-"istanbul"} + # Ocean contracts export OCEAN_HOME="${HOME}/.ocean" @@ -264,6 +269,22 @@ while :; do export DEPLOY_SUBGRAPH=false printf $COLOR_Y'Ocean subgraph will not be deployed, the last deployment (if any) will be intact ...\n\n'$COLOR_RESET ;; + --predictoor) + # Add what we need + COMPOSE_FILES+=" -f ${COMPOSE_DIR}/thegraph.yml" + # Remove what is not needed for now + COMPOSE_FILES="${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/provider.yml/}" + COMPOSE_FILES="${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/redis.yml/}" + COMPOSE_FILES="${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/aquarius.yml/}" + COMPOSE_FILES="${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/elasticsearch.yml/}" + COMPOSE_FILES="${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/dashboard.yml/}" + # Enforce images + export CONTRACTS_VERSION=predictoor + export SUBGRAPH_VERSION=predictoor + # replicate true blockchain behiavour + export GANACHE_INSTAMINE=strict + export GANACHE_BLOCKTIME=12 + ;; ################################################# # Cleaning switches #################################################