mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-01-22 20:42:13 +00:00
Unix-style command-line params for the 'deposit_contract' binary
This commit is contained in:
parent
6ceb75c6b3
commit
734ab64da8
@ -18,7 +18,6 @@ import
|
||||
const
|
||||
dataDirValidators = "validators"
|
||||
genesisFile = "genesis.json"
|
||||
testnetsBaseUrl = "https://raw.githubusercontent.com/status-im/nim-eth2-testnet-data/master/www"
|
||||
hasPrompt = not defined(withoutPrompt)
|
||||
|
||||
# https://github.com/ethereum/eth2.0-metrics/blob/master/metrics.md#interop-metrics
|
||||
|
@ -14,10 +14,13 @@ type
|
||||
|
||||
CliConfig = object
|
||||
depositWeb3Url* {.
|
||||
desc: "URL of the Web3 server to observe Eth1"}: string
|
||||
desc: "URL of the Web3 server to observe Eth1"
|
||||
longform: "web3-url" }: string
|
||||
|
||||
privateKey* {.
|
||||
desc: "Private key of the controlling account",
|
||||
defaultValue: ""}: string
|
||||
defaultValue: ""
|
||||
longform: "private-key" }: string
|
||||
|
||||
case cmd* {.command.}: StartUpCommand
|
||||
of deploy:
|
||||
@ -26,11 +29,12 @@ type
|
||||
of drain:
|
||||
contractAddress* {.
|
||||
desc: "Address of the contract to drain",
|
||||
defaultValue: ""}: string
|
||||
defaultValue: ""
|
||||
longform: "deposit-contract" }: string
|
||||
|
||||
of sendEth:
|
||||
toAddress: string
|
||||
valueEth: string
|
||||
toAddress {.longform: "to".}: string
|
||||
valueEth {.longform: "eth".}: string
|
||||
|
||||
contract(Deposit):
|
||||
proc drain()
|
||||
|
@ -50,8 +50,8 @@ DOCKER_BEACON_NODE="docker run -v $NETWORK_DIR_ABS:/network_dir -v $DATA_DIR_ABS
|
||||
make deposit_contract
|
||||
|
||||
if [ "$ETH1_PRIVATE_KEY" != "" ]; then
|
||||
DEPOSIT_CONTRACT_ADDRESS=$(./build/deposit_contract deploy $WEB3_URL_ARG --privateKey=$ETH1_PRIVATE_KEY)
|
||||
DEPOSIT_CONTRACT_ADDRESS_ARG="--deposit_contract=$DEPOSIT_CONTRACT_ADDRESS"
|
||||
DEPOSIT_CONTRACT_ADDRESS=$(./build/deposit_contract deploy $WEB3_URL_ARG --private-key=$ETH1_PRIVATE_KEY)
|
||||
DEPOSIT_CONTRACT_ADDRESS_ARG="--deposit-contract=$DEPOSIT_CONTRACT_ADDRESS"
|
||||
fi
|
||||
|
||||
cd docker
|
||||
|
Loading…
x
Reference in New Issue
Block a user