Handle hybrid configs for new and old cli util stacks
This commit is contained in:
parent
3db6879991
commit
9693d30c5f
@ -1,3 +0,0 @@
|
|||||||
[celery]
|
|
||||||
broker_url = redis://redis:6379
|
|
||||||
result_url = redis://redis:6379
|
|
@ -1,2 +0,0 @@
|
|||||||
[chain]
|
|
||||||
spec = evm:ethereum:1
|
|
@ -1,7 +0,0 @@
|
|||||||
[cic]
|
|
||||||
registry_address =
|
|
||||||
token_index_address =
|
|
||||||
accounts_index_address =
|
|
||||||
declarator_address =
|
|
||||||
approval_escrow_address =
|
|
||||||
chain_spec = Bloxberg:8996
|
|
@ -1,8 +0,0 @@
|
|||||||
[database]
|
|
||||||
user = postgres
|
|
||||||
password = tralala
|
|
||||||
name =
|
|
||||||
host = postgres
|
|
||||||
port = 5432
|
|
||||||
engine = postgres
|
|
||||||
driver = psycopg2
|
|
@ -1,33 +0,0 @@
|
|||||||
[dev]
|
|
||||||
mnemonic = "history stumble mystery avoid embark arrive mom foil pledge keep grain dice"
|
|
||||||
eth_reserve_address =
|
|
||||||
eth_accounts_index_address =
|
|
||||||
# 10m * 10^18 (10^7 * 10^18)
|
|
||||||
eth_reserve_amount = 1000000000000000000000000
|
|
||||||
|
|
||||||
eth_account_contract_deployer=0xEb3907eCad74a0013c259D5874AE7f22DcBcC95C
|
|
||||||
eth_account_gas_provider=0xFfe6E610d1Ea184AEE71c6B39828ecE921f04a7F
|
|
||||||
eth_account_gas_gifter=0xFfe6E610d1Ea184AEE71c6B39828ecE921f04a7F
|
|
||||||
eth_account_reserve_owner=0xc14958CD9A605AB0d9A36850362AaD2b9D42DF97
|
|
||||||
eth_account_reserve_minter=0xe3C4db5947409Aff0FF8D643047EA41515cA4B8e
|
|
||||||
eth_account_accounts_index_owner=0x1AB26f3AAaaa884B651E213508592F3Ec6BfCe74
|
|
||||||
eth_account_accounts_index_writer=0xACB0BC74E1686D62dE7DC6414C999EA60C09F0eA
|
|
||||||
eth_account_sarafu_owner=0x5567139c7a1C2977A391f51D8cA45B1D6700f5F6
|
|
||||||
eth_account_sarafu_gifter=0x1149D55B3495CdC8FcfaF2816384AafaeFfaEa24
|
|
||||||
eth_account_approval_escrow_owner=0x8754122F5718dC02Db5062c62fD4a63A5448623E
|
|
||||||
eth_account_single_shot_faucet_owner=0x34C85E47f45b0bea09F37c83e2fb02ECBC3a395d
|
|
||||||
|
|
||||||
eth_sarafu_token_address =
|
|
||||||
eth_token_index_address =
|
|
||||||
eth_sarafu_faucet_address =
|
|
||||||
eth_erc20_approval_escrow_address =
|
|
||||||
|
|
||||||
eth_sarafu_token_name=Sarafu
|
|
||||||
eth_sarafu_token_symbol=SRF
|
|
||||||
eth_sarafu_token_decimals=18
|
|
||||||
|
|
||||||
pgp_publickeys_active_file = publickeys.asc
|
|
||||||
pgp_publickeys_trusted_file =
|
|
||||||
pgp_publickeys_encrypt_file =
|
|
||||||
|
|
||||||
faucet_amount = 1000000
|
|
@ -1,3 +0,0 @@
|
|||||||
[eth]
|
|
||||||
provider = http://eth:8545
|
|
||||||
abi_dir = /usr/local/share/cic/solidity/abi
|
|
7
apps/contract-migration/config_template/legacy.ini
Normal file
7
apps/contract-migration/config_template/legacy.ini
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
[celery]
|
||||||
|
broker_url =
|
||||||
|
result_url =
|
||||||
|
debug =
|
||||||
|
|
||||||
|
[cic]
|
||||||
|
chain_spec =
|
@ -1,2 +0,0 @@
|
|||||||
[meta]
|
|
||||||
provider = http://cic-meta-server:80
|
|
@ -1,4 +0,0 @@
|
|||||||
[pgp]
|
|
||||||
exports_dir = /tmp/cic/pgp
|
|
||||||
privatekey_file = ge.priv.asc
|
|
||||||
passphrase = ge
|
|
@ -1,4 +0,0 @@
|
|||||||
[redis]
|
|
||||||
host = localhost
|
|
||||||
port = 63379
|
|
||||||
db = 0
|
|
@ -1,5 +0,0 @@
|
|||||||
[rpc]
|
|
||||||
http_provider = http://localhost:8545
|
|
||||||
http_authentication =
|
|
||||||
http_username =
|
|
||||||
http_password =
|
|
@ -1,3 +0,0 @@
|
|||||||
[signer]
|
|
||||||
socket_path = /tmp/cic/signer/jsonrpc.ipc
|
|
||||||
secret = deadbeef
|
|
@ -1,2 +0,0 @@
|
|||||||
[syncer]
|
|
||||||
loop_interval =
|
|
@ -1,5 +0,0 @@
|
|||||||
[tasks]
|
|
||||||
africastalking = cic_notify.tasks.sms.africastalking
|
|
||||||
sms_db = cic_notify.tasks.sms.db
|
|
||||||
log = cic_notify.tasks.sms.log
|
|
||||||
transfer_callbacks=cic-ussd:cic_ussd.tasks.callback_handler.process_incoming_transfer_callback
|
|
@ -1,8 +0,0 @@
|
|||||||
[token]
|
|
||||||
name =
|
|
||||||
symbol =
|
|
||||||
decimals =
|
|
||||||
demurrage_level =
|
|
||||||
redistribution_period =
|
|
||||||
sink_address =
|
|
||||||
supply_limit = 0
|
|
@ -1,3 +0,0 @@
|
|||||||
[wallet]
|
|
||||||
key_file =
|
|
||||||
passphrase =
|
|
@ -1,10 +1,10 @@
|
|||||||
cic-eth[tools]==0.12.2a3
|
cic-eth[tools]==0.12.2a4
|
||||||
eth-erc20>=0.0.11a1,<0.1.0
|
eth-erc20>=0.0.12a1,<0.1.0
|
||||||
erc20-demurrage-token>=0.0.2a5,<0.1.0
|
erc20-demurrage-token>=0.0.3a1,<0.1.0
|
||||||
eth-address-index>=0.1.3a1,<0.2.0
|
eth-address-index>=0.1.4a1,<0.2.0
|
||||||
eth-accounts-index>=0.0.13a1,<0.1.0
|
eth-accounts-index>=0.0.14a1,<0.1.0
|
||||||
cic-eth-registry>=0.5.7a1,<=0.6.0
|
cic-eth-registry>=0.5.8a1,<0.6.0
|
||||||
erc20-faucet>=0.2.3a1,<0.3.0
|
erc20-faucet>=0.2.4a1,<0.3.0
|
||||||
erc20-transfer-authorization>=0.3.3a1,<0.4.0
|
erc20-transfer-authorization>=0.3.4a1,<0.4.0
|
||||||
sarafu-faucet>=0.0.4a4,<0.1.0
|
sarafu-faucet>=0.0.5a3,<0.1.0
|
||||||
chainlib-eth>=0.0.6a1,<0.1.0
|
chainlib-eth>=0.0.7a1,<0.1.0
|
||||||
|
@ -18,6 +18,7 @@ token_supply_limit: $TOKEN_SUPPLY_LIMIT
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
CIC_CHAIN_SPEC=${CIC_CHAIN_SPEC:-evm:bloxberg:8995}
|
CIC_CHAIN_SPEC=${CIC_CHAIN_SPEC:-evm:bloxberg:8995}
|
||||||
|
CHAIN_SPEC=$CIC_CHAIN_SPEC
|
||||||
DEV_ETH_ACCOUNT_RESERVE_MINTER=${DEV_ETH_ACCOUNT_RESERVE_MINTER:-$DEV_ETH_ACCOUNT_CONTRACT_DEPLOYER}
|
DEV_ETH_ACCOUNT_RESERVE_MINTER=${DEV_ETH_ACCOUNT_RESERVE_MINTER:-$DEV_ETH_ACCOUNT_CONTRACT_DEPLOYER}
|
||||||
DEV_ETH_ACCOUNT_ACCOUNTS_INDEX_WRITER=${DEV_ETH_ACCOUNT_RESERVE_MINTER:-$DEV_ETH_ACCOUNT_CONTRACT_DEPLOYER}
|
DEV_ETH_ACCOUNT_ACCOUNTS_INDEX_WRITER=${DEV_ETH_ACCOUNT_RESERVE_MINTER:-$DEV_ETH_ACCOUNT_CONTRACT_DEPLOYER}
|
||||||
DEV_RESERVE_AMOUNT=${DEV_ETH_RESERVE_AMOUNT:-""10000000000000000000000000000000000}
|
DEV_RESERVE_AMOUNT=${DEV_ETH_RESERVE_AMOUNT:-""10000000000000000000000000000000000}
|
||||||
@ -30,6 +31,7 @@ DEV_ETH_ACCOUNT_CONTRACT_DEPLOYER=`eth-checksum $(cat $DEV_ETH_KEYSTORE_FILE | j
|
|||||||
|
|
||||||
if [ ! -z $DEV_ETH_GAS_PRICE ]; then
|
if [ ! -z $DEV_ETH_GAS_PRICE ]; then
|
||||||
gas_price_arg="--gas-price $DEV_ETH_GAS_PRICE"
|
gas_price_arg="--gas-price $DEV_ETH_GAS_PRICE"
|
||||||
|
fee_price_arg="--fee-price $DEV_ETH_GAS_PRICE"
|
||||||
>&2 echo using static gas price $DEV_ETH_GAS_PRICE
|
>&2 echo using static gas price $DEV_ETH_GAS_PRICE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -133,13 +135,22 @@ if [[ -n "${ETH_PROVIDER}" ]]; then
|
|||||||
|
|
||||||
# Sarafu faucet contract
|
# Sarafu faucet contract
|
||||||
>&2 echo "deploy token faucet contract"
|
>&2 echo "deploy token faucet contract"
|
||||||
DEV_FAUCET_ADDRESS=`sarafu-faucet-deploy $gas_price_arg -y $DEV_ETH_KEYSTORE_FILE -i $CIC_CHAIN_SPEC -p $ETH_PROVIDER -w -vv --account-index-address $DEV_ACCOUNT_INDEX_ADDRESS $DEV_RESERVE_ADDRESS`
|
export _CONFINI_DIR=$CONFINI_DIR
|
||||||
|
unset CONFINI_DIR
|
||||||
|
DEV_FAUCET_ADDRESS=`sarafu-faucet-deploy $fee_price_arg -y $DEV_ETH_KEYSTORE_FILE -i $CIC_CHAIN_SPEC -p $ETH_PROVIDER -w -vv --account-index-address $DEV_ACCOUNT_INDEX_ADDRESS $DEV_RESERVE_ADDRESS -s`
|
||||||
|
|
||||||
|
>&2 echo "set token faucet amount"
|
||||||
|
sarafu-faucet-set $fee_price_arg -y $DEV_ETH_KEYSTORE_FILE -i $CIC_CHAIN_SPEC -p $ETH_PROVIDER -e $DEV_FAUCET_ADDRESS -vv -s --fee-limit 100000 $DEV_FAUCET_AMOUNT
|
||||||
|
|
||||||
|
export CONFINI_DIR=$_CONFINI_DIR
|
||||||
|
|
||||||
|
>&2 echo "register faucet in registry"
|
||||||
eth-contract-registry-set $gas_price_arg -w -y $DEV_ETH_KEYSTORE_FILE -r $CIC_REGISTRY_ADDRESS -i $CIC_CHAIN_SPEC -p $ETH_PROVIDER -vv Faucet $DEV_FAUCET_ADDRESS
|
eth-contract-registry-set $gas_price_arg -w -y $DEV_ETH_KEYSTORE_FILE -r $CIC_REGISTRY_ADDRESS -i $CIC_CHAIN_SPEC -p $ETH_PROVIDER -vv Faucet $DEV_FAUCET_ADDRESS
|
||||||
|
|
||||||
>&2 echo "set faucet as token minter"
|
>&2 echo "set faucet as token minter"
|
||||||
giftable-token-minter $gas_price_arg -w -y $DEV_ETH_KEYSTORE_FILE -a $DEV_RESERVE_ADDRESS -i $CIC_CHAIN_SPEC -p $ETH_PROVIDER -vv $DEV_FAUCET_ADDRESS
|
giftable-token-minter $gas_price_arg -w -y $DEV_ETH_KEYSTORE_FILE -a $DEV_RESERVE_ADDRESS -i $CIC_CHAIN_SPEC -p $ETH_PROVIDER -vv $DEV_FAUCET_ADDRESS
|
||||||
|
|
||||||
>&2 echo "set token faucet amount"
|
|
||||||
sarafu-faucet-set $gas_price_arg -y $DEV_ETH_KEYSTORE_FILE -i $CIC_CHAIN_SPEC -p $ETH_PROVIDER -a $DEV_FAUCET_ADDRESS -vv $DEV_FAUCET_AMOUNT
|
|
||||||
|
|
||||||
|
|
||||||
else
|
else
|
||||||
|
@ -20,11 +20,11 @@ TOKEN_SYMBOL=$CIC_DEFAULT_TOKEN_SYMBOL
|
|||||||
DEV_ETH_ACCOUNT_CONTRACT_DEPLOYER=0xEb3907eCad74a0013c259D5874AE7f22DcBcC95C
|
DEV_ETH_ACCOUNT_CONTRACT_DEPLOYER=0xEb3907eCad74a0013c259D5874AE7f22DcBcC95C
|
||||||
keystore_file=./keystore/UTC--2021-01-08T17-18-44.521011372Z--eb3907ecad74a0013c259d5874ae7f22dcbcc95c
|
keystore_file=./keystore/UTC--2021-01-08T17-18-44.521011372Z--eb3907ecad74a0013c259d5874ae7f22dcbcc95c
|
||||||
debug='-vv'
|
debug='-vv'
|
||||||
abi_dir=${ETH_ABI_DIR:-/usr/local/share/cic/solidity/abi}
|
|
||||||
gas_amount=100000000000000000000000
|
gas_amount=100000000000000000000000
|
||||||
token_amount=${gas_amount}
|
token_amount=${gas_amount}
|
||||||
env_out_file=${CIC_DATA_DIR}/.env_seed
|
env_out_file=${CIC_DATA_DIR}/.env_seed
|
||||||
init_level_file=${CIC_DATA_DIR}/.init
|
init_level_file=${CIC_DATA_DIR}/.init
|
||||||
|
empty_config_dir=$CONFINI_DIR/empty
|
||||||
truncate $env_out_file -s 0
|
truncate $env_out_file -s 0
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
@ -33,9 +33,9 @@ set -a
|
|||||||
#pip install --extra-index-url $DEV_PIP_EXTRA_INDEX_URL eth-address-index==0.1.1a7
|
#pip install --extra-index-url $DEV_PIP_EXTRA_INDEX_URL eth-address-index==0.1.1a7
|
||||||
|
|
||||||
# get required addresses from registries
|
# get required addresses from registries
|
||||||
DEV_TOKEN_INDEX_ADDRESS=`eth-contract-registry-list -i $CIC_CHAIN_SPEC -p $ETH_PROVIDER -r $CIC_REGISTRY_ADDRESS -f brief TokenRegistry`
|
DEV_TOKEN_INDEX_ADDRESS=`eth-contract-registry-list -i $CHAIN_SPEC -p $ETH_PROVIDER -r $CIC_REGISTRY_ADDRESS -f brief TokenRegistry`
|
||||||
DEV_ACCOUNT_INDEX_ADDRESS=`eth-contract-registry-list -i $CIC_CHAIN_SPEC -p $ETH_PROVIDER -r $CIC_REGISTRY_ADDRESS -f brief AccountRegistry`
|
DEV_ACCOUNT_INDEX_ADDRESS=`eth-contract-registry-list -i $CHAIN_SPEC -p $ETH_PROVIDER -r $CIC_REGISTRY_ADDRESS -f brief AccountRegistry`
|
||||||
DEV_RESERVE_ADDRESS=`eth-token-index-list -i $CIC_CHAIN_SPEC -p $ETH_PROVIDER -a $DEV_TOKEN_INDEX_ADDRESS -f brief $CIC_DEFAULT_TOKEN_SYMBOL`
|
DEV_RESERVE_ADDRESS=`eth-token-index-list -i $CHAIN_SPEC -p $ETH_PROVIDER -a $DEV_TOKEN_INDEX_ADDRESS -f brief $CIC_DEFAULT_TOKEN_SYMBOL`
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
Token registry: $DEV_TOKEN_INDEX_ADDRESS
|
Token registry: $DEV_TOKEN_INDEX_ADDRESS
|
||||||
Account reigstry: $DEV_ACCOUNT_INDEX_ADDRESS
|
Account reigstry: $DEV_ACCOUNT_INDEX_ADDRESS
|
||||||
@ -44,20 +44,20 @@ EOF
|
|||||||
|
|
||||||
>&2 echo "create account for gas gifter"
|
>&2 echo "create account for gas gifter"
|
||||||
old_gas_provider=$DEV_ETH_ACCOUNT_GAS_PROVIDER
|
old_gas_provider=$DEV_ETH_ACCOUNT_GAS_PROVIDER
|
||||||
DEV_ETH_ACCOUNT_GAS_GIFTER=`cic-eth-create --timeout 120 $debug --redis-host $REDIS_HOST --redis-host-callback=$REDIS_HOST --redis-port-callback=$REDIS_PORT --no-register`
|
DEV_ETH_ACCOUNT_GAS_GIFTER=`CONFINI_DIR=$empty_config_dir cic-eth-create --redis-timeout 120 $debug --redis-host $REDIS_HOST --redis-host-callback=$REDIS_HOST --redis-port-callback=$REDIS_PORT --no-register`
|
||||||
echo DEV_ETH_ACCOUNT_GAS_GIFTER=$DEV_ETH_ACCOUNT_GAS_GIFTER >> $env_out_file
|
echo DEV_ETH_ACCOUNT_GAS_GIFTER=$DEV_ETH_ACCOUNT_GAS_GIFTER >> $env_out_file
|
||||||
cic-eth-tag -i $CIC_CHAIN_SPEC GAS_GIFTER $DEV_ETH_ACCOUNT_GAS_GIFTER
|
cic-eth-tag -i $CHAIN_SPEC GAS_GIFTER $DEV_ETH_ACCOUNT_GAS_GIFTER
|
||||||
|
|
||||||
|
|
||||||
>&2 echo "create account for sarafu gifter"
|
>&2 echo "create account for sarafu gifter"
|
||||||
DEV_ETH_ACCOUNT_SARAFU_GIFTER=`cic-eth-create $debug --redis-host $REDIS_HOST --redis-host-callback=$REDIS_HOST --redis-port-callback=$REDIS_PORT --no-register`
|
DEV_ETH_ACCOUNT_SARAFU_GIFTER=`CONFINI_DIR=$empty_config_dir cic-eth-create $debug --redis-host $REDIS_HOST --redis-host-callback=$REDIS_HOST --redis-port-callback=$REDIS_PORT --no-register`
|
||||||
echo DEV_ETH_ACCOUNT_SARAFU_GIFTER=$DEV_ETH_ACCOUNT_SARAFU_GIFTER >> $env_out_file
|
echo DEV_ETH_ACCOUNT_SARAFU_GIFTER=$DEV_ETH_ACCOUNT_SARAFU_GIFTER >> $env_out_file
|
||||||
cic-eth-tag -i $CIC_CHAIN_SPEC SARAFU_GIFTER $DEV_ETH_ACCOUNT_SARAFU_GIFTER
|
cic-eth-tag -i $CHAIN_SPEC SARAFU_GIFTER $DEV_ETH_ACCOUNT_SARAFU_GIFTER
|
||||||
|
|
||||||
>&2 echo "create account for approval escrow owner"
|
>&2 echo "create account for approval escrow owner"
|
||||||
DEV_ETH_ACCOUNT_TRANSFER_AUTHORIZATION_OWNER=`cic-eth-create $debug --redis-host $REDIS_HOST --redis-host-callback=$REDIS_HOST --redis-port-callback=$REDIS_PORT --no-register`
|
DEV_ETH_ACCOUNT_TRANSFER_AUTHORIZATION_OWNER=`CONFINI_DIR=$empty_config_dir cic-eth-create $debug --redis-host $REDIS_HOST --redis-host-callback=$REDIS_HOST --redis-port-callback=$REDIS_PORT --no-register`
|
||||||
echo DEV_ETH_ACCOUNT_TRANSFER_AUTHORIZATION_OWNER=$DEV_ETH_ACCOUNT_TRANSFER_AUTHORIZATION_OWNER >> $env_out_file
|
echo DEV_ETH_ACCOUNT_TRANSFER_AUTHORIZATION_OWNER=$DEV_ETH_ACCOUNT_TRANSFER_AUTHORIZATION_OWNER >> $env_out_file
|
||||||
cic-eth-tag -i $CIC_CHAIN_SPEC TRANSFER_AUTHORIZATION_OWNER $DEV_ETH_ACCOUNT_TRANSFER_AUTHORIZATION_OWNER
|
cic-eth-tag -i $CHAIN_SPEC TRANSFER_AUTHORIZATION_OWNER $DEV_ETH_ACCOUNT_TRANSFER_AUTHORIZATION_OWNER
|
||||||
|
|
||||||
#>&2 echo "create account for faucet owner"
|
#>&2 echo "create account for faucet owner"
|
||||||
#DEV_ETH_ACCOUNT_FAUCET_OWNER=`cic-eth-create $debug --redis-host-callback=$REDIS_HOST --redis-port-callback=$REDIS_PORT --no-register`
|
#DEV_ETH_ACCOUNT_FAUCET_OWNER=`cic-eth-create $debug --redis-host-callback=$REDIS_HOST --redis-port-callback=$REDIS_PORT --no-register`
|
||||||
@ -65,32 +65,32 @@ cic-eth-tag -i $CIC_CHAIN_SPEC TRANSFER_AUTHORIZATION_OWNER $DEV_ETH_ACCOUNT_TRA
|
|||||||
#cic-eth-tag FAUCET_GIFTER $DEV_ETH_ACCOUNT_FAUCET_OWNER
|
#cic-eth-tag FAUCET_GIFTER $DEV_ETH_ACCOUNT_FAUCET_OWNER
|
||||||
|
|
||||||
>&2 echo "create account for accounts index writer"
|
>&2 echo "create account for accounts index writer"
|
||||||
DEV_ETH_ACCOUNT_ACCOUNT_REGISTRY_WRITER=`cic-eth-create $debug --redis-host $REDIS_HOST --redis-host-callback=$REDIS_HOST --redis-port-callback=$REDIS_PORT --no-register`
|
DEV_ETH_ACCOUNT_ACCOUNT_REGISTRY_WRITER=`CONFINI_DIR=$empty_config_dir cic-eth-create $debug --redis-host $REDIS_HOST --redis-host-callback=$REDIS_HOST --redis-port-callback=$REDIS_PORT --no-register`
|
||||||
echo DEV_ETH_ACCOUNT_ACCOUNT_REGISTRY_WRITER=$DEV_ETH_ACCOUNT_ACCOUNT_REGISTRY_WRITER >> $env_out_file
|
echo DEV_ETH_ACCOUNT_ACCOUNT_REGISTRY_WRITER=$DEV_ETH_ACCOUNT_ACCOUNT_REGISTRY_WRITER >> $env_out_file
|
||||||
cic-eth-tag -i $CIC_CHAIN_SPEC ACCOUNT_REGISTRY_WRITER $DEV_ETH_ACCOUNT_ACCOUNT_REGISTRY_WRITER
|
cic-eth-tag -i $CHAIN_SPEC ACCOUNT_REGISTRY_WRITER $DEV_ETH_ACCOUNT_ACCOUNT_REGISTRY_WRITER
|
||||||
>&2 echo "add acccounts index writer account as writer on contract"
|
>&2 echo "add acccounts index writer account as writer on contract"
|
||||||
eth-accounts-index-writer -y $keystore_file -i $CIC_CHAIN_SPEC -p $ETH_PROVIDER -a $DEV_ACCOUNT_INDEX_ADDRESS -ww $debug $DEV_ETH_ACCOUNT_ACCOUNT_REGISTRY_WRITER
|
eth-accounts-index-writer -y $keystore_file -i $CHAIN_SPEC -p $ETH_PROVIDER -a $DEV_ACCOUNT_INDEX_ADDRESS -ww $debug $DEV_ETH_ACCOUNT_ACCOUNT_REGISTRY_WRITER
|
||||||
|
|
||||||
# Transfer gas to custodial gas provider adddress
|
# Transfer gas to custodial gas provider adddress
|
||||||
_CONFINI_DIR=$CONFINI_DIR
|
_CONFINI_DIR=$CONFINI_DIR
|
||||||
unset CONFINI_DIR
|
unset CONFINI_DIR
|
||||||
>&2 echo gift gas to gas gifter
|
>&2 echo gift gas to gas gifter
|
||||||
>&2 eth-gas --send -y $keystore_file -i $CIC_CHAIN_SPEC -p $ETH_PROVIDER -w $debug -a $DEV_ETH_ACCOUNT_GAS_GIFTER $gas_amount
|
>&2 eth-gas --send -y $keystore_file -i $CHAIN_SPEC -p $ETH_PROVIDER -w $debug -a $DEV_ETH_ACCOUNT_GAS_GIFTER $gas_amount
|
||||||
|
|
||||||
>&2 echo gift gas to sarafu token owner
|
>&2 echo gift gas to sarafu token owner
|
||||||
>&2 eth-gas --send -y $keystore_file -i $CIC_CHAIN_SPEC -p $ETH_PROVIDER -w $debug -a $DEV_ETH_ACCOUNT_SARAFU_GIFTER $gas_amount
|
>&2 eth-gas --send -y $keystore_file -i $CHAIN_SPEC -p $ETH_PROVIDER -w $debug -a $DEV_ETH_ACCOUNT_SARAFU_GIFTER $gas_amount
|
||||||
|
|
||||||
>&2 echo gift gas to account index owner
|
>&2 echo gift gas to account index owner
|
||||||
>&2 eth-gas --send -y $keystore_file -i $CIC_CHAIN_SPEC -p $ETH_PROVIDER -w $debug -a $DEV_ETH_ACCOUNT_ACCOUNT_REGISTRY_WRITER $gas_amount
|
>&2 eth-gas --send -y $keystore_file -i $CHAIN_SPEC -p $ETH_PROVIDER -w $debug -a $DEV_ETH_ACCOUNT_ACCOUNT_REGISTRY_WRITER $gas_amount
|
||||||
|
|
||||||
|
|
||||||
# Send token to token creator
|
# Send token to token creator
|
||||||
>&2 echo "gift tokens to sarafu owner"
|
>&2 echo "gift tokens to sarafu owner"
|
||||||
>&2 giftable-token-gift -y $keystore_file -i $CIC_CHAIN_SPEC -p $ETH_PROVIDER -a $DEV_RESERVE_ADDRESS --recipient $DEV_ETH_ACCOUNT_SARAFU_GIFTER -w $debug $token_amount
|
>&2 giftable-token-gift -y $keystore_file -i $CHAIN_SPEC -p $ETH_PROVIDER -a $DEV_RESERVE_ADDRESS --recipient $DEV_ETH_ACCOUNT_SARAFU_GIFTER -w $debug $token_amount
|
||||||
|
|
||||||
# Send token to token gifter
|
# Send token to token gifter
|
||||||
>&2 echo "gift tokens to keystore address"
|
>&2 echo "gift tokens to keystore address"
|
||||||
>&2 giftable-token-gift -y $keystore_file -i $CIC_CHAIN_SPEC -p $ETH_PROVIDER -a $DEV_RESERVE_ADDRESS --recipient $DEV_ETH_ACCOUNT_CONTRACT_DEPLOYER -w $debug $token_amount
|
>&2 giftable-token-gift -y $keystore_file -i $CHAIN_SPEC -p $ETH_PROVIDER -a $DEV_RESERVE_ADDRESS --recipient $DEV_ETH_ACCOUNT_CONTRACT_DEPLOYER -w $debug $token_amount
|
||||||
|
|
||||||
>&2 echo "set sarafu token to reserve token (temporarily while bancor contracts are not connected)"
|
>&2 echo "set sarafu token to reserve token (temporarily while bancor contracts are not connected)"
|
||||||
echo DEV_ETH_SARAFU_TOKEN_ADDRESS=$DEV_ETH_RESERVE_ADDRESS >> $env_out_file
|
echo DEV_ETH_SARAFU_TOKEN_ADDRESS=$DEV_ETH_RESERVE_ADDRESS >> $env_out_file
|
||||||
@ -98,7 +98,7 @@ export DEV_ETH_SARAFU_TOKEN_ADDRESS=$DEV_ETH_RESERVE_ADDRESS
|
|||||||
|
|
||||||
# Transfer tokens to gifter address
|
# Transfer tokens to gifter address
|
||||||
>&2 echo "transfer tokens to token gifter address"
|
>&2 echo "transfer tokens to token gifter address"
|
||||||
>&2 erc20-transfer -y $keystore_file -i $CIC_CHAIN_SPEC -p $ETH_PROVIDER --gas-limit 100000 --token-address $DEV_RESERVE_ADDRESS -w $debug $DEV_ETH_ACCOUNT_SARAFU_GIFTER ${token_amount:0:-1}
|
>&2 erc20-transfer -y $keystore_file -i $CHAIN_SPEC -p $ETH_PROVIDER --gas-limit 100000 --token-address $DEV_RESERVE_ADDRESS -w $debug $DEV_ETH_ACCOUNT_SARAFU_GIFTER ${token_amount:0:-1}
|
||||||
|
|
||||||
#echo -n 0 > $init_level_file
|
#echo -n 0 > $init_level_file
|
||||||
|
|
||||||
|
@ -79,16 +79,18 @@ services:
|
|||||||
args:
|
args:
|
||||||
pip_index_url: ${PIP_DEFAULT_INDEX_URL:-https://pypi.org/simple}
|
pip_index_url: ${PIP_DEFAULT_INDEX_URL:-https://pypi.org/simple}
|
||||||
pip_extra_args: $PIP_EXTRA_ARGS
|
pip_extra_args: $PIP_EXTRA_ARGS
|
||||||
|
EXTRA_INDEX_URL: ${EXTRA_INDEX_URL:-https://pip.grassrootseconomics.net:8433}
|
||||||
# image: registry.gitlab.com/grassrootseconomics/cic-internal-integration/contract-migration:latest
|
# image: registry.gitlab.com/grassrootseconomics/cic-internal-integration/contract-migration:latest
|
||||||
environment:
|
environment:
|
||||||
CIC_REGISTRY_ADDRESS: $CIC_REGISTRY_ADDRESS
|
CIC_REGISTRY_ADDRESS: $CIC_REGISTRY_ADDRESS
|
||||||
# ETH_PROVIDER should be broken out into host/port but cic-eth expects this
|
ETH_PROVIDER: ${CIC_HTTP_PROVIDER:-http://eth:8545}
|
||||||
ETH_PROVIDER: http://eth:8545
|
RPC_HTTP_PROVIDER: ${CIC_HTTP_PROVIDER:-http://eth:8545}
|
||||||
# And these two are for wait-for-it (could parse this)
|
# And these two are for wait-for-it (could parse this)
|
||||||
DEV_USE_DOCKER_WAIT_SCRIPT: 1
|
DEV_USE_DOCKER_WAIT_SCRIPT: 1
|
||||||
ETH_PROVIDER_HOST: eth
|
ETH_PROVIDER_HOST: eth
|
||||||
ETH_PROVIDER_PORT: 8545
|
ETH_PROVIDER_PORT: 8545
|
||||||
CIC_CHAIN_SPEC: ${CIC_CHAIN_SPEC:-evm:bloxberg:8996}
|
CHAIN_SPEC: ${CHAIN_SPEC:-evm:bloxberg:8996}
|
||||||
|
CIC_CHAIN_SPEC: ${CHAIN_SPEC:-evm:bloxberg:8996}
|
||||||
CIC_DATA_DIR: ${CIC_DATA_DIR:-/tmp/cic/config}
|
CIC_DATA_DIR: ${CIC_DATA_DIR:-/tmp/cic/config}
|
||||||
DATABASE_HOST: ${DATABASE_HOST:-postgres}
|
DATABASE_HOST: ${DATABASE_HOST:-postgres}
|
||||||
DATABASE_PORT: ${DATABASE_PORT:-5432}
|
DATABASE_PORT: ${DATABASE_PORT:-5432}
|
||||||
@ -135,7 +137,8 @@ services:
|
|||||||
EXTRA_INDEX_URL: ${EXTRA_INDEX_URL:-https://pip.grassrootseconomics.net:8433}
|
EXTRA_INDEX_URL: ${EXTRA_INDEX_URL:-https://pip.grassrootseconomics.net:8433}
|
||||||
environment:
|
environment:
|
||||||
CIC_REGISTRY_ADDRESS: $CIC_REGISTRY_ADDRESS # supplied at contract-config after contract provisioning
|
CIC_REGISTRY_ADDRESS: $CIC_REGISTRY_ADDRESS # supplied at contract-config after contract provisioning
|
||||||
RPC_HTTP_PROVIDER: ${ETH_PROVIDER:-http://eth:8545}
|
ETH_PROVIDER: ${RPC_HTTP_PROVIDER:-http://eth:8545}
|
||||||
|
RPC_HTTP_PROVIDER: ${RPC_HTTP_PROVIDER:-http://eth:8545}
|
||||||
DATABASE_USER: ${DATABASE_USER:-grassroots}
|
DATABASE_USER: ${DATABASE_USER:-grassroots}
|
||||||
DATABASE_PASSWORD: ${DATABASE_PASSWORD:-tralala} # this is is set at initdb see: postgres/initdb/create_db.sql
|
DATABASE_PASSWORD: ${DATABASE_PASSWORD:-tralala} # this is is set at initdb see: postgres/initdb/create_db.sql
|
||||||
DATABASE_HOST: ${DATABASE_HOST:-postgres}
|
DATABASE_HOST: ${DATABASE_HOST:-postgres}
|
||||||
@ -145,7 +148,8 @@ services:
|
|||||||
DATABASE_DRIVER: ${DATABASE_DRIVER:-psycopg2}
|
DATABASE_DRIVER: ${DATABASE_DRIVER:-psycopg2}
|
||||||
DATABASE_DEBUG: 1
|
DATABASE_DEBUG: 1
|
||||||
CIC_TRUST_ADDRESS: ${DEV_ETH_ACCOUNT_CONTRACT_DEPLOYER:-0xEb3907eCad74a0013c259D5874AE7f22DcBcC95C}
|
CIC_TRUST_ADDRESS: ${DEV_ETH_ACCOUNT_CONTRACT_DEPLOYER:-0xEb3907eCad74a0013c259D5874AE7f22DcBcC95C}
|
||||||
CHAIN_SPEC: ${CIC_CHAIN_SPEC:-evm:bloxberg:8996}
|
CHAIN_SPEC: ${CHAIN_SPEC:-evm:bloxberg:8996}
|
||||||
|
CIC_CHAIN_SPEC: ${CHAIN_SPEC:-evm:bloxberg:8996}
|
||||||
CELERY_BROKER_URL: redis://redis:6379
|
CELERY_BROKER_URL: redis://redis:6379
|
||||||
CELERY_RESULT_URL: redis://redis:6379
|
CELERY_RESULT_URL: redis://redis:6379
|
||||||
deploy:
|
deploy:
|
||||||
@ -184,7 +188,6 @@ services:
|
|||||||
DATABASE_DRIVER: ${DATABASE_DRIVER:-psycopg2}
|
DATABASE_DRIVER: ${DATABASE_DRIVER:-psycopg2}
|
||||||
DATABASE_DEBUG: 1
|
DATABASE_DEBUG: 1
|
||||||
DATABASE_POOL_SIZE: 0
|
DATABASE_POOL_SIZE: 0
|
||||||
ETH_ABI_DIR: ${ETH_ABI_DIR:-/usr/local/share/cic/solidity/abi}
|
|
||||||
CIC_TRUST_ADDRESS: ${DEV_ETH_ACCOUNT_CONTRACT_DEPLOYER:-0xEb3907eCad74a0013c259D5874AE7f22DcBcC95C}
|
CIC_TRUST_ADDRESS: ${DEV_ETH_ACCOUNT_CONTRACT_DEPLOYER:-0xEb3907eCad74a0013c259D5874AE7f22DcBcC95C}
|
||||||
CIC_CHAIN_SPEC: ${CIC_CHAIN_SPEC:-evm:bloxberg:8996}
|
CIC_CHAIN_SPEC: ${CIC_CHAIN_SPEC:-evm:bloxberg:8996}
|
||||||
CELERY_BROKER_URL: redis://redis:6379
|
CELERY_BROKER_URL: redis://redis:6379
|
||||||
@ -300,7 +303,8 @@ services:
|
|||||||
args:
|
args:
|
||||||
EXTRA_INDEX_URL: ${EXTRA_INDEX_URL:-https://pip.grassrootseconomics.net:8433}
|
EXTRA_INDEX_URL: ${EXTRA_INDEX_URL:-https://pip.grassrootseconomics.net:8433}
|
||||||
environment:
|
environment:
|
||||||
RPC_HTTP_PROVIDER: http://eth:8545
|
RPC_HTTP_PROVIDER: ${RPC_HTTP_PROVIDER:-http://eth:8545}
|
||||||
|
ETH_PROVIDER: ${RPC_HTTP_PROVIDER:-http://eth:8545}
|
||||||
DATABASE_USER: ${DATABASE_USER:-grassroots}
|
DATABASE_USER: ${DATABASE_USER:-grassroots}
|
||||||
DATABASE_HOST: ${DATABASE_HOST:-postgres}
|
DATABASE_HOST: ${DATABASE_HOST:-postgres}
|
||||||
DATABASE_PASSWORD: ${DATABASE_PASSWORD:-tralala}
|
DATABASE_PASSWORD: ${DATABASE_PASSWORD:-tralala}
|
||||||
@ -309,7 +313,8 @@ services:
|
|||||||
DATABASE_ENGINE: ${DATABASE_ENGINE:-postgres}
|
DATABASE_ENGINE: ${DATABASE_ENGINE:-postgres}
|
||||||
DATABASE_DRIVER: ${DATABASE_DRIVER:-psycopg2}
|
DATABASE_DRIVER: ${DATABASE_DRIVER:-psycopg2}
|
||||||
DATABASE_DEBUG: ${DATABASE_DEBUG:-0}
|
DATABASE_DEBUG: ${DATABASE_DEBUG:-0}
|
||||||
CHAIN_SPEC: ${CIC_CHAIN_SPEC:-evm:bloxberg:8996}
|
CIC_CHAIN_SPEC: ${CHAIN_SPEC:-evm:bloxberg:8996}
|
||||||
|
CHAIN_SPEC: ${CHAIN_SPEC:-evm:bloxberg:8996}
|
||||||
CIC_REGISTRY_ADDRESS: $CIC_REGISTRY_ADDRESS
|
CIC_REGISTRY_ADDRESS: $CIC_REGISTRY_ADDRESS
|
||||||
#BANCOR_DIR: $BANCOR_DIR
|
#BANCOR_DIR: $BANCOR_DIR
|
||||||
CELERY_BROKER_URL: ${CELERY_BROKER_URL:-redis://redis}
|
CELERY_BROKER_URL: ${CELERY_BROKER_URL:-redis://redis}
|
||||||
|
Loading…
Reference in New Issue
Block a user