Use substrate metadata, introduce builder for client (#4)

* Export Error type

* Fix license headers

* Remove unnecessary fully qualified associated types

* Update to parity-scale-codec, handles decoding errors

* rustfmt

* Add metadata.

* Use metadata for calls.

* Refactor generics.

* Storage metadata.

* Use builders.

* Finish making generic.

* Fix merge.

* Run rustfmt.

* Fix merge.
This commit is contained in:
David Craven
2019-08-08 16:04:50 +02:00
committed by Andrew Jones
parent 6522bb08d0
commit 19604e8f2e
6 changed files with 575 additions and 208 deletions
+5 -3
View File
@@ -1,12 +1,12 @@
// Copyright 2018-2019 Parity Technologies (UK) Ltd.
// Copyright 2019 Parity Technologies (UK) Ltd.
// This file is part of substrate-subxt.
//
// ink! is free software: you can redistribute it and/or modify
// 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.
//
// ink! is distributed in the hope that it will be useful,
// 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.
@@ -15,11 +15,13 @@
// along with substrate-subxt. If not, see <http://www.gnu.org/licenses/>.
use jsonrpc_core_client::RpcError;
use parity_scale_codec::Error as CodecError;
use std::io::Error as IoError;
use substrate_primitives::crypto::SecretStringError;
#[derive(Debug, derive_more::From)]
pub enum Error {
Codec(CodecError),
Io(IoError),
Rpc(RpcError),
SecretString(SecretStringError),