Showing 1,971 of 13,422 total issues
Function allBridgeQuotes
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export async function allBridgeQuotes(
this: SynapseSDK,
originChainId: number,
destChainId: number,
tokenIn: string,
Function formatBigIntToString
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const formatBigIntToString = (
bi: bigint | undefined,
nativePrecision: number | undefined,
decimalPlaces?: number
) => {
Method receiptsProxyImpl.processRequest
has 55 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (r *receiptsProxyImpl) processRequest(ctx context.Context, rpcRequest rpc.Request, requestID []byte) (resp omniHTTP.Response, err error) {
ctx, span := r.handler.Tracer().Start(ctx, "proxyrequest")
defer func() {
metrics.EndSpanWithErr(span, err)
}()
Method synapseCCTPHandler.SubmitReceiveMessage
has 55 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (s *synapseCCTPHandler) SubmitReceiveMessage(parentCtx context.Context, msg *relayTypes.Message) (err error) {
ctx, span := s.handler.Tracer().Start(parentCtx, "SubmitReceiveMessage", trace.WithAttributes(
attribute.String(MessageHash, msg.MessageHash),
attribute.Int(metrics.Origin, int(msg.OriginChainID)),
attribute.Int(metrics.Destination, int(msg.DestChainID)),
Function NewTestEnvDB
has 55 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func NewTestEnvDB(ctx context.Context, t *testing.T, handler metrics.Handler) (db db.ConsumerDB, eventDB scribedb.EventDB, gqlClient *client.Client, logIndex atomic.Int64, cleanup func(), testBackend backends.SimulatedTestBackend, deployManager *DeployManager) {
t.Helper()
dbPath := filet.TmpDir(t, "")
sqliteStore, err := sqlite.NewSqliteStore(ctx, dbPath, handler, false)
Function rfqEventToBridgeEvent
has 55 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func rfqEventToBridgeEvent(rfqEvent model.RFQEvent) model.BridgeEvent {
// Only convert BridgeRequestedEvent and BridgeRelayedEvent to bridge events
// Exclude BridgeDepositRefunded, BridgeProofProvided, and BridgeDepositClaimed
eventType := rfqEvent.EventType
if eventType != rfqTypes.BridgeRequestedEvent.Int() &&
Method ChainIndexer.livefillAtHead
has 55 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (c *ChainIndexer) livefillAtHead(parentContext context.Context) error {
timeout := time.Duration(0)
b := createBackoff()
addresses := getAddressesFromConfig(c.chainConfig.Contracts)
tipLivefillBlockMeter, err := c.handler.Metrics().NewHistogram(fmt.Sprintf("scribe_block_meter_%d_tip_livefill", c.chainConfig.ChainID), "block_histogram", "a block height meter", "blocks")
Function TestBytesToJSONString
has 55 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func TestBytesToJSONString(t *testing.T) {
tests := []struct {
name string
input []byte
want string
Function constructJSON
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const constructJSON = (swappableMap, exclusionList) => {
const result = {}
// Iterate through the chains
for (const chainA in swappableMap) {
Function GenerateShellCommand
has 55 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func GenerateShellCommand(shellCommands []*cli.Command) *cli.Command {
// explicitly exclude shell if included
capturedCommands := pruneShellCommands(shellCommands)
// make sure tty is open, this will not be the case in distroless containers
Function refundedAndRelayedTransactionsController
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const refundedAndRelayedTransactionsController = async (
req: Request,
res: Response
) => {
try {
Function recentInvalidRelays
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
recentInvalidRelays: async () => {
const query = db
.selectFrom('BridgeRelayedEvents')
.leftJoin(
'BridgeRequestEvents',
Function pendingTransactionsMissingProofController
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const pendingTransactionsMissingProofController = async (
req: Request,
res: Response
) => {
try {
Function getNetworkHover
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getNetworkHover = (chainColor: string): string => {
switch (chainColor) {
case ColorOptions.YELLOW:
return `hover:bg-[bg-yellow-500] hover:bg-opacity-30 dark:hover:bg-yellow-500 dark:hover:bg-opacity-30`
case ColorOptions.ETH:
Function getNetworkButtonBorderImportant
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getNetworkButtonBorderImportant = (chainColor: string): string => {
switch (chainColor) {
case ColorOptions.YELLOW:
return `border-[#ecae0b] dark:border-[#ecae0b]`
case ColorOptions.ETH:
Function getNetworkButtonBorderHover
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getNetworkButtonBorderHover = (chainColor: string): string => {
switch (chainColor) {
case ColorOptions.YELLOW:
return `hover:border-[#ecae0b]`
case ColorOptions.ETH:
Function getNetworkTextColor
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getNetworkTextColor = (chainColor: string): string => {
switch (chainColor) {
case ColorOptions.YELLOW:
return `text-[#ecae0b] dark:text-[#ecae0b]`
case ColorOptions.ETH:
Function getNetworkLinkTextColor
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getNetworkLinkTextColor = (chainColor: string): string => {
switch (chainColor) {
case ColorOptions.YELLOW:
return `text-gray-800 hover:text-[#ecae0b] dark:text-[#ecae0b] dark:hover:text-[#ecae0b]`
case ColorOptions.ETH:
Function getNetworkButtonBorderActive
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getNetworkButtonBorderActive = (chainColor: string): string => {
switch (chainColor) {
case ColorOptions.YELLOW:
return `active:border-[#ecae0b]`
case ColorOptions.ETH:
Function getNetworkBgClassNameLightDark
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getNetworkBgClassNameLightDark = (chainColor: string): string => {
switch (chainColor) {
case ColorOptions.YELLOW:
return `bg-[#ecae0b]`
case ColorOptions.ETH: