substrate_macro

Crates.iosubstrate_macro
lib.rssubstrate_macro
version0.1.3
sourcesrc
created_at2022-11-11 07:37:43.335794
updated_at2023-01-13 13:40:04.848762
descriptionDerive Macro for Substrate Actions
homepage
repositoryhttps://github.com/HugoByte/aurras/workflow/polkadot_macro
max_upload_size
id712727
size19,128
SHANiTH K K (shanithkk)

documentation

README

Substrate Macro

Description

This is a Derive Macro for Workflow-Aurras. This macro implement functionalities for interaction between substrate based chain

Usage

Creates necessary methods for Interaction between Substrate based chain.

#[derive(Polkadot)]
#[Chain = "Westend"]
#[Operation = "transfer"]
pub struct Data {
   input: TransactionInput,
   output: Value,
}

#[derive(Debug, Default, Clone, Serialize, Deserialize)]
struct TransactionInput {
   url: String,
   #[serde(default)]
   owner_key: String,
   address: String,
   #[serde(default)]
   amount: u32,
   #[serde(default)]
   era: u32,
}

References

License

Licensed under Apache-2.0

Commit count: 0

cargo fmt