Showing 1,971 of 13,422 total issues
Method InventoryTestSuite.TestHasSufficientGas
has 63 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (i *InventoryTestSuite) TestHasSufficientGas() {
var wg sync.WaitGroup
wg.Add(len(i.backends))
for _, backend := range i.backends {
go func(backend backends.SimulatedTestBackend) {
Function getFastBridgeOriginMap
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const getFastBridgeOriginMap = async (chainId, rfqResponse) => {
// Return empty map if FastBridge is not supported on the chain
if (!FastBridgeRouters[chainId]) {
return {}
}
Function RouterCache
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const RouterCache = (maxAge: number) => {
/* @ts-ignore */
return (
target: Object, // target
propertyKey: string,
Function Pagination
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const Pagination = ({}) => {
const router = useRouter()
let { p } = router.query
// @ts-ignore
p = p ?? 1
Function PackageInstall
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const PackageInstall = () => {
const [activeTab, setActiveTab] = useState('npm')
const tabContainerStyle = {
display: 'flex',
Function constructor
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor({
addresses,
wrapperAddresses,
decimals,
symbol,
Function useMaintenanceData
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const useMaintenanceData = () => {
const { pausedChainsData, pausedModulesData } = useMaintenanceState()
const pausedChainsList: ChainPause[] = pausedChainsData
? pausedChainsData?.map((pause: ChainPause) => {
Method AgentsIntegrationSuite.TestAgentsE2E
has 16 return statements (exceeds 4 allowed). Open
Open
func (u *AgentsIntegrationSuite) TestAgentsE2E() {
testDone := false
defer func() {
testDone = true
}()
Function createParsers
has 16 return statements (exceeds 4 allowed). Open
Open
func createParsers(ctx context.Context, db db.ConsumerDB, fetcher fetcherpkg.ScribeFetcher, clients map[uint32]etherClient.EVM, config serverConfig.Config) (*types.ServerParsers, *types.ServerRefs, map[string]*swap.SwapFlashLoanFilterer, error) {
ethClient, err := ethclient.DialContext(ctx, config.RPCURL+fmt.Sprintf("%d", 1))
if err != nil {
return nil, nil, nil, fmt.Errorf("could not create client: %w", err)
}
Method queryResolver.LogsAtHeadRange
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func (r *queryResolver) LogsAtHeadRange(ctx context.Context, contractAddress *string, chainID int, blockNumber *int, txHash *string, txIndex *int, blockHash *string, index *int, confirmed *bool, startBlock int, endBlock int, page int) ([]*model.Log, error) {
Function CopyTX
has 62 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func CopyTX(unsignedTx *types.Transaction, options ...CopyOption) (*types.Transaction, error) {
// tx is immutable except within the confines of type. Here we manually copy over the inner values
// these need to be overwritten, but copied over anyway for parity
// the v paramater will be modified by the signer if converting from a dynamic tx to a legacy tx
Function NewEmbeddedBackendWithConfig
has 62 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func NewEmbeddedBackendWithConfig(ctx context.Context, t *testing.T, config *params.ChainConfig) *Backend {
t.Helper()
setupEthLogger()
embedded := Backend{}
Method Executor.executeExecutable
has 62 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (e Executor) executeExecutable(parentCtx context.Context, chainID uint32) (err error) {
backoffInterval := time.Duration(0)
for {
select {
case <-parentCtx.Done():
Method queryResolver.getDateResultByChainMv
has 62 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (r *queryResolver) getDateResultByChainMv(ctx context.Context, chainID *int, typeArg *model.DailyStatisticType, platform *model.Platform, duration *model.Duration) ([]*model.DateResultByChain, error) {
var err error
firstFilter := true
timestampSpecifierMv := GetDurationFilter(duration, &firstFilter, "f")
chainIDSpecifierMv := generateSingleSpecifierI32SQL(chainID, sql.ChainIDFieldName, &firstFilter, "f")
Function pendingTransactionsMissingRelayExceedDeadlineController
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const pendingTransactionsMissingRelayExceedDeadlineController = async (
req: Request,
res: Response
) => {
try {
Function useSyncQueryParamsWithSwapState
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const useSyncQueryParamsWithSwapState = () => {
const dispatch = useDispatch()
const router = useRouter()
const { swapChainId, swapFromToken, swapToToken } = useSwapState()
Function extractDeploymentReceipts
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const extractDeploymentReceipts = (broadcastFN) => {
// Silent exit if the broadcast file does not exist
if (!fs.existsSync(broadcastFN)) {
return []
}
Function pendingTransactionsMissingRelayController
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const pendingTransactionsMissingRelayController = async (
req: Request,
res: Response
) => {
try {
Function swapTxInfoController
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const swapTxInfoController = async (req, res) => {
const errors = validationResult(req)
if (!errors.isEmpty()) {
return res.status(400).json({ errors: errors.array() })
}
Function ReturnToMonkePage
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const ReturnToMonkePage = () => {
const { address: currentAddress, chain } = useAccount()
const [connectedChainId, setConnectedChainId] = useState(0)
const [address, setAddress] = useState(undefined)