-
Notifications
You must be signed in to change notification settings - Fork 16
Feat/bbnd 1246 redeem all at maturity #703
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
Feat/bbnd 1246 redeem all at maturity #703
Conversation
Signed-off-by: Alberto Molina <[email protected]>
Signed-off-by: Alberto Molina <[email protected]>
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Signed-off-by: Alberto Molina <[email protected]>
Signed-off-by: Alberto Molina <[email protected]>
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 adds a new fullRedeemAtMaturity feature that enables redeeming all bond tokens at maturity across all partitions for a specified token holder. This complements the existing redeemAtMaturityByPartition method which only redeems from a single partition.
Key changes:
- New smart contract function
fullRedeemAtMaturityin Bond contract with proper validations - SDK integration with transaction adapters, command handlers, and request models
- Comprehensive test coverage at both contract and SDK levels
Reviewed Changes
Copilot reviewed 16 out of 19 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
Bond.sol |
Implements core fullRedeemAtMaturity logic to iterate through all partitions and redeem balances |
IBond.sol |
Adds interface definition for the new function |
BondUSAFacet.sol |
Registers the function selector in the facet |
RPCTransactionAdapter.ts |
Implements RPC adapter for the transaction |
HederaTransactionAdapter.ts |
Implements Hedera adapter for the transaction |
TransactionAdapter.ts |
Adds abstract method signature |
FullRedeemAtMaturityRequest.ts |
Defines request validation model |
FullRedeemAtMaturityCommand.ts |
Defines command and response objects |
FullRedeemAtMaturityCommandHandler.ts |
Implements command execution logic |
FullRedeemAtMaturityCommandError.ts |
Defines error handling |
Bond.ts |
Integrates new method into Bond API |
bond.test.ts |
Adds comprehensive contract tests |
Bond.unit.test.ts |
Adds SDK unit tests |
BondFixture.ts |
Adds test fixtures |
Constants.ts |
Adds gas constant |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…aturity Signed-off-by: Alberto Molina <[email protected]>
Signed-off-by: Alberto Molina <[email protected]>
Signed-off-by: Alberto Molina <[email protected]>
Signed-off-by: Alberto Molina <[email protected]> Signed-off-by: Mario Francia <[email protected]>
Description
This pull request introduces a new feature for full bond redemption at maturity, allowing all of a token holder's bond partitions to be redeemed in a single transaction. The change is implemented across the smart contract, SDK, and test suite, and includes updates to the interface, function selectors, and registry. Comprehensive tests are added to ensure correct behavior and error handling for the new method.
Feature Addition: Full Redeem at Maturity
fullRedeemAtMaturityfunction to theBondsmart contract, enabling redemption of all partitions for a token holder at maturity with appropriate access control and validation checks.IBondinterface to include the newfullRedeemAtMaturity(address)method, with documentation.Integration and Registry Updates
fullRedeemAtMaturityinBondUSAFacetand updated the facet registry data for contract discovery and integration. [1] [2]SDK and Fixture Enhancements
FullRedeemAtMaturityCommandandFullRedeemAtMaturityRequestfixtures to the SDK for testing and integration purposes. [1] [2] [3]Comprehensive Testing
Release Notes
Type of change
Testing
Node version:
Checklist