Skip to content

feat: return raw on-chain totalSupply#116

Merged
bowd merged 12 commits intofeat/sdk-v2from
feat/raw-total-supply
Jan 29, 2026
Merged

feat: return raw on-chain totalSupply#116
bowd merged 12 commits intofeat/sdk-v2from
feat/raw-total-supply

Conversation

@bowd
Copy link
Contributor

@bowd bowd commented Jan 28, 2026

Summary

  • Remove supply adjustment logic from StableTokenService
  • totalSupply now returns the actual on-chain ERC20 totalSupply() values without any adjustments
  • Parallelize token metadata and supply fetching for better performance
  • Remove SupplyAdjustmentService and calculators (migrated to analytics API)
  • Bump version to 2.0.0-beta.16

Related

Test plan

  • Verify that getStableTokens() returns raw on-chain total supply values
  • Ensure no regressions in token metadata fetching

🤖 Generated with Claude Code

bowd and others added 9 commits January 28, 2026 13:14
Remove supply adjustment logic from StableTokenService so that
totalSupply returns the actual on-chain ERC20 totalSupply values.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Update test expectations from old symbols (cUSD, cEUR, etc.)
to new symbols (USDm, EURm, etc.).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use Promise.all to fetch metadata and totalSupply for all tokens
concurrently instead of sequentially.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- CollateralAssetService: fetch isCollateral checks and metadata in parallel
- SupplyAdjustmentService: run all calculators in parallel

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove unused supply adjustment functionality:
- SupplyAdjustmentService and its tests
- Supply calculators (UniV3, AAVE, Multisig)
- Related constants (stableTokenMetadata, aaveConfig, protocolAddresses, mentoAddresses)
- UniswapV3 ABI
- SupplyAdjustment types

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@bowd bowd requested review from bayological and chapati23 January 28, 2026 13:53
simeon-clawd added a commit to simeon-clawd/mento-sdk that referenced this pull request Jan 28, 2026
- Remove supply adjustment logic from TokenService so that
  totalSupply returns the actual on-chain ERC20 totalSupply values
- Use Promise.all to fetch metadata and totalSupply for all tokens
  concurrently instead of sequentially
- Parallelize isCollateral checks and metadata fetching in
  getCollateralAssets()

Port of PR mento-protocol#116 changes to V3 architecture.
Copy link
Member

@bayological bayological left a comment

Choose a reason for hiding this comment

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

LGTM.

One point, I'd completely remove the supply adjustment logic since it's only exported for the API and never used in the sdk.

bowd and others added 3 commits January 29, 2026 11:31
Supply adjustments have been migrated to the analytics API.

Removed:
- SupplyAdjustmentService and tests
- Supply calculators (UniV3, AAVE, Multisig)
- Related constants and ABIs
- SupplyAdjustment types

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@bowd bowd merged commit 36b310e into feat/sdk-v2 Jan 29, 2026
1 check passed
@bowd bowd deleted the feat/raw-total-supply branch January 29, 2026 10:43
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