generated from andskur/go-microservice-template
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathscheme.go
36 lines (32 loc) · 922 Bytes
/
scheme.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package config
// Scheme represents the application configuration scheme.
type Scheme struct {
// Env is the application environment.
Env string
// Tokens that will be sent to the oracle contract
Tokens []string
// WS is a web socket configs
WS *WS
// WEB3 is a blockchain configs
WEB3 *WEB3
}
// WEB3 is a blockchain configs
type WEB3 struct {
// OracleAddress smart-contract address for the rollup oracle
OracleAddress string
// RpcURL url for rpc-provider
RpcURL string
// ChainID rollup chain ID
ChainID int
// SignerPK is a wallet private key. Should be the same as the oracle owner. Shall never be hardcoded
SignerPK string
// SendFrequencyMS is a send to oracle frequency in milliseconds
SendFrequencyMS int
}
// WS is a web socket configs
type WS struct {
// URL is a demon url address
URL string
// WriteFrequencyMS is a write from demon frequency in milliseconds
WriteFrequencyMS int
}