From: AJ ONeal Date: Tue, 21 Jun 2022 05:20:15 +0000 (-0600) Subject: test: script to test full workflow X-Git-Tag: v1.1.0~3 X-Git-Url: https://git.josue.xyz/?a=commitdiff_plain;h=18d84349c8714f1d922fd49989ab2736267f7375;p=crowdnode.js%2F.git test: script to test full workflow --- diff --git a/test.sh b/test.sh new file mode 100644 index 0000000..4688d1b --- /dev/null +++ b/test.sh @@ -0,0 +1,28 @@ +#!/bin/bash +set -e +set -u + +if [[ ! -e 'source-key.wif' ]]; then + echo "Please run 'crowdnode generate ./source-key.wif' and load it with Đ0.01 to start" + exit 1 +fi + +./bin/crowdnode.js generate ./staking-key.wif +( + set -e + set -u + sleep 0.5 + ./bin/crowdnode.js transfer source-key.wif ./staking-key.wif 0.00256000 +) & +./bin/crowdnode.js signup ./staking-key.wif +./bin/crowdnode.js accept ./staking-key.wif +( + set -e + set -u + sleep 0.5 + ./bin/crowdnode.js transfer source-key.wif ./staking-key.wif +) & +./bin/crowdnode.js deposit ./staking-key.wif +./bin/crowdnode.js withdrawal ./staking-key.wif 100.0 +./bin/crowdnode.js balance ./staking-key.wif +./bin/crowdnode.js transfer ./staking-key.wif ./source-key.wif