-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updates to be compatible with 6.0 chains BREAKING CHANGE: 🧨 Checkpoint Schedules specify dates explictly, reschedule instruction removed - use executeManually instead, InvestorUniquness claim types removed
- Loading branch information
1 parent
83d2c79
commit fcffc4b
Showing
29 changed files
with
227 additions
and
813 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,19 @@ | ||
/* istanbul ignore file */ | ||
|
||
import { ApiProperty } from '@nestjs/swagger'; | ||
import { BigNumber } from '@polymeshassociation/polymesh-sdk'; | ||
import { Type } from 'class-transformer'; | ||
import { IsDate, IsOptional, ValidateNested } from 'class-validator'; | ||
import { IsArray } from 'class-validator'; | ||
|
||
import { CalendarPeriodDto } from '~/checkpoints/dto/calendar-period.dto'; | ||
import { ToBigNumber } from '~/common/decorators/transformation'; | ||
import { IsBigNumber } from '~/common/decorators/validation'; | ||
import { TransactionBaseDto } from '~/common/dto/transaction-base-dto'; | ||
|
||
export class CreateCheckpointScheduleDto extends TransactionBaseDto { | ||
@ApiProperty({ | ||
description: | ||
'Date from which the Schedule will start creating Checkpoints. A null value means the first Checkpoint will be created immediately', | ||
description: 'An array of dates for when to make Checkpoints', | ||
type: 'string', | ||
example: new Date('05/23/2021').toISOString(), | ||
nullable: true, | ||
isArray: true, | ||
example: [new Date('03/23/2030').toISOString(), new Date('03/23/2031').toISOString()], | ||
}) | ||
@IsOptional() | ||
@IsDate() | ||
@IsArray() | ||
@Type(() => Date) | ||
readonly start: Date | null; | ||
|
||
@ApiProperty({ | ||
description: | ||
'Periodic interval between Checkpoints. For example, a period of 2 weeks means that a Checkpoint will be created every 2 weeks. A null value means this Schedule creates a single Checkpoint and then expires', | ||
type: CalendarPeriodDto, | ||
nullable: true, | ||
}) | ||
@IsOptional() | ||
@ValidateNested() | ||
@Type(() => CalendarPeriodDto) | ||
readonly period: CalendarPeriodDto | null; | ||
|
||
@ApiProperty({ | ||
description: | ||
'Number of Checkpoints that should be created by this Schedule. A null or 0 value means infinite Checkpoints (the Schedule never expires)', | ||
type: 'string', | ||
example: '12', | ||
nullable: true, | ||
}) | ||
@IsOptional() | ||
@IsBigNumber() | ||
@ToBigNumber() | ||
readonly repetitions: BigNumber | null; | ||
readonly points: Date[]; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.