Add missing license headers and CI check (#98)

* Add missing license headers and add CI check

* Remove log line

* Remove stale todos
This commit is contained in:
Andrew Jones
2020-04-30 22:26:22 +01:00
committed by GitHub
parent 6f27489378
commit 194c7bcf2f
24 changed files with 156 additions and 20 deletions
+12 -2
View File
@@ -13,7 +13,17 @@ jobs:
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Build
- name: setup
run: |
rustup install nightly
rustup component add rustfmt --toolchain nightly
- name: fmt
run: cargo +nightly fmt --all -- --check
- name: build
run: cargo build --verbose run: cargo build --verbose
- name: Run tests
- name: test
run: cargo test --verbose run: cargo test --verbose
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2019 Parity Technologies (UK) Ltd. // Copyright 2019-2020 Parity Technologies (UK) Ltd.
// This file is part of substrate-subxt. // This file is part of substrate-subxt.
// //
// subxt is free software: you can redistribute it and/or modify // subxt is free software: you can redistribute it and/or modify
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2020 Parity Technologies (UK) Ltd. // Copyright 2019-2020 Parity Technologies (UK) Ltd.
// This file is part of substrate-subxt. // This file is part of substrate-subxt.
// //
// subxt is free software: you can redistribute it and/or modify // subxt is free software: you can redistribute it and/or modify
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2020 Parity Technologies (UK) Ltd. // Copyright 2019-2020 Parity Technologies (UK) Ltd.
// This file is part of substrate-subxt. // This file is part of substrate-subxt.
// //
// subxt is free software: you can redistribute it and/or modify // subxt is free software: you can redistribute it and/or modify
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2019 Parity Technologies (UK) Ltd. // Copyright 2019-2020 Parity Technologies (UK) Ltd.
// This file is part of substrate-subxt. // This file is part of substrate-subxt.
// //
// subxt is free software: you can redistribute it and/or modify // subxt is free software: you can redistribute it and/or modify
+16
View File
@@ -1,3 +1,19 @@
// Copyright 2019-2020 Parity Technologies (UK) Ltd.
// This file is part of substrate-subxt.
//
// subxt is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// subxt is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with substrate-subxt. If not, see <http://www.gnu.org/licenses/>.
use crate::utils; use crate::utils;
use heck::{ use heck::{
CamelCase, CamelCase,
+16
View File
@@ -1,3 +1,19 @@
// Copyright 2019-2020 Parity Technologies (UK) Ltd.
// This file is part of substrate-subxt.
//
// subxt is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// subxt is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with substrate-subxt. If not, see <http://www.gnu.org/licenses/>.
use crate::utils; use crate::utils;
use heck::{ use heck::{
CamelCase, CamelCase,
+16
View File
@@ -1,3 +1,19 @@
// Copyright 2019-2020 Parity Technologies (UK) Ltd.
// This file is part of substrate-subxt.
//
// subxt is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// subxt is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with substrate-subxt. If not, see <http://www.gnu.org/licenses/>.
extern crate proc_macro; extern crate proc_macro;
mod call; mod call;
+16
View File
@@ -1,3 +1,19 @@
// Copyright 2019-2020 Parity Technologies (UK) Ltd.
// This file is part of substrate-subxt.
//
// subxt is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// subxt is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with substrate-subxt. If not, see <http://www.gnu.org/licenses/>.
use crate::utils; use crate::utils;
use heck::SnakeCase; use heck::SnakeCase;
use proc_macro2::TokenStream; use proc_macro2::TokenStream;
+16
View File
@@ -1,3 +1,19 @@
// Copyright 2019-2020 Parity Technologies (UK) Ltd.
// This file is part of substrate-subxt.
//
// subxt is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// subxt is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with substrate-subxt. If not, see <http://www.gnu.org/licenses/>.
use crate::utils; use crate::utils;
use heck::SnakeCase; use heck::SnakeCase;
use proc_macro2::{ use proc_macro2::{
+16
View File
@@ -1,3 +1,19 @@
// Copyright 2019-2020 Parity Technologies (UK) Ltd.
// This file is part of substrate-subxt.
//
// subxt is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// subxt is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with substrate-subxt. If not, see <http://www.gnu.org/licenses/>.
use crate::utils; use crate::utils;
use proc_macro2::TokenStream; use proc_macro2::TokenStream;
use quote::{ use quote::{
+16
View File
@@ -1,3 +1,19 @@
// Copyright 2019-2020 Parity Technologies (UK) Ltd.
// This file is part of substrate-subxt.
//
// subxt is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// subxt is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with substrate-subxt. If not, see <http://www.gnu.org/licenses/>.
use proc_macro2::{ use proc_macro2::{
Span, Span,
TokenStream, TokenStream,
+16
View File
@@ -1,3 +1,19 @@
// Copyright 2019-2020 Parity Technologies (UK) Ltd.
// This file is part of substrate-subxt.
//
// subxt is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// subxt is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with substrate-subxt. If not, see <http://www.gnu.org/licenses/>.
use codec::{ use codec::{
Decode, Decode,
Encode, Encode,
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2019 Parity Technologies (UK) Ltd. // Copyright 2019-2020 Parity Technologies (UK) Ltd.
// This file is part of substrate-subxt. // This file is part of substrate-subxt.
// //
// subxt is free software: you can redistribute it and/or modify // subxt is free software: you can redistribute it and/or modify
+2 -2
View File
@@ -1,4 +1,4 @@
// Copyright 2019 Parity Technologies (UK) Ltd. // Copyright 2019-2020 Parity Technologies (UK) Ltd.
// This file is part of substrate-subxt. // This file is part of substrate-subxt.
// //
// subxt is free software: you can redistribute it and/or modify // subxt is free software: you can redistribute it and/or modify
@@ -81,7 +81,7 @@ pub enum EventsError {
/// Event decoder. /// Event decoder.
pub struct EventsDecoder<T> { pub struct EventsDecoder<T> {
metadata: Metadata, // todo: [AJ] borrow? metadata: Metadata,
type_sizes: HashMap<String, usize>, type_sizes: HashMap<String, usize>,
marker: PhantomData<fn() -> T>, marker: PhantomData<fn() -> T>,
} }
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2019 Parity Technologies (UK) Ltd. // Copyright 2019-2020 Parity Technologies (UK) Ltd.
// This file is part of substrate-subxt. // This file is part of substrate-subxt.
// //
// subxt is free software: you can redistribute it and/or modify // subxt is free software: you can redistribute it and/or modify
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2019 Parity Technologies (UK) Ltd. // Copyright 2019-2020 Parity Technologies (UK) Ltd.
// This file is part of substrate-subxt. // This file is part of substrate-subxt.
// //
// subxt is free software: you can redistribute it and/or modify // subxt is free software: you can redistribute it and/or modify
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2019 Parity Technologies (UK) Ltd. // Copyright 2019-2020 Parity Technologies (UK) Ltd.
// This file is part of substrate-subxt. // This file is part of substrate-subxt.
// //
// subxt is free software: you can redistribute it and/or modify // subxt is free software: you can redistribute it and/or modify
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2019 Parity Technologies (UK) Ltd. // Copyright 2019-2020 Parity Technologies (UK) Ltd.
// This file is part of substrate-subxt. // This file is part of substrate-subxt.
// //
// subxt is free software: you can redistribute it and/or modify // subxt is free software: you can redistribute it and/or modify
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2019 Parity Technologies (UK) Ltd. // Copyright 2019-2020 Parity Technologies (UK) Ltd.
// This file is part of substrate-subxt. // This file is part of substrate-subxt.
// //
// subxt is free software: you can redistribute it and/or modify // subxt is free software: you can redistribute it and/or modify
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2019 Parity Technologies (UK) Ltd. // Copyright 2019-2020 Parity Technologies (UK) Ltd.
// This file is part of substrate-subxt. // This file is part of substrate-subxt.
// //
// subxt is free software: you can redistribute it and/or modify // subxt is free software: you can redistribute it and/or modify
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2019 Parity Technologies (UK) Ltd. // Copyright 2019-2020 Parity Technologies (UK) Ltd.
// This file is part of substrate-subxt. // This file is part of substrate-subxt.
// //
// subxt is free software: you can redistribute it and/or modify // subxt is free software: you can redistribute it and/or modify
+1 -3
View File
@@ -1,4 +1,4 @@
// Copyright 2019 Parity Technologies (UK) Ltd. // Copyright 2019-2020 Parity Technologies (UK) Ltd.
// This file is part of substrate-subxt. // This file is part of substrate-subxt.
// //
// subxt is free software: you can redistribute it and/or modify // subxt is free software: you can redistribute it and/or modify
@@ -129,8 +129,6 @@ impl<T: System> Rpc<T> {
key: StorageKey, key: StorageKey,
hash: Option<T::Hash>, hash: Option<T::Hash>,
) -> Result<Option<V>, Error> { ) -> Result<Option<V>, Error> {
// todo: update jsonrpsee::rpc_api! macro to accept shared Client (currently only RawClient)
// until then we manually construct params here and in other methods
let params = Params::Array(vec![to_json_value(key)?, to_json_value(hash)?]); let params = Params::Array(vec![to_json_value(key)?, to_json_value(hash)?]);
let data: Option<StorageData> = let data: Option<StorageData> =
self.client.request("state_getStorage", params).await?; self.client.request("state_getStorage", params).await?;
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2019 Parity Technologies (UK) Ltd. // Copyright 2019-2020 Parity Technologies (UK) Ltd.
// This file is part of substrate-subxt. // This file is part of substrate-subxt.
// //
// subxt is free software: you can redistribute it and/or modify // subxt is free software: you can redistribute it and/or modify