feat: make --ext override PAPI builtin extensions - #271
Open
peetzweg wants to merge 1 commit into
Open
Conversation
--ext now applies to every signed extension a chain declares, including polkadot-api builtins. Naming a builtin (e.g. CheckMortality, ChargeTransactionPayment) in --ext overrides the value PAPI would fill in automatically; previously such entries were silently dropped. --asset is now just sugar over an --ext override of ChargeAssetTxPayment, so both paths share one mechanism. The extensions detail view advertises the --ext override for builtins too. Closes #171
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #171.
Makes
--exta generic override that applies to every signed extension a chain declares, including polkadot-api builtins.Why:
--assetworked on theChargeAssetTxPaymentbuiltin, but naming any other builtin (e.g.ChargeTransactionPayment) in--extwas silently ignored — the two flags were inconsistent and--ext(the more generic one) couldn't reach builtins at all.How: in
buildCustomSignedExtensionsan explicit--extentry now takes priority over the builtin skip, so a named builtin is passed to polkadot-api'scustomSignedExtensions; un-named builtins are still auto-filled.--assetis now just sugar over an--extoverride ofChargeAssetTxPayment(the bespoke skip-set juggling is gone). One judgment call: overriding builtins is a power-user escape hatch — the ergonomic flags (--nonce/--tip/--mortality/--asset) remain the normal path.Example (real, executable — the detail view now advertises the override for builtins):
Force an immortal era on any call by overriding the builtin:
Tests + changeset added; docs, skill and README updated. Full suite (1742 tests), lint, typecheck and build all green.