Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Implement function json_metadata in decl_module! #654

Merged
merged 1 commit into from
Sep 4, 2018

Conversation

bkchr
Copy link
Member

@bkchr bkchr commented Sep 4, 2018

The new function json_metadata returns the module declaration
as a json string.

Progress on: #535

The new function `json_metadata` returns the module declaration
as a json string.

Progress on: #535
@bkchr bkchr requested a review from gavofyork September 4, 2018 09:33
@gavofyork
Copy link
Member

good stuff!

@gavofyork gavofyork merged commit 80abc17 into master Sep 4, 2018
@bkchr bkchr deleted the json_metdata_version_1 branch September 4, 2018 10:03
Copy link
Contributor

@pepyakin pepyakin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @bkchr ! There are some spaces were introduced in this PR (commented on some of them), could you please change them to tabs in the following PR #657 ? Thanks and sorry for being late to the party!

) => {
impl<$trait_instance: $trait_name> $mod_type<$trait_instance> {
pub fn json_metadata() -> &'static str {
concat!(r#"{ "name": ""#, stringify!($mod_type), r#"", "calls": ["#,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spaces

$($rest:tt)*
) => {
concat!($prefix_str, " ",
r#"{ "name": ""#, stringify!($call_type),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spaces

$($rest:tt)*
) => {
concat!($prefix_str, " ",
r#"{ "name": ""#, stringify!($call_type),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spaces

/// Convert the list of calls into their JSON representation, joined by ",".
#[macro_export]
macro_rules! __calls_to_json {
// WITHOUT AUX
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spaces

impl<$trait_instance: $trait_name> $mod_type<$trait_instance> {
pub fn json_metadata() -> &'static str {
concat!(r#"{ "name": ""#, stringify!($mod_type), r#"", "calls": ["#,
__calls_to_json!(""; $($rest)*), " ] }")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spaces

dvdplm added a commit that referenced this pull request Sep 4, 2018
* master: (22 commits)
  Introduce treasury and document (#646)
  Off-the-table staking preference (#656)
  Implement function `json_metadata` in `decl_module!` (#654)
  Fix warnings in networking (#652)
  Add a reputation system (#645)
  Check for pruned block state (#648)
  Contract runtime polishing (#601)
  WIP on chain heap (#639)
  Events to track extrinsic success (#640)
  Install llvm-tools-preview component (#643)
  fix wasm executor compile error (#631)
  random fixes (#638)
  Empty becomes (), reflecting convention (#637)
  Allow to build_upon skipped entries, but don't walk back (#635)
  Separate out staking module into balances and payment (#629)
  Update .gitlab-ci.yml (#633)
  Do not attempt to rustup if in CI. This is taken care of by the base (#621)
  Avoid need for ident strings in storage (#624)
  rename to panic_handler as panic_implementation is deprecated in nightly (#626)
  5 random fixes (#2) (#623)
  ...
dvdplm added a commit that referenced this pull request Sep 5, 2018
…and-rlpcodec

* master:
  Upgrade to libp2p master (#660)
  Include function comments into modules `json_metadata` (#657)
  Replace old headers with CHT in light clients (#512)
  Fix build
  Introduce treasury and document (#646)
  Off-the-table staking preference (#656)
  Implement function `json_metadata` in `decl_module!` (#654)
  Fix warnings in networking (#652)
  Add a reputation system (#645)
  Check for pruned block state (#648)
helin6 pushed a commit to boolnetwork/substrate that referenced this pull request Jul 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants