Skip to content

Commit

Permalink
Removed warnings in Smart Contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
inflector committed Dec 9, 2017
1 parent 5271290 commit 17849a8
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 36 deletions.
2 changes: 1 addition & 1 deletion agent/sn_agent/network/ethereum/core
Submodule core updated from d4e6a9 to acf47b
90 changes: 55 additions & 35 deletions tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,9 @@ export SN_NETWORK_ACCOUNT_PASSWORD

case "$1" in

init)
#https://www.vaultproject.io/intro/getting-started/deploy.html#initializing-the-vault+
;;

demo)
docker-compose -f docker/docker-compose.demo.yml create --build --force-recreate demo
docker-compose -f docker/docker-compose.demo.yml run --service-ports demo ./agent.sh run
;;

demo-down)
docker-compose -f docker/docker-compose.demo.yml down --remove-orphans
;;

# Deploys the Smart Contracts in agent/sn_agent/network/ethereum/core to the specififed network via a
# dockerized version of the Truffle environment and copies the compiled code and deployed addresses to
# the docker/agent/data/dev directory where the Agent's web3.py network class can find it.
deploy-contracts)
DOCKERNET=$(docker network ls | grep dockernet | awk '{print $2}')
if [ "$DOCKERNET" != "dockernet" ]
Expand All @@ -45,57 +35,69 @@ deploy-contracts)
fi
export TRUFFLE_NETWORK
echo "TRUFFLE_NETWORK = '$TRUFFLE_NETWORK'"
docker-compose -f docker/docker-compose.dev.yml create --build --force-recreate truffle
docker-compose -f docker/docker-compose.dev.yml create --build truffle
docker-compose -f docker/docker-compose.dev.yml run --service-ports truffle
;;

# The main developer command for testing and bring up a developer agent
dev)
docker-compose -f docker/docker-compose.dev.yml create --build dev
docker-compose -f docker/docker-compose.dev.yml run --service-ports dev ./agent.sh run
;;

# Rebuilds the dev image in case of stale docker caches
dev-force-build)
docker-compose -f docker/docker-compose.dev.yml create --build --force-recreate dev
;;

# Builds the image only but does not run ig
dev-build)
docker-compose -f docker/docker-compose.dev.yml create --build dev
;;

# Just run the built image.
dev-run)
docker-compose -f docker/docker-compose.dev.yml run --service-ports dev ./agent.sh run
;;

# Take down all the dev containers - defined in docker/docker-compose-dev.yml
dev-down)
docker-compose -f docker/docker-compose.dev.yml down --remove-orphans
;;


# ABC - Alice, Bob and Charlie (she's a girl)

# Brings up the Alice server fo demonstrate many agents interacting.
alice)
docker-compose -f docker/docker-compose.abc.yml create --build --force-recreate alice
docker-compose -f docker/docker-compose.abc.yml create --build alice
docker-compose -f docker/docker-compose.abc.yml run --service-ports alice ./agent.sh run
;;

# Brings up Bob
bob)
docker-compose -f docker/docker-compose.abc.yml create --build --force-recreate bob
docker-compose -f docker/docker-compose.abc.yml create --build bob
docker-compose -f docker/docker-compose.abc.yml run --service-ports bob ./agent.sh run
;;

# Brings up Charlie - she likes to be last...
charlie)
docker-compose -f docker/docker-compose.abc.yml create --build --force-recreate charlie
docker-compose -f docker/docker-compose.abc.yml create --build charlie
docker-compose -f docker/docker-compose.abc.yml run --service-ports charlie ./agent.sh run
;;

agent-docs)
docker-compose -f docker/docker-compose.yml create --build --force-recreate test
docker-compose -f docker/docker-compose.ymlrun test ./agent.sh docs
demo)
docker-compose -f docker/docker-compose.demo.yml create --build --force-recreate demo
docker-compose -f docker/docker-compose.demo.yml run --service-ports demo ./agent.sh run
;;

agent-test)
docker-compose -f docker/docker-compose.yml start testrpc
docker-compose -f docker/docker-compose.yml create --build test
docker-compose -f docker/docker-compose.yml run test ./agent.sh test
demo-down)
docker-compose -f docker/docker-compose.demo.yml down --remove-orphans
;;


# Experimental code - don't count on this staying around

opendht)
docker-compose -f docker/docker-compose.yml create --build --force-recreate opendht
docker-compose -f docker/docker-compose.yml run --service-ports opendht
Expand All @@ -120,28 +122,46 @@ vault)
docker-compose -f docker/docker-compose.yml run --service-ports vault $2
;;

relex)
docker-compose -f docker/docker-compose.dev.yml run --service-ports relex
ipfs)
docker-compose -f docker/docker-compose.yml run --service-ports ipfs daemon
;;

testrpc)
docker-compose -f docker/docker-compose.yml create --build --force-recreate testrpc
docker-compose -f docker/docker-compose.yml run --service-ports testrpc
init)
#https://www.vaultproject.io/intro/getting-started/deploy.html#initializing-the-vault+
;;

prepare-dao)
docker-compose -f docker-compose.dao.yml create --build --force-recreate dao
docker-compose -f docker-compose.dao.yml run --service-ports dao ./dao.sh $2
# Support

# Builds the docs
agent-docs)
docker-compose -f docker/docker-compose.yml create --build test
docker-compose -f docker/docker-compose.ymlrun test ./agent.sh docs
;;

ipfs)
docker-compose -f docker/docker-compose.yml run --service-ports ipfs daemon
# Runs the test suite
agent-test)
docker-compose -f docker/docker-compose.yml start testrpc
docker-compose -f docker/docker-compose.yml create --build test
docker-compose -f docker/docker-compose.yml run test ./agent.sh test
;;

# Brings up the OpenCog relationship extracter node
relex)
docker-compose -f docker/docker-compose.dev.yml run --service-ports relex
;;

# A test Ethereum client RPC server (ganache-cli) docker image
testrpc)
docker-compose -f docker/docker-compose.yml create --build testrpc
docker-compose -f docker/docker-compose.yml run --service-ports testrpc
;;

# Cleans recent docker images... useful when working on docker-compose and Dockerfiles
clean)
docker-compose -f docker/docker-compose.yml down --rmi all --remove-orphans
;;

# Clears the entire docker cache - generally only necessary when doing work with Dockerfiles themselves
hard-clean)
docker image prune
docker-compose -f docker/docker-compose.dev.yml down --rmi all --remove-orphans
Expand All @@ -161,7 +181,7 @@ gen-ssl)
openssl req -nodes -new -x509 -keyout server.key -out server.crt -subj '/CN=localhost'
;;

*) echo 'No operation specified'
*) echo "Command '$1' not found - No operation specified"
exit 0;
;;

Expand Down

0 comments on commit 17849a8

Please sign in to comment.