Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,20 +56,16 @@ Thank you for considering contributing to our project! We welcome contributions
To prevent issues with PRs:

1. **Scope Your Changes**

- Ensure each PR focuses on a single feature, bugfix, or improvement. Avoid combining unrelated changes.

2. **Communicate Before Major Changes**

- For significant changes, open an issue first to gather feedback and ensure alignment.

3. **Adhere to Standards**

- Follow the project’s coding style, structure, and standards.
- Run all tests and ensure the build passes before submitting your PR.

4. **Avoid Unsolicited Large Changes**

- Do not submit large-scale refactors, redesigns, or changes to critical functionality without prior discussion.

5. **Include Documentation**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import type { MigrationInterface, QueryRunner } from 'typeorm';

export class NotificationUpdateUpdatedAt1727701873513
implements MigrationInterface
{
export class NotificationUpdateUpdatedAt1727701873513 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`
CREATE TRIGGER update_push_notification_devices_updated_at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import type { MigrationInterface, QueryRunner } from 'typeorm';

export class UpdateUsersTimestampTrigger1737452044987
implements MigrationInterface
{
export class UpdateUsersTimestampTrigger1737452044987 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`
CREATE TRIGGER update_users_updated_at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import type { MigrationInterface, QueryRunner } from 'typeorm';

export class UpdateWalletTimestampTrigger1737473370466
implements MigrationInterface
{
export class UpdateWalletTimestampTrigger1737473370466 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`
CREATE TRIGGER update_wallets_updated_at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import type { MigrationInterface, QueryRunner } from 'typeorm';

export class UpdateOrganizationsTimestampTrigger1737988602722
implements MigrationInterface
{
export class UpdateOrganizationsTimestampTrigger1737988602722 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`
CREATE TRIGGER update_organizations_updated_at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import type { MigrationInterface, QueryRunner } from 'typeorm';

export class AddUserOrganizationsInvitedByField1740053306706
implements MigrationInterface
{
export class AddUserOrganizationsInvitedByField1740053306706 implements MigrationInterface {
name = 'AddUserOrganizationsInvitedByField1740053306706';

public async up(queryRunner: QueryRunner): Promise<void> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import type { MigrationInterface, QueryRunner } from 'typeorm';

export class AddOrganizationsSafeUniqueIndex1741709533269
implements MigrationInterface
{
export class AddOrganizationsSafeUniqueIndex1741709533269 implements MigrationInterface {
name = 'AddOrganizationsSafeUniqueIndex1741709533269';

public async up(queryRunner: QueryRunner): Promise<void> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import type { MigrationInterface, QueryRunner } from 'typeorm';

export class UnifyForeignKeysColumnNames1741792345987
implements MigrationInterface
{
export class UnifyForeignKeysColumnNames1741792345987 implements MigrationInterface {
name = 'UnifyForeignKeysColumnNames1741792345987';

public async up(queryRunner: QueryRunner): Promise<void> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import type { MigrationInterface, QueryRunner } from 'typeorm';

export class AlterOrganizationsSafeUniqueIndex1742295485154
implements MigrationInterface
{
export class AlterOrganizationsSafeUniqueIndex1742295485154 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`DROP INDEX UQ_OS_chainId_address; CREATE UNIQUE INDEX UQ_OS_chainId_address_organization ON organization_safes (chain_id, address, organization_id);`,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import type { MigrationInterface, QueryRunner } from 'typeorm';

export class MigrateOrganizationsToSpaces1742571887114
implements MigrationInterface
{
export class MigrateOrganizationsToSpaces1742571887114 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`
ALTER TABLE organizations RENAME TO spaces;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import type { MigrationInterface, QueryRunner } from 'typeorm';

export class MigrateUserOrganizationsToMembers1742572795471
implements MigrationInterface
{
export class MigrateUserOrganizationsToMembers1742572795471 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`
ALTER TABLE user_organizations RENAME TO members;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import type { MigrationInterface, QueryRunner } from 'typeorm';

export class MigrateOrganizationSafesToSpaceSafes1742573590016
implements MigrationInterface
{
export class MigrateOrganizationSafesToSpaceSafes1742573590016 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`
ALTER TABLE organization_safes RENAME TO space_safes;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
"eslint-config-prettier": "10.1.8",
"husky": "9.1.7",
"jest": "29.7.0",
"prettier": "3.5.3",
"prettier": "3.7.4",
"source-map-support": "0.5.21",
"supertest": "7.1.4",
"ts-jest": "29.4.5",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ import postgres from 'postgres';
import type { Address } from 'viem';

@Injectable()
export class CounterfactualSafesDatasource
implements ICounterfactualSafesDatasource
{
export class CounterfactualSafesDatasource implements ICounterfactualSafesDatasource {
private static readonly COUNTERFACTUAL_SAFES_CREATION_CACHE_PREFIX =
'counterfactual_safes_creation';
private readonly defaultExpirationTimeInSeconds: number;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ export const CreateAddressBookItemDtoSchema = z.object({
address: AddressSchema,
});

export class CreateAddressBookItemDto
implements z.infer<typeof CreateAddressBookItemDtoSchema>
{
export class CreateAddressBookItemDto implements z.infer<
typeof CreateAddressBookItemDtoSchema
> {
name: string;
address: Address;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ export const UpdateAddressBookItemDtoSchema = z.object({
address: z.string(),
});

export class UpdateAddressBookItemDto
implements z.infer<typeof UpdateAddressBookItemDtoSchema>
{
export class UpdateAddressBookItemDto implements z.infer<
typeof UpdateAddressBookItemDtoSchema
> {
id: number;
name: string;
address: Address;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ import {
import type { Address } from 'viem';

@Injectable()
export class CounterfactualSafesRepository
implements ICounterfactualSafesRepository
{
export class CounterfactualSafesRepository implements ICounterfactualSafesRepository {
constructor(
@Inject(ICounterfactualSafesDatasource)
private readonly datasource: ICounterfactualSafesDatasource,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { AddressSchema } from '@/validation/entities/schemas/address.schema';
import { z } from 'zod';
import type { Address } from 'viem';

export class CreateCounterfactualSafeDto
implements z.infer<typeof CreateCounterfactualSafeDtoSchema>
{
export class CreateCounterfactualSafeDto implements z.infer<
typeof CreateCounterfactualSafeDtoSchema
> {
chainId: string;
fallbackHandler: Address;
owners: Array<Address>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ export const CreateAccountDtoSchema = z.object({
name: NameSchema,
});

export class CreateAccountDto
implements z.infer<typeof CreateAccountDtoSchema>
{
export class CreateAccountDto implements z.infer<
typeof CreateAccountDtoSchema
> {
address: Address;
name: string;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { NumericStringSchema } from '@/validation/entities/schemas/numeric-string.schema';
import { z } from 'zod';

export class UpsertAccountDataSettingsDto
implements z.infer<typeof UpsertAccountDataSettingsDtoSchema>
{
export class UpsertAccountDataSettingsDto implements z.infer<
typeof UpsertAccountDataSettingsDtoSchema
> {
accountDataSettings: Array<{
dataTypeId: string;
enabled: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ import {
import { ApiProperty } from '@nestjs/swagger';
import type { Address } from 'viem';

export class CreateAddressBookItemDto
implements DomainCreateAddressBookItemDto
{
export class CreateAddressBookItemDto implements DomainCreateAddressBookItemDto {
@ApiProperty({ minLength: NAME_MIN_LENGTH, maxLength: NAME_MAX_LENGTH })
name!: string;
@ApiProperty()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ import { CreateCounterfactualSafeDto as DomainCreateCounterfactualSafeDto } from
import { ApiProperty } from '@nestjs/swagger';
import type { Address } from 'viem';

export class CreateCounterfactualSafeDto
implements DomainCreateCounterfactualSafeDto
{
export class CreateCounterfactualSafeDto implements DomainCreateCounterfactualSafeDto {
@ApiProperty()
chainId!: string;
@ApiProperty()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ class UpsertAccountDataSettingDto {
enabled!: boolean;
}

export class UpsertAccountDataSettingsDto
implements DomainUpsertAccountDataSettingsDto
{
export class UpsertAccountDataSettingsDto implements DomainUpsertAccountDataSettingsDto {
@ApiProperty({ type: UpsertAccountDataSettingDto, isArray: true })
accountDataSettings!: Array<UpsertAccountDataSettingDto>;
}
6 changes: 3 additions & 3 deletions src/modules/alerts/routes/entities/alert.dto.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ export class AlertLog implements z.infer<typeof AlertLogSchema> {
data!: Address;
}

export class AlertTransaction
implements z.infer<typeof AlertTransactionSchema>
{
export class AlertTransaction implements z.infer<
typeof AlertTransactionSchema
> {
network!: string;
block_hash!: string;
block_number!: number;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ type StartBridgeTokensViaAcrossV3Args = {
};

class StartBridgeTokensViaAcrossV3Encoder<
T extends StartBridgeTokensViaAcrossV3Args,
>
T extends StartBridgeTokensViaAcrossV3Args,
>
extends Builder<T>
implements IEncoder
{
Expand Down Expand Up @@ -155,8 +155,8 @@ type SwapAndStartBridgeTokensViaAcrossV3Args = {
};

class SwapAndStartBridgeTokensViaAcrossV3Encoder<
T extends SwapAndStartBridgeTokensViaAcrossV3Args,
>
T extends SwapAndStartBridgeTokensViaAcrossV3Args,
>
extends Builder<T>
implements IEncoder
{
Expand Down Expand Up @@ -217,8 +217,8 @@ type SwapTokensSingleV3ERC20ToERC20Args = {
};

class SwapTokensSingleV3ERC20ToERC20Encoder<
T extends SwapTokensSingleV3ERC20ToERC20Args,
>
T extends SwapTokensSingleV3ERC20ToERC20Args,
>
extends Builder<T>
implements IEncoder
{
Expand Down Expand Up @@ -276,8 +276,8 @@ type SwapTokensMultiV3ERC20ToERC20Args = {
};

class SwapTokensMultiV3ERC20ToERC20Encoder<
T extends SwapTokensMultiV3ERC20ToERC20Args,
>
T extends SwapTokensMultiV3ERC20ToERC20Args,
>
extends Builder<T>
implements IEncoder
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { ApiProperty } from '@nestjs/swagger';
import { BeaconChainExplorerUriTemplate as DomainBeaconChainExplorerUriTemplate } from '@/modules/chains/domain/entities/beacon-chain-explorer-uri-template.entity';

export class BeaconChainExplorerUriTemplate
implements DomainBeaconChainExplorerUriTemplate
{
export class BeaconChainExplorerUriTemplate implements DomainBeaconChainExplorerUriTemplate {
@ApiProperty({ type: String, nullable: true })
publicKey!: string | null;
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { ApiProperty } from '@nestjs/swagger';
import { BlockExplorerUriTemplate as DomainBlockExplorerUriTemplate } from '@/modules/chains/domain/entities/block-explorer-uri-template.entity';

export class BlockExplorerUriTemplate
implements DomainBlockExplorerUriTemplate
{
export class BlockExplorerUriTemplate implements DomainBlockExplorerUriTemplate {
@ApiProperty()
address!: string;
@ApiProperty()
Expand Down
4 changes: 0 additions & 4 deletions src/modules/csv-export/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ This module generates a downloadable CSV file of Safe transactions.
## High-Level Flow

1. **Launch** – `CsvExportController` exposes:

- `POST /v1/export/chains/:chainId/:safeAddress`
Creates an asynchronous job to export transactions for the specified Safe.
- `GET /v1/export/:jobId/status`
Expand All @@ -17,14 +16,12 @@ This module generates a downloadable CSV file of Safe transactions.

3. **Worker** – `CsvExportConsumer` listens to the `csv-export` queue.
For each job:

- Invokes `CsvExportService.export`.
- Updates progress to BullMQ (enabling the controller’s status endpoint).
- Retries failed job depending on the configured attempts count.

4. **Data Retrieval** – `CsvExportService.transactionPagesGenerator` streams
transaction pages from the Safe Transaction Service:

- `ExportApiManager` resolves an `ExportApi` for the requested chain.
- `ExportApi.export` fetches paginated data from
`/api/v1/safes/{safeAddress}/export/`, yielding `TransactionExport` records.
Expand All @@ -49,7 +46,6 @@ This module generates a downloadable CSV file of Safe transactions.
| `note` | Note |

6. **Storage & URL** – `createUploadStream` decides between:

- **AWS S3** (`CSV_EXPORT_FILE_STORAGE_TYPE=aws`):
Uses `ICloudStorageApiService.createUploadStream` with `Upload` to stream
directly to S3. A signed download URL is generated via
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
import { z } from 'zod';
import type { Address } from 'viem';

export class CreateDelegateDto
implements z.infer<typeof CreateDelegateDtoSchema>
{
export class CreateDelegateDto implements z.infer<
typeof CreateDelegateDtoSchema
> {
@ApiPropertyOptional({ type: String, nullable: true })
safe!: Address | null;
@ApiProperty()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { ApiProperty } from '@nestjs/swagger';
import { z } from 'zod';
import type { Address } from 'viem';

export class DeleteDelegateDto
implements z.infer<typeof DeleteDelegateDtoSchema>
{
export class DeleteDelegateDto implements z.infer<
typeof DeleteDelegateDtoSchema
> {
@ApiProperty()
delegate!: Address;
@ApiProperty()
Expand Down
Loading