Add opt out of v3 billing functionality #2

Merged
thabeta merged 1 commit from development-feat-v3-billing-opt-out into development 2026-02-19 12:00:56 +00:00
Member

Changes made

  • src/tfchain/client.rs:

    • Added ExtrinsicResult struct (mirrors TransferResult but without Subscan URL — generic for any extrinsic)
    • Added submit_extrinsic private helper (DRY pattern for all 3 new tx methods)
    • Added 2 queries: is_node_opted_out_of_v3_billing(node_id) → bool, get_allowed_twin_admins() → Vec (SS58)
    • Added 3 tx methods: opt_out_of_v3_billing(keypair, node_id), add_twin_admin(keypair, account), remove_twin_admin(keypair, account) — all return ExtrinsicResult
  • src/tfchain/rhai.rs:

    • Added extrinsic_result_to_dynamic converter
    • Added 5 RhaiTfChainClient methods wrapping the async client
    • Registered all 5 with the Rhai engine under matching snake_case names
  • src/tfchain/lib.rs + src/lib.rs:

    • Re-exported ExtrinsicResult at both module and crate root
## Changes made - src/tfchain/client.rs: - Added ExtrinsicResult struct (mirrors TransferResult but without Subscan URL — generic for any extrinsic) - Added submit_extrinsic private helper (DRY pattern for all 3 new tx methods) - Added 2 queries: is_node_opted_out_of_v3_billing(node_id) → bool, get_allowed_twin_admins() → Vec<String> (SS58) - Added 3 tx methods: opt_out_of_v3_billing(keypair, node_id), add_twin_admin(keypair, account), remove_twin_admin(keypair, account) — all return ExtrinsicResult - src/tfchain/rhai.rs: - Added extrinsic_result_to_dynamic converter - Added 5 RhaiTfChainClient methods wrapping the async client - Registered all 5 with the Rhai engine under matching snake_case names - src/tfchain/lib.rs + src/lib.rs: - Re-exported ExtrinsicResult at both module and crate root
feat: add opt out of v3 billing functionality
All checks were successful
Build and Test / build (pull_request) Successful in 2m15s
Build and Test / build (push) Successful in 2m54s
d4b2ae98f5
thabeta merged commit 017b327560 into development 2026-02-19 12:00:56 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
geomind_code/tfchain_client!2
No description provided.