From fd59d286f5e31e87a378c81de15bb6ad16c5ff05 Mon Sep 17 00:00:00 2001 From: Mohammed Sohail Date: Mon, 7 Oct 2024 09:49:01 +0300 Subject: [PATCH 1/7] feat: add custodial registration proxy handler --- cmd/service/router.go | 2 + internal/handler/custodial_registration.go | 66 ++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 internal/handler/custodial_registration.go diff --git a/cmd/service/router.go b/cmd/service/router.go index 90ff053..80a64d5 100644 --- a/cmd/service/router.go +++ b/cmd/service/router.go @@ -21,6 +21,7 @@ func bootstrapEventRouter(cacheProvider cache.Cache, pubCB router.Callback) *rou router.RegisterLogRoute(w3.H("0x6b7e2e653f93b645d4ed7292d6429f96637084363e477c8aaea1a43ed13c284e"), handler.HandleSealStateChangeLog()) router.RegisterLogRoute(w3.H("0xcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5"), handler.HandleTokenBurnLog()) router.RegisterLogRoute(w3.H("0xab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f8"), handler.HandleTokenMintLog()) + router.RegisterLogRoute(w3.H("0x894e56e1dac400b4475c83d8af0f0aa44de17c62764bd82f6e768a504e242461"), handler.HandleCustodialRegistrationLog()) router.RegisterLogRoute(w3.H("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), handler.HandleTokenTransferLog(handlerContainer)) router.RegisterInputDataRoute("63e4bff4", handler.HandleFaucetGiveInputData()) @@ -35,6 +36,7 @@ func bootstrapEventRouter(cacheProvider cache.Cache, pubCB router.Callback) *rou router.RegisterInputDataRoute("86fe212d", handler.HandleSealStateChangeInputData()) router.RegisterInputDataRoute("42966c68", handler.HandleTokenBurnInputData()) router.RegisterInputDataRoute("449a52f8", handler.HandleTokenMintInputData()) + router.RegisterInputDataRoute("4420e486", handler.HandleCustodialRegistrationInputData()) router.RegisterInputDataRoute("a9059cbb", handler.HandleTokenTransferInputData(handlerContainer)) router.RegisterInputDataRoute("23b872dd", handler.HandleTokenTransferInputData(handlerContainer)) diff --git a/internal/handler/custodial_registration.go b/internal/handler/custodial_registration.go new file mode 100644 index 0000000..f7af4e8 --- /dev/null +++ b/internal/handler/custodial_registration.go @@ -0,0 +1,66 @@ +package handler + +import ( + "context" + + "github.com/ethereum/go-ethereum/common" + "github.com/grassrootseconomics/eth-tracker/pkg/event" + "github.com/grassrootseconomics/eth-tracker/pkg/router" + "github.com/lmittmann/w3" +) + +const custodialRegistrationEventName = "CUSTODIAL_REGISTRATION" + +var ( + custodialRegistrationEvent = w3.MustNewEvent("NewRegistration(address indexed subject)") + custodialRegistrationSig = w3.MustNewFunc("register(address)", "") +) + +func HandleCustodialRegistrationLog() router.LogHandlerFunc { + return func(ctx context.Context, lp router.LogPayload, c router.Callback) error { + var account common.Address + + if err := custodialRegistrationEvent.DecodeArgs(lp.Log, &account); err != nil { + return err + } + + custodialRegistrationEvent := event.Event{ + Index: lp.Log.Index, + Block: lp.Log.BlockNumber, + ContractAddress: lp.Log.Address.Hex(), + Success: true, + Timestamp: lp.Timestamp, + TxHash: lp.Log.TxHash.Hex(), + TxType: custodialRegistrationEventName, + Payload: map[string]any{ + "account": account.Hex(), + }, + } + + return c(ctx, custodialRegistrationEvent) + } +} + +func HandleCustodialRegistrationInputData() router.InputDataHandlerFunc { + return func(ctx context.Context, idp router.InputDataPayload, c router.Callback) error { + var account common.Address + + if err := custodialRegistrationSig.DecodeArgs(w3.B(idp.InputData), &account); err != nil { + return err + } + + custodialRegistrationEvent := event.Event{ + Block: idp.Block, + ContractAddress: idp.ContractAddress, + Success: false, + Timestamp: idp.Timestamp, + TxHash: idp.TxHash, + TxType: custodialRegistrationEventName, + Payload: map[string]any{ + "account": account.Hex(), + }, + } + + return c(ctx, custodialRegistrationEvent) + } +} From f1086fcdc135c2ca98b6636e4f4592c06c9b6f98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mohamed=20Sohail=20=E5=A4=A9=E6=98=8E?= Date: Mon, 7 Oct 2024 10:07:11 +0300 Subject: [PATCH 2/7] feat: optimize exists to check multiple keys in one call (#40) * closes #32 --- internal/cache/cache.go | 2 +- internal/cache/redis.go | 4 ++-- internal/cache/xmap.go | 11 ++++++++--- internal/handler/token_transfer.go | 10 ++-------- 4 files changed, 13 insertions(+), 14 deletions(-) diff --git a/internal/cache/cache.go b/internal/cache/cache.go index 7166208..96a5077 100644 --- a/internal/cache/cache.go +++ b/internal/cache/cache.go @@ -9,7 +9,7 @@ type ( Cache interface { Add(context.Context, string) error Remove(context.Context, string) error - Exists(context.Context, string) (bool, error) + Exists(context.Context, ...string) (bool, error) Size(context.Context) (int64, error) } diff --git a/internal/cache/redis.go b/internal/cache/redis.go index 616578f..afdf09d 100644 --- a/internal/cache/redis.go +++ b/internal/cache/redis.go @@ -40,8 +40,8 @@ func (c *redisCache) Remove(ctx context.Context, key string) error { return c.client.Do(ctx, cmd).Error() } -func (c *redisCache) Exists(ctx context.Context, key string) (bool, error) { - cmd := c.client.B().Exists().Key(key).Build() +func (c *redisCache) Exists(ctx context.Context, key ...string) (bool, error) { + cmd := c.client.B().Exists().Key(key...).Build() res, err := c.client.Do(ctx, cmd).AsBool() if err != nil { return false, err diff --git a/internal/cache/xmap.go b/internal/cache/xmap.go index 49ba5a8..3a10bf2 100644 --- a/internal/cache/xmap.go +++ b/internal/cache/xmap.go @@ -26,9 +26,14 @@ func (c *mapCache) Remove(_ context.Context, key string) error { return nil } -func (c *mapCache) Exists(_ context.Context, key string) (bool, error) { - _, ok := c.xmap.Load(key) - return ok, nil +func (c *mapCache) Exists(_ context.Context, key ...string) (bool, error) { + for _, v := range key { + _, ok := c.xmap.Load(v) + if ok { + return true, nil + } + } + return false, nil } func (c *mapCache) Size(_ context.Context) (int64, error) { diff --git a/internal/handler/token_transfer.go b/internal/handler/token_transfer.go index 182e00f..7ae360a 100644 --- a/internal/handler/token_transfer.go +++ b/internal/handler/token_transfer.go @@ -147,16 +147,10 @@ func (hc *HandlerContainer) checkStables(ctx context.Context, from string, to st return true, nil } - // TODO: Pipeline this check on Redis with a new method - fromExists, err := hc.cache.Exists(ctx, from) + exists, err := hc.cache.Exists(ctx, from, to) if err != nil { return false, err } - toExists, err := hc.cache.Exists(ctx, to) - if err != nil { - return false, err - } - - return fromExists || toExists, nil + return exists, nil } From 4b2ad3daf93bf2bc26c202a1265f1dc3d57d9529 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 15:12:15 +0300 Subject: [PATCH 3/7] build(deps): bump github.com/knadh/koanf/providers/env (#37) Bumps [github.com/knadh/koanf/providers/env](https://github.com/knadh/koanf) from 0.1.0 to 1.0.0. - [Release notes](https://github.com/knadh/koanf/releases) - [Commits](https://github.com/knadh/koanf/compare/v0.1.0...v1.0.0) --- updated-dependencies: - dependency-name: github.com/knadh/koanf/providers/env dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 7c57d6e..9bdb4f5 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/grassrootseconomics/ethutils v1.3.0 github.com/kamikazechaser/common v0.2.0 github.com/knadh/koanf/parsers/toml v0.1.0 - github.com/knadh/koanf/providers/env v0.1.0 + github.com/knadh/koanf/providers/env v1.0.0 github.com/knadh/koanf/providers/file v1.1.0 github.com/knadh/koanf/v2 v2.1.1 github.com/lmittmann/w3 v0.17.0 diff --git a/go.sum b/go.sum index 704acc8..5ae32aa 100644 --- a/go.sum +++ b/go.sum @@ -108,8 +108,8 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/parsers/toml v0.1.0 h1:S2hLqS4TgWZYj4/7mI5m1CQQcWurxUz6ODgOub/6LCI= github.com/knadh/koanf/parsers/toml v0.1.0/go.mod h1:yUprhq6eo3GbyVXFFMdbfZSo928ksS+uo0FFqNMnO18= -github.com/knadh/koanf/providers/env v0.1.0 h1:LqKteXqfOWyx5Ab9VfGHmjY9BvRXi+clwyZozgVRiKg= -github.com/knadh/koanf/providers/env v0.1.0/go.mod h1:RE8K9GbACJkeEnkl8L/Qcj8p4ZyPXZIQ191HJi44ZaQ= +github.com/knadh/koanf/providers/env v1.0.0 h1:ufePaI9BnWH+ajuxGGiJ8pdTG0uLEUWC7/HDDPGLah0= +github.com/knadh/koanf/providers/env v1.0.0/go.mod h1:mzFyRZueYhb37oPmC1HAv/oGEEuyvJDA98r3XAa8Gak= github.com/knadh/koanf/providers/file v1.1.0 h1:MTjA+gRrVl1zqgetEAIaXHqYje0XSosxSiMD4/7kz0o= github.com/knadh/koanf/providers/file v1.1.0/go.mod h1:/faSBcv2mxPVjFrXck95qeoyoZ5myJ6uxN8OOVNJJCI= github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= From 05d142664d08ef5fe5b2e0c79b447dc589daab51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mohamed=20Sohail=20=E5=A4=A9=E6=98=8E?= Date: Mon, 7 Oct 2024 15:12:58 +0300 Subject: [PATCH 4/7] feat: handle contract creation (#43) * feat: add contract creation handler * fix: process contract creations * fix: redis keys name --- cmd/bootstrap/main.go | 4 +- cmd/service/router.go | 2 + internal/cache/redis.go | 4 +- internal/handler/contract_creation.go | 28 ++++++++++++ internal/processor/processor.go | 65 +++++++++++++++++++++++++-- pkg/router/router.go | 36 +++++++++++---- 6 files changed, 124 insertions(+), 15 deletions(-) create mode 100644 internal/handler/contract_creation.go diff --git a/cmd/bootstrap/main.go b/cmd/bootstrap/main.go index f664537..974e5f4 100644 --- a/cmd/bootstrap/main.go +++ b/cmd/bootstrap/main.go @@ -230,12 +230,12 @@ func bootstrapCache() error { } for _, address := range ko.MustStrings("bootstrap.watchlist") { - if err := cache.Add(ctx, address); err != nil { + if err := cache.Add(ctx, ethutils.HexToAddress(address).Hex()); err != nil { return err } } for _, address := range ko.MustStrings("bootstrap.blacklist") { - if err := cache.Remove(ctx, address); err != nil { + if err := cache.Remove(ctx, ethutils.HexToAddress(address).Hex()); err != nil { return err } } diff --git a/cmd/service/router.go b/cmd/service/router.go index 80a64d5..b0d7599 100644 --- a/cmd/service/router.go +++ b/cmd/service/router.go @@ -11,6 +11,8 @@ func bootstrapEventRouter(cacheProvider cache.Cache, pubCB router.Callback) *rou handlerContainer := handler.New(cacheProvider) router := router.New(pubCB) + router.RegisterContractCreationHandler(handler.HandleContractCreation()) + router.RegisterLogRoute(w3.H("0x26162814817e23ec5035d6a2edc6c422da2da2119e27cfca6be65cc2dc55ca4c"), handler.HandleFaucetGiveLog()) router.RegisterLogRoute(w3.H("0xa226db3f664042183ee0281230bba26cbf7b5057e50aee7f25a175ff45ce4d7f"), handler.HandleIndexAddLog(handlerContainer)) router.RegisterLogRoute(w3.H("0x24a12366c02e13fe4a9e03d86a8952e85bb74a456c16e4a18b6d8295700b74bb"), handler.HandleIndexRemoveLog(handlerContainer)) diff --git a/internal/cache/redis.go b/internal/cache/redis.go index afdf09d..5424162 100644 --- a/internal/cache/redis.go +++ b/internal/cache/redis.go @@ -40,8 +40,8 @@ func (c *redisCache) Remove(ctx context.Context, key string) error { return c.client.Do(ctx, cmd).Error() } -func (c *redisCache) Exists(ctx context.Context, key ...string) (bool, error) { - cmd := c.client.B().Exists().Key(key...).Build() +func (c *redisCache) Exists(ctx context.Context, keys ...string) (bool, error) { + cmd := c.client.B().Exists().Key(keys...).Build() res, err := c.client.Do(ctx, cmd).AsBool() if err != nil { return false, err diff --git a/internal/handler/contract_creation.go b/internal/handler/contract_creation.go new file mode 100644 index 0000000..0c44695 --- /dev/null +++ b/internal/handler/contract_creation.go @@ -0,0 +1,28 @@ +package handler + +import ( + "context" + + "github.com/grassrootseconomics/eth-tracker/pkg/event" + "github.com/grassrootseconomics/eth-tracker/pkg/router" +) + +const contractCreationEventName = "CONTRACT_CREATION" + +func HandleContractCreation() router.ContractCreationHandlerFunc { + return func(ctx context.Context, ccp router.ContractCreationPayload, c router.Callback) error { + contractCreationEvent := event.Event{ + Block: ccp.Block, + ContractAddress: ccp.ContractAddress, + Success: ccp.Success, + Timestamp: ccp.Timestamp, + TxHash: ccp.TxHash, + TxType: contractCreationEventName, + Payload: map[string]any{ + "from": ccp.From, + }, + } + + return c(ctx, contractCreationEvent) + } +} diff --git a/internal/processor/processor.go b/internal/processor/processor.go index 14376c8..271a108 100644 --- a/internal/processor/processor.go +++ b/internal/processor/processor.go @@ -54,7 +54,7 @@ func (p *Processor) ProcessBlock(ctx context.Context, blockNumber uint64) error } for _, receipt := range receipts { - if receipt.Status > 0 { + if receipt.Status == 1 { for _, log := range receipt.Logs { exists, err := p.cache.Exists(ctx, log.Address.Hex()) if err != nil { @@ -72,13 +72,72 @@ func (p *Processor) ProcessBlock(ctx context.Context, blockNumber uint64) error } } } - } else { + + if receipt.ContractAddress != (common.Address{}) { + tx, err := p.chain.GetTransaction(ctx, receipt.TxHash) + if err != nil && !errors.Is(err, context.Canceled) { + return fmt.Errorf("get transaction error: tx %s: %v", receipt.TxHash.Hex(), err) + } + + from, err := types.Sender(types.LatestSignerForChainID(tx.ChainId()), tx) + if err != nil { + return fmt.Errorf("transaction decode error: tx %s: %v", receipt.TxHash.Hex(), err) + } + + exists, err := p.cache.Exists(ctx, from.Hex()) + if err != nil { + return err + } + if exists { + if err := p.router.ProcessContractCreation( + ctx, + router.ContractCreationPayload{ + From: from.Hex(), + Block: blockNumber, + ContractAddress: receipt.ContractAddress.Hex(), + Timestamp: block.Time(), + TxHash: receipt.TxHash.Hex(), + Success: true, + }, + ); err != nil && !errors.Is(err, context.Canceled) { + return fmt.Errorf("route success contract creation error: tx %s: %v", receipt.TxHash.Hex(), err) + } + } + } + } + + if receipt.Status == 0 { tx, err := p.chain.GetTransaction(ctx, receipt.TxHash) if err != nil && !errors.Is(err, context.Canceled) { return fmt.Errorf("get transaction error: tx %s: %v", receipt.TxHash.Hex(), err) } + if tx.To() == nil { + from, err := types.Sender(types.LatestSignerForChainID(tx.ChainId()), tx) + if err != nil { + return fmt.Errorf("transaction decode error: tx %s: %v", receipt.TxHash.Hex(), err) + } - if tx.To() != nil { + exists, err := p.cache.Exists(ctx, from.Hex()) + if err != nil { + return err + } + + if exists { + if err := p.router.ProcessContractCreation( + ctx, + router.ContractCreationPayload{ + From: from.Hex(), + Block: blockNumber, + ContractAddress: receipt.ContractAddress.Hex(), + Timestamp: block.Time(), + TxHash: receipt.TxHash.Hex(), + Success: false, + }, + ); err != nil && !errors.Is(err, context.Canceled) { + return fmt.Errorf("route reverted contract creation error: tx %s: %v", receipt.TxHash.Hex(), err) + } + } + } else { exists, err := p.cache.Exists(ctx, tx.To().Hex()) if err != nil { return err diff --git a/pkg/router/router.go b/pkg/router/router.go index 6f5e940..61696bc 100644 --- a/pkg/router/router.go +++ b/pkg/router/router.go @@ -25,8 +25,18 @@ type ( TxHash string } - LogHandlerFunc func(context.Context, LogPayload, Callback) error - InputDataHandlerFunc func(context.Context, InputDataPayload, Callback) error + ContractCreationPayload struct { + From string + ContractAddress string + Block uint64 + Timestamp uint64 + TxHash string + Success bool + } + + LogHandlerFunc func(context.Context, LogPayload, Callback) error + InputDataHandlerFunc func(context.Context, InputDataPayload, Callback) error + ContractCreationHandlerFunc func(context.Context, ContractCreationPayload, Callback) error LogRouteEntry struct { Signature common.Hash @@ -39,17 +49,19 @@ type ( } Router struct { - callbackFn Callback - logHandlers map[common.Hash]LogRouteEntry - inputDataHandlers map[string]InputDataEntry + callbackFn Callback + logHandlers map[common.Hash]LogRouteEntry + inputDataHandlers map[string]InputDataEntry + contractCreationHandler ContractCreationHandlerFunc } ) func New(callbackFn Callback) *Router { return &Router{ - callbackFn: callbackFn, - logHandlers: make(map[common.Hash]LogRouteEntry), - inputDataHandlers: make(map[string]InputDataEntry), + callbackFn: callbackFn, + logHandlers: make(map[common.Hash]LogRouteEntry), + inputDataHandlers: make(map[string]InputDataEntry), + contractCreationHandler: nil, } } @@ -67,6 +79,10 @@ func (r *Router) RegisterInputDataRoute(signature string, handlerFunc InputDataH } } +func (r *Router) RegisterContractCreationHandler(handlerFunc ContractCreationHandlerFunc) { + r.contractCreationHandler = handlerFunc +} + func (r *Router) ProcessLog(ctx context.Context, payload LogPayload) error { handler, ok := r.logHandlers[payload.Log.Topics[0]] if ok { @@ -88,3 +104,7 @@ func (r *Router) ProcessInputData(ctx context.Context, payload InputDataPayload) return nil } + +func (r *Router) ProcessContractCreation(ctx context.Context, payload ContractCreationPayload) error { + return r.contractCreationHandler(ctx, payload, r.callbackFn) +} From 98e6b3bf68a8c5a122f36a42dbe7bd3ff3c32658 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 8 Oct 2024 08:52:04 +0300 Subject: [PATCH 5/7] build(deps): bump github.com/redis/rueidis from 1.0.46 to 1.0.47 (#47) Bumps [github.com/redis/rueidis](https://github.com/redis/rueidis) from 1.0.46 to 1.0.47. - [Release notes](https://github.com/redis/rueidis/releases) - [Commits](https://github.com/redis/rueidis/compare/v1.0.46...v1.0.47) --- updated-dependencies: - dependency-name: github.com/redis/rueidis dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 9bdb4f5..554ee54 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,7 @@ require ( github.com/lmittmann/w3 v0.17.0 github.com/nats-io/nats.go v1.36.0 github.com/puzpuzpuz/xsync/v3 v3.4.0 - github.com/redis/rueidis v1.0.46 + github.com/redis/rueidis v1.0.47 github.com/stretchr/testify v1.9.0 github.com/uptrace/bunrouter v1.0.22 go.etcd.io/bbolt v1.3.11 diff --git a/go.sum b/go.sum index 5ae32aa..934824b 100644 --- a/go.sum +++ b/go.sum @@ -171,8 +171,8 @@ github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0 github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/puzpuzpuz/xsync/v3 v3.4.0 h1:DuVBAdXuGFHv8adVXjWWZ63pJq+NRXOWVXlKDBZ+mJ4= github.com/puzpuzpuz/xsync/v3 v3.4.0/go.mod h1:VjzYrABPabuM4KyBh1Ftq6u8nhwY5tBPKP9jpmh0nnA= -github.com/redis/rueidis v1.0.46 h1:D4XWUZU2ByZpWky+LfIB/AouuLCkIL44BDI2NlJN63E= -github.com/redis/rueidis v1.0.46/go.mod h1:by+34b0cFXndxtYmPAHpoTHO5NkosDlBvhexoTURIxM= +github.com/redis/rueidis v1.0.47 h1:41UdeXOo4eJuW+cfpUJuLtVGyO0QJY3A2rEYgJWlfHs= +github.com/redis/rueidis v1.0.47/go.mod h1:by+34b0cFXndxtYmPAHpoTHO5NkosDlBvhexoTURIxM= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.2 h1:YwD0ulJSJytLpiaWua0sBDusfsCZohxjxzVTYjwxfV8= github.com/rivo/uniseg v0.4.2/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= From 9f9f564f84f07c0189f8077bbcbf815ded562a49 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 8 Oct 2024 08:52:13 +0300 Subject: [PATCH 6/7] build(deps): bump github.com/knadh/koanf/providers/file (#46) Bumps [github.com/knadh/koanf/providers/file](https://github.com/knadh/koanf) from 1.1.0 to 1.1.2. - [Release notes](https://github.com/knadh/koanf/releases) - [Commits](https://github.com/knadh/koanf/compare/v1.1.0...providers/file/v1.1.2) --- updated-dependencies: - dependency-name: github.com/knadh/koanf/providers/file dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 554ee54..9c23d65 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/kamikazechaser/common v0.2.0 github.com/knadh/koanf/parsers/toml v0.1.0 github.com/knadh/koanf/providers/env v1.0.0 - github.com/knadh/koanf/providers/file v1.1.0 + github.com/knadh/koanf/providers/file v1.1.2 github.com/knadh/koanf/v2 v2.1.1 github.com/lmittmann/w3 v0.17.0 github.com/nats-io/nats.go v1.36.0 diff --git a/go.sum b/go.sum index 934824b..9e90754 100644 --- a/go.sum +++ b/go.sum @@ -110,8 +110,8 @@ github.com/knadh/koanf/parsers/toml v0.1.0 h1:S2hLqS4TgWZYj4/7mI5m1CQQcWurxUz6OD github.com/knadh/koanf/parsers/toml v0.1.0/go.mod h1:yUprhq6eo3GbyVXFFMdbfZSo928ksS+uo0FFqNMnO18= github.com/knadh/koanf/providers/env v1.0.0 h1:ufePaI9BnWH+ajuxGGiJ8pdTG0uLEUWC7/HDDPGLah0= github.com/knadh/koanf/providers/env v1.0.0/go.mod h1:mzFyRZueYhb37oPmC1HAv/oGEEuyvJDA98r3XAa8Gak= -github.com/knadh/koanf/providers/file v1.1.0 h1:MTjA+gRrVl1zqgetEAIaXHqYje0XSosxSiMD4/7kz0o= -github.com/knadh/koanf/providers/file v1.1.0/go.mod h1:/faSBcv2mxPVjFrXck95qeoyoZ5myJ6uxN8OOVNJJCI= +github.com/knadh/koanf/providers/file v1.1.2 h1:aCC36YGOgV5lTtAFz2qkgtWdeQsgfxUkxDOe+2nQY3w= +github.com/knadh/koanf/providers/file v1.1.2/go.mod h1:/faSBcv2mxPVjFrXck95qeoyoZ5myJ6uxN8OOVNJJCI= github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= From f15373e34ecbbddb4e6faf8b902ef9d2a7a03e7b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 8 Oct 2024 08:56:13 +0300 Subject: [PATCH 7/7] build(deps): bump github.com/lmittmann/w3 from 0.17.0 to 0.17.1 (#44) Bumps [github.com/lmittmann/w3](https://github.com/lmittmann/w3) from 0.17.0 to 0.17.1. - [Release notes](https://github.com/lmittmann/w3/releases) - [Commits](https://github.com/lmittmann/w3/compare/v0.17.0...v0.17.1) --- updated-dependencies: - dependency-name: github.com/lmittmann/w3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 6 ++---- go.sum | 17 ++++++++--------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/go.mod b/go.mod index 9c23d65..290cda4 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,7 @@ require ( github.com/knadh/koanf/providers/env v1.0.0 github.com/knadh/koanf/providers/file v1.1.2 github.com/knadh/koanf/v2 v2.1.1 - github.com/lmittmann/w3 v0.17.0 + github.com/lmittmann/w3 v0.17.1 github.com/nats-io/nats.go v1.36.0 github.com/puzpuzpuz/xsync/v3 v3.4.0 github.com/redis/rueidis v1.0.47 @@ -41,7 +41,6 @@ require ( github.com/klauspost/compress v1.17.2 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/lmittmann/tint v1.0.4 // indirect - github.com/mattn/go-runewidth v0.0.14 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/mmcloughlin/addchain v0.4.0 // indirect @@ -49,7 +48,6 @@ require ( github.com/nats-io/nuid v1.0.1 // indirect github.com/pelletier/go-toml v1.9.5 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/rivo/uniseg v0.4.2 // indirect github.com/rogpeppe/go-internal v1.10.0 // indirect github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect github.com/supranational/blst v0.3.11 // indirect @@ -61,7 +59,7 @@ require ( golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect golang.org/x/sync v0.8.0 // indirect golang.org/x/sys v0.24.0 // indirect - golang.org/x/time v0.6.0 // indirect + golang.org/x/time v0.7.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect rsc.io/tmplfunc v0.0.3 // indirect ) diff --git a/go.sum b/go.sum index 9e90754..b002dd9 100644 --- a/go.sum +++ b/go.sum @@ -124,14 +124,14 @@ github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7 github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= github.com/lmittmann/tint v1.0.4 h1:LeYihpJ9hyGvE0w+K2okPTGUdVLfng1+nDNVR4vWISc= github.com/lmittmann/tint v1.0.4/go.mod h1:HIS3gSy7qNwGCj+5oRjAutErFBl4BzdQP6cJZ0NfMwE= -github.com/lmittmann/w3 v0.17.0 h1:Bsb6xSNU+woj7+VO7ERBCus97oCy6EWWKVUmoFbt534= -github.com/lmittmann/w3 v0.17.0/go.mod h1:sQXu3RJpP6Oj398bFyHeFiMHUExVxVOzoKrWZd/+yZ0= +github.com/lmittmann/w3 v0.17.1 h1:zdXIimmNmYfqOFur+Jqc9Yqwtq6jwnsQufbTOnSAtW4= +github.com/lmittmann/w3 v0.17.1/go.mod h1:WVUGMbL83WYBu4Sge3SVlW3qIG4VaHe+S8+UUnwz9Eg= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= -github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= +github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= @@ -173,9 +173,8 @@ github.com/puzpuzpuz/xsync/v3 v3.4.0 h1:DuVBAdXuGFHv8adVXjWWZ63pJq+NRXOWVXlKDBZ+ github.com/puzpuzpuz/xsync/v3 v3.4.0/go.mod h1:VjzYrABPabuM4KyBh1Ftq6u8nhwY5tBPKP9jpmh0nnA= github.com/redis/rueidis v1.0.47 h1:41UdeXOo4eJuW+cfpUJuLtVGyO0QJY3A2rEYgJWlfHs= github.com/redis/rueidis v1.0.47/go.mod h1:by+34b0cFXndxtYmPAHpoTHO5NkosDlBvhexoTURIxM= -github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= -github.com/rivo/uniseg v0.4.2 h1:YwD0ulJSJytLpiaWua0sBDusfsCZohxjxzVTYjwxfV8= -github.com/rivo/uniseg v0.4.2/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= +github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= +github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= @@ -226,8 +225,8 @@ golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= -golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U= -golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.7.0 h1:ntUhktv3OPE6TgYxXWv9vKvUSJyIFJlyohwbkEwPrKQ= +golang.org/x/time v0.7.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=