File

src/transaction/dtos/submit-transaction.dto.ts

Index

Properties

Properties

args
Type : string[]
Decorators :
@ApiProperty({type: 'string', isArray: true})
@IsArray()
contractAddress
Type : string
Decorators :
@ApiProperty({type: 'string'})
@IsString()
@IsOptional()
contractName
Type : ContractName
Decorators :
@ApiProperty({enumName: 'ContractName', enum: undefined})
@IsEnum(ContractName)
submitterAddress
Type : string
Decorators :
@ApiProperty({type: 'string'})
@IsString()
transactionName
Type : TransactionNames
Decorators :
@ApiProperty({enumName: 'TransactionNames', enum: undefined})
@IsEnum(TransactionNames)
import { ApiProperty } from "@nestjs/swagger";
import { IsArray, IsEnum, IsOptional, IsString } from "class-validator";
import { ContractName, TransactionNames } from "src/common/interfaces";

export class TransactionDto {
  @ApiProperty({
    type: "string",
  })
  @IsString()
  @IsOptional()
  contractAddress: string;

  @ApiProperty({
    enumName: "ContractName",
    enum: ["erc20"],
  })
  @IsEnum(ContractName)
  contractName: ContractName;

  @ApiProperty({
    enumName: "TransactionNames",
    enum: ["transfer"],
  })
  @IsEnum(TransactionNames)
  transactionName: TransactionNames;

  @ApiProperty({
    type: "string",
    isArray: true,
  })
  @IsArray()
  args: string[];

  @ApiProperty({
    type: "string",
  })
  @IsString()
  submitterAddress: string;
}

results matching ""

    No results matching ""