Skip to content

Smart Contract Recycling Via Chain Ext Function#9

Draft
LandynDev wants to merge 2 commits intotestfrom
feat/chain-ext-recycle
Draft

Smart Contract Recycling Via Chain Ext Function#9
LandynDev wants to merge 2 commits intotestfrom
feat/chain-ext-recycle

Conversation

@LandynDev
Copy link
Copy Markdown
Collaborator

@LandynDev LandynDev commented Apr 3, 2026

Blocked until we get subtensor contribution in:
opentensor/subtensor#2560

Leaving this PR in draft.

This has been tested E2E locally and testing can be viewed in the subtensor contribution

recycle_fees() now calls the subtensor AddStakeRecycleV1 chain
extension (func_id 18) to atomically stake and recycle fees on-chain
instead of transferring TAO to an external wallet.

Adds SubtensorExtension trait with CustomEnvironment for ink! chain
extension support. Requires subtensor chain extension func_ids 16-19.
Chain extension handles fee recycling on-chain now, so recycle_address
storage, setter, getter, and CLI command are dead code. Also adds
pre-check for zero fees and a hint when ContractReverted occurs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Net-new functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants