-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
50 lines (41 loc) · 1002 Bytes
/
main.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package main
import (
"github.com/JackalLabs/gulf/cmd"
"github.com/JackalLabs/gulf/jackal/uploader"
"github.com/JackalLabs/gulf/jackal/wallet"
"github.com/desmos-labs/cosmos-go-wallet/types"
"github.com/joho/godotenv"
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
"os"
)
func init() {
log.Logger = log.Output(zerolog.ConsoleWriter{Out: os.Stderr})
log.Logger = log.With().Caller().Logger()
log.Logger = log.Level(zerolog.TraceLevel)
}
func main() {
err := godotenv.Load()
if err != nil {
log.Fatal().Msg("Error loading .env file")
}
seed := os.Getenv("SEED")
w, err := wallet.CreateWallet(seed, "m/44'/118'/0'/0/0", types.ChainConfig{
Bech32Prefix: "jkl",
RPCAddr: os.Getenv("RPC"),
GRPCAddr: os.Getenv("GRPC"),
GasPrice: "0.02ujkl",
GasAdjustment: 1.5,
})
if err != nil {
panic(err)
}
log.Printf(w.AccAddress())
q := uploader.NewQueue(w)
q.Listen()
root := cmd.RootCMD(q, w)
err = root.Execute()
if err != nil {
panic(err)
}
}