File

src/transaction/dtos/query-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)
queryName
Type : QueryNames
Decorators :
@ApiProperty({enumName: 'QueryName', enum: undefined})
@IsEnum(QueryNames)
import { QueryNames } from "src/common/interfaces/Web3Types";
import { IsArray, IsEnum, IsOptional, IsString } from "class-validator";
import { ContractName } from "src/common/interfaces";
import { ApiProperty } from "@nestjs/swagger";

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

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

  @ApiProperty({
    enumName: "QueryName",
    enum: ["balanceOf"],
  })
  @IsEnum(QueryNames)
  queryName: QueryNames;

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

results matching ""

    No results matching ""