Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
3955800
chore: add ETH instant withdraw implementation
zhoujia6139 Mar 10, 2023
d9b8166
chore: use ERC1155 for collateral NFT
zhoujia6139 Mar 10, 2023
3b1aee5
Merge branch 'main' into eth_instant_withdraw
zhoujia6139 Mar 10, 2023
da4867d
chore: add utilization check
zhoujia6139 Mar 11, 2023
0ca4da7
chore: fix some issue and add more test case
zhoujia6139 Mar 13, 2023
c251722
chore: fix typo
zhoujia6139 Mar 13, 2023
122bbba
chore: merge Oracle interface and withdraw NFT interface
zhoujia6139 Mar 13, 2023
3bb1016
chore: deployment script(wETH, awETH, stETH, wstETH)
zhoujia6139 Mar 15, 2023
aab411f
chore: add multicall to support complex operation
zhoujia6139 Mar 15, 2023
83ba1ae
chore: fix deploy
zhoujia6139 Mar 15, 2023
ecfdee6
chore: deploy stable debt token address for all asset
zhoujia6139 Mar 16, 2023
8bf3282
chore: protect goerli paraproxyinterfaces
0x8f701 Mar 21, 2023
3cf9d61
chore: support mnemonic in anvil fork
0x8f701 Mar 21, 2023
cc06130
fix: warning
0x8f701 Mar 21, 2023
15722c3
chore: bump hardhat
0x8f701 Mar 21, 2023
d90d8ea
chore: bump version
0x8f701 Mar 21, 2023
af0e157
Merge remote-tracking branch 'origin/main' into eth_instant_withdraw
0x8f701 Mar 21, 2023
8f033e7
fix: add missing stableBorrowing flag
0x8f701 Mar 21, 2023
f9c90cf
Merge branch 'main' into eth_instant_withdraw
zhoujia6139 Mar 27, 2023
47d85f4
chore: fix lint
zhoujia6139 Mar 27, 2023
11526ee
chore: fix and extract total debt calculation logic
zhoujia6139 Mar 28, 2023
393306a
chore: add event
zhoujia6139 Mar 28, 2023
847be59
feat: initiate eth withdrawal (#339)
0x8f701 Mar 28, 2023
fd70146
fix: build
0x8f701 Mar 28, 2023
1062dfa
fix: size
0x8f701 Mar 28, 2023
c409605
chore: remove unused exitEpoch,withdrawableEpoch
0x8f701 Mar 28, 2023
cbf1703
chore: rename
0x8f701 Mar 28, 2023
896d988
chore: use dynamic uri
0x8f701 Mar 28, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ logs
*.swp

out/
app/
33 changes: 33 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ test-pool-initialization:
test-ntoken:
make TEST_TARGET=_xtoken_ntoken.spec.ts test

.PHONY: test-eth-withdrawal
test-eth-withdrawal:
make TEST_TARGET=_eth_withdrawal.spec.ts test

.PHONY: test-ntoken-punk
test-ntoken-punk:
make TEST_TARGET=ntoken-punk.spec.ts test
Expand Down Expand Up @@ -428,10 +432,36 @@ send-eth:
set-traits-multipliers:
make SCRIPT_PATH=./scripts/dev/11.set-traits-multipliers.ts run

.PHONY: setup-validators
setup-validators:
make TASK_NAME=setup-validators run-task

.PHONY: list-validators
list-validators:
make TASK_NAME=list-validators run-task

.PHONY: register-validators
register-validators:
make TASK_NAME=register-validators run-task

.PHONY: shutdown-validators
shutdown-validators:
docker-compose \
-f app/docker-compose.yml \
down \
--volumes \
--remove-orphans > /dev/null 2>&1 || true
sudo rm -fr app || true
docker volume prune -f

.PHONY: set-timelock-strategy
set-timelock-strategy:
make SCRIPT_PATH=./scripts/dev/12.set-timelock-strategy.ts run

.PHONY: upgrade-eth-instant-withdraw
upgrade-eth-instant-withdraw:
make SCRIPT_PATH=./scripts/dev/12.update-eth-instant-withdraw.ts run

.PHONY: transfer-tokens
transfer-tokens:
make SCRIPT_PATH=./scripts/dev/2.transfer-tokens.ts run
Expand Down Expand Up @@ -653,9 +683,12 @@ anvil:
anvil \
$(if $(FORK),--fork-url https://eth-$(FORK).alchemyapi.io/v2/$(ALCHEMY_KEY) --no-rate-limit,) \
$(if $(FORK),--chain-id 522,--chain-id 31337) \
$(if $(DEPLOYER_MNEMONIC),--mnemonic "$(DEPLOYER_MNEMONIC)",) \
--tracing \
--host 0.0.0.0 \
--block-time 1 \
--state-interval 60 \
--timeout 300000 \
--dump-state state.json \
$(if $(wildcard state.json),--load-state state.json,) \
--disable-block-gas-limit \
Expand Down
45 changes: 45 additions & 0 deletions config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
wallet:
name: paraspace/validators
passphrase: my wallet secret
baseDir: keystore/ethereum2
accounts:
- name: paraspace/validators/1
passphrase: my account secret
path: m/12381/3600/1/0/0
outputDir: app
depositContract: 0xff50ed3d0ec03ac01d4c79aad74928bff48a7b2b
genesis: []
nodes:
- name: validator1
volume: validator1-data
executionLayer:
image: ethereum/client-go:v1.11.4
dataDir: geth
flags:
- --goerli
- --http
- --http.api=engine,eth,web3,net,debug
- --ws
- --ws.api=engine,eth,web3,net,debug
- --http.corsdomain=*
- --syncmode=full
- --networkid=5
consensusLayer:
image: sigp/lighthouse:v3.5.1
dataDir: lighthouse
flags:
- --network=prater
- --eth1
- --http
- --http-allow-sync-stalled
- --enr-udp-port=9000
- --enr-tcp-port=9000
- --discovery-port=9000
- --checkpoint-sync-url=https://goerli.beaconstate.ethstaker.cc
- --suggested-fee-recipient=0x018281853eCC543Aa251732e8FDaa7323247eBeB
validator:
image: sigp/lighthouse:v3.5.1
dataDir: lighthouse/validator-data
flags:
- --network=prater
- --suggested-fee-recipient=0x018281853eCC543Aa251732e8FDaa7323247eBeB
48 changes: 48 additions & 0 deletions config.zhejiang.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
wallet:
name: paraspace/validators
passphrase: my wallet secret
baseDir: keystore/ethereum2
accounts:
- name: paraspace/validators/1
passphrase: my account secret
path: m/12381/3600/1/0/0
outputDir: app
depositContract: 0x4242424242424242424242424242424242424242
genesis:
- https://cdn.jsdelivr.net/gh/ethpandaops/withdrawals-testnet/zhejiang-testnet/custom_config_data/genesis.json
- https://cdn.jsdelivr.net/gh/ethpandaops/withdrawals-testnet/zhejiang-testnet/custom_config_data/genesis.ssz
- https://cdn.jsdelivr.net/gh/ethpandaops/withdrawals-testnet/zhejiang-testnet/custom_config_data/config.yaml
- https://cdn.jsdelivr.net/gh/ethpandaops/withdrawals-testnet/zhejiang-testnet/custom_config_data/deploy_block.txt
- https://cdn.jsdelivr.net/gh/ethpandaops/withdrawals-testnet/zhejiang-testnet/custom_config_data/boot_enr.txt
nodes:
- name: validator1
volume: validator1-data
executionLayer:
image: ethereum/client-go:latest
dataDir: geth
flags:
- --http
- --http.api=engine,eth,web3,net,debug
- --ws
- --ws.api=engine,eth,web3,net,debug
- --http.corsdomain=*
- --syncmode=full
- --bootnodes=enode://691c66d0ce351633b2ef8b4e4ef7db9966915ca0937415bd2b408df22923f274873b4d4438929e029a13a680140223dcf701cabe22df7d8870044321022dfefa@64.225.78.1:30303,enode://89347b9461727ee1849256d78e84d5c86cc3b4c6c5347650093982b726d71f3d08027e280b399b7b6604ceeda863283dcfe1a01e93728b4883114e9f8c7cc8ef@146.190.238.212:30303,enode://c2892072efe247f21ed7ebea6637ade38512a0ae7c5cffa1bf0786d5e3be1e7f40ff71252a21b36aa9de54e49edbcfc6962a98032adadfa29c8524262e484ad3@165.232.84.160:30303,enode://71e862580d3177a99e9837bd9e9c13c83bde63d3dba1d5cea18e89eb2a17786bbd47a8e7ae690e4d29763b55c205af13965efcaf6105d58e118a5a8ed2b0f6d0@68.183.13.170:30303,enode://2f6cf7f774e4507e7c1b70815f9c0ccd6515ee1170c991ce3137002c6ba9c671af38920f5b8ab8a215b62b3b50388030548f1d826cb6c2b30c0f59472804a045@161.35.147.98:30303
- --networkid=1337803
consensusLayer:
image: sigp/lighthouse:v3.5.1
dataDir: lighthouse
flags:
- --eth1
- --http
- --http-allow-sync-stalled
- --enr-udp-port=9000
- --enr-tcp-port=9000
- --discovery-port=9000
- --boot-nodes=enr:-Iq4QMCTfIMXnow27baRUb35Q8iiFHSIDBJh6hQM5Axohhf4b6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AAAAckYFAAAAAAAAgmlkgnY0gmlwhES3DaqJc2VjcDI1NmsxoQNIf37JZx-Lc8pnfDwURcHUqLbIEZ1RoxjZuBRtEODseYN0Y3CCIyiDdWRwgiMo,enr:-KG4QLNORYXUK76RPDI4rIVAqX__zSkc5AqMcwAketVzN9YNE8FHSu1im3qJTIeuwqI5JN5SPVsiX7L9nWXgWLRUf6sDhGV0aDKQ7ijXswAAAHJGBQAAAAAAAIJpZIJ2NIJpcIShI5NiiXNlY3AyNTZrMaECpA_KefrVAueFWiLLDZKQPPVOxMuxGogPrI474FaS-x2DdGNwgiMog3VkcIIjKA
- --suggested-fee-recipient=0x018281853eCC543Aa251732e8FDaa7323247eBeB
validator:
image: sigp/lighthouse:v3.5.1
dataDir: lighthouse/validator-data
flags:
- --suggested-fee-recipient=0x018281853eCC543Aa251732e8FDaa7323247eBeB
Loading