init-for-cli.sh 858 B

123456789101112131415161718192021
  1. #!/usr/bin/env bash
  2. # Must be run on the clean development chain.
  3. SCRIPT_PATH="$(dirname "${BASH_SOURCE[0]}")"
  4. cd $SCRIPT_PATH
  5. CLI=../bin/run
  6. GROUP=storageWorkingGroup yarn workspace api-scripts initialize-lead
  7. ${CLI} leader:update-bag-limit -l 7 --dev
  8. ${CLI} leader:update-voucher-limits -o 1000 -s 10000000000 --dev
  9. BUCKET_ID=`${CLI} leader:create-bucket -i=0 -a -n=1000 -s=10000000000 --dev`
  10. ${CLI} operator:accept-invitation -w=0 -i=${BUCKET_ID} --dev -t=5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY
  11. ${CLI} leader:update-bag -a=${BUCKET_ID} -i static:council --dev
  12. ${CLI} leader:update-dynamic-bag-policy -n 1 -t Channel --dev
  13. ${CLI} operator:set-metadata -w=0 -i=${BUCKET_ID} -e="http://localhost:3333" --dev
  14. ${CLI} leader:update-data-fee -f 100 --dev
  15. mkdir -p ~/tmp/uploads
  16. ${CLI} server -w 0 -o 3333 -d ~/tmp/uploads --dev -q localhost:9944