2021-11-23 16:44:46 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"flag"
|
|
|
|
"github.com/ledgerwatch/erigon/cmd/devnettest/services"
|
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
var (
|
|
|
|
to string
|
|
|
|
value uint64
|
|
|
|
blockNum string
|
|
|
|
getBalance bool
|
|
|
|
sendTx bool
|
|
|
|
txPoolContent bool
|
|
|
|
clearDev bool
|
|
|
|
)
|
|
|
|
|
|
|
|
flag.StringVar(&to, "to", "", "String Address to send to")
|
|
|
|
flag.Uint64Var(&value, "value", uint64(0), "Uint64 Value to send")
|
|
|
|
flag.StringVar(&blockNum, "block-num", "latest", "String denoting block number")
|
|
|
|
flag.BoolVar(&getBalance, "get-balance", false, "Boolean Flag to determine if API should get balance")
|
|
|
|
flag.BoolVar(&sendTx, "send-tx", false, "Boolean Flag to determine if API should send transaction")
|
|
|
|
flag.BoolVar(&txPoolContent, "txpool-content", false, "Boolean Flag to determine if API should get content of txpool")
|
|
|
|
flag.BoolVar(&clearDev, "clear-dev", false, "Boolean Flag to determine if service should clear /dev after this call")
|
|
|
|
flag.Parse()
|
|
|
|
|
2021-11-26 16:05:16 +00:00
|
|
|
services.ValidateInputs(getBalance, sendTx, txPoolContent, blockNum, value, to)
|
2021-11-23 16:44:46 +00:00
|
|
|
|
2021-11-26 16:05:16 +00:00
|
|
|
services.ParseRequests(getBalance, sendTx, txPoolContent, clearDev, blockNum, value, to)
|
2021-11-23 16:44:46 +00:00
|
|
|
}
|