Compare commits

...

11 Commits

Author SHA1 Message Date
75c944130b
bump: demurrage voucher (minor fixes) 2023-10-09 21:24:06 +08:00
837aa32831
deps: upgrade token index 2023-07-03 13:05:32 +08:00
lash
0b141252d2 Merge branch 'lash/split-reqs' 2023-05-19 07:13:50 +01:00
lash
5a07a6cf2b Merge branch 'lash/split-reqs-2' into lash/split-reqs 2023-05-19 07:10:41 +01:00
lash
ec804556aa
Upgrade chainlib-eth 2023-05-19 07:04:50 +01:00
lash
647d29decc
Upgrade eth-address-index to solve dependency problem 2023-05-15 15:18:03 +01:00
lash
93b43f9c5e
Update chainlib 2023-05-15 14:57:12 +01:00
5512da646c Split reqs into general and specific (#2)
`base_requirements.txt` can now be kept directly in sync with the `cicnet/cic` repo, as the proxy (and down the line maybe other things) are not relevant for the higher-level cic context.

Co-authored-by: lash <dev@holbrook.no>
Reviewed-on: #2
Co-authored-by: lash <accounts-grassrootseconomics@holbrook.no>
Co-committed-by: lash <accounts-grassrootseconomics@holbrook.no>
2023-05-10 13:29:49 +00:00
lash
2d9825165c
Update base requirements 2023-05-08 06:26:56 +01:00
lash
15df5cc5e5
split reqs to enable use of requirements copy from cic repo directly 2023-03-30 17:09:15 +01:00
2e4ea1eb87 Add custodial proxy and update defaults (#1)
Add:

- Custodial proxy contract

Fixes:

- Deploying the voucher takes a bit more than 5M

Also changed defaults:

- Voucher name
- Voucher symbol
- Faucet gift amount (worth 30 transfers)
- Faucet gift threshold (worth 5 transfers)
- Facuet period (every 24 hrs)

Co-authored-by: Mohammed Sohail <sohailsameja@gmail.com>
Reviewed-on: #1
Co-authored-by: Mohamed Sohail <kamikazechaser@noreply.localhost>
Co-committed-by: Mohamed Sohail <kamikazechaser@noreply.localhost>
2023-03-28 07:05:38 +00:00
4 changed files with 32 additions and 21 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
.venv/
.env

16
base_requirements.txt Normal file
View File

@ -0,0 +1,16 @@
chainlib-eth==0.4.23
chainlib==0.4.14
eth-erc20==0.7.3
eth-erc721==0.2.1
eth-erc712==0.0.1
ccw==0.0.6
eth-accounts-index==0.5.2
eth-contract-registry==0.11.0
erc20-faucet==0.8.0
eth-address-index==0.7.3
eth-token-index==0.6.2
eth-faucet==0.3.4
erc20-transfer-authorization==0.5.0
erc20-demurrage-token==0.5.6
eth-interface==0.1.1
#cic-contracts==0.2.0

18
boot.sh
View File

@ -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

View File

@ -1,16 +1 @@
chainlib-eth==0.4.17
chainlib==0.4.12
eth-erc20==0.7.3
eth-erc721==0.2.1
ccw==0.0.6
eth-accounts-index==0.5.1
eth-contract-registry==0.11.0
erc20-faucet==0.8.0
eth-address-index==0.7.2
eth-token-index==0.6.0
eth-faucet==0.3.4
erc20-transfer-authorization==0.5.0
erc20-demurrage-token==0.5.2
eth-interface==0.1.1
#cic-contracts==0.2.0
#defalsify-evm==0.2.0
custodial-registration-proxy==0.1.0