Spike/external orchestrator lib#855
Open
marcosio wants to merge 4 commits intospike/lib-based-diamond-versionfrom
Open
Spike/external orchestrator lib#855marcosio wants to merge 4 commits intospike/lib-based-diamond-versionfrom
marcosio wants to merge 4 commits intospike/lib-based-diamond-versionfrom
Conversation
…ionsç add storage accessor functions to LibSnapshots for snapshot data retrieval add helper functions to LibClearing for clearing data management by struct add setHoldThirdPartyByParams and getHoldThirdPartyByParams to LibHold refactor SnapshotsFeature to use LibSnapshots accessors instead of direct storage refactor LibClearingOps to use LibClearing helper functions refactor LibHoldOps to use LibHold accessor functions replace getKpiLinkedRate/getSustainabilityRate with memory-based getters update KPI-linked and sustainability rate contracts to use new interest rate getters remove direct storage imports from orchestrator libraries change getClearingBasicInfo parameter from calldata to memory format import statements in ERC3643 interface files Signed-off-by: Marcos Serradilla Diez <marcos@io.builders>
…ations create unified external orchestrator library for all token operations implement transfer operations (transferByPartition, issueByPartition, redeemByPartition) add ERC20-style wrappers (transfer, mint, burn, approve, transferFrom) implement allowance operations with ABAF synchronization add pre/post token transfer hooks for snapshots and voting power updates implement total balance operations with ABAF-adjusted calculations integrate hold operations via LibHoldOps delegation integrate clearing operations via LibClearingOps delegation architecture supports ~80% bytecode reduction via single deployed library with DELEGATECALL Signed-off-by: Marcos Serradilla Diez <marcos@io.builders>
… to external libraries - convert 4 internal orchestrator libraries to external libraries, all under 24KB EVM deployment limit - deploy TokenCoreOps (replaces LibTokenTransfer + ERC20/allowance operations) - deploy HoldOps (replaces LibHoldOps + LibTotalBalance - total balance reads with hold ops) - deploy ClearingOps (replaces LibClearingOps creation + action operations) - deploy ClearingReadOps (replaces LibClearingOps reads + absorbs ABAF prep functions) - delete obsolete internal libraries: LibTokenTransfer.sol, LibTotalBalance.sol, LibHoldOps.sol, LibClearingOps.sol, TokenOrchestrator.sol - all 4 new libraries compile successfully under Ethereum 24KB contract size limit diff.patch Signed-off-by: Marcos Serradilla Diez <marcos@io.builders>
✅ 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. |
…ibraries
This commit exposes errors and events in facet interfaces to support the
external orchestrator library pattern. When errors and events are defined
in external libraries, they need to be exposed in the facet interfaces
for proper ABI generation and test compatibility.
Changes:
- Add RedeemedByPartition event to IBond for bond redemption operations
- Add TransferByPartition event to IERC3643, IERC1594, IERC1644, ITransferAndLock
- Add Transfer event to IERC1594 for ERC20-style transfers
- Add InsufficientBalance error to IERC20 for balance validation
- Add InvalidPartition error to IERC1594 for partition validation
- Add WrongExpirationTimestamp error to IClearing for clearing operations
- Add hold-specific errors to IHoldTokenHolder (HoldExpirationNotReached,
WrongHoldId, InvalidDestinationAddress, InsufficientHoldBalance,
HoldExpirationReached, IsNotEscrow)
- Make IClearingActions inherit from IClearing to expose clearing errors
- Make IHoldTokenHolder inherit from IClearing to expose expiration errors
- Update LibHold and HoldOps to reference IHoldTokenHolder for error definitions
Test Results:
- Baseline: 1257 passing, 0 failing
- Current: 1246 passing, 11 failing
Remaining failures are related to event emission detection in tests and
error format expectations, which require further investigation.
Signed-off-by: Marcos Serradilla Diez <marcos@io.builders>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Type of change
Testing
Node version:
Checklist