Skip to content

Add redeemer stuff#184

Merged
evgeny-stakewise merged 6 commits intomasterfrom
redeemer-stuff
Feb 27, 2026
Merged

Add redeemer stuff#184
evgeny-stakewise merged 6 commits intomasterfrom
redeemer-stuff

Conversation

@evgeny-stakewise
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings February 26, 2026 17:19
Copy link

Copilot AI left a 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 several new utilities and configuration needed for “redeemer”/vault-related functionality in sw_utils, including a converter for OS token share/asset math, a new network config field, and new generic helpers for memoization and async batching.

Changes:

  • Add OsTokenConverter (and tests) for converting between assets and shares using cached totals.
  • Extend BaseNetworkConfig with META_VAULT_ID and populate it for all networks.
  • Add memoize decorator (sync + async) and async_batched helper, and export new utilities from sw_utils.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
sw_utils/os_token_converter.py New utility for assets↔shares conversion based on total assets/shares.
sw_utils/tests/test_os_token_converter.py Unit tests for OsTokenConverter conversions and edge cases.
sw_utils/networks.py Adds META_VAULT_ID to network config and populates values per network.
sw_utils/decorators.py Adds memoize decorator supporting both sync and async functions.
sw_utils/common.py Adds async_batched helper for batching items from an async generator.
sw_utils/init.py Exposes async_batched, memoize, and OsTokenConverter at package level.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings February 26, 2026 17:26
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@evgeny-stakewise evgeny-stakewise merged commit 29f6733 into master Feb 27, 2026
7 checks passed
@evgeny-stakewise evgeny-stakewise deleted the redeemer-stuff branch February 27, 2026 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants