From 0a9dcd5738762e80b62c6ede90b11f358d03ba3d Mon Sep 17 00:00:00 2001 From: Yaroslav Bolyukin Date: Thu, 02 Dec 2021 10:56:49 +0000 Subject: [PATCH] style: fix formatting --- --- a/crates/evm-coder-macros/src/lib.rs +++ b/crates/evm-coder-macros/src/lib.rs @@ -186,16 +186,16 @@ /// Derives call enum implementing [`evm_coder::Callable`], [`evm_coder::Weighted`] /// and [`evm_coder::Call`] from impl block -/// +/// /// ## Macro syntax -/// +/// /// `#[solidity_interface(name, is, inline_is, events)]` /// - *name*: used in generated code, and for Call enum name /// - *is*: used to provide call inheritance, not found methods will be delegated to all contracts -/// specified in is/inline_is +/// specified in is/inline_is /// - *inline_is*: same as is, but selectors for passed contracts will be used by derived ERC165 /// implementation -/// +/// /// `#[weight(value)]` /// Can be added to every method of impl block, used for deriving [`evm_coder::Weighted`], which /// is used by substrate bridge @@ -203,36 +203,36 @@ /// This expression can use call arguments to calculate non-constant execution time. /// This expression should evaluate faster than actual execution does, and may provide worser case /// than one is called -/// +/// /// `#[solidity_interface(rename_selector)]` /// - *rename_selector*: by default, selector name will be generated by transforming method name /// from snake_case to camelCase. Use this option, if other naming convention is required. /// I.e: method `token_uri` will be automatically renamed to `tokenUri` in selector, but name /// required by ERC721 standard is `tokenURI`, thus we need to specify `rename_selector = "tokenURI"` /// explicitly -/// +/// /// Also, any contract method may have doc comments, which will be automatically added to generated /// solidity interface definitions -/// +/// /// ## Example -/// +/// /// ```ignore /// struct SuperContract; /// struct InlineContract; /// struct Contract; -/// +/// /// #[derive(ToLog)] /// enum ContractEvents { -/// Event(#[indexed] uint32), +/// Event(#[indexed] uint32), /// } -/// +/// /// #[solidity_interface(name = "MyContract", is(SuperContract), inline_is(InlineContract))] /// impl Contract { /// /// Multiply two numbers /// #[weight(200 + a + b)] /// #[solidity_interface(rename_selector = "mul")] /// fn mul(&mut self, a: uint32, b: uint32) -> Result { -/// Ok(a.checked_mul(b).ok_or("overflow")?) +/// Ok(a.checked_mul(b).ok_or("overflow")?) /// } /// } /// ``` @@ -269,7 +269,7 @@ } /// ## Syntax -/// +/// /// `#[indexed]` /// Marks this field as indexed, so it will appear in [`ethereum::Log`] topics instead of data #[proc_macro_derive(ToLog, attributes(indexed))] --- a/pallets/unique/src/mock.rs +++ b/pallets/unique/src/mock.rs @@ -162,7 +162,8 @@ _source: H160, _tx: pallet_ethereum::Transaction, _logs: Vec, - ) {} + ) { + } } impl pallet_evm_coder_substrate::Config for Test { -- gitstuff