Skip to content
This repository was archived by the owner on Feb 8, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 0 additions & 23 deletions api/middlewares.go

This file was deleted.

5 changes: 0 additions & 5 deletions api/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"net/http"
"time"

"github.com/DataDog/datadog-go/statsd"
"github.com/go-playground/validator/v10"
"github.com/hibiken/asynq"
"github.com/labstack/echo/v4"
Expand Down Expand Up @@ -35,7 +34,6 @@ type Server struct {
vaultStorage vault.Storage
client *asynq.Client
inspector *asynq.Inspector
sdClient *statsd.Client
policyService service.Policy
plugin plugin.Spec
logger *logrus.Logger
Expand All @@ -49,7 +47,6 @@ func NewServer(
vaultStorage vault.Storage,
client *asynq.Client,
inspector *asynq.Inspector,
sdClient *statsd.Client,
p plugin.Spec,
scheduler scheduler.Service,
) *Server {
Expand All @@ -65,7 +62,6 @@ func NewServer(
redis: redis,
client: client,
inspector: inspector,
sdClient: sdClient,
vaultStorage: vaultStorage,
plugin: p,
db: db,
Expand All @@ -80,7 +76,6 @@ func (s *Server) StartServer() error {
e.Use(middleware.Logger())
e.Use(middleware.Recover())
e.Use(middleware.BodyLimit("2M")) // set maximum allowed size for a request body to 2M
e.Use(s.statsdMiddleware)
e.Use(middleware.CORS())
limiterStore := middleware.NewRateLimiterMemoryStoreWithConfig(
middleware.RateLimiterMemoryStoreConfig{Rate: 5, Burst: 30, ExpiresIn: 5 * time.Minute},
Expand Down
4 changes: 0 additions & 4 deletions cmd/fees/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ type CoreConfig struct {
Redis storage.RedisConfig `mapstructure:"redis" json:"redis,omitempty"`
BlockStorage vault_config.BlockStorage `mapstructure:"block_storage" json:"block_storage,omitempty"`
VaultServiceConfig vault_config.Config `mapstructure:"vault_service" json:"vault_service,omitempty"`
Datadog struct {
Host string `mapstructure:"host" json:"host,omitempty"`
Port string `mapstructure:"port" json:"port,omitempty"`
} `mapstructure:"datadog" json:"datadog"`
}

func GetConfigure() (*CoreConfig, error) {
Expand Down
6 changes: 0 additions & 6 deletions cmd/fees/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"fmt"
"net"

"github.com/DataDog/datadog-go/statsd"
"github.com/hibiken/asynq"
"github.com/sirupsen/logrus"
"github.com/vultisig/plugin/internal/scheduler"
Expand All @@ -29,10 +28,6 @@ func main() {
}

logger := logrus.New()
sdClient, err := statsd.New(net.JoinHostPort(cfg.Datadog.Host, cfg.Datadog.Port))
if err != nil {
panic(err)
}
redisStorage, err := storage.NewRedisStorage(cfg.Redis)
if err != nil {
panic(err)
Expand Down Expand Up @@ -103,7 +98,6 @@ func main() {
vaultStorage,
client,
inspector,
sdClient,
feePlugin,
scheduler.NewNilService(),
)
Expand Down
8 changes: 1 addition & 7 deletions cmd/fees/worker/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"fmt"
"time"

"github.com/DataDog/datadog-go/statsd"
"github.com/hibiken/asynq"
"github.com/robfig/cron/v3"
"github.com/sirupsen/logrus"
Expand All @@ -15,7 +14,7 @@ import (
"github.com/vultisig/verifier/plugin/tx_indexer"
"github.com/vultisig/verifier/plugin/tx_indexer/pkg/storage"
"github.com/vultisig/verifier/vault"
"github.com/vultisig/vultiserver/relay"
"github.com/vultisig/vultisig-go/relay"

feeconfig "github.com/vultisig/plugin/cmd/fees/config"
"github.com/vultisig/plugin/plugin/fees"
Expand Down Expand Up @@ -69,10 +68,6 @@ func main() {
panic(err)
}

sdClient, err := statsd.New(cfg.Datadog.Host + ":" + cfg.Datadog.Port)
if err != nil {
panic(err)
}
vaultStorage, err := vault.NewBlockStorageImp(cfg.BlockStorage)
if err != nil {
panic(fmt.Sprintf("failed to initialize vault storage: %v", err))
Expand Down Expand Up @@ -127,7 +122,6 @@ func main() {
vaultService, err := vault.NewManagementService(
cfg.VaultServiceConfig,
asynqClient,
sdClient,
vaultStorage,
txIndexerService,
)
Expand Down
4 changes: 0 additions & 4 deletions cmd/payroll/server/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ type PayrollServerConfig struct {
BaseConfigPath string `mapstructure:"base_config_path" json:"base_config_path,omitempty"`
Redis storage.RedisConfig `mapstructure:"redis" json:"redis,omitempty"`
BlockStorage vault_config.BlockStorage `mapstructure:"block_storage" json:"block_storage,omitempty"`
Datadog struct {
Host string `mapstructure:"host" json:"host,omitempty"`
Port string `mapstructure:"port" json:"port,omitempty"`
} `mapstructure:"datadog" json:"datadog"`
}

func GetConfigure() (*PayrollServerConfig, error) {
Expand Down
6 changes: 0 additions & 6 deletions cmd/payroll/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"fmt"
"net"

"github.com/DataDog/datadog-go/statsd"
"github.com/hibiken/asynq"
"github.com/sirupsen/logrus"
"github.com/vultisig/plugin/internal/scheduler"
Expand All @@ -28,10 +27,6 @@ func main() {
}
logger := logrus.New()

sdClient, err := statsd.New(net.JoinHostPort(cfg.Datadog.Host, cfg.Datadog.Port))
if err != nil {
panic(err)
}
redisStorage, err := storage.NewRedisStorage(cfg.Redis)
if err != nil {
panic(err)
Expand Down Expand Up @@ -97,7 +92,6 @@ func main() {
vaultStorage,
client,
inspector,
sdClient,
p,
payroll.NewSchedulerService(scheduler.NewPostgresStorage(db.Pool())),
)
Expand Down
6 changes: 1 addition & 5 deletions cmd/payroll/worker/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,7 @@ type PayrollWorkerConfig struct {
Verifier verifier `mapstructure:"verifier" json:"verifier,omitempty"`
BlockStorage vault_config.BlockStorage `mapstructure:"block_storage" json:"block_storage,omitempty"`
VaultServiceConfig vault_config.Config `mapstructure:"vault_service" json:"vault_service,omitempty"`
Datadog struct {
Host string `mapstructure:"host" json:"host,omitempty"`
Port string `mapstructure:"port" json:"port,omitempty"`
} `mapstructure:"datadog" json:"datadog"`
Database struct {
Database struct {
DSN string `mapstructure:"dsn" json:"dsn,omitempty"`
} `mapstructure:"database" json:"database,omitempty"`
}
Expand Down
8 changes: 1 addition & 7 deletions cmd/payroll/worker/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"context"
"fmt"

"github.com/DataDog/datadog-go/statsd"
"github.com/ethereum/go-ethereum/ethclient"
"github.com/hibiken/asynq"
"github.com/sirupsen/logrus"
Expand All @@ -13,7 +12,7 @@ import (
"github.com/vultisig/verifier/plugin/tx_indexer"
"github.com/vultisig/verifier/plugin/tx_indexer/pkg/storage"
"github.com/vultisig/verifier/vault"
"github.com/vultisig/vultiserver/relay"
"github.com/vultisig/vultisig-go/relay"

"github.com/vultisig/plugin/plugin/payroll"
"github.com/vultisig/plugin/storage/postgres"
Expand All @@ -27,10 +26,6 @@ func main() {
panic(err)
}

sdClient, err := statsd.New(cfg.Datadog.Host + ":" + cfg.Datadog.Port)
if err != nil {
panic(err)
}
vaultStorage, err := vault.NewBlockStorageImp(cfg.BlockStorage)
if err != nil {
panic(fmt.Sprintf("failed to initialize vault storage: %v", err))
Expand Down Expand Up @@ -75,7 +70,6 @@ func main() {
vaultService, err := vault.NewManagementService(
cfg.VaultServiceConfig,
client,
sdClient,
vaultStorage,
txIndexerService,
)
Expand Down
30 changes: 25 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ module github.com/vultisig/plugin
go 1.24.2

require (
github.com/DataDog/datadog-go v4.8.3+incompatible
github.com/eager7/dogd v0.0.0-20200427085516-2caf59f59dbb
github.com/ethereum/go-ethereum v1.15.11
github.com/go-playground/validator/v10 v10.26.0
Expand All @@ -18,10 +17,10 @@ require (
github.com/spf13/viper v1.20.1
github.com/vultisig/commondata v0.0.0-20250710214228-61d9ed8f7778
github.com/vultisig/mobile-tss-lib v0.0.0-20250316003201-2e7e570a4a74
github.com/vultisig/recipes v0.0.0-20250818151719-db3f03c3254c
github.com/vultisig/verifier v0.0.0-20250820091538-a29a985cae1d
github.com/vultisig/vultiserver v0.0.0-20250715212748-4b23f9849e4b
github.com/vultisig/vultisig-go v0.0.0-20250818095937-af97443fcbbe
github.com/vultisig/recipes v0.0.0-20251006192813-52d88afe31bb
github.com/vultisig/verifier v0.0.0-20251009160043-6af9d46ae9c6
github.com/vultisig/vultiserver v0.0.0-20250825042420-c6e6ac281110
github.com/vultisig/vultisig-go v0.0.0-20251004125942-60b3b1898d15
golang.org/x/sync v0.14.0
google.golang.org/protobuf v1.36.6
)
Expand All @@ -36,13 +35,17 @@ require (
cosmossdk.io/math v1.2.0 // indirect
cosmossdk.io/store v1.0.2 // indirect
cosmossdk.io/x/tx v0.13.0 // indirect
filippo.io/edwards25519 v1.1.0 // indirect
github.com/DataDog/zstd v1.5.5 // indirect
github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/StackExchange/wmi v1.2.1 // indirect
github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129 // indirect
github.com/aws/aws-sdk-go v1.55.7 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bits-and-blooms/bitset v1.20.0 // indirect
github.com/blendle/zapdriver v1.3.1 // indirect
github.com/btcsuite/btcd/btcutil v1.1.6 // indirect
github.com/btcsuite/btcd/btcutil/psbt v1.1.10 // indirect
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f // indirect
github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd // indirect
github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792 // indirect
Expand Down Expand Up @@ -75,7 +78,11 @@ require (
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/ethereum/c-kzg-4844/v2 v2.1.0 // indirect
github.com/ethereum/go-verkle v0.2.2 // indirect
github.com/fatih/color v1.16.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.8 // indirect
github.com/gagliardetto/binary v0.8.0 // indirect
github.com/gagliardetto/solana-go v1.13.0 // indirect
github.com/gagliardetto/treeout v0.1.4 // indirect
github.com/gcash/bchd v0.17.2-0.20201218180520-5708823e0e99 // indirect
github.com/gcash/bchutil v0.0.0-20210113190856-6ea28dff4000 // indirect
github.com/getsentry/sentry-go v0.27.0 // indirect
Expand Down Expand Up @@ -108,6 +115,7 @@ require (
github.com/jackc/puddle/v2 v2.2.2 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/jmhodges/levigo v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/kaptinlin/go-i18n v0.1.4 // indirect
github.com/kaptinlin/jsonschema v0.4.6 // indirect
github.com/klauspost/compress v1.18.0 // indirect
Expand All @@ -117,12 +125,18 @@ require (
github.com/leodido/go-urn v1.4.0 // indirect
github.com/libp2p/go-buffer-pool v0.1.0 // indirect
github.com/linxGnu/grocksdb v1.8.12 // indirect
github.com/logrusorgru/aurora v2.0.3+incompatible // indirect
github.com/ltcsuite/ltcd v0.23.5 // indirect
github.com/ltcsuite/ltcd/btcec/v2 v2.3.2 // indirect
github.com/ltcsuite/ltcd/chaincfg/chainhash v1.0.2 // indirect
github.com/ltcsuite/ltcd/ltcutil v1.1.3 // indirect
github.com/mfridman/interpolate v0.0.2 // indirect
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/mmcloughlin/addchain v0.4.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/mostynb/zstdpool-freelist v0.0.0-20201229113212-927304c0c3b1 // indirect
github.com/mr-tron/base58 v1.2.0 // indirect
github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect
github.com/petermattis/goid v0.0.0-20230904192822-1876fd5063bc // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
Expand All @@ -136,16 +150,22 @@ require (
github.com/sethvargo/go-retry v0.3.0 // indirect
github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect
github.com/spf13/cobra v1.8.1 // indirect
github.com/streamingfast/logging v0.0.0-20230608130331-f22c91403091 // indirect
github.com/stretchr/objx v0.5.2 // indirect
github.com/stretchr/testify v1.10.0 // indirect
github.com/supranational/blst v0.3.14 // indirect
github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect
github.com/tendermint/go-amino v0.16.0 // indirect
github.com/tklauser/go-sysconf v0.3.12 // indirect
github.com/tklauser/numcpus v0.6.1 // indirect
github.com/ugorji/go/codec v1.2.11 // indirect
github.com/vultisig/go-wrappers v0.0.0-20250716071337-34a5c0f4d6e0 // indirect
github.com/xyield/xrpl-go v0.0.0-20230914223425-9abe75c05830 // indirect
go.etcd.io/bbolt v1.3.8 // indirect
go.mongodb.org/mongo-driver v1.12.2 // indirect
go.uber.org/ratelimit v0.2.0 // indirect
golang.org/x/exp v0.0.0-20250305212735-054e65f0b394 // indirect
golang.org/x/term v0.30.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20250106144421-5f5ef82da422 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20250324211829-b45e905df463 // indirect
google.golang.org/grpc v1.71.0 // indirect
Expand Down
Loading