-
Notifications
You must be signed in to change notification settings - Fork 300
feat: flrp validators and delegator #7007
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
15dd921 to
55b5bd7
Compare
55b5bd7 to
0756bac
Compare
0756bac to
5658080
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces comprehensive support for Flare P-chain transactions in the BitGo SDK. The implementation adds multiple transaction builders for delegator operations, validator management, and atomic cross-chain transactions. The changes focus on FlareJS compatibility and provide structured transaction building capabilities for the Flare blockchain's Platform chain.
Key additions include:
- New delegator and validator transaction builders with proper fee validation and time management
- Atomic transaction builders for import/export operations between P-chain and C-chain
- Enhanced constants and utilities for Flare-specific validation patterns
- Comprehensive type definitions for improved type safety
Reviewed Changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| CODEOWNERS | Assigns ownership of sdk-coin-flrp module to the ethalt-team |
| atomicTransactionBuilder.ts | Enhances atomic transaction builder with FlareJS compatibility and proper input/output handling |
| constants.ts | Adds Flare-specific constants including asset lengths, fees, and hex validation utilities |
| delegatorTxBuilder.ts | Implements AddDelegator transaction builder with validation and FlareJS integration |
| validatorTxBuilder.ts | Extends delegator builder for AddValidator transactions with delegation fee validation |
| permissionlessValidatorTxBuilder.ts | Adds support for permissionless validators with BLS key handling |
| transactionBuilder.ts | Provides base transaction builder with recovery signature support |
| exportInCTxBuilder.ts/exportInPTxBuilder.ts | Implements export transaction builders for cross-chain operations |
| importInCTxBuilder.ts/importInPTxBuilder.ts | Implements import transaction builders for cross-chain operations |
| types.ts | Defines type-safe interfaces for extended transaction properties |
| Test files | Comprehensive unit tests for all transaction builders |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
modules/sdk-coin-flrp/src/lib/permissionlessValidatorTxBuilder.ts
Outdated
Show resolved
Hide resolved
modules/sdk-coin-flrp/src/lib/permissionlessValidatorTxBuilder.ts
Outdated
Show resolved
Hide resolved
sijuu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
approving CODEOWNERS change
kisslove-dewangan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
lokesh-bitgo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This pull request introduces significant enhancements and new features to the Flare P-chain SDK module, particularly around atomic transaction building, delegator transaction support, and improved transaction validation and signing. The changes include the addition of a new delegator transaction builder, expanded constants for Flare network compatibility, and a comprehensive refactor of the atomic transaction builder to support FlareJS structures and error handling.
New Features
DelegatorTxBuilderclass to support building and validating Flare P-chain delegator transactions with proper credential and reward address handling, including FlareJS-compatible structures and error management.Atomic Transaction Builder Enhancements
AtomicTransactionBuilderto:Constants and Utilities
constants.tswith Flare-specific asset, transaction, fee, and validator constants, and added utility functions for flexible hex validation.Transaction Type Validation
ExportInCTxBuilder, adding robust structure checks while maintaining backward compatibility. [1] [2]Project Ownership
CODEOWNERSto assign the newsdk-coin-flrpmodule to the@BitGo/ethalt-team.Key changes:
CODEOWNERS
modules/sdk-coin-flrp/src/lib/atomicTransactionBuilder.ts
modules/sdk-coin-flrp/src/lib/constants.ts
modules/sdk-coin-flrp/src/lib/delegatorTxBuilder.ts
modules/sdk-coin-flrp/src/lib/exportInCTxBuilder.ts
modules/sdk-coin-flrp/src/lib/exportInPTxBuilder.ts
modules/sdk-coin-flrp/src/lib/importInCTxBuilder.ts
(New file)
modules/sdk-coin-flrp/src/lib/importInPTxBuilder.ts
(New file)
modules/sdk-coin-flrp/src/lib/index.ts
modules/sdk-coin-flrp/src/lib/permissionlessValidatorTxBuilder.ts
(New file)
modules/sdk-coin-flrp/src/lib/transactionBuilder.ts
(New file)
modules/sdk-coin-flrp/src/lib/types.ts
(New file)
modules/sdk-coin-flrp/src/lib/validatorTxBuilder.ts
(New file)
TICKET: WIN-7084, WIN-6318, WIN-6317