diff --git a/apps/contract-migration/config_template/celery.ini b/apps/contract-migration/config_template/celery.ini index dac9a5f4..e69de29b 100644 --- a/apps/contract-migration/config_template/celery.ini +++ b/apps/contract-migration/config_template/celery.ini @@ -1,3 +0,0 @@ -[celery] -broker_url = redis://redis:6379 -result_url = redis://redis:6379 diff --git a/apps/contract-migration/config_template/chain.ini b/apps/contract-migration/config_template/chain.ini deleted file mode 100644 index 6a2a8cba..00000000 --- a/apps/contract-migration/config_template/chain.ini +++ /dev/null @@ -1,2 +0,0 @@ -[chain] -spec = evm:ethereum:1 diff --git a/apps/contract-migration/config_template/cic.ini b/apps/contract-migration/config_template/cic.ini deleted file mode 100644 index bf598b98..00000000 --- a/apps/contract-migration/config_template/cic.ini +++ /dev/null @@ -1,7 +0,0 @@ -[cic] -registry_address = -token_index_address = -accounts_index_address = -declarator_address = -approval_escrow_address = -chain_spec = Bloxberg:8996 diff --git a/apps/contract-migration/config_template/database.ini b/apps/contract-migration/config_template/database.ini deleted file mode 100644 index db8227bc..00000000 --- a/apps/contract-migration/config_template/database.ini +++ /dev/null @@ -1,8 +0,0 @@ -[database] -user = postgres -password = tralala -name = -host = postgres -port = 5432 -engine = postgres -driver = psycopg2 diff --git a/apps/contract-migration/config_template/dev.ini b/apps/contract-migration/config_template/dev.ini deleted file mode 100644 index a2c663ea..00000000 --- a/apps/contract-migration/config_template/dev.ini +++ /dev/null @@ -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 diff --git a/apps/contract-migration/config_template/eth.ini b/apps/contract-migration/config_template/eth.ini deleted file mode 100644 index 5506851b..00000000 --- a/apps/contract-migration/config_template/eth.ini +++ /dev/null @@ -1,3 +0,0 @@ -[eth] -provider = http://eth:8545 -abi_dir = /usr/local/share/cic/solidity/abi diff --git a/apps/contract-migration/config_template/legacy.ini b/apps/contract-migration/config_template/legacy.ini new file mode 100644 index 00000000..02eb709c --- /dev/null +++ b/apps/contract-migration/config_template/legacy.ini @@ -0,0 +1,7 @@ +[celery] +broker_url = +result_url = +debug = + +[cic] +chain_spec = diff --git a/apps/contract-migration/config_template/meta.ini b/apps/contract-migration/config_template/meta.ini deleted file mode 100644 index cbcc16ac..00000000 --- a/apps/contract-migration/config_template/meta.ini +++ /dev/null @@ -1,2 +0,0 @@ -[meta] -provider = http://cic-meta-server:80 diff --git a/apps/contract-migration/config_template/pgp.ini b/apps/contract-migration/config_template/pgp.ini deleted file mode 100644 index fade0d5a..00000000 --- a/apps/contract-migration/config_template/pgp.ini +++ /dev/null @@ -1,4 +0,0 @@ -[pgp] -exports_dir = /tmp/cic/pgp -privatekey_file = ge.priv.asc -passphrase = ge diff --git a/apps/contract-migration/config_template/redis.ini b/apps/contract-migration/config_template/redis.ini deleted file mode 100644 index ea321378..00000000 --- a/apps/contract-migration/config_template/redis.ini +++ /dev/null @@ -1,4 +0,0 @@ -[redis] -host = localhost -port = 63379 -db = 0 diff --git a/apps/contract-migration/config_template/rpc.ini b/apps/contract-migration/config_template/rpc.ini deleted file mode 100644 index 31dc0614..00000000 --- a/apps/contract-migration/config_template/rpc.ini +++ /dev/null @@ -1,5 +0,0 @@ -[rpc] -http_provider = http://localhost:8545 -http_authentication = -http_username = -http_password = diff --git a/apps/contract-migration/config_template/signer.ini b/apps/contract-migration/config_template/signer.ini deleted file mode 100644 index 58ad0c0a..00000000 --- a/apps/contract-migration/config_template/signer.ini +++ /dev/null @@ -1,3 +0,0 @@ -[signer] -socket_path = /tmp/cic/signer/jsonrpc.ipc -secret = deadbeef diff --git a/apps/contract-migration/config_template/syncer.ini b/apps/contract-migration/config_template/syncer.ini deleted file mode 100644 index 60c0c007..00000000 --- a/apps/contract-migration/config_template/syncer.ini +++ /dev/null @@ -1,2 +0,0 @@ -[syncer] -loop_interval = diff --git a/apps/contract-migration/config_template/tasks.ini b/apps/contract-migration/config_template/tasks.ini deleted file mode 100644 index b49ecad5..00000000 --- a/apps/contract-migration/config_template/tasks.ini +++ /dev/null @@ -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 diff --git a/apps/contract-migration/config_template/token.ini b/apps/contract-migration/config_template/token.ini deleted file mode 100644 index 865e7f84..00000000 --- a/apps/contract-migration/config_template/token.ini +++ /dev/null @@ -1,8 +0,0 @@ -[token] -name = -symbol = -decimals = -demurrage_level = -redistribution_period = -sink_address = -supply_limit = 0 diff --git a/apps/contract-migration/config_template/wallet.ini b/apps/contract-migration/config_template/wallet.ini deleted file mode 100644 index 696cee43..00000000 --- a/apps/contract-migration/config_template/wallet.ini +++ /dev/null @@ -1,3 +0,0 @@ -[wallet] -key_file = -passphrase = diff --git a/apps/contract-migration/requirements.txt b/apps/contract-migration/requirements.txt index 9d5cb9b2..0d1f52cc 100644 --- a/apps/contract-migration/requirements.txt +++ b/apps/contract-migration/requirements.txt @@ -1,10 +1,10 @@ -cic-eth[tools]==0.12.2a3 -eth-erc20>=0.0.11a1,<0.1.0 -erc20-demurrage-token>=0.0.2a5,<0.1.0 -eth-address-index>=0.1.3a1,<0.2.0 -eth-accounts-index>=0.0.13a1,<0.1.0 -cic-eth-registry>=0.5.7a1,<=0.6.0 -erc20-faucet>=0.2.3a1,<0.3.0 -erc20-transfer-authorization>=0.3.3a1,<0.4.0 -sarafu-faucet>=0.0.4a4,<0.1.0 -chainlib-eth>=0.0.6a1,<0.1.0 +cic-eth[tools]==0.12.2a4 +eth-erc20>=0.0.12a1,<0.1.0 +erc20-demurrage-token>=0.0.3a1,<0.1.0 +eth-address-index>=0.1.4a1,<0.2.0 +eth-accounts-index>=0.0.14a1,<0.1.0 +cic-eth-registry>=0.5.8a1,<0.6.0 +erc20-faucet>=0.2.4a1,<0.3.0 +erc20-transfer-authorization>=0.3.4a1,<0.4.0 +sarafu-faucet>=0.0.5a3,<0.1.0 +chainlib-eth>=0.0.7a1,<0.1.0 diff --git a/apps/contract-migration/reset.sh b/apps/contract-migration/reset.sh index ed6912c6..2c70946c 100755 --- a/apps/contract-migration/reset.sh +++ b/apps/contract-migration/reset.sh @@ -18,6 +18,7 @@ token_supply_limit: $TOKEN_SUPPLY_LIMIT EOF 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_ACCOUNTS_INDEX_WRITER=${DEV_ETH_ACCOUNT_RESERVE_MINTER:-$DEV_ETH_ACCOUNT_CONTRACT_DEPLOYER} 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 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 fi @@ -133,13 +135,22 @@ if [[ -n "${ETH_PROVIDER}" ]]; then # Sarafu 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 + >&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 - >&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 diff --git a/apps/contract-migration/seed_cic_eth.sh b/apps/contract-migration/seed_cic_eth.sh index aba7ea6c..539154c5 100755 --- a/apps/contract-migration/seed_cic_eth.sh +++ b/apps/contract-migration/seed_cic_eth.sh @@ -20,11 +20,11 @@ TOKEN_SYMBOL=$CIC_DEFAULT_TOKEN_SYMBOL DEV_ETH_ACCOUNT_CONTRACT_DEPLOYER=0xEb3907eCad74a0013c259D5874AE7f22DcBcC95C keystore_file=./keystore/UTC--2021-01-08T17-18-44.521011372Z--eb3907ecad74a0013c259d5874ae7f22dcbcc95c debug='-vv' -abi_dir=${ETH_ABI_DIR:-/usr/local/share/cic/solidity/abi} gas_amount=100000000000000000000000 token_amount=${gas_amount} env_out_file=${CIC_DATA_DIR}/.env_seed init_level_file=${CIC_DATA_DIR}/.init +empty_config_dir=$CONFINI_DIR/empty truncate $env_out_file -s 0 set -e @@ -33,9 +33,9 @@ set -a #pip install --extra-index-url $DEV_PIP_EXTRA_INDEX_URL eth-address-index==0.1.1a7 # 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_ACCOUNT_INDEX_ADDRESS=`eth-contract-registry-list -i $CIC_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_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 $CHAIN_SPEC -p $ETH_PROVIDER -r $CIC_REGISTRY_ADDRESS -f brief AccountRegistry` +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 <&2 echo "create account for gas gifter" 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 -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" -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 -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" -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 -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" #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 >&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 -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" -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 _CONFINI_DIR=$CONFINI_DIR unset CONFINI_DIR >&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 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 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 >&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 >&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)" 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 >&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 diff --git a/docker-compose.yml b/docker-compose.yml index 205e0713..e4f366df 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -79,16 +79,18 @@ services: args: pip_index_url: ${PIP_DEFAULT_INDEX_URL:-https://pypi.org/simple} 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 environment: CIC_REGISTRY_ADDRESS: $CIC_REGISTRY_ADDRESS - # ETH_PROVIDER should be broken out into host/port but cic-eth expects this - ETH_PROVIDER: http://eth:8545 + ETH_PROVIDER: ${CIC_HTTP_PROVIDER:-http://eth:8545} + RPC_HTTP_PROVIDER: ${CIC_HTTP_PROVIDER:-http://eth:8545} # And these two are for wait-for-it (could parse this) DEV_USE_DOCKER_WAIT_SCRIPT: 1 ETH_PROVIDER_HOST: eth 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} DATABASE_HOST: ${DATABASE_HOST:-postgres} DATABASE_PORT: ${DATABASE_PORT:-5432} @@ -135,7 +137,8 @@ services: EXTRA_INDEX_URL: ${EXTRA_INDEX_URL:-https://pip.grassrootseconomics.net:8433} environment: 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_PASSWORD: ${DATABASE_PASSWORD:-tralala} # this is is set at initdb see: postgres/initdb/create_db.sql DATABASE_HOST: ${DATABASE_HOST:-postgres} @@ -145,7 +148,8 @@ services: DATABASE_DRIVER: ${DATABASE_DRIVER:-psycopg2} DATABASE_DEBUG: 1 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_RESULT_URL: redis://redis:6379 deploy: @@ -184,7 +188,6 @@ services: DATABASE_DRIVER: ${DATABASE_DRIVER:-psycopg2} DATABASE_DEBUG: 1 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_CHAIN_SPEC: ${CIC_CHAIN_SPEC:-evm:bloxberg:8996} CELERY_BROKER_URL: redis://redis:6379 @@ -300,7 +303,8 @@ services: args: EXTRA_INDEX_URL: ${EXTRA_INDEX_URL:-https://pip.grassrootseconomics.net:8433} 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_HOST: ${DATABASE_HOST:-postgres} DATABASE_PASSWORD: ${DATABASE_PASSWORD:-tralala} @@ -309,7 +313,8 @@ services: DATABASE_ENGINE: ${DATABASE_ENGINE:-postgres} DATABASE_DRIVER: ${DATABASE_DRIVER:-psycopg2} 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 #BANCOR_DIR: $BANCOR_DIR CELERY_BROKER_URL: ${CELERY_BROKER_URL:-redis://redis}