Add trust address to contract migration config, get cic-eth default token from registry
This commit is contained in:
parent
2da19f5819
commit
9009815d78
@ -76,7 +76,7 @@ arg_flags = cic_eth.cli.argflag_std_read
|
||||
local_arg_flags = cic_eth.cli.argflag_local_task
|
||||
argparser = cic_eth.cli.ArgumentParser(arg_flags)
|
||||
argparser.process_local_flags(local_arg_flags)
|
||||
argparser.add_argument('--default-token-symbol', dest='default_token_symbol', type=str, help='Symbol of default token to use')
|
||||
#argparser.add_argument('--default-token-symbol', dest='default_token_symbol', type=str, help='Symbol of default token to use')
|
||||
argparser.add_argument('--trace-queue-status', default=None, dest='trace_queue_status', action='store_true', help='set to perist all queue entry status changes to storage')
|
||||
argparser.add_argument('--aux-all', action='store_true', help='include tasks from all submodules from the aux module path')
|
||||
argparser.add_argument('--aux', action='append', type=str, default=[], help='add single submodule from the aux module path')
|
||||
@ -84,7 +84,7 @@ args = argparser.parse_args()
|
||||
|
||||
# process config
|
||||
extra_args = {
|
||||
'default_token_symbol': 'CIC_DEFAULT_TOKEN_SYMBOL',
|
||||
# 'default_token_symbol': 'CIC_DEFAULT_TOKEN_SYMBOL',
|
||||
'aux_all': None,
|
||||
'aux': None,
|
||||
'trace_queue_status': 'TASKS_TRACE_QUEUE_STATUS',
|
||||
@ -204,7 +204,11 @@ def main():
|
||||
argv.append('-n')
|
||||
argv.append(config.get('CELERY_QUEUE'))
|
||||
|
||||
BaseTask.default_token_symbol = config.get('CIC_DEFAULT_TOKEN_SYMBOL')
|
||||
default_token_address = registry.by_name('DefaultToken')
|
||||
c = ERC20Token(chain_spec, conn, default_token_address)
|
||||
logg.info('found default token {} address {}'.format(c.symbol, default_token_address))
|
||||
|
||||
BaseTask.default_token_symbol = c.symbol
|
||||
BaseTask.default_token_address = registry.by_name(BaseTask.default_token_symbol)
|
||||
default_token = ERC20Token(chain_spec, conn, add_0x(BaseTask.default_token_address))
|
||||
default_token.load(conn)
|
||||
|
@ -8,7 +8,7 @@ pycryptodome==3.10.1
|
||||
liveness~=0.0.1a7
|
||||
eth-address-index>=0.2.3a4,<0.3.0
|
||||
eth-accounts-index>=0.1.2a3,<0.2.0
|
||||
cic-eth-registry>=0.6.1a3,<0.7.0
|
||||
cic-eth-registry>=0.6.1a5,<0.7.0
|
||||
erc20-faucet>=0.3.2a2,<0.4.0
|
||||
erc20-transfer-authorization>=0.3.5a2,<0.4.0
|
||||
sarafu-faucet>=0.0.7a2,<0.1.0
|
||||
|
@ -26,7 +26,8 @@ if [ ! -f $WALLET_KEY_FILE ]; then
|
||||
>&2 echo "wallet path '$WALLET_KEY_FILE' does not point to a file"
|
||||
exit 1
|
||||
fi
|
||||
export DEV_ETH_ACCOUNT_CONTRACT_DEPLOYER=`eth-checksum $(cat $WALLET_KEY_FILE | jq -r .address)`
|
||||
#export DEV_ETH_ACCOUNT_CONTRACT_DEPLOYER=`eth-checksum $(cat $WALLET_KEY_FILE | jq -r .address)`
|
||||
export DEV_ETH_ACCOUNT_CONTRACT_DEPLOYER=`eth-keyfile -z -d $WALLET_KEY_FILE`
|
||||
|
||||
# Wallet dependent variable defaults
|
||||
export DEV_ETH_ACCOUNT_RESERVE_MINTER=${DEV_ETH_ACCOUNT_RESERVE_MINTER:-$DEV_ETH_ACCOUNT_CONTRACT_DEPLOYER}
|
||||
@ -38,9 +39,10 @@ export TOKEN_SINK_ADDRESS=${TOKEN_SINK_ADDRESS:-$DEV_ETH_ACCOUNT_CONTRACT_DEPLOY
|
||||
|
||||
# Migration variable processing
|
||||
confini-dump --schema-dir ./config --prefix export > ${DEV_DATA_DIR}/env_reset
|
||||
echo "export CIC_TRUST_ADDRESS=$CIC_TRUST_ADDRESS
|
||||
export CIC_DEFAULT_TOKEN_SYMBOL=$CIC_DEFAULT_TOKEN_SYMBOL
|
||||
export WALLET_KEY_FILE=$WALLET_KEY_FILE
|
||||
" >> ${DEV_DATA_DIR}/env_reset
|
||||
|
||||
#echo "export CIC_TRUST_ADDRESS=$CIC_TRUST_ADDRESS
|
||||
#export CIC_DEFAULT_TOKEN_SYMBOL=$CIC_DEFAULT_TOKEN_SYMBOL
|
||||
#export WALLET_KEY_FILE=$WALLET_KEY_FILE
|
||||
#" >> ${DEV_DATA_DIR}/env_reset
|
||||
|
||||
set +a
|
||||
|
@ -26,3 +26,4 @@ port_callback =
|
||||
|
||||
[cic]
|
||||
registry_address =
|
||||
trust_address =
|
||||
|
@ -47,7 +47,7 @@ for ((i=0; i<$LAST_BIT_POS; i++)); do
|
||||
exit 1;
|
||||
fi
|
||||
>&2 echo -e "\033[;32mSUCCEEDED $s\033[;39m"
|
||||
echo -e "\033[;96mConfiguration state after $runlevel execution\033[;39m"
|
||||
>&2 echo -e "\033[;96mConfiguration state after $runlevel execution\033[;39m"
|
||||
confini-dump --schema-dir ./config
|
||||
fi
|
||||
bit=$((bit*2))
|
||||
|
Loading…
Reference in New Issue
Block a user