File tree Expand file tree Collapse file tree 5 files changed +10
-46
lines changed
scala/io/iohk/ethereum/faucet Expand file tree Collapse file tree 5 files changed +10
-46
lines changed Original file line number Diff line number Diff line change @@ -547,45 +547,6 @@ mantis {
547
547
port = 8888
548
548
}
549
549
}
550
-
551
- faucet {
552
- # Wallet address used to send transactions from
553
- wallet-address = "0x00"
554
-
555
- # Password to unlock faucet wallet
556
- wallet-password = ""
557
-
558
- # Path to directory where wallet key is stored
559
- keystore-dir = "~/.mantis-faucet-keystore"
560
-
561
- # Transaction gas price
562
- tx-gas-price = 20000000000
563
-
564
- # Transaction gas limit
565
- tx-gas-limit = 90000
566
-
567
- # Transaction value
568
- tx-value = 1000000000000000000
569
-
570
- # Faucet listen interface
571
- listen-interface = "127.0.0.1"
572
-
573
- # Faucet listen port
574
- listen-port = 8099
575
-
576
- # Faucet cors config
577
- cors-allowed-origins = "*"
578
-
579
- # Address of Ethereum node used to send the transaction
580
- rpc-address = "http://127.0.0.1:8546/"
581
-
582
- # How often can a single IP address send a request
583
- min-request-interval = 1.minute
584
-
585
- # How many ip addr -> timestamp entries to store
586
- latest-timestamp-cache-size = 1024
587
- }
588
-
589
550
}
590
551
591
552
akka {
Original file line number Diff line number Diff line change @@ -5,17 +5,18 @@ import java.security.SecureRandom
5
5
import akka .actor .ActorSystem
6
6
import akka .http .scaladsl .Http
7
7
import akka .stream .ActorMaterializer
8
+ import com .typesafe .config .ConfigFactory
8
9
import io .iohk .ethereum .keystore .KeyStoreImpl
9
10
import io .iohk .ethereum .mallet .service .RpcClient
10
- import io .iohk .ethereum .utils .{Config , Logger }
11
- import scala .concurrent .ExecutionContext .Implicits .global
11
+ import io .iohk .ethereum .utils .Logger
12
12
13
+ import scala .concurrent .ExecutionContext .Implicits .global
13
14
import scala .util .{Failure , Success }
14
15
15
16
object Faucet extends Logger {
16
17
17
18
def main (args : Array [String ]): Unit = {
18
- val config = FaucetConfig (Config .config )
19
+ val config = FaucetConfig (ConfigFactory .load() )
19
20
20
21
val rpcClient = new RpcClient (config.rpcAddress)
21
22
val keyStore = new KeyStoreImpl (config.keyStoreDir, new SecureRandom ())
Original file line number Diff line number Diff line change @@ -22,8 +22,8 @@ case class FaucetConfig(
22
22
latestTimestampCacheSize : Int )
23
23
24
24
object FaucetConfig {
25
- def apply (mantisConfig : TypesafeConfig ): FaucetConfig = {
26
- val faucetConfig = mantisConfig .getConfig(" faucet" )
25
+ def apply (typesafeConfig : TypesafeConfig ): FaucetConfig = {
26
+ val faucetConfig = typesafeConfig .getConfig(" faucet" )
27
27
28
28
val corsAllowedOrigins = ConfigUtils .parseCorsAllowedOrigins(faucetConfig, " cors-allowed-origins" )
29
29
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
- ./bin/mantis-app -Dconfig.file=./conf/mantis.conf -Dlogback.configurationFile=./conf/logback.xml -J-Xss10M faucet " $@ "
3
+ DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd ) "
4
+ cd $DIR /..
5
+ ./bin/mantis -Dconfig.file=./conf/faucet.conf -- faucet " $@ "
Original file line number Diff line number Diff line change 1
- mantis. faucet {
1
+ faucet {
2
2
# Wallet address used to send transactions from
3
3
wallet-address = "0x00"
4
4
You can’t perform that action at this time.
0 commit comments