Skip to content

Instantly share code, notes, and snippets.

@bensig
Created December 6, 2022 00:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bensig/0b160db313400a21845007f59e04168d to your computer and use it in GitHub Desktop.
Save bensig/0b160db313400a21845007f59e04168d to your computer and use it in GitHub Desktop.
#/bin/sh
# Set the permission of the proposing account
ACCOUNTPERM="benobi.chat@active"
# Get user input
echo "You may need to set your account permission first - check the contents of this script"
echo ""
read -p "Enter the name of the proposal: " NAME
read -p "Enter the name of the account to pay: " PAYEE
read -p "Amount to pay in EOS (digits only - no decimals): " AMOUNT
read -p "Enter the memo to use: " MEMO
echo ""
# Remove commas
AMOUNT=`echo $AMOUNT|sed 's/,//g'`
# Add precision
AMOUNT="$AMOUNT.0000"
# Confirm transaction details:
read -p "You are creating a proposal called $NAME to pay $PAYEE $AMOUNT EOS - if correct press enter. "
# Propose MSIG
cleos.sh multisig propose -x "3600" $NAME \
'[
{"actor": "benobi.chat", "permission": "active"},
{"actor": "chrisbedenos", "permission": "active"},
{"actor": "cometothesun", "permission": "active"},
{"actor": "lukeeosproxy", "permission": "active"},
{"actor": "marketing.gm", "permission": "active"},
]' \
'[
{"actor": "edentogoveos", "permission": "active"}
]' \
eosio.token transfer '{"from":"edentogoveos", "to":"'"$PAYEE"'", "quantity":"'"$AMOUNT"' EOS", "memo":"'"$MEMO"'"}' -p $ACCOUNTPERM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment