Skip to content

update changed only tokens #2052

@gmbronco

Description

@gmbronco

First query updates all the token rows - it get's really slow. Instead do select update.

modules/actions/content/sync-erc4626-blocked-buffers.ts

await prisma.$transaction([
    prisma.prismaToken.updateMany({
        where: {
            chain: chain,
        },
        data: { isBufferAllowed: true },
    }),
    prisma.prismaToken.updateMany({
        where: {
            chain: chain,
            address: { in: blockedBuffersForErc4626Addresses },
        },
        data: { isBufferAllowed: false },
    }),
]);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions