git.delta.rocks / unique-network / refs/commits / 0a9dcd573876

difftreelog

style fix formatting

Yaroslav Bolyukin2021-12-02parent: #bd5e29f.patch.diff
in: master

2 files changed

modifiedcrates/evm-coder-macros/src/lib.rsdiffbeforeafterboth
186186
187/// Derives call enum implementing [`evm_coder::Callable`], [`evm_coder::Weighted`]187/// Derives call enum implementing [`evm_coder::Callable`], [`evm_coder::Weighted`]
188/// and [`evm_coder::Call`] from impl block188/// and [`evm_coder::Call`] from impl block
189/// 189///
190/// ## Macro syntax190/// ## Macro syntax
191/// 191///
192/// `#[solidity_interface(name, is, inline_is, events)]`192/// `#[solidity_interface(name, is, inline_is, events)]`
193/// - *name*: used in generated code, and for Call enum name193/// - *name*: used in generated code, and for Call enum name
194/// - *is*: used to provide call inheritance, not found methods will be delegated to all contracts194/// - *is*: used to provide call inheritance, not found methods will be delegated to all contracts
195/// specified in is/inline_is 195/// specified in is/inline_is
196/// - *inline_is*: same as is, but selectors for passed contracts will be used by derived ERC165196/// - *inline_is*: same as is, but selectors for passed contracts will be used by derived ERC165
197/// implementation197/// implementation
198/// 198///
199/// `#[weight(value)]`199/// `#[weight(value)]`
200/// Can be added to every method of impl block, used for deriving [`evm_coder::Weighted`], which200/// Can be added to every method of impl block, used for deriving [`evm_coder::Weighted`], which
201/// is used by substrate bridge201/// is used by substrate bridge
202/// - *value*: expression, which evaluates to weight required to call this method.202/// - *value*: expression, which evaluates to weight required to call this method.
203/// This expression can use call arguments to calculate non-constant execution time.203/// This expression can use call arguments to calculate non-constant execution time.
204/// This expression should evaluate faster than actual execution does, and may provide worser case204/// This expression should evaluate faster than actual execution does, and may provide worser case
205/// than one is called205/// than one is called
206/// 206///
207/// `#[solidity_interface(rename_selector)]`207/// `#[solidity_interface(rename_selector)]`
208/// - *rename_selector*: by default, selector name will be generated by transforming method name208/// - *rename_selector*: by default, selector name will be generated by transforming method name
209/// from snake_case to camelCase. Use this option, if other naming convention is required.209/// from snake_case to camelCase. Use this option, if other naming convention is required.
210/// I.e: method `token_uri` will be automatically renamed to `tokenUri` in selector, but name210/// I.e: method `token_uri` will be automatically renamed to `tokenUri` in selector, but name
211/// required by ERC721 standard is `tokenURI`, thus we need to specify `rename_selector = "tokenURI"`211/// required by ERC721 standard is `tokenURI`, thus we need to specify `rename_selector = "tokenURI"`
212/// explicitly212/// explicitly
213/// 213///
214/// Also, any contract method may have doc comments, which will be automatically added to generated214/// Also, any contract method may have doc comments, which will be automatically added to generated
215/// solidity interface definitions215/// solidity interface definitions
216/// 216///
217/// ## Example217/// ## Example
218/// 218///
219/// ```ignore219/// ```ignore
220/// struct SuperContract;220/// struct SuperContract;
221/// struct InlineContract;221/// struct InlineContract;
222/// struct Contract;222/// struct Contract;
223/// 223///
224/// #[derive(ToLog)]224/// #[derive(ToLog)]
225/// enum ContractEvents {225/// enum ContractEvents {
226/// Event(#[indexed] uint32), 226/// Event(#[indexed] uint32),
227/// }227/// }
228/// 228///
229/// #[solidity_interface(name = "MyContract", is(SuperContract), inline_is(InlineContract))]229/// #[solidity_interface(name = "MyContract", is(SuperContract), inline_is(InlineContract))]
230/// impl Contract {230/// impl Contract {
231/// /// Multiply two numbers231/// /// Multiply two numbers
232/// #[weight(200 + a + b)]232/// #[weight(200 + a + b)]
233/// #[solidity_interface(rename_selector = "mul")]233/// #[solidity_interface(rename_selector = "mul")]
234/// fn mul(&mut self, a: uint32, b: uint32) -> Result<uint32> {234/// fn mul(&mut self, a: uint32, b: uint32) -> Result<uint32> {
235/// Ok(a.checked_mul(b).ok_or("overflow")?) 235/// Ok(a.checked_mul(b).ok_or("overflow")?)
236/// }236/// }
237/// }237/// }
238/// ```238/// ```
269}269}
270270
271/// ## Syntax271/// ## Syntax
272/// 272///
273/// `#[indexed]`273/// `#[indexed]`
274/// Marks this field as indexed, so it will appear in [`ethereum::Log`] topics instead of data274/// Marks this field as indexed, so it will appear in [`ethereum::Log`] topics instead of data
275#[proc_macro_derive(ToLog, attributes(indexed))]275#[proc_macro_derive(ToLog, attributes(indexed))]
modifiedpallets/unique/src/mock.rsdiffbeforeafterboth

no syntactic changes