rework signed extensions

This commit is contained in:
Tadeo hepperle
2024-02-20 18:22:13 +01:00
parent 81c145db1e
commit 6f97ca7041
13 changed files with 227 additions and 165 deletions
+3 -3
View File
@@ -53,13 +53,13 @@ impl CustomExtrinsicParamsBuilder {
// Describe how to fetch and then encode the params:
impl<T: Config> ExtrinsicParams<T> for CustomExtrinsicParams<T> {
type OtherParams = CustomExtrinsicParamsBuilder;
type Params = CustomExtrinsicParamsBuilder;
// Gather together all of the params we will need to encode:
fn new<Client: OfflineClientT<T>>(
_nonce: u64,
client: Client,
other_params: Self::OtherParams,
other_params: Self::Params,
) -> Result<Self, ExtrinsicParamsError> {
Ok(Self {
genesis_hash: client.genesis_hash(),
@@ -86,7 +86,7 @@ async fn main() {
let tx_payload = runtime::tx().system().remark(b"Hello".to_vec());
// Build your custom "OtherParams":
// Build your custom "Params":
let tx_config = CustomExtrinsicParamsBuilder::new().tip(1234).enable_foo();
// And provide them when submitting a transaction: