From b830f2305bf14ae2959722b08f77ec693bbf8bd6 Mon Sep 17 00:00:00 2001 From: golangisfun123 Date: Tue, 2 Jul 2024 17:46:49 -0500 Subject: [PATCH 01/16] initial --- core/metrics/base.go | 3 ++- core/metrics/metrics.go | 7 ++++--- core/metrics/metrics_test.go | 5 +++-- ethergo/submitter/submitter.go | 20 ++++++++++++++++++++ services/rfq/relayer/relapi/client.go | 21 ++++++++++++++++++++- services/rfq/relayer/relapi/handler.go | 10 ++++++++++ services/rfq/relayer/relapi/server.go | 2 ++ 7 files changed, 61 insertions(+), 7 deletions(-) diff --git a/core/metrics/base.go b/core/metrics/base.go index ebbe87804a..bafe4ce87c 100644 --- a/core/metrics/base.go +++ b/core/metrics/base.go @@ -3,6 +3,8 @@ package metrics import ( "context" "fmt" + "net/http" + "github.com/gin-gonic/gin" "github.com/prometheus/client_golang/prometheus/promhttp" "github.com/synapsecns/sanguine/core" @@ -28,7 +30,6 @@ import ( semconv "go.opentelemetry.io/otel/semconv/v1.25.0" "go.opentelemetry.io/otel/trace" "gorm.io/gorm" - "net/http" ) const pyroscopeEndpoint = internal.PyroscopeEndpoint diff --git a/core/metrics/metrics.go b/core/metrics/metrics.go index d09a794b6b..f3f6bf8da3 100644 --- a/core/metrics/metrics.go +++ b/core/metrics/metrics.go @@ -3,6 +3,10 @@ package metrics import ( "context" "fmt" + "net/http" + "os" + "strings" + "github.com/gin-gonic/gin" "github.com/synapsecns/sanguine/core/config" experimentalLogger "github.com/synapsecns/sanguine/core/metrics/logger" @@ -11,9 +15,6 @@ import ( "go.opentelemetry.io/otel/propagation" "go.opentelemetry.io/otel/trace" "gorm.io/gorm" - "net/http" - "os" - "strings" ) // Handler collects metrics. diff --git a/core/metrics/metrics_test.go b/core/metrics/metrics_test.go index 3436a83512..bd41396153 100644 --- a/core/metrics/metrics_test.go +++ b/core/metrics/metrics_test.go @@ -2,12 +2,13 @@ package metrics_test import ( "context" - "github.com/stretchr/testify/assert" + "testing" + + "github.com/alecthomas/assert" . "github.com/stretchr/testify/assert" "github.com/synapsecns/sanguine/core/config" "github.com/synapsecns/sanguine/core/metrics" "github.com/synapsecns/sanguine/core/metrics/localmetrics" - "testing" ) func TestSetupFromEnv(t *testing.T) { diff --git a/ethergo/submitter/submitter.go b/ethergo/submitter/submitter.go index 0823d690cc..3b7c378346 100644 --- a/ethergo/submitter/submitter.go +++ b/ethergo/submitter/submitter.go @@ -48,6 +48,8 @@ type TransactionSubmitter interface { GetSubmissionStatus(ctx context.Context, chainID *big.Int, nonce uint64) (status SubmissionStatus, err error) // Address returns the address of the signer. Address() common.Address + // GetTxHashByNonce returns the transaction hash for a given nonce. + GetTxHashByNonce(ctx context.Context, chainID *big.Int, nonce uint64) (txHash common.Hash, err error) } // txSubmitterImpl is the implementation of the transaction submitter. @@ -671,4 +673,22 @@ func (t *txSubmitterImpl) Address() common.Address { return t.signer.Address() } +func (t *txSubmitterImpl) GetTxHashByNonce(ctx context.Context, chainID *big.Int, nonce uint64) (txHash common.Hash, err error) { + ctx, span := t.metrics.Tracer().Start(ctx, "submitter.getTxHashByNonce", trace.WithAttributes( + attribute.Stringer("chainID", chainID), + attribute.Int64("nonce", int64(nonce)), + )) + + defer func() { + metrics.EndSpanWithErr(span, err) + }() + + tx, err := t.db.GetNonceAttemptsByStatus(ctx, t.signer.Address(), chainID, nonce) + if err != nil { + return common.Hash{}, fmt.Errorf("could not get tx by nonce: %w", err) + } + + return tx[0].Hash(), nil +} + var _ TransactionSubmitter = &txSubmitterImpl{} diff --git a/services/rfq/relayer/relapi/client.go b/services/rfq/relayer/relapi/client.go index cd643cec4c..22fff668e0 100644 --- a/services/rfq/relayer/relapi/client.go +++ b/services/rfq/relayer/relapi/client.go @@ -3,12 +3,13 @@ package relapi import ( "context" "fmt" + "net/http" + "github.com/dubonzi/otelresty" "github.com/go-http-utils/headers" "github.com/go-resty/resty/v2" "github.com/synapsecns/sanguine/core/metrics" "github.com/valyala/fastjson" - "net/http" ) // RelayerClient is the interface for the relayer client. @@ -122,3 +123,21 @@ func (r *relayerClient) Withdraw(ctx context.Context, req *WithdrawRequest) (*Wi return &res, nil } + +func (r *relayerClient) GetTxHashByNonce(ctx context.Context, chainID string, nonce string) (string, error) { + var res struct { + Hash string `json:"hash"` + } + resp, err := r.client.R().SetContext(ctx). + SetQueryParam("chain_id", chainID). + SetQueryParam("nonce", nonce). + SetResult(&res). + Get(getTxHashByNonceRoute) + if err != nil { + return "", fmt.Errorf("failed to get tx hash by nonce: %w", err) + } + if resp.StatusCode() != http.StatusOK { + return "", fmt.Errorf("unexpected status code: %d", resp.StatusCode()) + } + return res.Hash, nil +} diff --git a/services/rfq/relayer/relapi/handler.go b/services/rfq/relayer/relapi/handler.go index 9b5d741cbd..de7b788ef2 100644 --- a/services/rfq/relayer/relapi/handler.go +++ b/services/rfq/relayer/relapi/handler.go @@ -1,6 +1,7 @@ package relapi import ( + "context" "encoding/json" "fmt" "math/big" @@ -212,6 +213,15 @@ func (h *Handler) Withdraw(c *gin.Context) { c.JSON(http.StatusOK, gin.H{"nonce": nonce}) } +func (h *Handler) getTxHashByNonce(ctx context.Context, chainID *big.Int, nonce uint64) (txHash common.Hash, err error) { + txHash, err = h.submitter.GetTxHashByNonce(ctx, chainID, nonce) + if err != nil { + return common.Hash{}, fmt.Errorf("could not get tx by nonce: %w", err) + } + + return txHash, nil +} + // tokenIDExists checks if a token ID exists in the config. // note: this method assumes that SanitizeTokenID is a method of relconfig.Config func tokenIDExists(cfg relconfig.Config, tokenAddress common.Address, chainID int) bool { diff --git a/services/rfq/relayer/relapi/server.go b/services/rfq/relayer/relapi/server.go index 709a6c3b12..857d635932 100644 --- a/services/rfq/relayer/relapi/server.go +++ b/services/rfq/relayer/relapi/server.go @@ -101,6 +101,7 @@ const ( getQuoteStatusByTxIDRoute = "/status/by_tx_id" getRetryRoute = "/retry" postWithdrawRoute = "/withdraw" + getTxHashByNonceRoute = "/txMiddleware" ) var logger = log.Logger("relayer-api") @@ -110,6 +111,7 @@ func (r *RelayerAPIServer) Run(ctx context.Context) error { engine := ginhelper.New(logger) // default tracing middleware engine.Use(r.handler.Gin()...) + engine.Use(r.handler.GetWithdrawalTxHash()) h := NewHandler(r.db, r.chains, r.cfg, r.submitter) // Assign GET routes From d046c7f16c109eecad162b0c745431745b56f299 Mon Sep 17 00:00:00 2001 From: golangisfun123 Date: Tue, 2 Jul 2024 18:59:12 -0500 Subject: [PATCH 02/16] rework --- agents/go.mod | 2 -- contrib/promexporter/go.sum | 6 +++++ contrib/screener-api/go.sum | 6 +++++ core/go.mod | 3 +++ core/go.sum | 6 +++++ ethergo/go.sum | 6 +++++ ethergo/submitter/submitter.go | 10 ++++++-- services/explorer/go.mod | 2 -- services/omnirpc/go.sum | 6 +++++ services/rfq/go.mod | 16 +++++++++++++ services/rfq/go.sum | 33 ++++++++++++++++++++++++++ services/rfq/relayer/cmd/commands.go | 22 ++++++++++++++++- services/rfq/relayer/relapi/client.go | 1 + services/rfq/relayer/relapi/handler.go | 22 +++++++++++++---- services/rfq/relayer/relapi/server.go | 4 ++-- services/scribe/go.mod | 1 - 16 files changed, 131 insertions(+), 15 deletions(-) diff --git a/agents/go.mod b/agents/go.mod index 55acbdbc79..96aa4b9d65 100644 --- a/agents/go.mod +++ b/agents/go.mod @@ -51,8 +51,6 @@ require ( dario.cat/mergo v1.0.0 // indirect github.com/DataDog/zstd v1.5.2 // indirect github.com/DenrianWeiss/tracely v0.0.0-20220624070317-49cf8afaaf18 // indirect - github.com/alecthomas/colour v0.1.0 // indirect - github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142 // indirect github.com/bcicen/jstream v1.0.1 // indirect github.com/bits-and-blooms/bitset v1.10.0 // indirect github.com/bytedance/sonic/loader v0.1.1 // indirect diff --git a/contrib/promexporter/go.sum b/contrib/promexporter/go.sum index 3170bf3e09..23b210fb85 100644 --- a/contrib/promexporter/go.sum +++ b/contrib/promexporter/go.sum @@ -115,6 +115,12 @@ github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRB github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= +github.com/alecthomas/assert v1.0.0 h1:3XmGh/PSuLzDbK3W2gUbRXwgW5lqPkuqvRgeQ30FI5o= +github.com/alecthomas/assert v1.0.0/go.mod h1:va/d2JC+M7F6s+80kl/R3G7FUiW6JzUO+hPhLyJ36ZY= +github.com/alecthomas/colour v0.1.0 h1:nOE9rJm6dsZ66RGWYSFrXw461ZIt9A6+nHgL7FRrDUk= +github.com/alecthomas/colour v0.1.0/go.mod h1:QO9JBoKquHd+jz9nshCh40fOfO+JzsoXy8qTHF68zU0= +github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142 h1:8Uy0oSf5co/NZXje7U1z8Mpep++QJOldL2hs/sBQf48= +github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= diff --git a/contrib/screener-api/go.sum b/contrib/screener-api/go.sum index 1d7c0eea54..af3984d4b6 100644 --- a/contrib/screener-api/go.sum +++ b/contrib/screener-api/go.sum @@ -57,6 +57,12 @@ github.com/ProtonMail/go-crypto v1.0.0 h1:LRuvITjQWX+WIfr930YHG2HNfjR1uOfyf5vE0k github.com/ProtonMail/go-crypto v1.0.0/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= github.com/TwiN/gocache/v2 v2.2.2 h1:4HToPfDV8FSbaYO5kkbhLpEllUYse5rAf+hVU/mSsuI= github.com/TwiN/gocache/v2 v2.2.2/go.mod h1:WfIuwd7GR82/7EfQqEtmLFC3a2vqaKbs4Pe6neB7Gyc= +github.com/alecthomas/assert v1.0.0 h1:3XmGh/PSuLzDbK3W2gUbRXwgW5lqPkuqvRgeQ30FI5o= +github.com/alecthomas/assert v1.0.0/go.mod h1:va/d2JC+M7F6s+80kl/R3G7FUiW6JzUO+hPhLyJ36ZY= +github.com/alecthomas/colour v0.1.0 h1:nOE9rJm6dsZ66RGWYSFrXw461ZIt9A6+nHgL7FRrDUk= +github.com/alecthomas/colour v0.1.0/go.mod h1:QO9JBoKquHd+jz9nshCh40fOfO+JzsoXy8qTHF68zU0= +github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142 h1:8Uy0oSf5co/NZXje7U1z8Mpep++QJOldL2hs/sBQf48= +github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= diff --git a/core/go.mod b/core/go.mod index 3938b25872..3625e72aa3 100644 --- a/core/go.mod +++ b/core/go.mod @@ -10,6 +10,7 @@ require ( github.com/Flaque/filet v0.0.0-20201012163910-45f684403088 github.com/ImVexed/fasturl v0.0.0-20230304231329-4e41488060f3 github.com/Soft/iter v0.1.0 + github.com/alecthomas/assert v1.0.0 github.com/brianvoe/gofakeit/v6 v6.27.0 github.com/c-bata/go-prompt v0.2.6 github.com/cheekybits/genny v1.0.0 @@ -69,6 +70,8 @@ require ( github.com/Microsoft/go-winio v0.6.1 // indirect github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect github.com/ProtonMail/go-crypto v1.0.0 // indirect + github.com/alecthomas/colour v0.1.0 // indirect + github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.0 // indirect github.com/bytedance/sonic v1.11.6 // indirect diff --git a/core/go.sum b/core/go.sum index 9f04a80f95..3cdb8185e3 100644 --- a/core/go.sum +++ b/core/go.sum @@ -55,6 +55,12 @@ github.com/ProtonMail/go-crypto v1.0.0 h1:LRuvITjQWX+WIfr930YHG2HNfjR1uOfyf5vE0k github.com/ProtonMail/go-crypto v1.0.0/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= github.com/Soft/iter v0.1.0 h1:fEWgwubt0cnnJo3Vd2IzYcaJ5ORI/dJDkaC3loI7Ys8= github.com/Soft/iter v0.1.0/go.mod h1:8brXuNcweP5AZyF0Yzjvje+IR/6RNFyyLF6DTMiPXRc= +github.com/alecthomas/assert v1.0.0 h1:3XmGh/PSuLzDbK3W2gUbRXwgW5lqPkuqvRgeQ30FI5o= +github.com/alecthomas/assert v1.0.0/go.mod h1:va/d2JC+M7F6s+80kl/R3G7FUiW6JzUO+hPhLyJ36ZY= +github.com/alecthomas/colour v0.1.0 h1:nOE9rJm6dsZ66RGWYSFrXw461ZIt9A6+nHgL7FRrDUk= +github.com/alecthomas/colour v0.1.0/go.mod h1:QO9JBoKquHd+jz9nshCh40fOfO+JzsoXy8qTHF68zU0= +github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142 h1:8Uy0oSf5co/NZXje7U1z8Mpep++QJOldL2hs/sBQf48= +github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= diff --git a/ethergo/go.sum b/ethergo/go.sum index 1e7d9fcda0..6a6252e311 100644 --- a/ethergo/go.sum +++ b/ethergo/go.sum @@ -104,6 +104,12 @@ github.com/VictoriaMetrics/fastcache v1.12.1/go.mod h1:tX04vaqcNoQeGLD+ra5pU5sWk github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= +github.com/alecthomas/assert v1.0.0 h1:3XmGh/PSuLzDbK3W2gUbRXwgW5lqPkuqvRgeQ30FI5o= +github.com/alecthomas/assert v1.0.0/go.mod h1:va/d2JC+M7F6s+80kl/R3G7FUiW6JzUO+hPhLyJ36ZY= +github.com/alecthomas/colour v0.1.0 h1:nOE9rJm6dsZ66RGWYSFrXw461ZIt9A6+nHgL7FRrDUk= +github.com/alecthomas/colour v0.1.0/go.mod h1:QO9JBoKquHd+jz9nshCh40fOfO+JzsoXy8qTHF68zU0= +github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142 h1:8Uy0oSf5co/NZXje7U1z8Mpep++QJOldL2hs/sBQf48= +github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= diff --git a/ethergo/submitter/submitter.go b/ethergo/submitter/submitter.go index 3b7c378346..f170b6b004 100644 --- a/ethergo/submitter/submitter.go +++ b/ethergo/submitter/submitter.go @@ -683,12 +683,18 @@ func (t *txSubmitterImpl) GetTxHashByNonce(ctx context.Context, chainID *big.Int metrics.EndSpanWithErr(span, err) }() - tx, err := t.db.GetNonceAttemptsByStatus(ctx, t.signer.Address(), chainID, nonce) + txs, err := t.db.GetNonceAttemptsByStatus(ctx, t.signer.Address(), chainID, nonce) if err != nil { return common.Hash{}, fmt.Errorf("could not get tx by nonce: %w", err) } - return tx[0].Hash(), nil + for tx := range txs { + if txs[tx].Status == db.Confirmed { + return txs[tx].Hash(), nil + } + } + + return txs[0].Hash(), nil } var _ TransactionSubmitter = &txSubmitterImpl{} diff --git a/services/explorer/go.mod b/services/explorer/go.mod index 4d99dfb961..654659b319 100644 --- a/services/explorer/go.mod +++ b/services/explorer/go.mod @@ -68,8 +68,6 @@ require ( github.com/VictoriaMetrics/fastcache v1.12.1 // indirect github.com/agnivade/levenshtein v1.1.1 // indirect github.com/alecthomas/chroma v0.7.1 // indirect - github.com/alecthomas/colour v0.1.0 // indirect - github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142 // indirect github.com/andybalholm/brotli v1.1.0 // indirect github.com/aws/smithy-go v1.15.0 // indirect github.com/bcicen/jstream v1.0.1 // indirect diff --git a/services/omnirpc/go.sum b/services/omnirpc/go.sum index 2bc342f5b9..430000eaa4 100644 --- a/services/omnirpc/go.sum +++ b/services/omnirpc/go.sum @@ -107,6 +107,12 @@ github.com/VictoriaMetrics/fastcache v1.12.1/go.mod h1:tX04vaqcNoQeGLD+ra5pU5sWk github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= +github.com/alecthomas/assert v1.0.0 h1:3XmGh/PSuLzDbK3W2gUbRXwgW5lqPkuqvRgeQ30FI5o= +github.com/alecthomas/assert v1.0.0/go.mod h1:va/d2JC+M7F6s+80kl/R3G7FUiW6JzUO+hPhLyJ36ZY= +github.com/alecthomas/colour v0.1.0 h1:nOE9rJm6dsZ66RGWYSFrXw461ZIt9A6+nHgL7FRrDUk= +github.com/alecthomas/colour v0.1.0/go.mod h1:QO9JBoKquHd+jz9nshCh40fOfO+JzsoXy8qTHF68zU0= +github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142 h1:8Uy0oSf5co/NZXje7U1z8Mpep++QJOldL2hs/sBQf48= +github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= diff --git a/services/rfq/go.mod b/services/rfq/go.mod index 138846a0c5..ccc92c6681 100644 --- a/services/rfq/go.mod +++ b/services/rfq/go.mod @@ -8,6 +8,7 @@ require ( github.com/Flaque/filet v0.0.0-20201012163910-45f684403088 github.com/alecthomas/assert v1.0.0 github.com/brianvoe/gofakeit/v6 v6.27.0 + github.com/charmbracelet/huh/spinner v0.0.0-20240618200428-90406d79077d github.com/dubonzi/otelresty v1.2.0 github.com/ethereum/go-ethereum v1.13.8 github.com/gin-gonic/gin v1.10.0 @@ -79,6 +80,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.3 // indirect github.com/aws/aws-sdk-go-v2/service/sts v1.23.2 // indirect github.com/aws/smithy-go v1.15.0 // indirect + github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect github.com/bcicen/jstream v1.0.1 // indirect github.com/benbjohnson/immutable v0.4.3 // indirect github.com/beorn7/perks v1.0.1 // indirect @@ -93,6 +95,13 @@ require ( github.com/c-bata/go-prompt v0.2.6 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/charmbracelet/bubbles v0.18.0 // indirect + github.com/charmbracelet/bubbletea v0.26.5 // indirect + github.com/charmbracelet/lipgloss v0.11.0 // indirect + github.com/charmbracelet/x/ansi v0.1.2 // indirect + github.com/charmbracelet/x/input v0.1.2 // indirect + github.com/charmbracelet/x/term v0.1.1 // indirect + github.com/charmbracelet/x/windows v0.1.2 // indirect github.com/cheekybits/genny v1.0.0 // indirect github.com/chzyer/logex v1.2.1 // indirect github.com/chzyer/test v1.0.0 // indirect @@ -123,6 +132,7 @@ require ( github.com/docker/go-connections v0.5.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/emirpasic/gods v1.18.1 // indirect + github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect github.com/ethereum/c-kzg-4844 v0.4.0 // indirect github.com/fatih/structtag v1.2.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect @@ -201,9 +211,11 @@ require ( github.com/kr/text v0.2.0 // indirect github.com/leodido/go-urn v1.4.0 // indirect github.com/libp2p/go-libp2p v0.33.0 // indirect + github.com/lucasb-eyer/go-colorful v1.2.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect + github.com/mattn/go-localereader v0.0.1 // indirect github.com/mattn/go-runewidth v0.0.15 // indirect github.com/mattn/go-sqlite3 v2.0.3+incompatible // indirect github.com/mattn/go-tty v0.0.3 // indirect @@ -216,6 +228,9 @@ require ( github.com/moby/term v0.5.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect + github.com/muesli/cancelreader v0.2.2 // indirect + github.com/muesli/termenv v0.15.2 // indirect github.com/neverlee/keymutex v0.0.0-20171121013845-f593aa834bf9 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect @@ -269,6 +284,7 @@ require ( github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect + github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 // indirect github.com/yusufpapurcu/wmi v1.2.3 // indirect go.opencensus.io v0.24.0 // indirect diff --git a/services/rfq/go.sum b/services/rfq/go.sum index cf76314f9e..19c1524ae6 100644 --- a/services/rfq/go.sum +++ b/services/rfq/go.sum @@ -170,6 +170,8 @@ github.com/aws/smithy-go v1.1.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB github.com/aws/smithy-go v1.11.3/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/aws/smithy-go v1.15.0 h1:PS/durmlzvAFpQHDs4wi4sNNP9ExsqZh6IlfdHXgKK8= github.com/aws/smithy-go v1.15.0/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= +github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= +github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8= github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= github.com/bcicen/jstream v1.0.1 h1:BXY7Cu4rdmc0rhyTVyT3UkxAiX3bnLpKLas9btbH5ck= github.com/bcicen/jstream v1.0.1/go.mod h1:9ielPxqFry7Y4Tg3j4BfjPocfJ3TbsRtXOAYXYmRuAQ= @@ -227,6 +229,22 @@ github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/charmbracelet/bubbles v0.18.0 h1:PYv1A036luoBGroX6VWjQIE9Syf2Wby2oOl/39KLfy0= +github.com/charmbracelet/bubbles v0.18.0/go.mod h1:08qhZhtIwzgrtBjAcJnij1t1H0ZRjwHyGsy6AL11PSw= +github.com/charmbracelet/bubbletea v0.26.5 h1:90pqTPElAReb/qQUgSMUresTkfwVr0Wx+zczeHHOgxk= +github.com/charmbracelet/bubbletea v0.26.5/go.mod h1:dz8CWPlfCCGLFbBlTY4N7bjLiyOGDJEnd2Muu7pOWhk= +github.com/charmbracelet/huh/spinner v0.0.0-20240618200428-90406d79077d h1:OpthCCWiHBSx6LTAYGGkN9OeuJrKzjobe0q12wO6BX0= +github.com/charmbracelet/huh/spinner v0.0.0-20240618200428-90406d79077d/go.mod h1:CrXBZnOWs3zpyppOZZS7lu2CpLq2jx6U5chL/frRG/E= +github.com/charmbracelet/lipgloss v0.11.0 h1:UoAcbQ6Qml8hDwSWs0Y1cB5TEQuZkDPH/ZqwWWYTG4g= +github.com/charmbracelet/lipgloss v0.11.0/go.mod h1:1UdRTH9gYgpcdNN5oBtjbu/IzNKtzVtb7sqN1t9LNn8= +github.com/charmbracelet/x/ansi v0.1.2 h1:6+LR39uG8DE6zAmbu023YlqjJHkYXDF1z36ZwzO4xZY= +github.com/charmbracelet/x/ansi v0.1.2/go.mod h1:dk73KoMTT5AX5BsX0KrqhsTqAnhZZoCBjs7dGWp4Ktw= +github.com/charmbracelet/x/input v0.1.2 h1:QJAZr33eOhDowkkEQ24rsJy4Llxlm+fRDf/cQrmqJa0= +github.com/charmbracelet/x/input v0.1.2/go.mod h1:LGBim0maUY4Pitjn/4fHnuXb4KirU3DODsyuHuXdOyA= +github.com/charmbracelet/x/term v0.1.1 h1:3cosVAiPOig+EV4X9U+3LDgtwwAoEzJjNdwbXDjF6yI= +github.com/charmbracelet/x/term v0.1.1/go.mod h1:wB1fHt5ECsu3mXYusyzcngVWWlu1KKUmmLhfgr/Flxw= +github.com/charmbracelet/x/windows v0.1.2 h1:Iumiwq2G+BRmgoayww/qfcvof7W/3uLoelhxojXlRWg= +github.com/charmbracelet/x/windows v0.1.2/go.mod h1:GLEO/l+lizvFDBPLIOk+49gdX49L9YWMB5t+DZd0jkQ= github.com/checkpoint-restore/go-criu/v5 v5.3.0/go.mod h1:E/eQpaFtUKGOOSEBZgmKAcn+zUUwWxqcaKZlF54wK8E= github.com/cheekybits/genny v1.0.0 h1:uGGa4nei+j20rOSeDeP5Of12XVm7TGUd4dJA9RDitfE= github.com/cheekybits/genny v1.0.0/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wXkRAgjxjQ= @@ -350,6 +368,8 @@ github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5y github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f h1:Y/CXytFA4m6baUTXGLOoWe4PQhGxaX0KpnayAqC48p4= +github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f/go.mod h1:vw97MGsxSvLiUE2X8qFplwetxpGLQrlU1Q9AUEIzCaM= github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= github.com/ethereum/c-kzg-4844 v0.4.0 h1:3MS1s4JtA868KpJxroZoepdV0ZKBp3u/O5HcZ7R3nlY= github.com/ethereum/c-kzg-4844 v0.4.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= @@ -769,6 +789,8 @@ github.com/libp2p/go-libp2p v0.33.0 h1:yTPSr8sJRbfeEYXyeN8VPVSlTlFjtMUwGDRniwaf/ github.com/libp2p/go-libp2p v0.33.0/go.mod h1:RIJFRQVUBKy82dnW7J5f1homqqv6NcsDJAl3e7CRGfE= github.com/lmittmann/w3 v0.10.0 h1:AjQJKfcwHSDLr7cnRbS+0Jio9xt/h1JDBAP/jvLWC58= github.com/lmittmann/w3 v0.10.0/go.mod h1:AydD3eqJiyg7tubFve39JL025kZr8QWO1lemXllK+Sw= +github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= +github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= @@ -798,6 +820,8 @@ github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27k github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= 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-localereader v0.0.1 h1:ygSAOl7ZXTx4RdPYinUpg6W99U8jWvWi9Ye2JC/oIi4= +github.com/mattn/go-localereader v0.0.1/go.mod h1:8fBrzywKY7BI3czFoHkuzRoWE9C+EiG4R1k4Cjx5p88= github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.6/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= @@ -845,6 +869,12 @@ github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o= github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg= +github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 h1:ZK8zHtRHOkbHy6Mmr5D264iyp3TiX5OmNcI5cIARiQI= +github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6/go.mod h1:CJlz5H+gyd6CUWT45Oy4q24RdLyn7Md9Vj2/ldJBSIo= +github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELUXHmA= +github.com/muesli/cancelreader v0.2.2/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo= +github.com/muesli/termenv v0.15.2 h1:GohcuySI0QmI3wN8Ok9PtKGkgkFIk7y6Vpb5PvrY+Wo= +github.com/muesli/termenv v0.15.2/go.mod h1:Epx+iuz8sNs7mNKhxzH4fWXGNpZwUaJKRS1noLXviQ8= github.com/multiformats/go-base32 v0.1.0 h1:pVx9xoSPqEIQG8o+UbAe7DNi51oej1NtK+aGkbLYxPE= github.com/multiformats/go-base32 v0.1.0/go.mod h1:Kj3tFY6zNr+ABYMqeUNeGvkIC/UYgtWibDcT0rExnbI= github.com/multiformats/go-base36 v0.2.0 h1:lFsAbNOGeKtuKozrtBsAkSVhv1p9D0/qedU9rQyccr0= @@ -1128,6 +1158,8 @@ github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1: github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= +github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no= +github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 h1:+qGGcbkzsfDQNPPe9UDgpxAWQrhbbBXOYJFQDq/dtJw= github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913/go.mod h1:4aEEwZQutDLsQv2Deui4iYQ6DWTxR14g6m8Wv88+Xqk= @@ -1436,6 +1468,7 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210906170528-6f6e22806c34/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= diff --git a/services/rfq/relayer/cmd/commands.go b/services/rfq/relayer/cmd/commands.go index 0ce6bdb172..a384d8e435 100644 --- a/services/rfq/relayer/cmd/commands.go +++ b/services/rfq/relayer/cmd/commands.go @@ -4,6 +4,7 @@ package cmd import ( "fmt" + "github.com/charmbracelet/huh/spinner" "github.com/ethereum/go-ethereum/common" "github.com/synapsecns/sanguine/core" "github.com/synapsecns/sanguine/core/commandline" @@ -114,11 +115,30 @@ var withdrawCommand = &cli.Command{ To: common.HexToAddress(to), } - _, err = client.Withdraw(c.Context, &withdrawRequest) + res, err := client.Withdraw(c.Context, &withdrawRequest) if err != nil { return fmt.Errorf("could not start relayer: %w", err) } + var clientErr error + var status string + err = spinner.New(). + Title("Logging in..."). + Action(func() { + status, err = client.GetTxHashByNonce(c.Context, fmt.Sprint(chainID), fmt.Sprint(res.Nonce)) + if err != nil { + clientErr = fmt.Errorf("could not login: %w", err) + } + }).Run() + if err != nil { + panic(err) + } + if clientErr != nil { + panic(clientErr) + } + + fmt.Sprintf("Withdraw Tx: %s", status) + return nil }, } diff --git a/services/rfq/relayer/relapi/client.go b/services/rfq/relayer/relapi/client.go index 22fff668e0..009f31291e 100644 --- a/services/rfq/relayer/relapi/client.go +++ b/services/rfq/relayer/relapi/client.go @@ -19,6 +19,7 @@ type RelayerClient interface { GetQuoteRequestStatusByTxID(ctx context.Context, hash string) (*GetQuoteRequestStatusResponse, error) RetryTransaction(ctx context.Context, txhash string) (*GetTxRetryResponse, error) Withdraw(ctx context.Context, req *WithdrawRequest) (*WithdrawResponse, error) + GetTxHashByNonce(ctx context.Context, chainID string, nonce string) (string, error) } type relayerClient struct { diff --git a/services/rfq/relayer/relapi/handler.go b/services/rfq/relayer/relapi/handler.go index de7b788ef2..4085238c92 100644 --- a/services/rfq/relayer/relapi/handler.go +++ b/services/rfq/relayer/relapi/handler.go @@ -1,7 +1,6 @@ package relapi import ( - "context" "encoding/json" "fmt" "math/big" @@ -213,13 +212,26 @@ func (h *Handler) Withdraw(c *gin.Context) { c.JSON(http.StatusOK, gin.H{"nonce": nonce}) } -func (h *Handler) getTxHashByNonce(ctx context.Context, chainID *big.Int, nonce uint64) (txHash common.Hash, err error) { - txHash, err = h.submitter.GetTxHashByNonce(ctx, chainID, nonce) +func (h *Handler) GetTxHashByNonce(c *gin.Context) { + nonce, ok := c.Get("nonce") + if !ok { + c.JSON(http.StatusInternalServerError, gin.H{"error": "could not get nonce"}) + return + } + chainid, ok := c.Get("chainid") + if !ok { + c.JSON(http.StatusInternalServerError, gin.H{"error": "could not get nonce"}) + return + } + + tx, err := h.submitter.GetTxHashByNonce(c, big.NewInt(chainid.(int64)), nonce.(uint64)) if err != nil { - return common.Hash{}, fmt.Errorf("could not get tx by nonce: %w", err) + c.JSON(http.StatusInternalServerError, gin.H{"error": fmt.Sprintf("could not get tx hash: %s", err.Error())}) + return } - return txHash, nil + c.JSON(http.StatusOK, gin.H{"withdrawTxHash": tx}) + } // tokenIDExists checks if a token ID exists in the config. diff --git a/services/rfq/relayer/relapi/server.go b/services/rfq/relayer/relapi/server.go index 857d635932..588ab30c2c 100644 --- a/services/rfq/relayer/relapi/server.go +++ b/services/rfq/relayer/relapi/server.go @@ -101,7 +101,7 @@ const ( getQuoteStatusByTxIDRoute = "/status/by_tx_id" getRetryRoute = "/retry" postWithdrawRoute = "/withdraw" - getTxHashByNonceRoute = "/txMiddleware" + getTxHashByNonceRoute = "/tx_hash/by_nonce" ) var logger = log.Logger("relayer-api") @@ -111,7 +111,6 @@ func (r *RelayerAPIServer) Run(ctx context.Context) error { engine := ginhelper.New(logger) // default tracing middleware engine.Use(r.handler.Gin()...) - engine.Use(r.handler.GetWithdrawalTxHash()) h := NewHandler(r.db, r.chains, r.cfg, r.submitter) // Assign GET routes @@ -123,6 +122,7 @@ func (r *RelayerAPIServer) Run(ctx context.Context) error { if r.cfg.EnableAPIWithdrawals { engine.POST(postWithdrawRoute, h.Withdraw) + engine.GET(getTxHashByNonceRoute, h.GetTxHashByNonce) } r.engine = engine diff --git a/services/scribe/go.mod b/services/scribe/go.mod index 5df6e12305..baf757fbe2 100644 --- a/services/scribe/go.mod +++ b/services/scribe/go.mod @@ -83,7 +83,6 @@ require ( github.com/Soft/iter v0.1.0 // indirect github.com/VictoriaMetrics/fastcache v1.12.1 // indirect github.com/agnivade/levenshtein v1.1.1 // indirect - github.com/alecthomas/assert v1.0.0 // indirect github.com/alecthomas/chroma v0.7.1 // indirect github.com/andybalholm/brotli v1.1.0 // indirect github.com/bcicen/jstream v1.0.1 // indirect From 0e0dc94c6ab36783b039618c63b8e484ec4de564 Mon Sep 17 00:00:00 2001 From: golangisfun123 Date: Tue, 2 Jul 2024 18:59:45 -0500 Subject: [PATCH 03/16] better print --- services/rfq/relayer/cmd/commands.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/rfq/relayer/cmd/commands.go b/services/rfq/relayer/cmd/commands.go index a384d8e435..d8cc1d5db7 100644 --- a/services/rfq/relayer/cmd/commands.go +++ b/services/rfq/relayer/cmd/commands.go @@ -137,7 +137,7 @@ var withdrawCommand = &cli.Command{ panic(clientErr) } - fmt.Sprintf("Withdraw Tx: %s", status) + fmt.Printf("Withdraw Tx Hash: %s\n", status) return nil }, From 740b61fb081b257fa089c85290e4de7c4ca78190 Mon Sep 17 00:00:00 2001 From: golangisfun123 Date: Wed, 3 Jul 2024 02:18:12 -0500 Subject: [PATCH 04/16] try and fix test --- services/rfq/relayer/cmd/commands.go | 20 ++- services/rfq/relayer/relapi/client.go | 24 +-- services/rfq/relayer/relapi/client_test.go | 186 +++++++++++++++++++++ services/rfq/relayer/relapi/handler.go | 28 ++-- services/rfq/relayer/relapi/server_test.go | 147 +--------------- 5 files changed, 233 insertions(+), 172 deletions(-) diff --git a/services/rfq/relayer/cmd/commands.go b/services/rfq/relayer/cmd/commands.go index d8cc1d5db7..41f72b9026 100644 --- a/services/rfq/relayer/cmd/commands.go +++ b/services/rfq/relayer/cmd/commands.go @@ -3,6 +3,7 @@ package cmd import ( "fmt" + "math/big" "github.com/charmbracelet/huh/spinner" "github.com/ethereum/go-ethereum/common" @@ -88,8 +89,8 @@ var withdrawCommand = &cli.Command{ return fmt.Errorf("could not create relayer: %w", err) } - chainID := c.Uint(chainIDFlag.Name) - if chainID == 0 { + chainID := big.NewInt(c.Int64(chainIDFlag.Name)) + if chainID.Cmp(big.NewInt(0)) == 0 { return fmt.Errorf("valid chain ID is required") } @@ -109,7 +110,7 @@ var withdrawCommand = &cli.Command{ } withdrawRequest := relapi.WithdrawRequest{ - ChainID: uint32(chainID), + ChainID: uint32(chainID.Uint64()), Amount: amount, TokenAddress: common.HexToAddress(tokenAddress), To: common.HexToAddress(to), @@ -121,11 +122,16 @@ var withdrawCommand = &cli.Command{ } var clientErr error - var status string + var status *relapi.TxHashByNonceResponse err = spinner.New(). - Title("Logging in..."). + Title("Waiting for tx..."). Action(func() { - status, err = client.GetTxHashByNonce(c.Context, fmt.Sprint(chainID), fmt.Sprint(res.Nonce)) + status, err = client.GetTxHashByNonce( + c.Context, + &relapi.GetTxByNonceRequest{ + ChainID: chainID, + Nonce: res.Nonce, + }) if err != nil { clientErr = fmt.Errorf("could not login: %w", err) } @@ -137,7 +143,7 @@ var withdrawCommand = &cli.Command{ panic(clientErr) } - fmt.Printf("Withdraw Tx Hash: %s\n", status) + fmt.Printf("Withdraw Tx Hash: %s\n", status.Hash) return nil }, diff --git a/services/rfq/relayer/relapi/client.go b/services/rfq/relayer/relapi/client.go index 009f31291e..9a31e23a07 100644 --- a/services/rfq/relayer/relapi/client.go +++ b/services/rfq/relayer/relapi/client.go @@ -19,7 +19,7 @@ type RelayerClient interface { GetQuoteRequestStatusByTxID(ctx context.Context, hash string) (*GetQuoteRequestStatusResponse, error) RetryTransaction(ctx context.Context, txhash string) (*GetTxRetryResponse, error) Withdraw(ctx context.Context, req *WithdrawRequest) (*WithdrawResponse, error) - GetTxHashByNonce(ctx context.Context, chainID string, nonce string) (string, error) + GetTxHashByNonce(ctx context.Context, req *GetTxByNonceRequest) (*TxHashByNonceResponse, error) } type relayerClient struct { @@ -125,20 +125,24 @@ func (r *relayerClient) Withdraw(ctx context.Context, req *WithdrawRequest) (*Wi return &res, nil } -func (r *relayerClient) GetTxHashByNonce(ctx context.Context, chainID string, nonce string) (string, error) { - var res struct { - Hash string `json:"hash"` - } +type TxHashByNonceResponse struct { + Hash string `json:"withdrawTxHash"` +} + +func (r *relayerClient) GetTxHashByNonce(ctx context.Context, req *GetTxByNonceRequest) (*TxHashByNonceResponse, error) { + var res TxHashByNonceResponse + resp, err := r.client.R().SetContext(ctx). - SetQueryParam("chain_id", chainID). - SetQueryParam("nonce", nonce). SetResult(&res). + SetBody(req). Get(getTxHashByNonceRoute) + if err != nil { - return "", fmt.Errorf("failed to get tx hash by nonce: %w", err) + return nil, fmt.Errorf("failed to get tx hash by nonce: %w", err) } if resp.StatusCode() != http.StatusOK { - return "", fmt.Errorf("unexpected status code: %d", resp.StatusCode()) + return nil, fmt.Errorf("wahhh %s", resp.String()) } - return res.Hash, nil + + return &res, nil } diff --git a/services/rfq/relayer/relapi/client_test.go b/services/rfq/relayer/relapi/client_test.go index 875eb71c04..6a08c1a1b8 100644 --- a/services/rfq/relayer/relapi/client_test.go +++ b/services/rfq/relayer/relapi/client_test.go @@ -1,7 +1,17 @@ package relapi_test import ( + "context" + "fmt" + "math/big" + + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/synapsecns/sanguine/core/retry" + submitterdb "github.com/synapsecns/sanguine/ethergo/submitter/db" + "github.com/synapsecns/sanguine/services/rfq/relayer/chain" + "github.com/synapsecns/sanguine/services/rfq/relayer/relapi" "github.com/synapsecns/sanguine/services/rfq/relayer/reldb" ) @@ -49,3 +59,179 @@ func (c *RelayerClientSuite) TestRetryTransaction() { c.Equal(resp.TxID, hexutil.Encode(testReq.TransactionID[:])) } + +func (c *RelayerClientSuite) TestEthWithdraw() { + backend := c.underlying.testBackends[uint64(c.underlying.originChainID)] + + startBalance, err := backend.BalanceAt(c.GetTestContext(), testWithdrawalAddress, nil) + c.Require().NoError(err) + + withdrawalAmount := big.NewInt(50) + + _, err = c.Client.Withdraw(c.GetTestContext(), &relapi.WithdrawRequest{ + ChainID: uint32(backend.GetChainID()), + To: testWithdrawalAddress, + Amount: withdrawalAmount.String(), + TokenAddress: chain.EthAddress, + }) + c.Require().NoError(err) + + // Wait for the transaction to be mined + err = retry.WithBackoff(c.GetTestContext(), func(ctx context.Context) error { + balance, err := backend.BalanceAt(ctx, testWithdrawalAddress, nil) + if err != nil { + return fmt.Errorf("could not fetch balance %w", err) + } + + expectedBalance := new(big.Int).Add(startBalance, withdrawalAmount) + + if balance.Cmp(expectedBalance) != 0 { + return fmt.Errorf("balance not updated") + } + + return nil + }) + c.Require().NoError(err) +} + +func (c *RelayerClientSuite) TestERC20Withdraw() { + backend := c.underlying.testBackends[uint64(c.underlying.originChainID)] + + _, erc20 := c.underlying.deployManager.GetMockERC20(c.GetTestContext(), backend) + + startBalance, err := erc20.BalanceOf(&bind.CallOpts{Context: c.GetTestContext()}, testWithdrawalAddress) + c.Require().NoError(err) + + withdrawalAmount := big.NewInt(50) + + _, err = c.Client.Withdraw(c.GetTestContext(), &relapi.WithdrawRequest{ + ChainID: uint32(backend.GetChainID()), + To: testWithdrawalAddress, + Amount: withdrawalAmount.String(), + TokenAddress: erc20.Address(), + }) + c.Require().NoError(err) + + // Wait for the transaction to be mined + err = retry.WithBackoff(c.GetTestContext(), func(ctx context.Context) error { + balance, err := erc20.BalanceOf(&bind.CallOpts{Context: ctx}, testWithdrawalAddress) + if err != nil { + return fmt.Errorf("could not get balance %w", err) + } + + expectedBalance := new(big.Int).Add(startBalance, withdrawalAmount) + + if balance.Cmp(expectedBalance) != 0 { + return fmt.Errorf("balance not updated") + } + + return nil + }) + c.Require().NoError(err) +} + +func (c *RelayerClientSuite) TestGetTxHash() { + backend := c.underlying.testBackends[uint64(c.underlying.originChainID)] + + _, erc20 := c.underlying.deployManager.GetMockERC20(c.GetTestContext(), backend) + + withdrawalAmount := big.NewInt(50) + + withdrawRes, err := c.Client.Withdraw(c.GetTestContext(), &relapi.WithdrawRequest{ + ChainID: uint32(backend.GetChainID()), + To: testWithdrawalAddress, + Amount: withdrawalAmount.String(), + TokenAddress: erc20.Address(), + }) + c.Require().NoError(err) + + var txHashRes *relapi.TxHashByNonceResponse + + // Wait for the transaction to be mined + err = retry.WithBackoff(c.GetTestContext(), func(ctx context.Context) error { + txHashRes, err = c.Client.GetTxHashByNonce( + c.GetTestContext(), + &relapi.GetTxByNonceRequest{ + ChainID: big.NewInt(int64(c.underlying.originChainID)), + Nonce: withdrawRes.Nonce, + }, + ) + if err != nil { + return fmt.Errorf("could not get hash %w", err) + } + return nil + }) + + c.Require().NoError(err) + c.Require().NotEmpty(txHashRes.Hash) +} + +func (c *RelayerClientSuite) TestEthWithdrawCLI() { + res, err := c.Client.Withdraw(c.GetTestContext(), &relapi.WithdrawRequest{ + ChainID: c.underlying.originChainID, + To: common.HexToAddress(testWithdrawalAddress.String()), + Amount: "1000000000000000000", + TokenAddress: chain.EthAddress, + }) + c.Require().NoError(err) + + // Wait for the transaction to be mined + err = retry.WithBackoff(c.GetTestContext(), func(ctx context.Context) error { + status, err := c.underlying.database.SubmitterDB(). + GetNonceStatus( + ctx, + c.underlying.wallet.Address(), + big.NewInt(int64(c.underlying.originChainID)), + res.Nonce, + ) + if err != nil { + return fmt.Errorf("could not get status %w", err) + } + + if status != submitterdb.Stored { + return fmt.Errorf("transaction not mined") + } + + return nil + }) + c.Require().NoError(err) + c.Require().NotNil(res) +} + +func (c *RelayerClientSuite) TestERC20WithdrawCLI() { + backend := c.underlying.testBackends[uint64(c.underlying.originChainID)] + + _, erc20 := c.underlying.deployManager.GetMockERC20(c.GetTestContext(), backend) + + startBalance, err := erc20.BalanceOf(&bind.CallOpts{Context: c.GetTestContext()}, testWithdrawalAddress) + c.Require().NoError(err) + + withdrawalAmount := big.NewInt(1000000000000000000) + + res, err := c.Client.Withdraw(c.GetTestContext(), &relapi.WithdrawRequest{ + ChainID: c.underlying.originChainID, + To: common.HexToAddress(testWithdrawalAddress.String()), + Amount: withdrawalAmount.String(), + TokenAddress: erc20.Address(), + }) + c.Require().NoError(err) + + // Wait for the transaction to be mined + err = retry.WithBackoff(c.GetTestContext(), func(ctx context.Context) error { + balance, err := erc20.BalanceOf(&bind.CallOpts{Context: ctx}, testWithdrawalAddress) + if err != nil { + return fmt.Errorf("could not fetch balance %w", err) + } + + expectedBalance := new(big.Int).Add(startBalance, withdrawalAmount) + + if balance.Cmp(expectedBalance) != 0 { + return fmt.Errorf("balance not updated") + } + + return nil + }) + + c.Require().NoError(err) + c.Require().NotNil(res) +} diff --git a/services/rfq/relayer/relapi/handler.go b/services/rfq/relayer/relapi/handler.go index 4085238c92..770c4e0e5a 100644 --- a/services/rfq/relayer/relapi/handler.go +++ b/services/rfq/relayer/relapi/handler.go @@ -212,26 +212,32 @@ func (h *Handler) Withdraw(c *gin.Context) { c.JSON(http.StatusOK, gin.H{"nonce": nonce}) } +type GetTxByNonceRequest struct { + ChainID *big.Int `json:"chain_id"` + Nonce uint64 `json:"nonce"` +} + func (h *Handler) GetTxHashByNonce(c *gin.Context) { - nonce, ok := c.Get("nonce") - if !ok { - c.JSON(http.StatusInternalServerError, gin.H{"error": "could not get nonce"}) - return - } - chainid, ok := c.Get("chainid") - if !ok { - c.JSON(http.StatusInternalServerError, gin.H{"error": "could not get nonce"}) + var req GetTxByNonceRequest + + // bind the request body to the struct + if err := c.ShouldBindJSON(&req); err != nil { + c.JSON(http.StatusBadRequest, gin.H{"error": err.Error(), "req": req}) return } - tx, err := h.submitter.GetTxHashByNonce(c, big.NewInt(chainid.(int64)), nonce.(uint64)) + tx, err := h.submitter.GetSubmissionStatus(c, req.ChainID, req.Nonce) if err != nil { - c.JSON(http.StatusInternalServerError, gin.H{"error": fmt.Sprintf("could not get tx hash: %s", err.Error())}) + c.JSON(http.StatusInternalServerError-1, gin.H{"error": fmt.Sprintf("could not get tx hash: %s", err.Error())}) return } - c.JSON(http.StatusOK, gin.H{"withdrawTxHash": tx}) + if tx.HasTx() { + c.JSON(http.StatusOK, gin.H{"withdrawTxHash": tx.TxHash().String()}) + return + } + c.JSON(http.StatusNotFound, gin.H{"error": "transaction not found"}) } // tokenIDExists checks if a token ID exists in the config. diff --git a/services/rfq/relayer/relapi/server_test.go b/services/rfq/relayer/relapi/server_test.go index e4af4b116c..9d54bcba0c 100644 --- a/services/rfq/relayer/relapi/server_test.go +++ b/services/rfq/relayer/relapi/server_test.go @@ -4,15 +4,14 @@ import ( "context" "encoding/json" "fmt" - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/stretchr/testify/assert" - "github.com/synapsecns/sanguine/services/rfq/relayer/chain" - "github.com/synapsecns/sanguine/services/rfq/relayer/relconfig" "math/big" "net/http" "testing" "time" + "github.com/stretchr/testify/assert" + "github.com/synapsecns/sanguine/services/rfq/relayer/relconfig" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/crypto" @@ -208,76 +207,6 @@ func (c *RelayerServerSuite) getTestQuoteRequest(status reldb.QuoteRequestStatus } } -func (c *RelayerClientSuite) TestEthWithdraw() { - backend := c.underlying.testBackends[uint64(c.underlying.originChainID)] - - startBalance, err := backend.BalanceAt(c.GetTestContext(), testWithdrawalAddress, nil) - c.Require().NoError(err) - - withdrawalAmount := big.NewInt(50) - - _, err = c.Client.Withdraw(c.GetTestContext(), &relapi.WithdrawRequest{ - ChainID: uint32(backend.GetChainID()), - To: testWithdrawalAddress, - Amount: withdrawalAmount.String(), - TokenAddress: chain.EthAddress, - }) - c.Require().NoError(err) - - // Wait for the transaction to be mined - err = retry.WithBackoff(c.GetTestContext(), func(ctx context.Context) error { - balance, err := backend.BalanceAt(ctx, testWithdrawalAddress, nil) - if err != nil { - return fmt.Errorf("could not fetch balance %w", err) - } - - expectedBalance := new(big.Int).Add(startBalance, withdrawalAmount) - - if balance.Cmp(expectedBalance) != 0 { - return fmt.Errorf("balance not updated") - } - - return nil - }) - c.Require().NoError(err) -} - -func (c *RelayerClientSuite) TestERC20Withdraw() { - backend := c.underlying.testBackends[uint64(c.underlying.originChainID)] - - _, erc20 := c.underlying.deployManager.GetMockERC20(c.GetTestContext(), backend) - - startBalance, err := erc20.BalanceOf(&bind.CallOpts{Context: c.GetTestContext()}, testWithdrawalAddress) - c.Require().NoError(err) - - withdrawalAmount := big.NewInt(50) - - _, err = c.Client.Withdraw(c.GetTestContext(), &relapi.WithdrawRequest{ - ChainID: uint32(backend.GetChainID()), - To: testWithdrawalAddress, - Amount: withdrawalAmount.String(), - TokenAddress: erc20.Address(), - }) - c.Require().NoError(err) - - // Wait for the transaction to be mined - err = retry.WithBackoff(c.GetTestContext(), func(ctx context.Context) error { - balance, err := erc20.BalanceOf(&bind.CallOpts{Context: ctx}, testWithdrawalAddress) - if err != nil { - return fmt.Errorf("could not get balance %w", err) - } - - expectedBalance := new(big.Int).Add(startBalance, withdrawalAmount) - - if balance.Cmp(expectedBalance) != 0 { - return fmt.Errorf("balance not updated") - } - - return nil - }) - c.Require().NoError(err) -} - func TestTokenIDExists(t *testing.T) { cfg := relconfig.Config{ QuotableTokens: map[string][]string{ @@ -360,73 +289,3 @@ func TestToAddressIsWhitelisted(t *testing.T) { }) } } - -func (c *RelayerClientSuite) TestEthWithdrawCLI() { - res, err := c.Client.Withdraw(c.GetTestContext(), &relapi.WithdrawRequest{ - ChainID: c.underlying.originChainID, - To: common.HexToAddress(testWithdrawalAddress.String()), - Amount: "1000000000000000000", - TokenAddress: chain.EthAddress, - }) - c.Require().NoError(err) - - // Wait for the transaction to be mined - err = retry.WithBackoff(c.GetTestContext(), func(ctx context.Context) error { - status, err := c.underlying.database.SubmitterDB(). - GetNonceStatus( - ctx, - c.underlying.wallet.Address(), - big.NewInt(int64(c.underlying.originChainID)), - res.Nonce, - ) - if err != nil { - return fmt.Errorf("could not get status %w", err) - } - - if status != submitterdb.Stored { - return fmt.Errorf("transaction not mined") - } - - return nil - }) - c.Require().NoError(err) - c.Require().NotNil(res) -} - -func (c *RelayerClientSuite) TestERC20WithdrawCLI() { - backend := c.underlying.testBackends[uint64(c.underlying.originChainID)] - - _, erc20 := c.underlying.deployManager.GetMockERC20(c.GetTestContext(), backend) - - startBalance, err := erc20.BalanceOf(&bind.CallOpts{Context: c.GetTestContext()}, testWithdrawalAddress) - c.Require().NoError(err) - - withdrawalAmount := big.NewInt(1000000000000000000) - - res, err := c.Client.Withdraw(c.GetTestContext(), &relapi.WithdrawRequest{ - ChainID: c.underlying.originChainID, - To: common.HexToAddress(testWithdrawalAddress.String()), - Amount: withdrawalAmount.String(), - TokenAddress: erc20.Address(), - }) - c.Require().NoError(err) - - // Wait for the transaction to be mined - err = retry.WithBackoff(c.GetTestContext(), func(ctx context.Context) error { - balance, err := erc20.BalanceOf(&bind.CallOpts{Context: ctx}, testWithdrawalAddress) - if err != nil { - return fmt.Errorf("could not fetch balance %w", err) - } - - expectedBalance := new(big.Int).Add(startBalance, withdrawalAmount) - - if balance.Cmp(expectedBalance) != 0 { - return fmt.Errorf("balance not updated") - } - - return nil - }) - - c.Require().NoError(err) - c.Require().NotNil(res) -} From 9a687cc476a6f30a280df6f73bde2b49dc04260e Mon Sep 17 00:00:00 2001 From: golangisfun123 Date: Wed, 3 Jul 2024 02:18:30 -0500 Subject: [PATCH 05/16] submitter --- ethergo/submitter/submitter.go | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/ethergo/submitter/submitter.go b/ethergo/submitter/submitter.go index f170b6b004..0823d690cc 100644 --- a/ethergo/submitter/submitter.go +++ b/ethergo/submitter/submitter.go @@ -48,8 +48,6 @@ type TransactionSubmitter interface { GetSubmissionStatus(ctx context.Context, chainID *big.Int, nonce uint64) (status SubmissionStatus, err error) // Address returns the address of the signer. Address() common.Address - // GetTxHashByNonce returns the transaction hash for a given nonce. - GetTxHashByNonce(ctx context.Context, chainID *big.Int, nonce uint64) (txHash common.Hash, err error) } // txSubmitterImpl is the implementation of the transaction submitter. @@ -673,28 +671,4 @@ func (t *txSubmitterImpl) Address() common.Address { return t.signer.Address() } -func (t *txSubmitterImpl) GetTxHashByNonce(ctx context.Context, chainID *big.Int, nonce uint64) (txHash common.Hash, err error) { - ctx, span := t.metrics.Tracer().Start(ctx, "submitter.getTxHashByNonce", trace.WithAttributes( - attribute.Stringer("chainID", chainID), - attribute.Int64("nonce", int64(nonce)), - )) - - defer func() { - metrics.EndSpanWithErr(span, err) - }() - - txs, err := t.db.GetNonceAttemptsByStatus(ctx, t.signer.Address(), chainID, nonce) - if err != nil { - return common.Hash{}, fmt.Errorf("could not get tx by nonce: %w", err) - } - - for tx := range txs { - if txs[tx].Status == db.Confirmed { - return txs[tx].Hash(), nil - } - } - - return txs[0].Hash(), nil -} - var _ TransactionSubmitter = &txSubmitterImpl{} From 3e7a861b15fad9a4e911f0058ff7b94bc2757a8b Mon Sep 17 00:00:00 2001 From: golangisfun123 Date: Thu, 4 Jul 2024 13:35:11 -0500 Subject: [PATCH 06/16] add command --- services/rfq/relayer/cmd/commands.go | 2 +- services/rfq/relayer/relapi/client.go | 5 +++-- services/rfq/relayer/relapi/client_test.go | 2 +- services/rfq/relayer/relapi/handler.go | 23 ++++++++++++++-------- 4 files changed, 20 insertions(+), 12 deletions(-) diff --git a/services/rfq/relayer/cmd/commands.go b/services/rfq/relayer/cmd/commands.go index 41f72b9026..091e563511 100644 --- a/services/rfq/relayer/cmd/commands.go +++ b/services/rfq/relayer/cmd/commands.go @@ -129,7 +129,7 @@ var withdrawCommand = &cli.Command{ status, err = client.GetTxHashByNonce( c.Context, &relapi.GetTxByNonceRequest{ - ChainID: chainID, + ChainID: uint32(chainID.Uint64()), Nonce: res.Nonce, }) if err != nil { diff --git a/services/rfq/relayer/relapi/client.go b/services/rfq/relayer/relapi/client.go index 9a31e23a07..982dcbe091 100644 --- a/services/rfq/relayer/relapi/client.go +++ b/services/rfq/relayer/relapi/client.go @@ -134,14 +134,15 @@ func (r *relayerClient) GetTxHashByNonce(ctx context.Context, req *GetTxByNonceR resp, err := r.client.R().SetContext(ctx). SetResult(&res). - SetBody(req). + SetQueryParam("chain_id", fmt.Sprintf("%d", req.ChainID)). + SetQueryParam("nonce", fmt.Sprintf("%d", req.Nonce)). Get(getTxHashByNonceRoute) if err != nil { return nil, fmt.Errorf("failed to get tx hash by nonce: %w", err) } if resp.StatusCode() != http.StatusOK { - return nil, fmt.Errorf("wahhh %s", resp.String()) + return nil, fmt.Errorf("unexpected status code: %d", resp.StatusCode()) } return &res, nil diff --git a/services/rfq/relayer/relapi/client_test.go b/services/rfq/relayer/relapi/client_test.go index 6a08c1a1b8..2eedc83327 100644 --- a/services/rfq/relayer/relapi/client_test.go +++ b/services/rfq/relayer/relapi/client_test.go @@ -152,7 +152,7 @@ func (c *RelayerClientSuite) TestGetTxHash() { txHashRes, err = c.Client.GetTxHashByNonce( c.GetTestContext(), &relapi.GetTxByNonceRequest{ - ChainID: big.NewInt(int64(c.underlying.originChainID)), + ChainID: uint32(backend.GetChainID()), Nonce: withdrawRes.Nonce, }, ) diff --git a/services/rfq/relayer/relapi/handler.go b/services/rfq/relayer/relapi/handler.go index 770c4e0e5a..580435728c 100644 --- a/services/rfq/relayer/relapi/handler.go +++ b/services/rfq/relayer/relapi/handler.go @@ -213,22 +213,29 @@ func (h *Handler) Withdraw(c *gin.Context) { } type GetTxByNonceRequest struct { - ChainID *big.Int `json:"chain_id"` - Nonce uint64 `json:"nonce"` + ChainID uint32 `json:"chain_id"` + Nonce uint64 `json:"nonce"` } func (h *Handler) GetTxHashByNonce(c *gin.Context) { - var req GetTxByNonceRequest + chainIDStr := c.Query("chain_id") + nonceStr := c.Query("nonce") - // bind the request body to the struct - if err := c.ShouldBindJSON(&req); err != nil { - c.JSON(http.StatusBadRequest, gin.H{"error": err.Error(), "req": req}) + chainID, ok := new(big.Int).SetString(chainIDStr, 10) + if !ok { + c.JSON(http.StatusBadRequest, gin.H{"error": "invalid chainID", "chainID": chainID.String()}) + return + } + + nonce, ok := new(big.Int).SetString(nonceStr, 10) + if !ok { + c.JSON(http.StatusBadRequest, gin.H{"error": "invalid nonce"}) return } - tx, err := h.submitter.GetSubmissionStatus(c, req.ChainID, req.Nonce) + tx, err := h.submitter.GetSubmissionStatus(c, chainID, nonce.Uint64()) if err != nil { - c.JSON(http.StatusInternalServerError-1, gin.H{"error": fmt.Sprintf("could not get tx hash: %s", err.Error())}) + c.JSON(http.StatusInternalServerError, gin.H{"error": fmt.Sprintf("could not get tx hash: %s", err.Error())}) return } From fbc9e7ca61ccf4e61acc32aef3f39b2d3ba33eab Mon Sep 17 00:00:00 2001 From: golangisfun123 Date: Thu, 4 Jul 2024 13:55:08 -0500 Subject: [PATCH 07/16] lint --- services/rfq/relayer/cmd/commands.go | 10 +++++----- services/rfq/relayer/relapi/client.go | 3 +++ services/rfq/relayer/relapi/handler.go | 2 ++ services/rfq/relayer/relapi/suite_test.go | 1 - 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/services/rfq/relayer/cmd/commands.go b/services/rfq/relayer/cmd/commands.go index 091e563511..5dc6609e7e 100644 --- a/services/rfq/relayer/cmd/commands.go +++ b/services/rfq/relayer/cmd/commands.go @@ -121,7 +121,7 @@ var withdrawCommand = &cli.Command{ return fmt.Errorf("could not start relayer: %w", err) } - var clientErr error + var errClient error var status *relapi.TxHashByNonceResponse err = spinner.New(). Title("Waiting for tx..."). @@ -133,14 +133,14 @@ var withdrawCommand = &cli.Command{ Nonce: res.Nonce, }) if err != nil { - clientErr = fmt.Errorf("could not login: %w", err) + errClient = fmt.Errorf("could not login: %w", err) } }).Run() if err != nil { - panic(err) + return fmt.Errorf("could not get withdrawal tx hash: %w", err) } - if clientErr != nil { - panic(clientErr) + if errClient != nil { + return fmt.Errorf("client error: could not get withdrawal tx hash: %w", err) } fmt.Printf("Withdraw Tx Hash: %s\n", status.Hash) diff --git a/services/rfq/relayer/relapi/client.go b/services/rfq/relayer/relapi/client.go index 982dcbe091..de97c644e6 100644 --- a/services/rfq/relayer/relapi/client.go +++ b/services/rfq/relayer/relapi/client.go @@ -109,6 +109,7 @@ type WithdrawResponse struct { Nonce uint64 `json:"nonce"` } +// Withdraw withdraws an ERC20 or Ether from the relayer. func (r *relayerClient) Withdraw(ctx context.Context, req *WithdrawRequest) (*WithdrawResponse, error) { var res WithdrawResponse resp, err := r.client.R().SetContext(ctx). @@ -125,10 +126,12 @@ func (r *relayerClient) Withdraw(ctx context.Context, req *WithdrawRequest) (*Wi return &res, nil } +// TxHashByNonceResponse is the request for getting a transaction hash by nonce. type TxHashByNonceResponse struct { Hash string `json:"withdrawTxHash"` } +// GetTxByNonceRequest is the request for getting a transaction hash by nonce. func (r *relayerClient) GetTxHashByNonce(ctx context.Context, req *GetTxByNonceRequest) (*TxHashByNonceResponse, error) { var res TxHashByNonceResponse diff --git a/services/rfq/relayer/relapi/handler.go b/services/rfq/relayer/relapi/handler.go index 580435728c..abbcce9ab6 100644 --- a/services/rfq/relayer/relapi/handler.go +++ b/services/rfq/relayer/relapi/handler.go @@ -212,11 +212,13 @@ func (h *Handler) Withdraw(c *gin.Context) { c.JSON(http.StatusOK, gin.H{"nonce": nonce}) } +// GetTxByNonceRequest is the request for getting a transaction hash by nonce. type GetTxByNonceRequest struct { ChainID uint32 `json:"chain_id"` Nonce uint64 `json:"nonce"` } +// GetTxHashByNonce gets the transaction hash by submitter nonce. func (h *Handler) GetTxHashByNonce(c *gin.Context) { chainIDStr := c.Query("chain_id") nonceStr := c.Query("nonce") diff --git a/services/rfq/relayer/relapi/suite_test.go b/services/rfq/relayer/relapi/suite_test.go index f7fd89532e..7b28169b2a 100644 --- a/services/rfq/relayer/relapi/suite_test.go +++ b/services/rfq/relayer/relapi/suite_test.go @@ -177,7 +177,6 @@ func (c *RelayerServerSuite) SetupSuite() { g, _ := errgroup.WithContext(c.GetSuiteContext()) for _, chainID := range chainIDs { - chainID := chainID // Setup Anvil backend for the suite to have RPC support g.Go(func() error { backend := geth.NewEmbeddedBackendForChainID(c.GetSuiteContext(), c.T(), new(big.Int).SetUint64(chainID)) From 26e7d59535dbe5b2c70a3ba6605c41ca180e0f3d Mon Sep 17 00:00:00 2001 From: golangisfun123 Date: Thu, 4 Jul 2024 13:58:11 -0500 Subject: [PATCH 08/16] better error msg --- services/rfq/relayer/relapi/handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/rfq/relayer/relapi/handler.go b/services/rfq/relayer/relapi/handler.go index abbcce9ab6..cdab82f967 100644 --- a/services/rfq/relayer/relapi/handler.go +++ b/services/rfq/relayer/relapi/handler.go @@ -225,7 +225,7 @@ func (h *Handler) GetTxHashByNonce(c *gin.Context) { chainID, ok := new(big.Int).SetString(chainIDStr, 10) if !ok { - c.JSON(http.StatusBadRequest, gin.H{"error": "invalid chainID", "chainID": chainID.String()}) + c.JSON(http.StatusBadRequest, gin.H{"error": "invalid chainID"}) return } From 6efab87ff9ee73dc8642a6b04f36d534cfdbe359 Mon Sep 17 00:00:00 2001 From: golangisfun123 Date: Thu, 4 Jul 2024 14:02:15 -0500 Subject: [PATCH 09/16] linter lied --- services/rfq/relayer/relapi/suite_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/services/rfq/relayer/relapi/suite_test.go b/services/rfq/relayer/relapi/suite_test.go index 7b28169b2a..321a85a578 100644 --- a/services/rfq/relayer/relapi/suite_test.go +++ b/services/rfq/relayer/relapi/suite_test.go @@ -178,6 +178,7 @@ func (c *RelayerServerSuite) SetupSuite() { g, _ := errgroup.WithContext(c.GetSuiteContext()) for _, chainID := range chainIDs { // Setup Anvil backend for the suite to have RPC support + chainID := chainID g.Go(func() error { backend := geth.NewEmbeddedBackendForChainID(c.GetSuiteContext(), c.T(), new(big.Int).SetUint64(chainID)) From 3aae0078fca0c54cc5d4249f0bd4f40cf6bcb55c Mon Sep 17 00:00:00 2001 From: golangisfun123 Date: Fri, 5 Jul 2024 12:03:54 -0500 Subject: [PATCH 10/16] fix gopls import reorder --- .vscode/settings.json | 2 +- core/metrics/metrics_test.go | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 19bbfe56d3..ed3d2aeafe 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,6 +1,6 @@ { "editor.fontLigatures": "'calt', 'liga', 'ss01', 'ss02', 'ss03', 'ss04', 'ss05', 'ss06', 'ss07', 'ss08', 'ss09'", - "editor.formatOnSave": true, + // "editor.formatOnSave": true, "[typescript]": { "editor.defaultFormatter": "dbaeumer.vscode-eslint" }, diff --git a/core/metrics/metrics_test.go b/core/metrics/metrics_test.go index bd41396153..3436a83512 100644 --- a/core/metrics/metrics_test.go +++ b/core/metrics/metrics_test.go @@ -2,13 +2,12 @@ package metrics_test import ( "context" - "testing" - - "github.com/alecthomas/assert" + "github.com/stretchr/testify/assert" . "github.com/stretchr/testify/assert" "github.com/synapsecns/sanguine/core/config" "github.com/synapsecns/sanguine/core/metrics" "github.com/synapsecns/sanguine/core/metrics/localmetrics" + "testing" ) func TestSetupFromEnv(t *testing.T) { From 63c3abd45b7c49e7795c5290033f8e2676709a4c Mon Sep 17 00:00:00 2001 From: Trajan0x Date: Sat, 6 Jul 2024 01:40:23 -0400 Subject: [PATCH 11/16] cleanup --- contrib/promexporter/go.sum | 6 ------ contrib/screener-api/go.sum | 6 ------ core/go.mod | 3 --- core/go.sum | 6 ------ ethergo/go.sum | 6 ------ services/omnirpc/go.sum | 6 ------ 6 files changed, 33 deletions(-) diff --git a/contrib/promexporter/go.sum b/contrib/promexporter/go.sum index 23b210fb85..3170bf3e09 100644 --- a/contrib/promexporter/go.sum +++ b/contrib/promexporter/go.sum @@ -115,12 +115,6 @@ github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRB github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= -github.com/alecthomas/assert v1.0.0 h1:3XmGh/PSuLzDbK3W2gUbRXwgW5lqPkuqvRgeQ30FI5o= -github.com/alecthomas/assert v1.0.0/go.mod h1:va/d2JC+M7F6s+80kl/R3G7FUiW6JzUO+hPhLyJ36ZY= -github.com/alecthomas/colour v0.1.0 h1:nOE9rJm6dsZ66RGWYSFrXw461ZIt9A6+nHgL7FRrDUk= -github.com/alecthomas/colour v0.1.0/go.mod h1:QO9JBoKquHd+jz9nshCh40fOfO+JzsoXy8qTHF68zU0= -github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142 h1:8Uy0oSf5co/NZXje7U1z8Mpep++QJOldL2hs/sBQf48= -github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= diff --git a/contrib/screener-api/go.sum b/contrib/screener-api/go.sum index af3984d4b6..1d7c0eea54 100644 --- a/contrib/screener-api/go.sum +++ b/contrib/screener-api/go.sum @@ -57,12 +57,6 @@ github.com/ProtonMail/go-crypto v1.0.0 h1:LRuvITjQWX+WIfr930YHG2HNfjR1uOfyf5vE0k github.com/ProtonMail/go-crypto v1.0.0/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= github.com/TwiN/gocache/v2 v2.2.2 h1:4HToPfDV8FSbaYO5kkbhLpEllUYse5rAf+hVU/mSsuI= github.com/TwiN/gocache/v2 v2.2.2/go.mod h1:WfIuwd7GR82/7EfQqEtmLFC3a2vqaKbs4Pe6neB7Gyc= -github.com/alecthomas/assert v1.0.0 h1:3XmGh/PSuLzDbK3W2gUbRXwgW5lqPkuqvRgeQ30FI5o= -github.com/alecthomas/assert v1.0.0/go.mod h1:va/d2JC+M7F6s+80kl/R3G7FUiW6JzUO+hPhLyJ36ZY= -github.com/alecthomas/colour v0.1.0 h1:nOE9rJm6dsZ66RGWYSFrXw461ZIt9A6+nHgL7FRrDUk= -github.com/alecthomas/colour v0.1.0/go.mod h1:QO9JBoKquHd+jz9nshCh40fOfO+JzsoXy8qTHF68zU0= -github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142 h1:8Uy0oSf5co/NZXje7U1z8Mpep++QJOldL2hs/sBQf48= -github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= diff --git a/core/go.mod b/core/go.mod index 3625e72aa3..3938b25872 100644 --- a/core/go.mod +++ b/core/go.mod @@ -10,7 +10,6 @@ require ( github.com/Flaque/filet v0.0.0-20201012163910-45f684403088 github.com/ImVexed/fasturl v0.0.0-20230304231329-4e41488060f3 github.com/Soft/iter v0.1.0 - github.com/alecthomas/assert v1.0.0 github.com/brianvoe/gofakeit/v6 v6.27.0 github.com/c-bata/go-prompt v0.2.6 github.com/cheekybits/genny v1.0.0 @@ -70,8 +69,6 @@ require ( github.com/Microsoft/go-winio v0.6.1 // indirect github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect github.com/ProtonMail/go-crypto v1.0.0 // indirect - github.com/alecthomas/colour v0.1.0 // indirect - github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.0 // indirect github.com/bytedance/sonic v1.11.6 // indirect diff --git a/core/go.sum b/core/go.sum index 3cdb8185e3..9f04a80f95 100644 --- a/core/go.sum +++ b/core/go.sum @@ -55,12 +55,6 @@ github.com/ProtonMail/go-crypto v1.0.0 h1:LRuvITjQWX+WIfr930YHG2HNfjR1uOfyf5vE0k github.com/ProtonMail/go-crypto v1.0.0/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= github.com/Soft/iter v0.1.0 h1:fEWgwubt0cnnJo3Vd2IzYcaJ5ORI/dJDkaC3loI7Ys8= github.com/Soft/iter v0.1.0/go.mod h1:8brXuNcweP5AZyF0Yzjvje+IR/6RNFyyLF6DTMiPXRc= -github.com/alecthomas/assert v1.0.0 h1:3XmGh/PSuLzDbK3W2gUbRXwgW5lqPkuqvRgeQ30FI5o= -github.com/alecthomas/assert v1.0.0/go.mod h1:va/d2JC+M7F6s+80kl/R3G7FUiW6JzUO+hPhLyJ36ZY= -github.com/alecthomas/colour v0.1.0 h1:nOE9rJm6dsZ66RGWYSFrXw461ZIt9A6+nHgL7FRrDUk= -github.com/alecthomas/colour v0.1.0/go.mod h1:QO9JBoKquHd+jz9nshCh40fOfO+JzsoXy8qTHF68zU0= -github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142 h1:8Uy0oSf5co/NZXje7U1z8Mpep++QJOldL2hs/sBQf48= -github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= diff --git a/ethergo/go.sum b/ethergo/go.sum index 6a6252e311..1e7d9fcda0 100644 --- a/ethergo/go.sum +++ b/ethergo/go.sum @@ -104,12 +104,6 @@ github.com/VictoriaMetrics/fastcache v1.12.1/go.mod h1:tX04vaqcNoQeGLD+ra5pU5sWk github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= -github.com/alecthomas/assert v1.0.0 h1:3XmGh/PSuLzDbK3W2gUbRXwgW5lqPkuqvRgeQ30FI5o= -github.com/alecthomas/assert v1.0.0/go.mod h1:va/d2JC+M7F6s+80kl/R3G7FUiW6JzUO+hPhLyJ36ZY= -github.com/alecthomas/colour v0.1.0 h1:nOE9rJm6dsZ66RGWYSFrXw461ZIt9A6+nHgL7FRrDUk= -github.com/alecthomas/colour v0.1.0/go.mod h1:QO9JBoKquHd+jz9nshCh40fOfO+JzsoXy8qTHF68zU0= -github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142 h1:8Uy0oSf5co/NZXje7U1z8Mpep++QJOldL2hs/sBQf48= -github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= diff --git a/services/omnirpc/go.sum b/services/omnirpc/go.sum index 430000eaa4..2bc342f5b9 100644 --- a/services/omnirpc/go.sum +++ b/services/omnirpc/go.sum @@ -107,12 +107,6 @@ github.com/VictoriaMetrics/fastcache v1.12.1/go.mod h1:tX04vaqcNoQeGLD+ra5pU5sWk github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= -github.com/alecthomas/assert v1.0.0 h1:3XmGh/PSuLzDbK3W2gUbRXwgW5lqPkuqvRgeQ30FI5o= -github.com/alecthomas/assert v1.0.0/go.mod h1:va/d2JC+M7F6s+80kl/R3G7FUiW6JzUO+hPhLyJ36ZY= -github.com/alecthomas/colour v0.1.0 h1:nOE9rJm6dsZ66RGWYSFrXw461ZIt9A6+nHgL7FRrDUk= -github.com/alecthomas/colour v0.1.0/go.mod h1:QO9JBoKquHd+jz9nshCh40fOfO+JzsoXy8qTHF68zU0= -github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142 h1:8Uy0oSf5co/NZXje7U1z8Mpep++QJOldL2hs/sBQf48= -github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= From df8e30ed6634d28ba37ed3ba62e7e20b90b357cd Mon Sep 17 00:00:00 2001 From: Trajan0x Date: Sun, 7 Jul 2024 13:18:19 -0400 Subject: [PATCH 12/16] cleanp assert --- agents/go.mod | 2 ++ contrib/opbot/go.sum | 6 ------ services/cctp-relayer/go.mod | 3 --- services/cctp-relayer/go.sum | 6 ------ services/cctp-relayer/relayer/util_test.go | 2 +- services/explorer/go.mod | 2 ++ services/rfq/go.mod | 3 --- services/rfq/go.sum | 6 ------ services/rfq/relayer/relconfig/config_test.go | 2 +- services/scribe/go.mod | 1 + 10 files changed, 7 insertions(+), 26 deletions(-) diff --git a/agents/go.mod b/agents/go.mod index 96aa4b9d65..55acbdbc79 100644 --- a/agents/go.mod +++ b/agents/go.mod @@ -51,6 +51,8 @@ require ( dario.cat/mergo v1.0.0 // indirect github.com/DataDog/zstd v1.5.2 // indirect github.com/DenrianWeiss/tracely v0.0.0-20220624070317-49cf8afaaf18 // indirect + github.com/alecthomas/colour v0.1.0 // indirect + github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142 // indirect github.com/bcicen/jstream v1.0.1 // indirect github.com/bits-and-blooms/bitset v1.10.0 // indirect github.com/bytedance/sonic/loader v0.1.1 // indirect diff --git a/contrib/opbot/go.sum b/contrib/opbot/go.sum index 3e2fe7e384..c8205c6e22 100644 --- a/contrib/opbot/go.sum +++ b/contrib/opbot/go.sum @@ -90,12 +90,6 @@ github.com/VictoriaMetrics/fastcache v1.12.1/go.mod h1:tX04vaqcNoQeGLD+ra5pU5sWk github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= -github.com/alecthomas/assert v1.0.0 h1:3XmGh/PSuLzDbK3W2gUbRXwgW5lqPkuqvRgeQ30FI5o= -github.com/alecthomas/assert v1.0.0/go.mod h1:va/d2JC+M7F6s+80kl/R3G7FUiW6JzUO+hPhLyJ36ZY= -github.com/alecthomas/colour v0.1.0 h1:nOE9rJm6dsZ66RGWYSFrXw461ZIt9A6+nHgL7FRrDUk= -github.com/alecthomas/colour v0.1.0/go.mod h1:QO9JBoKquHd+jz9nshCh40fOfO+JzsoXy8qTHF68zU0= -github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142 h1:8Uy0oSf5co/NZXje7U1z8Mpep++QJOldL2hs/sBQf48= -github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20231202071711-9a357b53e9c9 h1:ez/4by2iGztzR4L0zgAOR8lTQK9VlyBVVd7G4omaOQs= diff --git a/services/cctp-relayer/go.mod b/services/cctp-relayer/go.mod index cee5c5e8ef..756b9a357b 100644 --- a/services/cctp-relayer/go.mod +++ b/services/cctp-relayer/go.mod @@ -7,7 +7,6 @@ toolchain go1.22.4 require ( github.com/Flaque/filet v0.0.0-20201012163910-45f684403088 github.com/ImVexed/fasturl v0.0.0-20230304231329-4e41488060f3 - github.com/alecthomas/assert v1.0.0 github.com/brianvoe/gofakeit/v6 v6.27.0 github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc github.com/ethereum/go-ethereum v1.13.8 @@ -49,8 +48,6 @@ require ( github.com/ProtonMail/go-crypto v1.0.0 // indirect github.com/Soft/iter v0.1.0 // indirect github.com/VictoriaMetrics/fastcache v1.12.1 // indirect - github.com/alecthomas/colour v0.1.0 // indirect - github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142 // indirect github.com/andybalholm/brotli v1.1.0 // indirect github.com/aws/aws-sdk-go-v2 v1.21.2 // indirect github.com/aws/aws-sdk-go-v2/config v1.18.45 // indirect diff --git a/services/cctp-relayer/go.sum b/services/cctp-relayer/go.sum index 30c684088c..68898c573d 100644 --- a/services/cctp-relayer/go.sum +++ b/services/cctp-relayer/go.sum @@ -106,12 +106,6 @@ github.com/VictoriaMetrics/fastcache v1.12.1/go.mod h1:tX04vaqcNoQeGLD+ra5pU5sWk github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= -github.com/alecthomas/assert v1.0.0 h1:3XmGh/PSuLzDbK3W2gUbRXwgW5lqPkuqvRgeQ30FI5o= -github.com/alecthomas/assert v1.0.0/go.mod h1:va/d2JC+M7F6s+80kl/R3G7FUiW6JzUO+hPhLyJ36ZY= -github.com/alecthomas/colour v0.1.0 h1:nOE9rJm6dsZ66RGWYSFrXw461ZIt9A6+nHgL7FRrDUk= -github.com/alecthomas/colour v0.1.0/go.mod h1:QO9JBoKquHd+jz9nshCh40fOfO+JzsoXy8qTHF68zU0= -github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142 h1:8Uy0oSf5co/NZXje7U1z8Mpep++QJOldL2hs/sBQf48= -github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= diff --git a/services/cctp-relayer/relayer/util_test.go b/services/cctp-relayer/relayer/util_test.go index d42a9a9d2b..2aa970437b 100644 --- a/services/cctp-relayer/relayer/util_test.go +++ b/services/cctp-relayer/relayer/util_test.go @@ -1,9 +1,9 @@ package relayer_test import ( + "github.com/stretchr/testify/assert" "testing" - "github.com/alecthomas/assert" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/synapsecns/sanguine/services/cctp-relayer/relayer" ) diff --git a/services/explorer/go.mod b/services/explorer/go.mod index 654659b319..4d99dfb961 100644 --- a/services/explorer/go.mod +++ b/services/explorer/go.mod @@ -68,6 +68,8 @@ require ( github.com/VictoriaMetrics/fastcache v1.12.1 // indirect github.com/agnivade/levenshtein v1.1.1 // indirect github.com/alecthomas/chroma v0.7.1 // indirect + github.com/alecthomas/colour v0.1.0 // indirect + github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142 // indirect github.com/andybalholm/brotli v1.1.0 // indirect github.com/aws/smithy-go v1.15.0 // indirect github.com/bcicen/jstream v1.0.1 // indirect diff --git a/services/rfq/go.mod b/services/rfq/go.mod index ccc92c6681..08605bc53e 100644 --- a/services/rfq/go.mod +++ b/services/rfq/go.mod @@ -6,7 +6,6 @@ toolchain go1.22.4 require ( github.com/Flaque/filet v0.0.0-20201012163910-45f684403088 - github.com/alecthomas/assert v1.0.0 github.com/brianvoe/gofakeit/v6 v6.27.0 github.com/charmbracelet/huh/spinner v0.0.0-20240618200428-90406d79077d github.com/dubonzi/otelresty v1.2.0 @@ -64,8 +63,6 @@ require ( github.com/ProtonMail/go-crypto v1.0.0 // indirect github.com/Soft/iter v0.1.0 // indirect github.com/VictoriaMetrics/fastcache v1.12.1 // indirect - github.com/alecthomas/colour v0.1.0 // indirect - github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142 // indirect github.com/andybalholm/brotli v1.1.0 // indirect github.com/aws/aws-sdk-go-v2 v1.21.2 // indirect github.com/aws/aws-sdk-go-v2/config v1.18.45 // indirect diff --git a/services/rfq/go.sum b/services/rfq/go.sum index 19c1524ae6..e14ca8a433 100644 --- a/services/rfq/go.sum +++ b/services/rfq/go.sum @@ -108,12 +108,6 @@ github.com/VictoriaMetrics/fastcache v1.12.1/go.mod h1:tX04vaqcNoQeGLD+ra5pU5sWk github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= -github.com/alecthomas/assert v1.0.0 h1:3XmGh/PSuLzDbK3W2gUbRXwgW5lqPkuqvRgeQ30FI5o= -github.com/alecthomas/assert v1.0.0/go.mod h1:va/d2JC+M7F6s+80kl/R3G7FUiW6JzUO+hPhLyJ36ZY= -github.com/alecthomas/colour v0.1.0 h1:nOE9rJm6dsZ66RGWYSFrXw461ZIt9A6+nHgL7FRrDUk= -github.com/alecthomas/colour v0.1.0/go.mod h1:QO9JBoKquHd+jz9nshCh40fOfO+JzsoXy8qTHF68zU0= -github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142 h1:8Uy0oSf5co/NZXje7U1z8Mpep++QJOldL2hs/sBQf48= -github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= diff --git a/services/rfq/relayer/relconfig/config_test.go b/services/rfq/relayer/relconfig/config_test.go index 01a94286d4..2d64aec9e1 100644 --- a/services/rfq/relayer/relconfig/config_test.go +++ b/services/rfq/relayer/relconfig/config_test.go @@ -1,10 +1,10 @@ package relconfig_test import ( + "github.com/stretchr/testify/assert" "testing" "time" - "github.com/alecthomas/assert" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" "github.com/synapsecns/sanguine/services/rfq/relayer/relconfig" diff --git a/services/scribe/go.mod b/services/scribe/go.mod index baf757fbe2..5df6e12305 100644 --- a/services/scribe/go.mod +++ b/services/scribe/go.mod @@ -83,6 +83,7 @@ require ( github.com/Soft/iter v0.1.0 // indirect github.com/VictoriaMetrics/fastcache v1.12.1 // indirect github.com/agnivade/levenshtein v1.1.1 // indirect + github.com/alecthomas/assert v1.0.0 // indirect github.com/alecthomas/chroma v0.7.1 // indirect github.com/andybalholm/brotli v1.1.0 // indirect github.com/bcicen/jstream v1.0.1 // indirect From 84fa1a03c1585950d4888128ea3387407c351662 Mon Sep 17 00:00:00 2001 From: golangisfun123 Date: Tue, 9 Jul 2024 11:24:55 -0500 Subject: [PATCH 13/16] go work sum --- go.work.sum | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/go.work.sum b/go.work.sum index 4c420938cb..b0b54a84b8 100644 --- a/go.work.sum +++ b/go.work.sum @@ -1849,6 +1849,7 @@ github.com/casbin/casbin/v2 v2.37.0/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRt github.com/celo-org/celo-blockchain v0.0.0-20210222234634-f8c8f6744526 h1:rdY1F8vUybjjsv+V58eaSYsYPTNO+AXK9o7l+BQuhhU= github.com/celo-org/celo-bls-go v0.2.4 h1:V1y92kM5IRJWQZ6DCwqiKLW7swmUA5y/dPJ9YbU4HfA= github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.4.1 h1:iKLQ0xPNFxR/2hzXZMrBo8f1j86j5WHzznCCQxV/b8g= github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054 h1:uH66TXeswKn5PW5zdZ39xEwfS9an067BirqA+P4QaLI= @@ -2127,6 +2128,7 @@ github.com/facette/natsort v0.0.0-20181210072756-2cd4dd1e2dcb h1:IT4JYU7k4ikYg1S github.com/facette/natsort v0.0.0-20181210072756-2cd4dd1e2dcb/go.mod h1:bH6Xx7IW64qjjJq8M2u4dxNaBiDfKK+z/3eGDpXEQhc= github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072 h1:DddqAaWDpywytcG8w/qoQ5sAN8X12d3Z3koB0C3Rxsc= github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= +github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/ferranbt/fastssz v0.1.2 h1:Dky6dXlngF6Qjc+EfDipAkE83N5I5DE68bY6O0VLNPk= github.com/ferranbt/fastssz v0.1.2/go.mod h1:X5UPrE2u1UJjxHA8X54u04SBwdAQjG2sFtWs39YxyWs= github.com/fjl/gencodec v0.0.0-20220412091415-8bb9e558978c h1:CndMRAH4JIwxbW8KYq6Q+cGWcGHz0FjGR3QqcInWcW0= @@ -2258,6 +2260,7 @@ github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4 github.com/go-playground/validator/v10 v10.14.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= github.com/go-redis/redis v6.15.8+incompatible h1:BKZuG6mCnRj5AOaWJXoCgf6rqTYnYJLe4en2hxT7r9o= github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI= +github.com/go-resty/resty/v2 v2.11.0/go.mod h1:iiP/OpA0CkcL3IGt1O0+/SIItFUbkkyw5BGXiVdTu+A= github.com/go-sourcemap/sourcemap v2.1.3+incompatible h1:W1iEw64niKVGogNgBN3ePyLFfuisuzeidWPMPWmECqU= github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw= @@ -2668,7 +2671,6 @@ github.com/kataras/sitemap v0.0.6 h1:w71CRMMKYMJh6LR2wTgnk5hSgjVNB9KL60n5e2KHvLY github.com/kataras/sitemap v0.0.6/go.mod h1:dW4dOCNs896OR1HmG+dMLdT7JjDk7mYBzoIRwuj5jA4= github.com/kataras/tunnel v0.0.4 h1:sCAqWuJV7nPzGrlb0os3j49lk2JhILT0rID38NHNLpA= github.com/kataras/tunnel v0.0.4/go.mod h1:9FkU4LaeifdMWqZu7o20ojmW4B7hdhv2CMLwfnHGpYw= -github.com/kathiouchka/slacker v0.0.0-20240629123301-04d4e71c3a96/go.mod h1:VPW+xhTrmB4lUoxA5tiB180fmWFt6UFW+96ZWYtj0Qg= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/keep-network/keep-common v1.7.1-0.20211012131917-7102d7b9c6a0 h1:pQ6IV5wK1v5GESbLUQlQASCBorc13FJHFYoO1O7ftNU= @@ -3573,6 +3575,7 @@ go.opentelemetry.io/collector/semconv v0.101.0 h1:tOe9iTe9dDCnvz/bqgfNRr4w80kXG8 go.opentelemetry.io/collector/semconv v0.101.0/go.mod h1:8ElcRZ8Cdw5JnvhTOQOdYizkJaQ10Z2fS+R6djOnj6A= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0/go.mod h1:r9vWsPS/3AQItv3OSlEJ/E4mbrhUbbw18meOjArPtKQ= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.48.0/go.mod h1:tIKj3DbO8N9Y2xo52og3irLsPI4GW02DSMtrVgNMgxg= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0/go.mod h1:62CPTSry9QZtOaSsE3tOzhx6LzDhHnXJ6xHeMNNiM6Q= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0/go.mod h1:SK2UL73Zy1quvRPonmOmRDiWk1KBV3LyIeeIxcEApWw= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.48.0/go.mod h1:rdENBZMT2OE6Ne/KLwpiXudnAsbdrdBaqBvTN8M8BgA= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= @@ -3661,6 +3664,7 @@ golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45 golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= @@ -3719,6 +3723,7 @@ golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2 golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5HA= golang.org/x/oauth2 v0.18.0/go.mod h1:Wf7knwG0MPoWIMMBgFlEaSUDaKskp0dCfrlJRJXbBi8= golang.org/x/oauth2 v0.19.0/go.mod h1:vYi7skDa1x015PmRRYZ7+s1cWyPgrPiSYRe4rnsexc8= +golang.org/x/oauth2 v0.20.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/perf v0.0.0-20180704124530-6e6d33e29852 h1:xYq6+9AtI+xP3M4r0N1hCkHrInHDBohhquRgx9Kk6gI= golang.org/x/perf v0.0.0-20230113213139-801c7ef9e5c5 h1:ObuXPmIgI4ZMyQLIz48cJYgSyWdjUXc2SZAdyJMwEAU= golang.org/x/perf v0.0.0-20230113213139-801c7ef9e5c5/go.mod h1:UBKtEnL8aqnd+0JHqZ+2qoMDwtuy6cYhhKNoHLBiTQc= @@ -3766,6 +3771,7 @@ golang.org/x/term v0.9.0/go.mod h1:M6DEAAIenWoTxdKrOltXcmDY3rSplQUkrvaDU5FcQyo= golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= @@ -3871,6 +3877,7 @@ google.golang.org/genproto/googleapis/rpc v0.0.0-20240429193739-8cf5692501f6/go. google.golang.org/genproto/googleapis/rpc v0.0.0-20240509183442-62759503f434/go.mod h1:I7Y+G38R2bu5j1aLzfFmQfTcU/WnFuqDwLZAbvKTKpM= google.golang.org/genproto/googleapis/rpc v0.0.0-20240513163218-0867130af1f8/go.mod h1:I7Y+G38R2bu5j1aLzfFmQfTcU/WnFuqDwLZAbvKTKpM= google.golang.org/genproto/googleapis/rpc v0.0.0-20240521202816-d264139d666e/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240624140628-dc46fd24d27d/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= google.golang.org/grpc v0.0.0-20170208002647-2a6bf6142e96/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= From eb13cff35a1db584c24511dcdeb1116f172ccf81 Mon Sep 17 00:00:00 2001 From: golangisfun123 Date: Tue, 9 Jul 2024 11:27:18 -0500 Subject: [PATCH 14/16] fix merge --- agents/go.sum | 9 +++------ contrib/promexporter/go.sum | 6 ------ contrib/screener-api/go.sum | 6 ------ core/go.mod | 3 --- core/go.sum | 6 ------ ethergo/go.sum | 6 ------ go.work.sum | 3 --- services/explorer/go.sum | 9 +++------ services/omnirpc/go.sum | 6 ------ services/rfq/go.mod | 4 ---- services/rfq/relayer/relapi/client.go | 3 --- services/scribe/go.sum | 9 +++------ 12 files changed, 9 insertions(+), 61 deletions(-) diff --git a/agents/go.sum b/agents/go.sum index 0401fc2217..611def91a9 100644 --- a/agents/go.sum +++ b/agents/go.sum @@ -118,18 +118,15 @@ github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRB github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= +github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38 h1:smF2tmSOzy2Mm+0dGI2AIUHY+w0BUc+4tn40djz7+6U= github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38/go.mod h1:r7bzyVFMNntcxPZXK3/+KdruV1H5KSlyVY0gc+NgInI= -github.com/alecthomas/assert v1.0.0 h1:3XmGh/PSuLzDbK3W2gUbRXwgW5lqPkuqvRgeQ30FI5o= -github.com/alecthomas/assert v1.0.0/go.mod h1:va/d2JC+M7F6s+80kl/R3G7FUiW6JzUO+hPhLyJ36ZY= github.com/alecthomas/chroma v0.7.1 h1:G1i02OhUbRi2nJxcNkwJaY/J1gHXj9tt72qN6ZouLFQ= github.com/alecthomas/chroma v0.7.1/go.mod h1:gHw09mkX1Qp80JlYbmN9L3+4R5o6DJJ3GRShh+AICNc= +github.com/alecthomas/colour v0.0.0-20160524082231-60882d9e2721 h1:JHZL0hZKJ1VENNfmXvHbgYlbUOvpzYzvy2aZU5gXVeo= github.com/alecthomas/colour v0.0.0-20160524082231-60882d9e2721/go.mod h1:QO9JBoKquHd+jz9nshCh40fOfO+JzsoXy8qTHF68zU0= -github.com/alecthomas/colour v0.1.0 h1:nOE9rJm6dsZ66RGWYSFrXw461ZIt9A6+nHgL7FRrDUk= -github.com/alecthomas/colour v0.1.0/go.mod h1:QO9JBoKquHd+jz9nshCh40fOfO+JzsoXy8qTHF68zU0= github.com/alecthomas/kong v0.2.1-0.20190708041108-0548c6b1afae/go.mod h1:+inYUSluD+p4L8KdviBSgzcqEjUQOfC5fQDRFuc36lI= +github.com/alecthomas/repr v0.0.0-20180818092828-117648cd9897 h1:p9Sln00KOTlrYkxI1zYWl1QLnEqAqEARBEYa8FQnQcY= github.com/alecthomas/repr v0.0.0-20180818092828-117648cd9897/go.mod h1:xTS7Pm1pD1mvyM075QCDSRqH6qRLXylzS24ZTpRiSzQ= -github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142 h1:8Uy0oSf5co/NZXje7U1z8Mpep++QJOldL2hs/sBQf48= -github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= diff --git a/contrib/promexporter/go.sum b/contrib/promexporter/go.sum index a30d77d9b5..033406ddd5 100644 --- a/contrib/promexporter/go.sum +++ b/contrib/promexporter/go.sum @@ -115,12 +115,6 @@ github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRB github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= -github.com/alecthomas/assert v1.0.0 h1:3XmGh/PSuLzDbK3W2gUbRXwgW5lqPkuqvRgeQ30FI5o= -github.com/alecthomas/assert v1.0.0/go.mod h1:va/d2JC+M7F6s+80kl/R3G7FUiW6JzUO+hPhLyJ36ZY= -github.com/alecthomas/colour v0.1.0 h1:nOE9rJm6dsZ66RGWYSFrXw461ZIt9A6+nHgL7FRrDUk= -github.com/alecthomas/colour v0.1.0/go.mod h1:QO9JBoKquHd+jz9nshCh40fOfO+JzsoXy8qTHF68zU0= -github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142 h1:8Uy0oSf5co/NZXje7U1z8Mpep++QJOldL2hs/sBQf48= -github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= diff --git a/contrib/screener-api/go.sum b/contrib/screener-api/go.sum index 3d62620efb..a60c41c532 100644 --- a/contrib/screener-api/go.sum +++ b/contrib/screener-api/go.sum @@ -57,12 +57,6 @@ github.com/ProtonMail/go-crypto v1.0.0 h1:LRuvITjQWX+WIfr930YHG2HNfjR1uOfyf5vE0k github.com/ProtonMail/go-crypto v1.0.0/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= github.com/TwiN/gocache/v2 v2.2.2 h1:4HToPfDV8FSbaYO5kkbhLpEllUYse5rAf+hVU/mSsuI= github.com/TwiN/gocache/v2 v2.2.2/go.mod h1:WfIuwd7GR82/7EfQqEtmLFC3a2vqaKbs4Pe6neB7Gyc= -github.com/alecthomas/assert v1.0.0 h1:3XmGh/PSuLzDbK3W2gUbRXwgW5lqPkuqvRgeQ30FI5o= -github.com/alecthomas/assert v1.0.0/go.mod h1:va/d2JC+M7F6s+80kl/R3G7FUiW6JzUO+hPhLyJ36ZY= -github.com/alecthomas/colour v0.1.0 h1:nOE9rJm6dsZ66RGWYSFrXw461ZIt9A6+nHgL7FRrDUk= -github.com/alecthomas/colour v0.1.0/go.mod h1:QO9JBoKquHd+jz9nshCh40fOfO+JzsoXy8qTHF68zU0= -github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142 h1:8Uy0oSf5co/NZXje7U1z8Mpep++QJOldL2hs/sBQf48= -github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= diff --git a/core/go.mod b/core/go.mod index 4818c0223e..6c32da15ba 100644 --- a/core/go.mod +++ b/core/go.mod @@ -10,7 +10,6 @@ require ( github.com/Flaque/filet v0.0.0-20201012163910-45f684403088 github.com/ImVexed/fasturl v0.0.0-20230304231329-4e41488060f3 github.com/Soft/iter v0.1.0 - github.com/alecthomas/assert v1.0.0 github.com/brianvoe/gofakeit/v6 v6.27.0 github.com/c-bata/go-prompt v0.2.6 github.com/cheekybits/genny v1.0.0 @@ -70,8 +69,6 @@ require ( github.com/Microsoft/go-winio v0.6.1 // indirect github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect github.com/ProtonMail/go-crypto v1.0.0 // indirect - github.com/alecthomas/colour v0.1.0 // indirect - github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.0 // indirect github.com/bytedance/sonic v1.11.6 // indirect diff --git a/core/go.sum b/core/go.sum index 9fb661456d..038ea0a0fb 100644 --- a/core/go.sum +++ b/core/go.sum @@ -55,12 +55,6 @@ github.com/ProtonMail/go-crypto v1.0.0 h1:LRuvITjQWX+WIfr930YHG2HNfjR1uOfyf5vE0k github.com/ProtonMail/go-crypto v1.0.0/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= github.com/Soft/iter v0.1.0 h1:fEWgwubt0cnnJo3Vd2IzYcaJ5ORI/dJDkaC3loI7Ys8= github.com/Soft/iter v0.1.0/go.mod h1:8brXuNcweP5AZyF0Yzjvje+IR/6RNFyyLF6DTMiPXRc= -github.com/alecthomas/assert v1.0.0 h1:3XmGh/PSuLzDbK3W2gUbRXwgW5lqPkuqvRgeQ30FI5o= -github.com/alecthomas/assert v1.0.0/go.mod h1:va/d2JC+M7F6s+80kl/R3G7FUiW6JzUO+hPhLyJ36ZY= -github.com/alecthomas/colour v0.1.0 h1:nOE9rJm6dsZ66RGWYSFrXw461ZIt9A6+nHgL7FRrDUk= -github.com/alecthomas/colour v0.1.0/go.mod h1:QO9JBoKquHd+jz9nshCh40fOfO+JzsoXy8qTHF68zU0= -github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142 h1:8Uy0oSf5co/NZXje7U1z8Mpep++QJOldL2hs/sBQf48= -github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= diff --git a/ethergo/go.sum b/ethergo/go.sum index e233c4bb38..69727a3305 100644 --- a/ethergo/go.sum +++ b/ethergo/go.sum @@ -104,12 +104,6 @@ github.com/VictoriaMetrics/fastcache v1.12.1/go.mod h1:tX04vaqcNoQeGLD+ra5pU5sWk github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= -github.com/alecthomas/assert v1.0.0 h1:3XmGh/PSuLzDbK3W2gUbRXwgW5lqPkuqvRgeQ30FI5o= -github.com/alecthomas/assert v1.0.0/go.mod h1:va/d2JC+M7F6s+80kl/R3G7FUiW6JzUO+hPhLyJ36ZY= -github.com/alecthomas/colour v0.1.0 h1:nOE9rJm6dsZ66RGWYSFrXw461ZIt9A6+nHgL7FRrDUk= -github.com/alecthomas/colour v0.1.0/go.mod h1:QO9JBoKquHd+jz9nshCh40fOfO+JzsoXy8qTHF68zU0= -github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142 h1:8Uy0oSf5co/NZXje7U1z8Mpep++QJOldL2hs/sBQf48= -github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= diff --git a/go.work.sum b/go.work.sum index c375c2f06c..9cfc28f3ba 100644 --- a/go.work.sum +++ b/go.work.sum @@ -2671,11 +2671,8 @@ github.com/kataras/sitemap v0.0.6 h1:w71CRMMKYMJh6LR2wTgnk5hSgjVNB9KL60n5e2KHvLY github.com/kataras/sitemap v0.0.6/go.mod h1:dW4dOCNs896OR1HmG+dMLdT7JjDk7mYBzoIRwuj5jA4= github.com/kataras/tunnel v0.0.4 h1:sCAqWuJV7nPzGrlb0os3j49lk2JhILT0rID38NHNLpA= github.com/kataras/tunnel v0.0.4/go.mod h1:9FkU4LaeifdMWqZu7o20ojmW4B7hdhv2CMLwfnHGpYw= -<<<<<<< HEAD -======= github.com/kathiouchka/slacker v0.0.0-20240629123301-04d4e71c3a96 h1:/RfYfEL6WutfEvEGx7JM3lG7dKdeKT/tnhXpaiaBILw= github.com/kathiouchka/slacker v0.0.0-20240629123301-04d4e71c3a96/go.mod h1:VPW+xhTrmB4lUoxA5tiB180fmWFt6UFW+96ZWYtj0Qg= ->>>>>>> 15d18e8ef6180546fce269c8c00f56324ece9385 github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/keep-network/keep-common v1.7.1-0.20211012131917-7102d7b9c6a0 h1:pQ6IV5wK1v5GESbLUQlQASCBorc13FJHFYoO1O7ftNU= diff --git a/services/explorer/go.sum b/services/explorer/go.sum index b8a98aa18a..cf2d145d9c 100644 --- a/services/explorer/go.sum +++ b/services/explorer/go.sum @@ -106,18 +106,15 @@ github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRB github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= +github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38 h1:smF2tmSOzy2Mm+0dGI2AIUHY+w0BUc+4tn40djz7+6U= github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38/go.mod h1:r7bzyVFMNntcxPZXK3/+KdruV1H5KSlyVY0gc+NgInI= -github.com/alecthomas/assert v1.0.0 h1:3XmGh/PSuLzDbK3W2gUbRXwgW5lqPkuqvRgeQ30FI5o= -github.com/alecthomas/assert v1.0.0/go.mod h1:va/d2JC+M7F6s+80kl/R3G7FUiW6JzUO+hPhLyJ36ZY= github.com/alecthomas/chroma v0.7.1 h1:G1i02OhUbRi2nJxcNkwJaY/J1gHXj9tt72qN6ZouLFQ= github.com/alecthomas/chroma v0.7.1/go.mod h1:gHw09mkX1Qp80JlYbmN9L3+4R5o6DJJ3GRShh+AICNc= +github.com/alecthomas/colour v0.0.0-20160524082231-60882d9e2721 h1:JHZL0hZKJ1VENNfmXvHbgYlbUOvpzYzvy2aZU5gXVeo= github.com/alecthomas/colour v0.0.0-20160524082231-60882d9e2721/go.mod h1:QO9JBoKquHd+jz9nshCh40fOfO+JzsoXy8qTHF68zU0= -github.com/alecthomas/colour v0.1.0 h1:nOE9rJm6dsZ66RGWYSFrXw461ZIt9A6+nHgL7FRrDUk= -github.com/alecthomas/colour v0.1.0/go.mod h1:QO9JBoKquHd+jz9nshCh40fOfO+JzsoXy8qTHF68zU0= github.com/alecthomas/kong v0.2.1-0.20190708041108-0548c6b1afae/go.mod h1:+inYUSluD+p4L8KdviBSgzcqEjUQOfC5fQDRFuc36lI= +github.com/alecthomas/repr v0.0.0-20180818092828-117648cd9897 h1:p9Sln00KOTlrYkxI1zYWl1QLnEqAqEARBEYa8FQnQcY= github.com/alecthomas/repr v0.0.0-20180818092828-117648cd9897/go.mod h1:xTS7Pm1pD1mvyM075QCDSRqH6qRLXylzS24ZTpRiSzQ= -github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142 h1:8Uy0oSf5co/NZXje7U1z8Mpep++QJOldL2hs/sBQf48= -github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= diff --git a/services/omnirpc/go.sum b/services/omnirpc/go.sum index 62fd2396d2..c9a0f01d48 100644 --- a/services/omnirpc/go.sum +++ b/services/omnirpc/go.sum @@ -107,12 +107,6 @@ github.com/VictoriaMetrics/fastcache v1.12.1/go.mod h1:tX04vaqcNoQeGLD+ra5pU5sWk github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= -github.com/alecthomas/assert v1.0.0 h1:3XmGh/PSuLzDbK3W2gUbRXwgW5lqPkuqvRgeQ30FI5o= -github.com/alecthomas/assert v1.0.0/go.mod h1:va/d2JC+M7F6s+80kl/R3G7FUiW6JzUO+hPhLyJ36ZY= -github.com/alecthomas/colour v0.1.0 h1:nOE9rJm6dsZ66RGWYSFrXw461ZIt9A6+nHgL7FRrDUk= -github.com/alecthomas/colour v0.1.0/go.mod h1:QO9JBoKquHd+jz9nshCh40fOfO+JzsoXy8qTHF68zU0= -github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142 h1:8Uy0oSf5co/NZXje7U1z8Mpep++QJOldL2hs/sBQf48= -github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= diff --git a/services/rfq/go.mod b/services/rfq/go.mod index 0912970514..76558f23c5 100644 --- a/services/rfq/go.mod +++ b/services/rfq/go.mod @@ -8,13 +8,9 @@ require ( github.com/Flaque/filet v0.0.0-20201012163910-45f684403088 github.com/alecthomas/assert v1.0.0 github.com/brianvoe/gofakeit/v6 v6.27.0 -<<<<<<< HEAD github.com/charmbracelet/huh/spinner v0.0.0-20240618200428-90406d79077d - github.com/dubonzi/otelresty v1.2.0 -======= github.com/cornelk/hashmap v1.0.8 github.com/dubonzi/otelresty v1.3.0 ->>>>>>> 15d18e8ef6180546fce269c8c00f56324ece9385 github.com/ethereum/go-ethereum v1.13.8 github.com/gin-gonic/gin v1.10.0 github.com/go-http-utils/headers v0.0.0-20181008091004-fed159eddc2a diff --git a/services/rfq/relayer/relapi/client.go b/services/rfq/relayer/relapi/client.go index 372ea6a179..9716172471 100644 --- a/services/rfq/relayer/relapi/client.go +++ b/services/rfq/relayer/relapi/client.go @@ -127,7 +127,6 @@ func (r *relayerClient) Withdraw(ctx context.Context, req *WithdrawRequest) (*Wi return &res, nil } -<<<<<<< HEAD // TxHashByNonceResponse is the request for getting a transaction hash by nonce. type TxHashByNonceResponse struct { Hash string `json:"withdrawTxHash"` @@ -146,7 +145,6 @@ func (r *relayerClient) GetTxHashByNonce(ctx context.Context, req *GetTxByNonceR if err != nil { return nil, fmt.Errorf("failed to get tx hash by nonce: %w", err) } -======= func (r *relayerClient) GetQuoteRequestByTXID(ctx context.Context, txid string) (*GetQuoteRequestResponse, error) { var res GetQuoteRequestResponse resp, err := r.client.R().SetContext(ctx). @@ -157,7 +155,6 @@ func (r *relayerClient) GetQuoteRequestByTXID(ctx context.Context, txid string) return nil, fmt.Errorf("failed to get quote request by tx id: %w", err) } ->>>>>>> 15d18e8ef6180546fce269c8c00f56324ece9385 if resp.StatusCode() != http.StatusOK { return nil, fmt.Errorf("unexpected status code: %d", resp.StatusCode()) } diff --git a/services/scribe/go.sum b/services/scribe/go.sum index 19d0f70752..93e442a04e 100644 --- a/services/scribe/go.sum +++ b/services/scribe/go.sum @@ -117,18 +117,15 @@ github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRB github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= +github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38 h1:smF2tmSOzy2Mm+0dGI2AIUHY+w0BUc+4tn40djz7+6U= github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38/go.mod h1:r7bzyVFMNntcxPZXK3/+KdruV1H5KSlyVY0gc+NgInI= -github.com/alecthomas/assert v1.0.0 h1:3XmGh/PSuLzDbK3W2gUbRXwgW5lqPkuqvRgeQ30FI5o= -github.com/alecthomas/assert v1.0.0/go.mod h1:va/d2JC+M7F6s+80kl/R3G7FUiW6JzUO+hPhLyJ36ZY= github.com/alecthomas/chroma v0.7.1 h1:G1i02OhUbRi2nJxcNkwJaY/J1gHXj9tt72qN6ZouLFQ= github.com/alecthomas/chroma v0.7.1/go.mod h1:gHw09mkX1Qp80JlYbmN9L3+4R5o6DJJ3GRShh+AICNc= +github.com/alecthomas/colour v0.0.0-20160524082231-60882d9e2721 h1:JHZL0hZKJ1VENNfmXvHbgYlbUOvpzYzvy2aZU5gXVeo= github.com/alecthomas/colour v0.0.0-20160524082231-60882d9e2721/go.mod h1:QO9JBoKquHd+jz9nshCh40fOfO+JzsoXy8qTHF68zU0= -github.com/alecthomas/colour v0.1.0 h1:nOE9rJm6dsZ66RGWYSFrXw461ZIt9A6+nHgL7FRrDUk= -github.com/alecthomas/colour v0.1.0/go.mod h1:QO9JBoKquHd+jz9nshCh40fOfO+JzsoXy8qTHF68zU0= github.com/alecthomas/kong v0.2.1-0.20190708041108-0548c6b1afae/go.mod h1:+inYUSluD+p4L8KdviBSgzcqEjUQOfC5fQDRFuc36lI= +github.com/alecthomas/repr v0.0.0-20180818092828-117648cd9897 h1:p9Sln00KOTlrYkxI1zYWl1QLnEqAqEARBEYa8FQnQcY= github.com/alecthomas/repr v0.0.0-20180818092828-117648cd9897/go.mod h1:xTS7Pm1pD1mvyM075QCDSRqH6qRLXylzS24ZTpRiSzQ= -github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142 h1:8Uy0oSf5co/NZXje7U1z8Mpep++QJOldL2hs/sBQf48= -github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= From c0cbf4e2bc36e26080988317ad20bfd7e37ebaa4 Mon Sep 17 00:00:00 2001 From: golangisfun123 Date: Tue, 9 Jul 2024 11:28:14 -0500 Subject: [PATCH 15/16] fixing random errors caused by merge --- services/rfq/relayer/relapi/client.go | 8 ++++++++ services/rfq/relayer/relapi/client_test.go | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/services/rfq/relayer/relapi/client.go b/services/rfq/relayer/relapi/client.go index 9716172471..f4c690cb89 100644 --- a/services/rfq/relayer/relapi/client.go +++ b/services/rfq/relayer/relapi/client.go @@ -145,6 +145,14 @@ func (r *relayerClient) GetTxHashByNonce(ctx context.Context, req *GetTxByNonceR if err != nil { return nil, fmt.Errorf("failed to get tx hash by nonce: %w", err) } + + if resp.StatusCode() != http.StatusOK { + return nil, fmt.Errorf("unexpected status code: %d", resp.StatusCode()) + } + + return &res, nil +} + func (r *relayerClient) GetQuoteRequestByTXID(ctx context.Context, txid string) (*GetQuoteRequestResponse, error) { var res GetQuoteRequestResponse resp, err := r.client.R().SetContext(ctx). diff --git a/services/rfq/relayer/relapi/client_test.go b/services/rfq/relayer/relapi/client_test.go index 9e408c46f0..81baea2940 100644 --- a/services/rfq/relayer/relapi/client_test.go +++ b/services/rfq/relayer/relapi/client_test.go @@ -1,6 +1,11 @@ package relapi_test import ( + "context" + "fmt" + "math/big" + + "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/synapsecns/sanguine/core/retry" @@ -229,6 +234,7 @@ func (c *RelayerClientSuite) TestERC20WithdrawCLI() { c.Require().NoError(err) c.Require().NotNil(res) +} func (c *RelayerClientSuite) TestGetQuoteByTX() { testReq := c.underlying.getTestQuoteRequest(reldb.Seen) err := c.underlying.database.StoreQuoteRequest(c.GetTestContext(), testReq) From 4c475e92a3d73ffda81404bcef8f0bfb1e531bd3 Mon Sep 17 00:00:00 2001 From: golangisfun123 Date: Tue, 9 Jul 2024 11:29:49 -0500 Subject: [PATCH 16/16] reeee --- agents/go.sum | 9 ++++++--- services/explorer/go.sum | 9 ++++++--- services/rfq/go.mod | 1 + services/rfq/relayer/relapi/client_test.go | 4 ---- services/scribe/go.sum | 9 ++++++--- 5 files changed, 19 insertions(+), 13 deletions(-) diff --git a/agents/go.sum b/agents/go.sum index 611def91a9..0401fc2217 100644 --- a/agents/go.sum +++ b/agents/go.sum @@ -118,15 +118,18 @@ github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRB github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= -github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38 h1:smF2tmSOzy2Mm+0dGI2AIUHY+w0BUc+4tn40djz7+6U= github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38/go.mod h1:r7bzyVFMNntcxPZXK3/+KdruV1H5KSlyVY0gc+NgInI= +github.com/alecthomas/assert v1.0.0 h1:3XmGh/PSuLzDbK3W2gUbRXwgW5lqPkuqvRgeQ30FI5o= +github.com/alecthomas/assert v1.0.0/go.mod h1:va/d2JC+M7F6s+80kl/R3G7FUiW6JzUO+hPhLyJ36ZY= github.com/alecthomas/chroma v0.7.1 h1:G1i02OhUbRi2nJxcNkwJaY/J1gHXj9tt72qN6ZouLFQ= github.com/alecthomas/chroma v0.7.1/go.mod h1:gHw09mkX1Qp80JlYbmN9L3+4R5o6DJJ3GRShh+AICNc= -github.com/alecthomas/colour v0.0.0-20160524082231-60882d9e2721 h1:JHZL0hZKJ1VENNfmXvHbgYlbUOvpzYzvy2aZU5gXVeo= github.com/alecthomas/colour v0.0.0-20160524082231-60882d9e2721/go.mod h1:QO9JBoKquHd+jz9nshCh40fOfO+JzsoXy8qTHF68zU0= +github.com/alecthomas/colour v0.1.0 h1:nOE9rJm6dsZ66RGWYSFrXw461ZIt9A6+nHgL7FRrDUk= +github.com/alecthomas/colour v0.1.0/go.mod h1:QO9JBoKquHd+jz9nshCh40fOfO+JzsoXy8qTHF68zU0= github.com/alecthomas/kong v0.2.1-0.20190708041108-0548c6b1afae/go.mod h1:+inYUSluD+p4L8KdviBSgzcqEjUQOfC5fQDRFuc36lI= -github.com/alecthomas/repr v0.0.0-20180818092828-117648cd9897 h1:p9Sln00KOTlrYkxI1zYWl1QLnEqAqEARBEYa8FQnQcY= github.com/alecthomas/repr v0.0.0-20180818092828-117648cd9897/go.mod h1:xTS7Pm1pD1mvyM075QCDSRqH6qRLXylzS24ZTpRiSzQ= +github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142 h1:8Uy0oSf5co/NZXje7U1z8Mpep++QJOldL2hs/sBQf48= +github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= diff --git a/services/explorer/go.sum b/services/explorer/go.sum index cf2d145d9c..b8a98aa18a 100644 --- a/services/explorer/go.sum +++ b/services/explorer/go.sum @@ -106,15 +106,18 @@ github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRB github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= -github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38 h1:smF2tmSOzy2Mm+0dGI2AIUHY+w0BUc+4tn40djz7+6U= github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38/go.mod h1:r7bzyVFMNntcxPZXK3/+KdruV1H5KSlyVY0gc+NgInI= +github.com/alecthomas/assert v1.0.0 h1:3XmGh/PSuLzDbK3W2gUbRXwgW5lqPkuqvRgeQ30FI5o= +github.com/alecthomas/assert v1.0.0/go.mod h1:va/d2JC+M7F6s+80kl/R3G7FUiW6JzUO+hPhLyJ36ZY= github.com/alecthomas/chroma v0.7.1 h1:G1i02OhUbRi2nJxcNkwJaY/J1gHXj9tt72qN6ZouLFQ= github.com/alecthomas/chroma v0.7.1/go.mod h1:gHw09mkX1Qp80JlYbmN9L3+4R5o6DJJ3GRShh+AICNc= -github.com/alecthomas/colour v0.0.0-20160524082231-60882d9e2721 h1:JHZL0hZKJ1VENNfmXvHbgYlbUOvpzYzvy2aZU5gXVeo= github.com/alecthomas/colour v0.0.0-20160524082231-60882d9e2721/go.mod h1:QO9JBoKquHd+jz9nshCh40fOfO+JzsoXy8qTHF68zU0= +github.com/alecthomas/colour v0.1.0 h1:nOE9rJm6dsZ66RGWYSFrXw461ZIt9A6+nHgL7FRrDUk= +github.com/alecthomas/colour v0.1.0/go.mod h1:QO9JBoKquHd+jz9nshCh40fOfO+JzsoXy8qTHF68zU0= github.com/alecthomas/kong v0.2.1-0.20190708041108-0548c6b1afae/go.mod h1:+inYUSluD+p4L8KdviBSgzcqEjUQOfC5fQDRFuc36lI= -github.com/alecthomas/repr v0.0.0-20180818092828-117648cd9897 h1:p9Sln00KOTlrYkxI1zYWl1QLnEqAqEARBEYa8FQnQcY= github.com/alecthomas/repr v0.0.0-20180818092828-117648cd9897/go.mod h1:xTS7Pm1pD1mvyM075QCDSRqH6qRLXylzS24ZTpRiSzQ= +github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142 h1:8Uy0oSf5co/NZXje7U1z8Mpep++QJOldL2hs/sBQf48= +github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= diff --git a/services/rfq/go.mod b/services/rfq/go.mod index 6b1aa2bf20..fb54b15999 100644 --- a/services/rfq/go.mod +++ b/services/rfq/go.mod @@ -8,6 +8,7 @@ require ( github.com/Flaque/filet v0.0.0-20201012163910-45f684403088 github.com/brianvoe/gofakeit/v6 v6.27.0 github.com/charmbracelet/huh/spinner v0.0.0-20240618200428-90406d79077d + github.com/cornelk/hashmap v1.0.8 github.com/dubonzi/otelresty v1.3.0 github.com/ethereum/go-ethereum v1.13.8 github.com/gin-gonic/gin v1.10.0 diff --git a/services/rfq/relayer/relapi/client_test.go b/services/rfq/relayer/relapi/client_test.go index 9dfd95a4c8..81baea2940 100644 --- a/services/rfq/relayer/relapi/client_test.go +++ b/services/rfq/relayer/relapi/client_test.go @@ -6,10 +6,6 @@ import ( "math/big" "github.com/ethereum/go-ethereum/accounts/abi/bind" -<<<<<<< HEAD -======= - ->>>>>>> cba4be004ba6eeff18a28c15cffb4bbdff0e9460 "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/synapsecns/sanguine/core/retry" diff --git a/services/scribe/go.sum b/services/scribe/go.sum index 93e442a04e..19d0f70752 100644 --- a/services/scribe/go.sum +++ b/services/scribe/go.sum @@ -117,15 +117,18 @@ github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRB github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= -github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38 h1:smF2tmSOzy2Mm+0dGI2AIUHY+w0BUc+4tn40djz7+6U= github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38/go.mod h1:r7bzyVFMNntcxPZXK3/+KdruV1H5KSlyVY0gc+NgInI= +github.com/alecthomas/assert v1.0.0 h1:3XmGh/PSuLzDbK3W2gUbRXwgW5lqPkuqvRgeQ30FI5o= +github.com/alecthomas/assert v1.0.0/go.mod h1:va/d2JC+M7F6s+80kl/R3G7FUiW6JzUO+hPhLyJ36ZY= github.com/alecthomas/chroma v0.7.1 h1:G1i02OhUbRi2nJxcNkwJaY/J1gHXj9tt72qN6ZouLFQ= github.com/alecthomas/chroma v0.7.1/go.mod h1:gHw09mkX1Qp80JlYbmN9L3+4R5o6DJJ3GRShh+AICNc= -github.com/alecthomas/colour v0.0.0-20160524082231-60882d9e2721 h1:JHZL0hZKJ1VENNfmXvHbgYlbUOvpzYzvy2aZU5gXVeo= github.com/alecthomas/colour v0.0.0-20160524082231-60882d9e2721/go.mod h1:QO9JBoKquHd+jz9nshCh40fOfO+JzsoXy8qTHF68zU0= +github.com/alecthomas/colour v0.1.0 h1:nOE9rJm6dsZ66RGWYSFrXw461ZIt9A6+nHgL7FRrDUk= +github.com/alecthomas/colour v0.1.0/go.mod h1:QO9JBoKquHd+jz9nshCh40fOfO+JzsoXy8qTHF68zU0= github.com/alecthomas/kong v0.2.1-0.20190708041108-0548c6b1afae/go.mod h1:+inYUSluD+p4L8KdviBSgzcqEjUQOfC5fQDRFuc36lI= -github.com/alecthomas/repr v0.0.0-20180818092828-117648cd9897 h1:p9Sln00KOTlrYkxI1zYWl1QLnEqAqEARBEYa8FQnQcY= github.com/alecthomas/repr v0.0.0-20180818092828-117648cd9897/go.mod h1:xTS7Pm1pD1mvyM075QCDSRqH6qRLXylzS24ZTpRiSzQ= +github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142 h1:8Uy0oSf5co/NZXje7U1z8Mpep++QJOldL2hs/sBQf48= +github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM=