Skip to content

Conversation

@SmartDever02
Copy link
Contributor

@SmartDever02 SmartDever02 commented Dec 12, 2025

Displays the exact deposit required when creating or updating subnet identity.

Changes

  • Added get_identity_deposit() to query identity deposit constants from chain
  • register_network_with_identity: Now displays deposit amount when creating subnet with identity (deposit is NOT forgone - still required)
  • set_subnet_identity: Shows deposit amount in confirmation prompt when updating identity
  • Fixed JSON output to exclude ANSI codes (uses print() instead of Rich Console)
  • Added unit tests and updated e2e tests

Answer to Issue Question

Q: When creating a subnet with identity via register_network_with_identity, is the deposit forgone?
A: No, the deposit is still required. This PR now displays the deposit amount to users before they proceed, making it clear that a deposit is needed even when creating a subnet with identity in a single transaction.

Findings

  • Identity deposit constant doesn't exist on localnet/testnet (or uses different name)
  • Implementation shows informative message when constant cannot be determined
  • On mainnet, will show exact deposit if constant exists

Testing

✅ Unit tests pass (6/6)
✅ E2E tests pass
✅ JSON output is clean and parseable

@SmartDever02
Copy link
Contributor Author

SmartDever02 commented Dec 12, 2025

Untitled

@SmartDever02 SmartDever02 marked this pull request as draft December 12, 2025 14:41
@SmartDever02 SmartDever02 marked this pull request as ready for review December 12, 2025 15:29
@thewhaleking thewhaleking requested a review from a team December 15, 2025 12:15
Comment on lines +102 to +109
constant_names = [
"SubnetIdentityDeposit",
"IdentityDeposit",
"SubnetIdentityFee",
"IdentityFee",
"SubnetIdentityDepositAmount",
"IdentityDepositAmount",
]
Copy link
Contributor

Choose a reason for hiding this comment

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

Where do these come from?

@SmartDever02 SmartDever02 marked this pull request as draft December 16, 2025 12:24
@SmartDever02 SmartDever02 changed the title Spike: Display identity deposit amount when creating/updating subnet identity (#344) Spike: Display identity deposit amount when creating/updating subnet identity (#344) [WIP] Dec 16, 2025
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.

2 participants