Add contextual token symbol and name defaults

This commit is contained in:
nolash 2021-07-09 18:00:20 +02:00
parent 021c736707
commit 651cd888f4
Signed by untrusted user who does not match committer: lash
GPG Key ID: 21D2E7BB88C2A746
2 changed files with 9 additions and 4 deletions

View File

@ -6,10 +6,15 @@ default_token=giftable_erc20_token
CIC_DEFAULT_TOKEN_SYMBOL=${CIC_DEFAULT_TOKEN_SYMBOL:-GFT} CIC_DEFAULT_TOKEN_SYMBOL=${CIC_DEFAULT_TOKEN_SYMBOL:-GFT}
TOKEN_SYMBOL=${CIC_DEFAULT_TOKEN_SYMBOL} TOKEN_SYMBOL=${CIC_DEFAULT_TOKEN_SYMBOL}
TOKEN_NAME=${TOKEN_NAME:-$TOKEN_SYMBOL} TOKEN_NAME=${TOKEN_NAME:-$TOKEN_SYMBOL}
TOKEN_TYPE=${TOKEN_TYPE:-$default_token} #TOKEN_TYPE=${TOKEN_TYPE:-$default_token}
if [ $TOKEN_TYPE == 'default' ]; then if [ $TOKEN_TYPE == $default_token ]; then
>&2 echo resolving "default" token to $default_token >&2 echo using default token $default_token
TOKEN_TYPE=$default_token TOKEN_TYPE=$default_token
TOKEN_SYMBOL=${TOKEN_SYMBOL:-GFT}
TOKEN_SYMBOL=${TOKEN_NAME:-"Giftable Token"}
elif [ $TOKEN_TYPE == 'erc20_demurrage_token' ]; then
TOKEN_SYMBOL=${TOKEN_SYMBOL:-SARAFU}
TOKEN_SYMBOL=${TOKEN_NAME:-"Sarafu Token"}
fi fi
cat <<EOF cat <<EOF
external token settings: external token settings:

View File

@ -111,7 +111,7 @@ services:
TOKEN_SUPPLY_LIMIT: $TOKEN_SUPPLY_LIMIT TOKEN_SUPPLY_LIMIT: $TOKEN_SUPPLY_LIMIT
TOKEN_DEMURRAGE_LEVEL: ${TOKEN_DEMURRAGE_LEVEL:-196454828847045000000000000000000} TOKEN_DEMURRAGE_LEVEL: ${TOKEN_DEMURRAGE_LEVEL:-196454828847045000000000000000000}
TOKEN_SINK_ADDRESS: $TOKEN_SINK_ADDRESS TOKEN_SINK_ADDRESS: $TOKEN_SINK_ADDRESS
TOKEN_TYPE: ${TOKEN_TYPE:-default} TOKEN_TYPE: $TOKEN_TYPE
#CONFINI_DIR: ${CONFINI_DIR:-/tmp/cic/config} #CONFINI_DIR: ${CONFINI_DIR:-/tmp/cic/config}
command: ["./run_job.sh"] command: ["./run_job.sh"]
#command: ["./reset.sh"] #command: ["./reset.sh"]