Skip to content

Commit

Permalink
Merge branch 'main' into add-blob-encryption
Browse files Browse the repository at this point in the history
  • Loading branch information
hectorgomezv committed Nov 15, 2024
2 parents f8af865 + 0f309a2 commit ad1c139
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,24 @@ import {
} from '@/routes/transactions/entities/transaction-info.entity';

export class CreationTransactionInfo extends TransactionInfo {
@ApiProperty({ enum: [TransactionInfoType.Creation] })
override type = TransactionInfoType.Creation;
@ApiProperty()
creator: AddressInfo;
@ApiProperty()
transactionHash: string;
@ApiPropertyOptional({ type: AddressInfo, nullable: true })
implementation: AddressInfo | null;
@ApiPropertyOptional({ type: AddressInfo, nullable: true })
factory: AddressInfo | null;
@ApiPropertyOptional({ type: AddressInfo })
factory: AddressInfo;
@ApiPropertyOptional({ type: String, nullable: true })
saltNonce: string | null;

constructor(
creator: AddressInfo,
transactionHash: string,
implementation: AddressInfo | null,
factory: AddressInfo | null,
factory: AddressInfo,
saltNonce: string | null,
) {
super(TransactionInfoType.Creation, null);
Expand Down
2 changes: 2 additions & 0 deletions src/routes/transactions/entities/custom-transaction.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import {
} from '@/routes/transactions/entities/transaction-info.entity';

export class CustomTransactionInfo extends TransactionInfo {
@ApiProperty({ enum: [TransactionInfoType.Custom] })
override type = TransactionInfoType.Custom;
@ApiProperty()
to: AddressInfo;
@ApiProperty()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import {
} from '@/routes/transactions/entities/transaction-info.entity';

export class SettingsChangeTransaction extends TransactionInfo {
@ApiProperty({ enum: [TransactionInfoType.SettingsChange] })
override type = TransactionInfoType.SettingsChange;
@ApiProperty()
dataDecoded: DataDecoded;
@ApiPropertyOptional({ type: SettingsChange, nullable: true })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ export enum TransferDirection {
}

export class TransferTransactionInfo extends TransactionInfo {
@ApiProperty({ enum: [TransactionInfoType.Transfer] })
override type = TransactionInfoType.Transfer;
@ApiProperty()
sender: AddressInfo;
@ApiProperty()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ export class SwapTransferTransactionInfo
extends TransactionInfo
implements TransferTransactionInfo, SwapOrderTransactionInfo
{
@ApiProperty({ enum: [TransactionInfoType.SwapTransfer] })
override type = TransactionInfoType.SwapTransfer;

// TransferTransactionInfo properties
@ApiProperty()
sender: AddressInfo;
Expand Down

0 comments on commit ad1c139

Please sign in to comment.