Skip to content

Commit

Permalink
Merge pull request #49 from EOSLaoMao/feature/order-perm
Browse files Browse the repository at this point in the history
add script to add orderperm
  • Loading branch information
JohnnyZhao authored Mar 25, 2019
2 parents e9959b6 + 24897bf commit 882c613
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/dev/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ sleep 1
sleep 1
./scripts/bank_perm.sh bankofstaked EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV
sleep 1
./scripts/order_perm.sh bankofstaked EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV
sleep 1
cleos -u $API push action bankofstaked addcreditor '{"account": "voter1", "for_free": 1, "free_memo": "A gift from EOSLaoMao team"}' -p bankofstaked
sleep 1
cleos -u $API push action bankofstaked addcreditor '{"account": "voter2", "for_free": 0, "free_memo": ""}' -p bankofstaked
Expand Down
9 changes: 9 additions & 0 deletions scripts/order_perm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

ACCOUNT=$1
PKEY=${2:-EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV}
PERM_ACCOUNT=${3:-bankofstaked}
PERMISSION=${4:-eosio.code}

cleos set account permission $ACCOUNT orderperm '{"threshold": 1,"keys": [{"key": "'$PKEY'","weight": 1}],"accounts": [{"permission":{"actor":"'$PERM_ACCOUNT'","permission":"'$PERMISSION'"},"weight":1}]}' "active" -p $ACCOUNT@active
cleos set action permission $ACCOUNT bankofstaked customorder orderperm -p $ACCOUNT@active

0 comments on commit 882c613

Please sign in to comment.