Skip to content

fix(cli): derive storage-deposit floor from chain tokenDecimals - #268

Open
itsnevu wants to merge 4 commits into
paritytech:mainfrom
itsnevu:fix/storage-deposit-floor
Open

fix(cli): derive storage-deposit floor from chain tokenDecimals#268
itsnevu wants to merge 4 commits into
paritytech:mainfrom
itsnevu:fix/storage-deposit-floor

Conversation

@itsnevu

@itsnevu itsnevu commented Aug 22, 2026

Copy link
Copy Markdown

Fixes paritytech/dotns#226.

The storage-deposit floor was hardcoded to 2_000_000_000_000n. At 10 decimals that's 200 tokens, not the 2 the comment claims, so the limit ends up 100x too high and the dry-run branch above it never really applies.

This derives the floor from the chain's tokenDecimals (2 * 10^decimals) instead, falling back to DEFAULT_NATIVE_TOKEN_DECIMALS, and passes the real decimals into ReviveClientWrapper.

Ran lint, format, typecheck and the unit tests (301/301) in packages/cli, all green.

@itsnevu
itsnevu requested a review from waytwotall as a code owner August 22, 2026 16:53
@itsnevu itsnevu changed the title ix(cli): derive storage-deposit floor from chain tokenDecimals fix(cli): derive storage-deposit floor from chain tokenDecimals Aug 22, 2026
@sphamjoli
sphamjoli self-requested a review August 22, 2026 21:33
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.

[Bug]: The storage-deposit floor is a hardcoded testnet amount, 100× its documented value

1 participant