Skip to content

feat: dynamically resolve share_decimals from asset decimals (fixes #66)#736

Open
david87131 wants to merge 1 commit into
StellarYield:mainfrom
david87131:feat/issue-66-share-decimals
Open

feat: dynamically resolve share_decimals from asset decimals (fixes #66)#736
david87131 wants to merge 1 commit into
StellarYield:mainfrom
david87131:feat/issue-66-share-decimals

Conversation

@david87131

Copy link
Copy Markdown
Contributor

Resolves #66.

Changes:

  • Modified the Single RWA Vault factory helper (_create_single_rwa_vault) to query the actual token decimals of the underlying asset (vault_asset) using the SEP-41 decimals() query.
  • Initialized share_decimals dynamically inside SingleRwaVaultInitParams with the retrieved value instead of hardcoding it to 6.
  • Fixed existing compiling errors and failing tests in single_rwa_vault test suite (including test_lock_up calling activate before deposit and incorrect panic error check).
  • Added factory unit tests verifying custom decimals query.

…tellarYield#66)

- Retrieve underlying asset decimals via SEP-41 decimals() query in vault factory creation
- Fix compile errors and failing lockup/shortfall tests in single_rwa_vault contract
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.

Hardcoded share_decimals: 6 in Factory Ignores Asset's Actual Decimals

1 participant