github.com/trezor/blockbook@v0.4.1-0.20240328132726-e9a08582ee2c/build/templates/backend/scripts/bsc.sh (about) 1 #!/bin/sh 2 3 {{define "main" -}} 4 5 set -e 6 7 INSTALL_DIR={{.Env.BackendInstallPath}}/{{.Coin.Alias}} 8 DATA_DIR={{.Env.BackendDataPath}}/{{.Coin.Alias}}/backend 9 10 GETH_BIN=$INSTALL_DIR/geth_linux 11 CHAINDATA_DIR=$DATA_DIR/geth/chaindata 12 13 if [ ! -d "$CHAINDATA_DIR" ]; then 14 $GETH_BIN init --datadir $DATA_DIR $INSTALL_DIR/genesis.json 15 fi 16 17 $GETH_BIN \ 18 --config $INSTALL_DIR/config.toml \ 19 --datadir $DATA_DIR \ 20 --port {{.Ports.BackendP2P}} \ 21 --http \ 22 --http.addr 127.0.0.1 \ 23 --http.port {{.Ports.BackendHttp}} \ 24 --http.api eth,net,web3,debug,txpool \ 25 --http.vhosts '*' \ 26 --http.corsdomain '*' \ 27 --ws \ 28 --ws.addr 127.0.0.1 \ 29 --ws.port {{.Ports.BackendRPC}} \ 30 --ws.api eth,net,web3,debug,txpool \ 31 --ws.origins '*' \ 32 --syncmode full \ 33 --maxpeers 200 \ 34 --rpc.allow-unprotected-txs \ 35 --txlookuplimit 0 \ 36 --cache 8000 \ 37 --ipcdisable \ 38 --nat none 39 40 {{end}}