Showing 1,971 of 13,422 total issues
Method Client.GetMessageBusTransactions
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func (c *Client) GetMessageBusTransactions(ctx context.Context, chainID []*int, contractAddress *string, startTime *int, endTime *int, txHash *string, messageID *string, pending *bool, reverted *bool, page *int, httpRequestOptions ...client.HTTPRequestOption) (*GetMessageBusTransactions, error) {
Method queryResolver.ReceiptsRange
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func (r *queryResolver) ReceiptsRange(ctx context.Context, chainID int, txHash *string, contractAddress *string, blockHash *string, blockNumber *int, txIndex *int, confirmed *bool, startBlock int, endBlock int, page int) ([]*model.Receipt, error) {
Method queryResolver.ReceiptsAtHeadRange
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func (r *queryResolver) ReceiptsAtHeadRange(ctx context.Context, chainID int, txHash *string, contractAddress *string, blockHash *string, blockNumber *int, txIndex *int, confirmed *bool, startBlock int, endBlock int, page int) ([]*model.Receipt, error) {
Method screenerImpl.blacklistAddress
has 59 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (s *screenerImpl) blacklistAddress(c *gin.Context) {
var err error
ctx, span := s.metrics.Tracer().Start(c.Request.Context(), "blacklistAddress")
defer metrics.EndSpanWithErr(span, err)
Function WaitForConfirmation
has 59 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func WaitForConfirmation(ctx context.Context, client ConfirmationClient, transaction *types.Transaction, timeout time.Duration) {
// if tx is nil , we should panic here so we can see the call context
_ = transaction.Hash()
const debugTimeout = time.Second * 5
Function main
has 59 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func main() {
fmt.Println("Enter Sending Chain URL (eg https://polygon-rpc.com, https://api.avax.network/ext/bc/C/rpc, https://optimism-mainnet.public.blastapi.io): ")
var sendingChainURL string
fmt.Scanln(&sendingChainURL)
Method Manager.ShouldProcess
has 59 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (m *Manager) ShouldProcess(parentCtx context.Context, quote reldb.QuoteRequest) (res bool, err error) {
ctx, span := m.metricsHandler.Tracer().Start(parentCtx, "shouldProcess", trace.WithAttributes(
attribute.String("transaction_id", hexutil.Encode(quote.TransactionID[:])),
))
Function NewGuard
has 59 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func NewGuard(ctx context.Context, metricHandler metrics.Handler, cfg guardconfig.Config, txSubmitter submitter.TransactionSubmitter) (*Guard, error) {
omniClient := omniClient.NewOmnirpcClient(cfg.OmniRPCURL, metricHandler, omniClient.WithCaptureReqRes())
chainListeners := make(map[int]listener.ContractListener)
dbType, err := dbcommon.DBTypeFromString(cfg.Database.Type)
Method executionContext.fieldContext_Query_transactionsRange
has 59 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (ec *executionContext) fieldContext_Query_transactionsRange(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Query",
Field: field,
IsMethod: true,
Method executionContext.fieldContext_Query_transactions
has 59 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (ec *executionContext) fieldContext_Query_transactions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Query",
Field: field,
IsMethod: true,
Method executionContext.fieldContext_Query_transactionsAtHeadRange
has 59 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (ec *executionContext) fieldContext_Query_transactionsAtHeadRange(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Query",
Field: field,
IsMethod: true,
Method executionContext.fieldContext_Query_transactionsAtHeadRange
has 59 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (ec *executionContext) fieldContext_Query_transactionsAtHeadRange(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Query",
Field: field,
IsMethod: true,
Method executionContext.fieldContext_Query_transactionsRange
has 59 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (ec *executionContext) fieldContext_Query_transactionsRange(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Query",
Field: field,
IsMethod: true,
Method executionContext.fieldContext_Query_transactions
has 59 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (ec *executionContext) fieldContext_Query_transactions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Query",
Field: field,
IsMethod: true,
Method IndexerSuite.TestGetChunkArr
has 59 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (x *IndexerSuite) TestGetChunkArr() {
chainID := big.NewInt(int64(1))
simulatedChain := geth.NewEmbeddedBackendForChainID(x.GetTestContext(), x.T(), chainID)
simulatedClient, err := backend.DialBackend(x.GetTestContext(), simulatedChain.RPCAddress(), x.metrics)
Nil(x.T(), err)
Method IndexerSuite.TestFetchLogs
has 59 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (x *IndexerSuite) TestFetchLogs() {
testBackend := geth.NewEmbeddedBackend(x.GetTestContext(), x.T())
// start an omnirpc proxy and run 10 test transactions so we can batch call blocks 1-10
var wg sync.WaitGroup
var testChainHandler *testutil.TestChainHandler
Function getNetworkCurrencyColor
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getNetworkCurrencyColor = (chainId) => {
switch (parseInt(chainId)) {
case ChainId.BSC:
return 'text-[#ecae0b] dark:text-[#ecae0b]'
case ChainId.ETH:
Function constructJSON
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const constructJSON = (
swappableMap,
exclusionList
): StringifiedBridgeRoutes => {
const result = {}
Function extraReducers
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
extraReducers: (builder) => {
builder
.addCase(fetchAndStoreTokenBalances.pending, (state) => {
state.balances = []
state.balancesFetchStatus = FetchState.LOADING
Function useEthereumWallet
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const useEthereumWallet = () => {
const [connectedAddress, setConnectedAddress] = useState<string>('')
const [web3Provider, setWeb3Provider] = useState<any>(null)
const [connectedNetwork, setConnectedNetwork] = useState<Network | null>()