feat(1739): schedule transaction implementation#1752
feat(1739): schedule transaction implementation#1752mmyslblocky wants to merge 8 commits intomainfrom
Conversation
Signed-off-by: mmyslblocky <michal.myslinski@blockydevs.com>
…:hiero-ledger/hiero-cli into feat/1739-schedule-transaction-implementation
…39-schedule-transaction-implementation
Signed-off-by: mmyslblocky <michal.myslinski@blockydevs.com>
Signed-off-by: mmyslblocky <michal.myslinski@blockydevs.com>
Signed-off-by: mmyslblocky <michal.myslinski@blockydevs.com>
Signed-off-by: mmyslblocky <michal.myslinski@blockydevs.com>
| export const ScheduleVerifyInputSchema = z | ||
| .object({ | ||
| name: AliasNameSchema.optional().describe( | ||
| 'Local alias of a schedule created with schedule create', | ||
| ), | ||
| scheduleId: EntityIdSchema.optional().describe( | ||
| 'Schedule id (0.0.x) when not using a saved name', | ||
| ), | ||
| keyManager: KeyManagerTypeSchema.optional(), | ||
| }) | ||
| .refine( | ||
| (schema) => !(schema.name && schema.scheduleId), | ||
| 'Either schedule name or schedule ID must be provided', | ||
| ); |
There was a problem hiding this comment.
I think that alias or id should be required, right? Right now validation will only reject if the user will pass both parameters
src/plugins/schedule/manifest.ts
Outdated
| name: 'create', | ||
| summary: 'Register a named schedule in local state', | ||
| description: | ||
| 'Like batch create: stores a name and schedule options (admin, execution payer, memo, expiration, wait-for-expiry). Use --scheduled <name> on a supported transaction command to submit ScheduleCreateTransaction.', |
There was a problem hiding this comment.
Do we want to keep "Like batch create" here in the description?
There was a problem hiding this comment.
Also in general: do we want to use a technical language in the description like submit ScheduleCreateTransaction etc? Correct me if I'm wrong but I'm pretty sure that we don't do that anywhere else like that.
src/plugins/schedule/manifest.ts
Outdated
| type: OptionType.STRING, | ||
| required: false, | ||
| description: | ||
| 'Account id or key reference for the execution fee payer (optional)', |
There was a problem hiding this comment.
I think we don't need to write (optional) - it's enough to not say (required), right?
| @@ -0,0 +1,764 @@ | |||
| ### ADR-011: Schedule Transaction Plugin | |||
There was a problem hiding this comment.
General documentation for schedule plugin is missing like README.
| expect(result.creator_account_id).toBe('0.0.1234'); | ||
| expect(result.payer_account_id).toBe('0.0.1234'); |
There was a problem hiding this comment.
please do not use string literals. Maybe it's worth to change the name of MOCK_CONTRACT_ID to somrhing more generic so we can reuse it across the tests? Just a suggestion.
src/core/types/shared.types.ts
Outdated
| topicId?: string; | ||
| contractId?: string; | ||
| topicSequenceNumber?: number; | ||
| /** Present on ScheduleCreateTransaction receipts when the schedule entity is created. */ |
There was a problem hiding this comment.
Do we need this comment?
Signed-off-by: mmyslblocky <michal.myslinski@blockydevs.com>
Issue #1739
Issue #1741