stack-orchestrator/app/data/config/fixturenet-lotus/fund-account.sh
prathamesh0 333797b0c3
Lotus stack usability improvements (#489)
* move health check inside startup script

* remove pre-built genesis

* move health check inside startup script

* remove pre-built genesis

* Use hardcoded paths for Lotus node data directories

* Persist proof parameters

* Write out miner node's multiaddr with docker network IP

* Enable Lotus ETH RPC API and bind to all available interfaces

* Fund a known account

---------

Co-authored-by: iskay <ikay@lakeheadu.ca>
Co-authored-by: Ian Kay <ian@knowable.vc>
2023-08-09 17:24:47 +05:30

21 lines
613 B
Bash
Executable File

#!/bin/bash
# ETH account with pk c05fd3613bcd62a4f25e5eba1f464d0b76d74c3f771a7c2f13e26ad6439444b3
ETH_ADDRESS=0xD375B03bd3A2434A9f675bEC4Ccd68aC5e67C743
AMOUNT=1000
# Pre-fund stat
PREFUND_STAT_OUTPUT=$(lotus evm stat $ETH_ADDRESS)
FILECOIN_ADDRESS=$(echo "$PREFUND_STAT_OUTPUT" | grep -oP 'Filecoin address:\s+\K\S+')
echo Filecoin address: "$FILECOIN_ADDRESS"
echo Sending balance to "$FILECOIN_ADDRESS"
lotus send --from $(lotus wallet default) "$FILECOIN_ADDRESS" $AMOUNT
# Post-fund stat
echo lotus evm stat $ETH_ADDRESS
lotus evm stat $ETH_ADDRESS
echo "Account with ETH address $ETH_ADDRESS funded"