Refactor (#7)

* Increment nonce when submitting transaction.

* Refactor.

* use default values from metadata
* use functions from metadata

* Nonce fixup

* Add docs.

* Add contracts module.

* Add set_code.

* Add events to metadata.

* Support pretty printing metadata.

* Add subscriptions.

* Add submit_and_watch to XtBuilder.

* nits from review
This commit is contained in:
David Craven
2019-08-12 17:07:28 +02:00
committed by GitHub
parent be5ccc1d11
commit 151c7f7e0a
9 changed files with 888 additions and 267 deletions
+9
View File
@@ -14,17 +14,26 @@
// 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::metadata::MetadataError;
use jsonrpc_core_client::RpcError;
use parity_scale_codec::Error as CodecError;
use std::io::Error as IoError;
use substrate_primitives::crypto::SecretStringError;
/// Error enum.
#[derive(Debug, derive_more::From)]
pub enum Error {
/// Codec error.
Codec(CodecError),
/// Io error.
Io(IoError),
/// Rpc error.
Rpc(RpcError),
/// Secret string error.
SecretString(SecretStringError),
/// Metadata error.
Metadata(MetadataError),
/// Other error.
Other(String),
}