Merge upstream contract migration
This commit is contained in:
@@ -1,14 +1,22 @@
|
||||
#FROM ethereum/solc:0.6.12
|
||||
FROM ethereum/solc:0.8.0
|
||||
# syntax = docker/dockerfile:1.2
|
||||
FROM python:3.8.6-slim-buster as compile-image
|
||||
|
||||
# The solc image messes up the alpine environment, so we have to go all over again
|
||||
FROM alpine
|
||||
COPY --from=0 /usr/bin/solc /usr/bin/solc
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y --no-install-recommends git gcc g++ libpq-dev gawk jq telnet wget openssl iputils-ping gnupg socat bash procps make python2 cargo
|
||||
|
||||
RUN apk update && \
|
||||
apk add make git
|
||||
|
||||
WORKDIR /usr/src
|
||||
RUN apt-get install -y software-properties-common
|
||||
RUN add-apt-repository ppa:ethereum/ethereum
|
||||
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 1C52189C923F6CA9
|
||||
RUN apt-get update
|
||||
RUN apt-get install solc
|
||||
RUN pip install --upgrade pip
|
||||
|
||||
WORKDIR /root
|
||||
RUN mkdir -vp /usr/local/etc/cic
|
||||
|
||||
COPY contract-migration/nvm.sh .
|
||||
ENV CONFINI_DIR /usr/local/etc/cic/
|
||||
RUN mkdir -vp $CONFINI_DIR
|
||||
|
||||
ARG cic_config_commit=35c69ba75f00c8147150acf325565d5391cf25bf
|
||||
ARG cic_config_url=https://gitlab.com/grassrootseconomics/cic-config.git/
|
||||
@@ -16,11 +24,8 @@ RUN echo Install confini schema files && \
|
||||
git clone --depth 1 $cic_config_url cic-config && \
|
||||
cd cic-config && \
|
||||
git fetch --depth 1 origin $cic_config_commit && \
|
||||
git checkout $cic_config_commit && \
|
||||
mkdir -vp /usr/local/etc/cic && \
|
||||
cp -v *.ini /usr/local/etc/cic/
|
||||
ENV CONFINI_DIR /usr/local/etc/cic
|
||||
|
||||
git checkout $cic_config_commit && \
|
||||
cp -v *.ini $CONFINI_DIR
|
||||
|
||||
ARG cic_contracts_commit=698ef3a30fde8d7f2c498f1208fb0ff45d665501
|
||||
ARG cic_contracts_url=https://gitlab.com/grassrootseconomics/cic-contracts.git/
|
||||
@@ -31,30 +36,6 @@ RUN echo Install ABI collection for solidity interfaces used across all componen
|
||||
git checkout $cic_contracts_commit && \
|
||||
make install
|
||||
|
||||
#COPY ./Makefile ./cic-contracts/Makefile
|
||||
#COPY ./*.sol ./cic-contracts/
|
||||
|
||||
#RUN cd cic-contracts && \
|
||||
# make -B && make install -B
|
||||
|
||||
FROM python:3.8.6-slim-buster
|
||||
|
||||
COPY --from=1 /usr/local/share/cic/ /usr/local/share/cic/
|
||||
COPY --from=1 /usr/local/etc/ /usr/local/etc/
|
||||
|
||||
LABEL authors="Louis Holbrook <dev@holbrook.no> 0826EDA1702D1E87C6E2875121D2E7BB88C2A746"
|
||||
LABEL spdx-license-identifier="GPL-3.0-or-later"
|
||||
LABEL description="Base layer for buiding development images for the cic component suite"
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y git gcc g++ libpq-dev && \
|
||||
apt-get install -y vim gawk jq telnet openssl iputils-ping curl wget gnupg socat bash procps make python2 postgresql-client
|
||||
|
||||
|
||||
RUN echo installing nodejs tooling
|
||||
|
||||
COPY contract-migration/nvm.sh /root/
|
||||
|
||||
# Install nvm with node and npm
|
||||
# https://stackoverflow.com/questions/25899912/how-to-install-nvm-in-docker
|
||||
ENV NVM_DIR /root/.nvm
|
||||
@@ -65,67 +46,95 @@ RUN wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh |
|
||||
&& . $NVM_DIR/nvm.sh \
|
||||
&& nvm install $NODE_VERSION \
|
||||
&& nvm alias default $NODE_VERSION \
|
||||
&& nvm use $NODE_VERSION \
|
||||
# So many ridiculously stupid issues with node in docker that take oceans of absolutely wasted time to resolve
|
||||
# owner of these files is "1001" by default - wtf
|
||||
&& chown -R root:root "$NVM_DIR/versions/node/v$NODE_VERSION"
|
||||
&& nvm use $NODE_VERSION
|
||||
# && chown -R root:root "$NVM_DIR/versions/node/v$NODE_VERSION"
|
||||
|
||||
ENV NODE_PATH $NVM_DIR/versions/node//v$NODE_VERSION/lib/node_modules
|
||||
ENV PATH $NVM_DIR/versions/node//v$NODE_VERSION/bin:$PATH
|
||||
|
||||
RUN useradd --create-home grassroots
|
||||
WORKDIR /home/grassroots
|
||||
USER grassroots
|
||||
|
||||
ARG pip_extra_index_url=https://pip.grassrootseconomics.net:8433
|
||||
ARG cic_base_version=0.1.1a23
|
||||
ARG cic_registry_version=0.5.3a24
|
||||
ARG cic_eth_version=0.10.0a41
|
||||
ARG chainlib_version=0.0.1a21
|
||||
ARG cic_contracts_version=0.0.2a2
|
||||
RUN pip install --user --extra-index-url $pip_extra_index_url cic-base[full_graph]==$cic_base_version \
|
||||
cic-registry==$cic_registry_version \
|
||||
cic-eth==$cic_eth_version \
|
||||
chainlib==$chainlib_version \
|
||||
cic-contracts==$cic_contracts_version
|
||||
|
||||
# ARG cic_bancor_url=https://gitlab.com/grassrootseconomics/cic-bancor.git/
|
||||
# ARG cic_bancor_contracts_url=https://github.com/bancorprotocol/contracts-solidity
|
||||
# RUN echo Compile and install bancor protocol contracts && \
|
||||
# git clone --depth 1 $cic_bancor_url cic-bancor && \
|
||||
# cd cic-bancor
|
||||
|
||||
# RUN cd cic-bancor/python && \
|
||||
# pip install --extra-index-url $pip_extra_index_url .
|
||||
|
||||
# This is a temporary solution for building the Bancor contracts using the bancor protocol repository truffle setup
|
||||
# We should instead flatten the files ourselves and build them with solc in the first image layer in this file
|
||||
ARG cic_bancor_commit=a04c7ae6882ea515938d852cc861d59a35070094
|
||||
ARG cic_bancor_url=https://gitlab.com/grassrootseconomics/cic-bancor.git/
|
||||
ARG cic_bancor_contracts_url=https://github.com/bancorprotocol/contracts-solidity
|
||||
RUN echo Compile and install bancor protocol contracts && \
|
||||
git clone --depth 1 $cic_bancor_url cic-bancor && \
|
||||
cd cic-bancor && \
|
||||
git fetch --depth 1 origin $cic_bancor_commit && \
|
||||
git checkout $cic_bancor_commit && \
|
||||
# Apparently the git version here doesn't have set-url as a command. *sigh*
|
||||
#if [ ! -z $cic_bancor_contracts_url ]; then
|
||||
# git submodule set-url bancor $cic_bancor_contracts_url
|
||||
#fi
|
||||
git submodule init && \
|
||||
git submodule update
|
||||
RUN cd root && \
|
||||
. $NVM_DIR/nvm.sh &&\
|
||||
nvm install $BANCOR_NODE_VERSION && \
|
||||
nvm use $BANCOR_NODE_VERSION && \
|
||||
cd - && \
|
||||
cd cic-bancor/bancor && \
|
||||
npm install --python=/usr/bin/python2 && \
|
||||
node_modules/truffle/build/cli.bundled.js compile && \
|
||||
mkdir -vp /usr/local/share/cic/bancor/solidity/build && \
|
||||
cp -vR solidity/build/contracts /usr/local/share/cic/bancor/solidity/build/
|
||||
RUN cd cic-bancor/python && \
|
||||
pip install --extra-index-url $pip_extra_index_url .
|
||||
# ARG cic_bancor_commit=a04c7ae6882ea515938d852cc861d59a35070094
|
||||
# ARG cic_bancor_url=https://gitlab.com/grassrootseconomics/cic-bancor.git/
|
||||
# ARG cic_bancor_contracts_url=https://github.com/bancorprotocol/contracts-solidity
|
||||
# RUN echo Compile and install bancor protocol contracts && \
|
||||
# git clone --depth 1 $cic_bancor_url cic-bancor && \
|
||||
# cd cic-bancor && \
|
||||
# git fetch --depth 1 origin $cic_bancor_commit && \
|
||||
# git checkout $cic_bancor_commit && \
|
||||
# # Apparently the git version here doesn't have set-url as a command. *sigh*
|
||||
# #if [ ! -z $cic_bancor_contracts_url ]; then
|
||||
# # git submodule set-url bancor $cic_bancor_contracts_url
|
||||
# #fi
|
||||
# git submodule init && \
|
||||
# git submodule update
|
||||
# RUN cd root && \
|
||||
# . $NVM_DIR/nvm.sh &&\
|
||||
# nvm install $BANCOR_NODE_VERSION && \
|
||||
# nvm use $BANCOR_NODE_VERSION && \
|
||||
# cd - && \
|
||||
# cd cic-bancor/bancor && \
|
||||
# npm install --python=/usr/bin/python2 && \
|
||||
# node_modules/truffle/build/cli.bundled.js compile && \
|
||||
# mkdir -vp /usr/local/share/cic/bancor/solidity/build && \
|
||||
# cp -vR solidity/build/contracts /usr/local/share/cic/bancor/solidity/build/
|
||||
# RUN cd cic-bancor/python && \
|
||||
# pip install --extra-index-url $pip_extra_index_url .
|
||||
|
||||
FROM python:3.8.6-slim-buster as runtime-image
|
||||
|
||||
RUN apt-get install -y cargo
|
||||
ARG cic_base_version=0.1.1a30
|
||||
RUN pip install --extra-index-url $pip_extra_index_url cic-base[full_graph]==$cic_base_version
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y --no-install-recommends gnupg libpq-dev
|
||||
|
||||
ARG cic_registry_version=0.5.3a24
|
||||
RUN pip install --extra-index-url $pip_extra_index_url cic-registry==$cic_registry_version
|
||||
COPY --from=compile-image /usr/local/bin/ /usr/local/bin/
|
||||
COPY --from=compile-image /usr/local/etc/cic/ /usr/local/etc/cic/
|
||||
|
||||
WORKDIR /root
|
||||
RUN useradd --create-home grassroots
|
||||
WORKDIR /home/grassroots
|
||||
# COPY python dependencies to user dir
|
||||
COPY --from=compile-image /home/grassroots/.local .local
|
||||
ENV PATH=/home/grassroots/.local/bin:$PATH
|
||||
|
||||
COPY contract-migration/testdata/pgp testdata/pgp
|
||||
COPY contract-migration/wait-for-it.sh .
|
||||
RUN chmod +x ./wait-for-it.sh
|
||||
|
||||
# COPY contract-migration/.env_config_template .env_config_template
|
||||
# COPY contract-migration/.env_dockercompose_template .env_dockercompose_template
|
||||
|
||||
COPY contract-migration/reset.sh reset.sh
|
||||
COPY contract-migration/from_env.sh from_env.sh
|
||||
COPY contract-migration/seed_cic_eth.sh seed_cic_eth.sh
|
||||
COPY contract-migration/sarafu_declaration.json sarafu_declaration.json
|
||||
COPY contract-migration/keystore keystore
|
||||
COPY contract-migration/envlist .
|
||||
COPY contract-migration/*.sh ./
|
||||
|
||||
ENTRYPOINT [ "/bin/bash" ]
|
||||
# RUN chown grassroots:grassroots .local/
|
||||
RUN chown grassroots:grassroots -R .
|
||||
RUN chmod gu+x *.sh
|
||||
|
||||
RUN mkdir -p /tmp/cic/config
|
||||
RUN chown grassroots:grassroots /tmp/cic/config
|
||||
# A shared output dir for environment configs
|
||||
RUN chmod a+rwx /tmp/cic/config
|
||||
|
||||
USER grassroots
|
||||
|
||||
ENTRYPOINT [ ]
|
||||
|
||||
61
apps/contract-migration/envlist
Normal file
61
apps/contract-migration/envlist
Normal file
@@ -0,0 +1,61 @@
|
||||
SYNCER_LOOP_INTERVAL
|
||||
SSL_ENABLE_CLIENT
|
||||
SSL_CERT_FILE
|
||||
SSL_KEY_FILE
|
||||
SSL_PASSWORD
|
||||
SSL_CA_FILE
|
||||
BANCOR_DIR
|
||||
REDIS_HOST
|
||||
REDIS_PORT
|
||||
REDIS_DB
|
||||
PGP_EXPORTS_DIR
|
||||
PGP_PRIVATEKEY_FILE
|
||||
PGP_PASSPHRASE
|
||||
DATABASE_USER
|
||||
DATABASE_PASSWORD
|
||||
DATABASE_NAME
|
||||
DATABASE_HOST
|
||||
DATABASE_PORT
|
||||
DATABASE_ENGINE
|
||||
DATABASE_DRIVER
|
||||
DATABASE_DEBUG
|
||||
TASKS_AFRICASTALKING
|
||||
TASKS_SMS_DB
|
||||
TASKS_LOG
|
||||
TASKS_TRACE_QUEUE_STATUS
|
||||
TASKS_TRANSFER_CALLBACKS
|
||||
DEV_MNEMONIC
|
||||
DEV_ETH_RESERVE_ADDRESS
|
||||
DEV_ETH_ACCOUNTS_INDEX_ADDRESS
|
||||
DEV_ETH_RESERVE_AMOUNT
|
||||
DEV_ETH_ACCOUNT_BANCOR_DEPLOYER
|
||||
DEV_ETH_ACCOUNT_CONTRACT_DEPLOYER
|
||||
DEV_ETH_ACCOUNT_GAS_PROVIDER
|
||||
DEV_ETH_ACCOUNT_RESERVE_OWNER
|
||||
DEV_ETH_ACCOUNT_RESERVE_MINTER
|
||||
DEV_ETH_ACCOUNT_ACCOUNTS_INDEX_OWNER
|
||||
DEV_ETH_ACCOUNT_ACCOUNTS_INDEX_WRITER
|
||||
DEV_ETH_ACCOUNT_SARAFU_OWNER
|
||||
DEV_ETH_ACCOUNT_SARAFU_GIFTER
|
||||
DEV_ETH_ACCOUNT_APPROVAL_ESCROW_OWNER
|
||||
DEV_ETH_ACCOUNT_SINGLE_SHOT_FAUCET_OWNER
|
||||
DEV_ETH_SARAFU_TOKEN_NAME
|
||||
DEV_ETH_SARAFU_TOKEN_SYMBOL
|
||||
DEV_ETH_SARAFU_TOKEN_DECIMALS
|
||||
DEV_ETH_SARAFU_TOKEN_ADDRESS
|
||||
DEV_PGP_PUBLICKEYS_ACTIVE_FILE
|
||||
DEV_PGP_PUBLICKEYS_TRUSTED_FILE
|
||||
DEV_PGP_PUBLICKEYS_ENCRYPT_FILE
|
||||
CIC_REGISTRY_ADDRESS
|
||||
CIC_APPROVAL_ESCROW_ADDRESS
|
||||
CIC_TOKEN_INDEX_ADDRESS
|
||||
CIC_ACCOUNTS_INDEX_ADDRESS
|
||||
CIC_DECLARATOR_ADDRESS
|
||||
CIC_CHAIN_SPEC
|
||||
ETH_PROVIDER
|
||||
ETH_ABI_DIR
|
||||
SIGNER_SOCKET_PATH
|
||||
SIGNER_SECRET
|
||||
CELERY_BROKER_URL
|
||||
CELERY_RESULT_URL
|
||||
META_PROVIDER
|
||||
@@ -19,6 +19,12 @@ echo \n
|
||||
# pushd /usr/src
|
||||
|
||||
init_level_file=${CIC_DATA_DIR}/.init
|
||||
if [ ! -f ${CIC_DATA_DIR}/.init ]; then
|
||||
echo "Creating .init file..."
|
||||
mkdir -p $CIC_DATA_DIR
|
||||
touch /tmp/cic/config/.init
|
||||
# touch $init_level_file
|
||||
fi
|
||||
echo -n 1 > $init_level_file
|
||||
|
||||
# Abort on any error (including if wait-for-it fails).
|
||||
@@ -61,10 +67,10 @@ export DEV_ETH_ACCOUNTS_INDEX_ADDRESS=$CIC_ACCOUNTS_INDEX_ADDRESS
|
||||
export BANCOR_REGISTRY_ADDRESS=$BANCOR_REGISTRY_ADDRESS
|
||||
export CIC_REGISTRY_ADDRESS=$CIC_REGISTRY_ADDRESS
|
||||
export CIC_TRUST_ADDRESS=$DEV_ETH_ACCOUNT_CONTRACT_DEPLOYER
|
||||
|
||||
export CIC_DECLARATOR_ADDRESS=$CIC_DECLARATOR_ADDRESS
|
||||
EOF
|
||||
|
||||
cat $CIC_DATA_DIR/envlist | bash from_env.sh > $CIC_DATA_DIR/.env_all
|
||||
cat ./envlist | bash from_env.sh > $CIC_DATA_DIR/.env_all
|
||||
# popd
|
||||
|
||||
set +a
|
||||
|
||||
11
apps/contract-migration/run_job.sh
Normal file
11
apps/contract-migration/run_job.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
#! /bin/bash
|
||||
|
||||
if [[ $RUN_LEVEL -gt 0 ]]
|
||||
then
|
||||
./reset.sh
|
||||
fi
|
||||
|
||||
if [[ $RUN_LEVEL -gt 1 ]]
|
||||
then
|
||||
./seed_cic_eth.sh
|
||||
fi
|
||||
@@ -1,3 +1,3 @@
|
||||
cic-base[full_graph]==0.1.1a28
|
||||
cic-eth==0.10.0a46
|
||||
cic-base[full_graph]==0.1.1a23
|
||||
cic-eth==0.10.0a41
|
||||
cic-types==0.1.0a8
|
||||
|
||||
@@ -68,7 +68,6 @@ if args.v == True:
|
||||
logging.getLogger().setLevel(logging.INFO)
|
||||
elif args.vv == True:
|
||||
logging.getLogger().setLevel(logging.DEBUG)
|
||||
verbose = args.vv or args.v
|
||||
|
||||
config_dir = os.path.join(args.c)
|
||||
os.makedirs(config_dir, 0o777, True)
|
||||
@@ -314,8 +313,7 @@ def main():
|
||||
r = l.split(',')
|
||||
try:
|
||||
address = to_checksum(r[0])
|
||||
if not verbose:
|
||||
sys.stdout.write('loading balance {} {}'.format(i, address).ljust(200) + "\r")
|
||||
#sys.stdout.write('loading balance {} {}'.format(i, address).ljust(200) + "\r")
|
||||
logg.debug('loading balance {} {}'.format(i, address).ljust(200))
|
||||
except ValueError:
|
||||
break
|
||||
@@ -330,7 +328,6 @@ def main():
|
||||
verifier = Verifier(conn, api, gas_oracle, chain_spec, account_index_address, sarafu_token_address, user_dir, exit_on_error)
|
||||
|
||||
user_new_dir = os.path.join(user_dir, 'new')
|
||||
i = 0
|
||||
for x in os.walk(user_new_dir):
|
||||
for y in x[2]:
|
||||
if y[len(y)-5:] != '.json':
|
||||
@@ -346,8 +343,6 @@ def main():
|
||||
f.close()
|
||||
|
||||
u = Person.deserialize(o)
|
||||
if not verbose:
|
||||
sys.stdout.write('processing {} {}'.format(i, u.identities['evm']).ljust(200) + "\r")
|
||||
logg.debug('data {}'.format(u.identities['evm']))
|
||||
|
||||
subchain_str = '{}:{}'.format(chain_spec.common_name(), chain_spec.network_id())
|
||||
@@ -362,7 +357,6 @@ def main():
|
||||
logg.debug('checking {} -> {} = {}'.format(old_address, new_address, balance))
|
||||
|
||||
verifier.verify(new_address, balance)
|
||||
i += 1
|
||||
|
||||
print(verifier)
|
||||
|
||||
|
||||
17
apps/contract-migration/seed_cic_eth.sh
Normal file → Executable file
17
apps/contract-migration/seed_cic_eth.sh
Normal file → Executable file
@@ -26,13 +26,11 @@ env_out_file=${CIC_DATA_DIR}/.env_seed
|
||||
init_level_file=${CIC_DATA_DIR}/.init
|
||||
truncate $env_out_file -s 0
|
||||
|
||||
pip install --extra-index-url https://pip.grassrootseconomics.net:8433 chainlib==0.0.1a22
|
||||
|
||||
set -e
|
||||
set -a
|
||||
|
||||
# We need to not install these here...
|
||||
pip install --extra-index-url $DEV_PIP_EXTRA_INDEX_URL cic-eth==0.10.0a46 chainlib==0.0.1a25 cic-contracts==0.0.2a2
|
||||
|
||||
>&2 echo "create account for gas gifter"
|
||||
old_gas_provider=$DEV_ETH_ACCOUNT_GAS_PROVIDER
|
||||
DEV_ETH_ACCOUNT_GAS_GIFTER=`cic-eth-create $debug --redis-host-callback=$REDIS_HOST --redis-port-callback=$REDIS_PORT --no-register`
|
||||
@@ -55,9 +53,9 @@ cic-eth-tag TRANSFER_AUTHORIZATION_OWNER $DEV_ETH_ACCOUNT_TRANSFER_AUTHORIZATION
|
||||
#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-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 ACCOUNT_REGISTRY_WRITER $DEV_ETH_ACCOUNT_ACCOUNT_REGISTRY_WRITER
|
||||
DEV_ETH_ACCOUNT_ACCOUNTS_INDEX_WRITER=`cic-eth-create $debug --redis-host-callback=$REDIS_HOST --redis-port-callback=$REDIS_PORT --no-register`
|
||||
echo DEV_ETH_ACCOUNT_ACCOUNTS_INDEX_WRITER=$DEV_ETH_ACCOUNT_ACCOUNTS_INDEX_WRITER >> $env_out_file
|
||||
cic-eth-tag ACCOUNTS_INDEX_WRITER $DEV_ETH_ACCOUNT_ACCOUNTS_INDEX_WRITER
|
||||
|
||||
|
||||
# Transfer gas to custodial gas provider adddress
|
||||
@@ -68,7 +66,7 @@ cic-eth-tag ACCOUNT_REGISTRY_WRITER $DEV_ETH_ACCOUNT_ACCOUNT_REGISTRY_WRITER
|
||||
>&2 eth-gas -y $keystore_file -i $CIC_CHAIN_SPEC -p $ETH_PROVIDER -w $debug $DEV_ETH_ACCOUNT_SARAFU_GIFTER $gas_amount
|
||||
|
||||
>&2 echo gift gas to account index owner
|
||||
>&2 eth-gas -y $keystore_file -i $CIC_CHAIN_SPEC -p $ETH_PROVIDER -w $debug $DEV_ETH_ACCOUNT_ACCOUNT_REGISTRY_WRITER $gas_amount
|
||||
>&2 eth-gas -y $keystore_file -i $CIC_CHAIN_SPEC -p $ETH_PROVIDER -w $debug $DEV_ETH_ACCOUNT_ACCOUNTS_INDEX_WRITER $gas_amount
|
||||
|
||||
# Send token to token creator
|
||||
>&2 echo "gift tokens to sarafu owner"
|
||||
@@ -100,7 +98,7 @@ export CIC_TRANSFER_AUTHORIZATION_ADDRESS=$CIC_TRANSFER_AUTHORIZATION_ADDRESS
|
||||
|
||||
# Deploy one-time token faucet for newly created token
|
||||
>&2 echo "deploy faucet"
|
||||
DEV_ETH_SARAFU_FAUCET_ADDRESS=`sarafu-faucet-deploy -y $keystore_file -i $CIC_CHAIN_SPEC -p $ETH_PROVIDER --token-address $DEV_ETH_SARAFU_TOKEN_ADDRESS --editor $DEV_ETH_ACCOUNT_CONTRACT_DEPLOYER --set-amount $faucet_amount --accounts-index-address $DEV_ETH_ACCOUNT_REGISTRY_ADDRESS -w $debug`
|
||||
DEV_ETH_SARAFU_FAUCET_ADDRESS=`sarafu-faucet-deploy -y $keystore_file -i $CIC_CHAIN_SPEC -p $ETH_PROVIDER --token-address $DEV_ETH_SARAFU_TOKEN_ADDRESS --editor $DEV_ETH_ACCOUNT_CONTRACT_DEPLOYER --set-amount $faucet_amount --accounts-index-address $DEV_ETH_ACCOUNTS_INDEX_ADDRESS -w $debug`
|
||||
echo DEV_ETH_SARAFU_FAUCET_ADDRESS=$DEV_ETH_SARAFU_FAUCET_ADDRESS >> $env_out_file
|
||||
export DEV_ETH_SARAFU_FAUCET_ADDRESS=$DEV_ETH_SARAFU_FAUCET_ADDRESS
|
||||
|
||||
@@ -128,6 +126,7 @@ export CIC_TOKEN_INDEX_ADDRESS=$CIC_TOKEN_INDEX_ADDRESS
|
||||
>&2 echo "add declarations for sarafu token"
|
||||
token_description_one=`sha256sum sarafu_declaration.json | awk '{ print $1; }'`
|
||||
token_description_two=0x54686973206973207468652053617261667520746f6b656e0000000000000000
|
||||
echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> foo $CIC_DECLARATOR_ADDRESSh"
|
||||
>&2 eth-address-declarator-add -y $keystore_file -i $CIC_CHAIN_SPEC -p $ETH_PROVIDER -r $CIC_DECLARATOR_ADDRESS -w $debug $DEV_ETH_SARAFU_TOKEN_ADDRESS $token_description_one
|
||||
>&2 eth-address-declarator-add -y $keystore_file -i $CIC_CHAIN_SPEC -p $ETH_PROVIDER -r $CIC_DECLARATOR_ADDRESS -w $debug $DEV_ETH_SARAFU_TOKEN_ADDRESS $token_description_two
|
||||
|
||||
@@ -143,7 +142,7 @@ token_description_two=0x54686973206973207468652053617261667520746f6b656e00000000
|
||||
|
||||
# Add accounts index writer with key from keystore
|
||||
>&2 echo "add keystore account $keystore_file to accounts index writers"
|
||||
>&2 eth-accounts-index-add -y $keystore_file -i $CIC_CHAIN_SPEC -p $ETH_PROVIDER -r $CIC_ACCOUNT_REGISTRY_ADDRESS --writer $DEV_ETH_ACCOUNT_ACCOUNT_REGISTRY_WRITER -w $debug
|
||||
>&2 eth-accounts-index-add -y $keystore_file -i $CIC_CHAIN_SPEC -p $ETH_PROVIDER -r $CIC_ACCOUNTS_INDEX_ADDRESS --writer $DEV_ETH_ACCOUNT_ACCOUNTS_INDEX_WRITER -w $debug
|
||||
|
||||
echo -n 0 > $init_level_file
|
||||
|
||||
|
||||
Reference in New Issue
Block a user