Support for custom tx payload builder#46
Conversation
iulianbarbu
left a comment
There was a problem hiding this comment.
Looks very nice, thanks!
|
Hmm, we have a clippy error in relation to too many args for a fn. Probably fixable with some effort. |
|
It is a bit clumsy that we have two methods, but for now I don't have better idea how to handle this. Probably entire scenario builder should be generic over the config - the thing I wanted to avoid at the beginning. Something to think about as a side project maybe... |
You mean the two methods for tx builder payload, on the scenario builder? |
It is not necessarily a bad idea, it is a single generic type for now, unless you tried in the past and it turned out to be a mess. |
Added
with_tx_payload_builder_subandwith_tx_payload_builder_ethmethods toScenarioBuilder, allowing users to provide custom transaction payload builders instead of using the built-in transfer/remark recipes. The custom builder receives aTxBuildContextwith accountinfo and nonce, enabling arbitrary extrinsic calls.
An example (examples/kill_dev_entry.rs) demonstrates how to use new feature to build custom CLI sender. It uses by sending
TestPallet::kill_dev_entrytransactions across a range of accounts.