Moves node-template into substrate repo (#1637)

* Make runtime macros work without required `macro_use`

* Adds node-template

* Adds node-template-release tool

* Fixes building `node-template` and improve the release

* Add `profile.release` by release script to remove warning

* Adds script for releasing the node template

* Fixes compilation after master merge

* Port node-template to edition 2018

* Remove license

* Fixes compilation after master merge

* Add `node-template-release.sh` into the CI

* WIP Ci integrate node template (#1701)

* copy artifacts to s3 bucket latest path

* typo

* bucket name

* Update wasm files
This commit is contained in:
Bastian Köcher
2019-02-06 17:15:12 +01:00
committed by GitHub
parent b6fd967dfb
commit 567122fab5
38 changed files with 3362 additions and 223 deletions
+15 -15
View File
@@ -690,13 +690,13 @@ macro_rules! decl_module {
impl<$trait_instance: $trait_name> $crate::dispatch::Decode for $call_type<$trait_instance> {
fn decode<I: $crate::dispatch::Input>(input: &mut I) -> Option<Self> {
let _input_id = input.read_byte()?;
__impl_decode!(input; _input_id; 0; $call_type; $( fn $fn_name( $( $(#[$codec_attr on type $param])* $param_name ),* ); )*)
$crate::__impl_decode!(input; _input_id; 0; $call_type; $( fn $fn_name( $( $(#[$codec_attr on type $param])* $param_name ),* ); )*)
}
}
impl<$trait_instance: $trait_name> $crate::dispatch::Encode for $call_type<$trait_instance> {
fn encode_to<W: $crate::dispatch::Output>(&self, _dest: &mut W) {
__impl_encode!(_dest; *self; 0; $call_type; $( fn $fn_name( $( $(#[$codec_attr on type $param])* $param_name ),* ); )*);
$crate::__impl_encode!(_dest; *self; 0; $call_type; $( fn $fn_name( $( $(#[$codec_attr on type $param])* $param_name ),* ); )*);
if let $call_type::__PhantomItem(_) = *self { unreachable!() }
if let $call_type::__OtherPhantomItem(_) = *self { unreachable!() }
}
@@ -710,7 +710,7 @@ macro_rules! decl_module {
match self {
$(
$call_type::$fn_name( $( $param_name ),* ) => {
decl_module!(
$crate::decl_module!(
@call
$from
$mod_type $trait_instance $fn_name _origin $system [ $( $param_name ),* ]
@@ -755,7 +755,7 @@ macro_rules! __impl_decode {
{
if $input_id == ($fn_id) {
$(
__impl_decode!(@decode
$crate::__impl_decode!(@decode
$(#[$codec_attr on type $param])*
$param_name;
$input;
@@ -764,7 +764,7 @@ macro_rules! __impl_decode {
return Some($call_type:: $fn_name( $( $param_name ),* ));
}
__impl_decode!($input; $input_id; $fn_id + 1; $call_type; $($rest)*)
$crate::__impl_decode!($input; $input_id; $fn_id + 1; $call_type; $($rest)*)
}
};
(
@@ -822,7 +822,7 @@ macro_rules! __impl_encode {
) = $self {
$dest.push_byte(($fn_id) as u8);
$(
__impl_encode!(@encode_as
$crate::__impl_encode!(@encode_as
$(#[$codec_attr on type $param])*
$param_name;
$dest;
@@ -830,7 +830,7 @@ macro_rules! __impl_encode {
)*
}
__impl_encode!($dest; $self; $fn_id + 1; $call_type; $($rest)*)
$crate::__impl_encode!($dest; $self; $fn_id + 1; $call_type; $($rest)*)
}
};
(
@@ -887,7 +887,7 @@ macro_rules! impl_outer_dispatch {
$camelcase ( $crate::dispatch::CallableCallFor<$camelcase> )
,)*
}
__impl_outer_dispatch_common! { $call_type, $($camelcase,)* }
$crate::__impl_outer_dispatch_common! { $call_type, $($camelcase,)* }
impl $crate::dispatch::Dispatchable for $call_type {
type Origin = $origin;
type Trait = $call_type;
@@ -923,13 +923,13 @@ macro_rules! __impl_outer_dispatch_common {
impl $crate::dispatch::Decode for $call_type {
fn decode<I: $crate::dispatch::Input>(input: &mut I) -> Option<Self> {
let input_id = input.read_byte()?;
__impl_decode!(input; input_id; 0; $call_type; $( fn $camelcase ( outer_dispatch_param ); )*)
$crate::__impl_decode!(input; input_id; 0; $call_type; $( fn $camelcase ( outer_dispatch_param ); )*)
}
}
impl $crate::dispatch::Encode for $call_type {
fn encode_to<W: $crate::dispatch::Output>(&self, dest: &mut W) {
__impl_encode!(dest; *self; 0; $call_type; $( fn $camelcase( outer_dispatch_param ); )*)
$crate::__impl_encode!(dest; *self; 0; $call_type; $( fn $camelcase( outer_dispatch_param ); )*)
}
}
}
@@ -945,7 +945,7 @@ macro_rules! __dispatch_impl_metadata {
) => {
impl<$trait_instance: $trait_name> $mod_type<$trait_instance> {
pub fn call_functions() -> &'static [$crate::dispatch::FunctionMetadata] {
__call_to_functions!($($rest)*)
$crate::__call_to_functions!($($rest)*)
}
}
}
@@ -966,7 +966,7 @@ macro_rules! __call_to_functions {
);
)*}
) => {
__functions_to_metadata!(0; $origin_type;; $(
$crate::__functions_to_metadata!(0; $origin_type;; $(
fn $fn_name( $($(#[$codec_attr])* $param_name: $param ),* );
$( $doc_attr ),*;
)*)
@@ -990,9 +990,9 @@ macro_rules! __functions_to_metadata{
$( $fn_doc:expr ),*;
$( $rest:tt )*
) => {
__functions_to_metadata!(
$crate::__functions_to_metadata!(
$fn_id + 1; $origin_type;
$( $function_metadata, )* __function_to_metadata!(
$( $function_metadata, )* $crate::__function_to_metadata!(
fn $fn_name($( $(#[$codec_attr])* $param_name : $param ),*); $( $fn_doc ),*; $fn_id;
);
$($rest)*
@@ -1025,7 +1025,7 @@ macro_rules! __function_to_metadata {
$crate::dispatch::FunctionArgumentMetadata {
name: $crate::dispatch::DecodeDifferent::Encode(stringify!($param_name)),
ty: $crate::dispatch::DecodeDifferent::Encode(
__function_to_metadata!(@stringify_expand_attr
$crate::__function_to_metadata!(@stringify_expand_attr
$(#[$codec_attr])* $param_name: $param
)
),