|
|
|
@ -3,15 +3,19 @@ CHAIN_SPEC=${CHAIN_SPEC:-evm:celo:1337:celo}
|
|
|
|
|
KEY_FILE=${KEY_FILE:-keyfile.json}
|
|
|
|
|
RPC_DIALECT=${RPC_DIALECT:-chainlib_eth_celo}
|
|
|
|
|
|
|
|
|
|
TOKEN_NAME="Testtoken"
|
|
|
|
|
TOKEN_SYMBOL=TST
|
|
|
|
|
TOKEN_NAME="TrainingVoucher"
|
|
|
|
|
TOKEN_SYMBOL=TRN
|
|
|
|
|
TOKEN_DECIMALS=6
|
|
|
|
|
TOKEN_DEMURRAGE=20000
|
|
|
|
|
TOKEN_PERIOD=43200
|
|
|
|
|
TOKEN_SINK_ADDRESS=${TOKEN_SINK_ADDRESS:-Eb3907eCad74a0013c259D5874AE7f22DcBcC95C}
|
|
|
|
|
GAS_FAUCET_AMOUNT=${GAS_FAUCET_AMOUNT:-20000000}
|
|
|
|
|
# 30 * 20000000010 * 100000
|
|
|
|
|
GAS_FAUCET_AMOUNT=${GAS_FAUCET_AMOUNT:-60000000030000000}
|
|
|
|
|
# 5 * 20000000010 * 100000
|
|
|
|
|
GAS_FAUCET_THRESHOLD=${GAS_FAUCET_THRESHOLD:-10000000005000000}
|
|
|
|
|
# 24 hrs
|
|
|
|
|
GAS_FAUCET_PERIOD=${GAS_FAUCET_PERIOD:-86400}
|
|
|
|
|
log='-v'
|
|
|
|
|
|
|
|
|
|
set +e
|
|
|
|
|
|
|
|
|
|
t=$(mktemp -d)
|
|
|
|
@ -63,14 +67,18 @@ eth-encode -y $KEY_FILE --mode tx --signature addWriter a:$writer -e $(eth-check
|
|
|
|
|
eth-encode -y $KEY_FILE --mode tx --signature addWriter a:$writer -e $(eth-checksum $token) --fee-limit 100000 -s -w $log
|
|
|
|
|
eth-encode -y $KEY_FILE --mode tx --signature addWriter a:$writer -e $(eth-checksum $index) --fee-limit 100000 -s -w $log
|
|
|
|
|
|
|
|
|
|
# publish custodial registration proxy
|
|
|
|
|
proxy=$(ge-custodial-registration-proxy-publish -y $KEY_FILE --fee-limit 2000000 -s -w $log --eth-faucet-address $gasfaucet --account-index-address $accounts --training-voucher-address $token --system-account-address $publisher | tee $t/proxy.txt)
|
|
|
|
|
|
|
|
|
|
# publish contract registry
|
|
|
|
|
contracts=$(eth-contract-registry-publish -y $KEY_FILE --fee-limit 2000000 -s -w $log --identifier TrainingVoucher --identifier AccountIndex --identifier TokenIndex --identifier GasFaucet | tee $t/contracts.txt)
|
|
|
|
|
contracts=$(eth-contract-registry-publish -y $KEY_FILE --fee-limit 2000000 -s -w $log --identifier TrainingVoucher --identifier AccountIndex --identifier TokenIndex --identifier GasFaucet --identifier CustodialRegistrationProxy | tee $t/contracts.txt)
|
|
|
|
|
contracts=$(eth-checksum $contracts)
|
|
|
|
|
|
|
|
|
|
eth-contract-registry-set -y $KEY_FILE --fee-limit 100000 -s -w $log -e $contracts -a $(eth-checksum $token) TrainingVoucher
|
|
|
|
|
eth-contract-registry-set -y $KEY_FILE --fee-limit 100000 -s -w $log -e $contracts -a $(eth-checksum $accounts) AccountIndex
|
|
|
|
|
eth-contract-registry-set -y $KEY_FILE --fee-limit 100000 -s -w $log -e $contracts -a $(eth-checksum $index) TokenIndex
|
|
|
|
|
eth-contract-registry-set -y $KEY_FILE --fee-limit 100000 -s -w $log -e $contracts -a $(eth-checksum $gasfaucet) GasFaucet
|
|
|
|
|
eth-contract-registry-set -y $KEY_FILE --fee-limit 100000 -s -w $log -e $contracts -a $(eth-checksum $proxy) CustodialRegistrationProxy
|
|
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
|
|