Skip to content
Open
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
6 changes: 6 additions & 0 deletions src/escrow/dto/split-release.dto.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { ApiProperty } from '@nestjs/swagger';
import { Type } from 'class-transformer';
import {
ArrayMaxSize,
ArrayMinSize,
IsNumber,
IsOptional,
Expand Down Expand Up @@ -29,8 +30,13 @@ export class SplitRecipientDto {
}

export class SplitReleaseDto {
// Unbounded recipients: the contract's `release` iterates every recipient
// (one token transfer each) — a large split exceeds Soroban's
// per-transaction resource limits and fails on-chain (#581, #15). Cap at a
// size that stays within the contract's budget.
@ApiProperty({ type: [SplitRecipientDto] })
@ArrayMinSize(1)
@ArrayMaxSize(50)
@ValidateNested({ each: true })
@Type(() => SplitRecipientDto)
recipients: SplitRecipientDto[];
Expand Down
3 changes: 3 additions & 0 deletions src/teams/dto/create-team.dto.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { ApiProperty } from '@nestjs/swagger';
import { Transform, Type } from 'class-transformer';
import {
ArrayMaxSize,
ArrayMinSize,
IsNotEmpty,
IsNumber,
Expand Down Expand Up @@ -34,6 +35,7 @@ export class TeamMemberSplitDto {
export class UpdateTeamSplitsDto {
@ApiProperty({ type: [TeamMemberSplitDto] })
@ArrayMinSize(1)
@ArrayMaxSize(50)
@ValidateNested({ each: true })
@Type(() => TeamMemberSplitDto)
splits: TeamMemberSplitDto[];
Expand All @@ -56,6 +58,7 @@ export class CreateTeamDto {

@ApiProperty({ type: [TeamMemberSplitDto] })
@ArrayMinSize(1)
@ArrayMaxSize(50)
@ValidateNested({ each: true })
@Type(() => TeamMemberSplitDto)
members: TeamMemberSplitDto[];
Expand Down