From 7f9cdbb320dc56bae6ab9b59227c5aa4314e7c31 Mon Sep 17 00:00:00 2001 From: Mohammed Sohail Date: Fri, 24 Mar 2023 08:40:31 +0300 Subject: [PATCH 1/5] fix: bump gas limit to 6M --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..055b8c0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.venv/ +.env -- 2.40.1 From 76fc15758385648f57e323cb21a2f3a46958e54a Mon Sep 17 00:00:00 2001 From: Mohammed Sohail Date: Fri, 24 Mar 2023 10:58:15 +0300 Subject: [PATCH 2/5] boot.sh: update optional parameters * gift = 30 transfers equivalent * threshold = 5 transfers equivalent * period = every 24 hrs * update training voucher name and symbol --- boot.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/boot.sh b/boot.sh index 50b5e4d..0ba80c1 100644 --- a/boot.sh +++ b/boot.sh @@ -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="Training Voucher" +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) -- 2.40.1 From 3eea3d64294f560dbb734aff22da3d9d4aaf8ad6 Mon Sep 17 00:00:00 2001 From: Mohammed Sohail Date: Mon, 27 Mar 2023 16:24:19 +0300 Subject: [PATCH 3/5] feat: add custodial proxy --- boot.sh | 8 ++++++-- requirements.txt | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/boot.sh b/boot.sh index 0ba80c1..d1e0b53 100644 --- a/boot.sh +++ b/boot.sh @@ -3,7 +3,7 @@ CHAIN_SPEC=${CHAIN_SPEC:-evm:celo:1337:celo} KEY_FILE=${KEY_FILE:-keyfile.json} RPC_DIALECT=${RPC_DIALECT:-chainlib_eth_celo} -TOKEN_NAME="Training Voucher" +TOKEN_NAME="TrainingVoucher" TOKEN_SYMBOL=TRN TOKEN_DECIMALS=6 TOKEN_DEMURRAGE=20000 @@ -67,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 diff --git a/requirements.txt b/requirements.txt index ba4eed1..ac4444f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,5 +12,6 @@ eth-faucet==0.3.4 erc20-transfer-authorization==0.5.0 erc20-demurrage-token==0.5.2 eth-interface==0.1.1 +custodial-registration-proxy #cic-contracts==0.2.0 #defalsify-evm==0.2.0 -- 2.40.1 From 03b46361f73a689f2450cff72e5f020b4eb86cce Mon Sep 17 00:00:00 2001 From: Mohammed Sohail Date: Mon, 27 Mar 2023 16:40:46 +0300 Subject: [PATCH 4/5] fix (deps): pin proxy version --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index ac4444f..1dec9fe 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,6 +12,6 @@ eth-faucet==0.3.4 erc20-transfer-authorization==0.5.0 erc20-demurrage-token==0.5.2 eth-interface==0.1.1 -custodial-registration-proxy +custodial-registration-proxy=0.1.0 #cic-contracts==0.2.0 #defalsify-evm==0.2.0 -- 2.40.1 From 8edf46a76b1e6513cd979f3d7cf53abb47a5b4f2 Mon Sep 17 00:00:00 2001 From: Mohammed Sohail Date: Tue, 28 Mar 2023 10:01:16 +0300 Subject: [PATCH 5/5] fix: typo in pinned requirement --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 1dec9fe..160ed0a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,6 +12,6 @@ eth-faucet==0.3.4 erc20-transfer-authorization==0.5.0 erc20-demurrage-token==0.5.2 eth-interface==0.1.1 -custodial-registration-proxy=0.1.0 +custodial-registration-proxy==0.1.0 #cic-contracts==0.2.0 #defalsify-evm==0.2.0 -- 2.40.1