feat(sdk-coin-flr): add Export C to P chain support#7739
Conversation
6efdb9d to
e2ef269
Compare
There was a problem hiding this comment.
Pull request overview
This PR adds support for Export C to P chain atomic transactions in the Flare (FLR) SDK coin module, enabling cross-chain operations between Flare's C-chain (EVM-compatible) and P-chain. The implementation closely follows the established patterns from the AVAX C-chain implementation.
Key Changes:
- Integrated atomic transaction builder (
FlrPLib) for cross-chain Export transactions - Added transaction explanation, verification, and signature validation for atomic transactions
- Implemented hop transaction parameter creation with Export type support
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| modules/sdk-coin-flr/src/flr.ts | Main implementation adding atomic transaction support including explainTransaction, verifyTransaction, validateHopPrebuild, createHopTransactionParams, and helper methods for Export C to P transactions |
| modules/sdk-coin-flr/src/iface.ts | New interface definitions exported publicly including ExplainTransactionOptions, HopParams, HopPrebuild, and extended BuildOptions/TransactionPrebuild types |
| modules/sdk-coin-flr/src/index.ts | Exports new iface module for public API access |
| modules/sdk-coin-flr/test/unit/flr.ts | Unit tests for P-chain address validation, hop transaction parameters, transaction explanation, and basic transaction verification |
| modules/sdk-coin-flr/test/resources.ts | Test data for Export C to P transactions including addresses, transaction hex values, and metadata |
| modules/sdk-coin-flr/package.json | Added dependencies for atomic transactions (sdk-coin-flrp, secp256k1, keccak, ethereumjs-util, bignumber.js) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
e2ef269 to
8af5b4d
Compare
8af5b4d to
db858bd
Compare
|
I have addressed all the above review comments. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Ticket: WIN-7886