Skip to content

Commit

Permalink
Add file for functions
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeljyeates committed Oct 22, 2018
1 parent 488db75 commit 7900933
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 64 deletions.
14 changes: 1 addition & 13 deletions eosdac-testnet/boot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,12 @@ reset=`tput sgr0`

source ./conf_private.sh
source ./conf.sh
source ./functions.sh



echo -e "\n\n----------------- BOOT SEQUENCE -------------------\n\n";

run_cmd() {
cmd="$1";
echo -e "\n\n >> ${green} Next command: $1 \n\n ${reset}";
#wait;
#read -p "Press enter to continue ${reset}";
eval "cleos --wallet-url $WALLET_URL -u $API_URL $1";
}

create_act() {
act="$1"
key="$2"
eval "cleos --wallet-url $WALLET_URL -u $API_URL system newaccount --stake-cpu \"10.0000 EOS\" --stake-net \"10.0000 EOS\" --transfer --buy-ram-kbytes 1024 eosio $act $key"
}


run_cmd "set contract eosio "$CONTRACTS/eosio.bios" -p eosio";
Expand Down
9 changes: 1 addition & 8 deletions eosdac-testnet/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,7 @@ reset=`tput sgr0`
source ./conf_private.sh
source ./conf_dac.sh
source ./conf.sh

run_cmd() {
cmd="$1";
echo -e "\n\n >> ${green} Next command: $1 \n\n ${reset}";
#wait;
#read -p "Press enter to continue ${reset}";
eval "cleos --wallet-url $WALLET_URL -u $API_URL $1";
}
source ./functions.sh

echo -e "\n\n----------------- BUILDING CONTRACTS -------------------\n\n";

Expand Down
10 changes: 2 additions & 8 deletions eosdac-testnet/change_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,15 @@ reset=`tput sgr0`
source ./conf_private.sh
source ./conf_dac.sh
source ./conf.sh
source ./functions.sh



echo -e "\n\n----------------- UPDATING CONFIG -------------------\n\n";

run_cmd() {
cmd="$1";
echo -e "\n\n >> ${green} Next command: $1 \n\n ${reset}";
#wait;
#read -p "Press enter to continue ${reset}";
eval "cleos --wallet-url $WALLET_URL -u $API_URL $1";
}

./msig/gen_requested_permissions.py

run
run_cmd "push action -s -d -j daccustodian updateconfig dac_config2.json -p dacauthority@high > updateconfig.trx"
run_cmd "multisig cancel eosdaccustab updconfig eosdaccustab"
run_cmd "multisig propose_trx updconfig ./requested_perms.json updateconfig.trx eosdaccustab"
Expand Down
8 changes: 1 addition & 7 deletions eosdac-testnet/fire.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,12 @@ reset=`tput sgr0`
source ./conf_private.sh
source ./conf_dac.sh
source ./conf.sh
source ./functions.sh



echo -e "\n\n----------------- FIRING CUSTODIAN -------------------\n\n";

run_cmd() {
cmd="$1";
echo -e "\n\n >> ${green} Next command: $1 \n\n ${reset}";
#wait;
#read -p "Press enter to continue ${reset}";
eval "cleos --wallet-url $WALLET_URL -u $API_URL $1";
}

./msig/gen_requested_permissions.py

Expand Down
15 changes: 15 additions & 0 deletions eosdac-testnet/functions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@


run_cmd() {
cmd="$1";
echo -e "\n\n >> ${green} Next command: $1 \n\n ${reset}";
#wait;
#read -p "Press enter to continue ${reset}";
eval "cleos --wallet-url $WALLET_URL -u $API_URL $1";
}

create_act() {
act="$1"
key="$2"
eval "cleos --wallet-url $WALLET_URL -u $API_URL system newaccount --stake-cpu \"10.0000 EOS\" --stake-net \"10.0000 EOS\" --transfer --buy-ram-kbytes 1024 eosio $act $key"
}
1 change: 1 addition & 0 deletions eosdac-testnet/permissions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ reset=`tput sgr0`
source ./conf_private.sh
source ./conf_dac.sh
source ./conf.sh
source ./functions.sh



Expand Down
13 changes: 1 addition & 12 deletions eosdac-testnet/populate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,13 @@ reset=`tput sgr0`
source ./conf_private.sh
source ./conf_dac.sh
source ./conf.sh
source ./functions.sh



echo -e "\n\n----------------- POPULATING DAC -------------------\n\n";

run_cmd() {
cmd="$1";
echo -e "\n\n >> ${green} Next command: $1 \n\n ${reset}";
#wait;
#read -p "Press enter to continue ${reset}";
eval "cleos --wallet-url $WALLET_URL -u $API_URL $1";
}

create_act() {
act="$1"
key="$2"
eval "cleos --wallet-url $WALLET_URL -u $API_URL system newaccount --stake-cpu \"10.0000 EOS\" --stake-net \"10.0000 EOS\" --transfer --buy-ram-kbytes 1024 eosio $act $key"
}


dacaccounts="$dacextra $dacowner $dactokens $dacauthority $daccustodian"
Expand Down
10 changes: 1 addition & 9 deletions eosdac-testnet/resign.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,7 @@ reset=`tput sgr0`
source ./conf_private.sh
source ./conf_dac.sh
source ./conf.sh


run_cmd() {
cmd="$1";
echo -e "\n\n >> ${green} Next command: $1 \n\n ${reset}";
#wait;
#read -p "Press enter to continue ${reset}";
eval "cleos --wallet-url $WALLET_URL -u $API_URL $1";
}
source ./functions.sh


echo -e "\n\n----------------- RESIGNING -------------------\n\n";
Expand Down
8 changes: 1 addition & 7 deletions eosdac-testnet/transfer_raw.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,12 @@ reset=`tput sgr0`
source ./conf_private.sh
source ./conf_dac.sh
source ./conf.sh
source ./functions.sh



echo -e "\n\n----------------- TRANSFER TOKENS -------------------\n\n";

run_cmd() {
cmd="$1";
echo -e "\n\n >> ${green} Next command: $1 \n\n ${reset}";
#wait;
#read -p "Press enter to continue ${reset}";
eval "cleos --wallet-url $WALLET_URL -u $API_URL $1";
}

./msig/gen_requested_permissions.py

Expand Down

0 comments on commit 7900933

Please sign in to comment.