forked from gofractally/Eden
-
Notifications
You must be signed in to change notification settings - Fork 2
/
init_community.sh
executable file
·74 lines (68 loc) · 2.21 KB
/
init_community.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/usr/bin/env sh
set -e
CLEOS="cleos -u https://waxtest.eosn.io"
CONTRACT="test2.edev"
for PARMS in $(cat ./genesis_accounts_long_list); do
ACCOUNT_NAME=$(echo $PARMS | cut -d "," -f1);
INDUCTION_ID=$(echo $PARMS | cut -d "," -f2);
IMAGE=$(echo $PARMS | cut -d "," -f3);
GENESIS_MEMBERS="$GENESIS_MEMBERS, \"$ACCOUNT_NAME\""
done
GENESIS_MEMBERS=$(echo $GENESIS_MEMBERS | cut -c 3-)
GENESIS_MEMBERS="$GENESIS_MEMBERS"
COMMUNITY_NAME="Eden Test"
COMMUNITY_DESCRIPTION="Eden is a community working to maximize the power and independence of its members and thereby securing life, liberty, property, and justice for all."
COMMUNITY_LOGO="QmZQ11KWvfj2NkKUMJfsTfvfbyUNQpLYCu8uxSbFTQ2zbA"
COMMUNITY_URL="https://eden.eoscommunity.org"
GENESIS_VIDEO="QmTYqoPYf7DiVebTnvwwFdTgsYXg2RnuPrt8uddjfW2kHS"
SYMBOL="8,WAX"
MINIMUM_DONATION="10.00000000 WAX"
AUCTION_STARTING_BID="1.00000000 WAX"
AUCTION_DURATION=604800
GENESIS_MEMO="A community is born."
ELECTION_DAY="0"
ELECTION_TIME="16:00"
GENESIS_ACTION_DATA="{
\"community\": \"$COMMUNITY_NAME\",
\"community_symbol\": \"$SYMBOL\",
\"minimum_donation\": \"$MINIMUM_DONATION\",
\"initial_members\": [$GENESIS_MEMBERS],
\"genesis_video\": \"$GENESIS_VIDEO\",
\"auction_starting_bid\": \"$AUCTION_STARTING_BID\",
\"auction_duration\": $AUCTION_DURATION,
\"memo\": \"$GENESIS_MEMO\",
\"election_day\": \"$ELECTION_DAY\",
\"election_time\": \"$ELECTION_TIME\",
\"collection_attributes\": [
{
\"key\": \"name\",
\"value\": [
\"string\",
\"$COMMUNITY_NAME\"
]
},
{
\"key\": \"img\",
\"value\": [
\"string\",
\"$COMMUNITY_LOGO\"
]
},
{
\"key\": \"description\",
\"value\": [
\"string\",
\"$COMMUNITY_DESCRIPTION\"
]
},
{
\"key\": \"url\",
\"value\": [
\"string\",
\"$COMMUNITY_URL\"
]
}
]
}"
# cleos set account permission edenmembersd active --add-code
$CLEOS push action $CONTRACT genesis "$GENESIS_ACTION_DATA" -p $CONTRACT@active