Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decode raw events using scale_value and return the decoded Values, too #576

Merged
merged 3 commits into from
Jun 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion subxt/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ integration-tests = []
bitvec = { version = "1.0.0", default-features = false, features = ["alloc"] }
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "full", "bit-vec"] }
scale-info = { version = "2.0.0", features = ["bit-vec"] }
scale-value = "0.2.0"
futures = "0.3.13"
hex = "0.4.3"
jsonrpsee = { version = "0.14.0", features = ["async-client", "client-ws-transport"] }
Expand All @@ -41,5 +42,4 @@ frame-metadata = "15.0.0"
derivative = "2.2.0"

[dev-dependencies]
assert_matches = "1.5.0"
tokio = { version = "1.8", features = ["macros", "time"] }
12 changes: 5 additions & 7 deletions subxt/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,13 @@
// You should have received a copy of the GNU General Public License
// along with subxt. If not, see <http://www.gnu.org/licenses/>.

use crate::{
events::EventsDecodingError,
metadata::{
InvalidMetadataError,
MetadataError,
},
use crate::metadata::{
InvalidMetadataError,
MetadataError,
};
use core::fmt::Debug;
use jsonrpsee::core::error::Error as RequestError;
use scale_value::scale::DecodeError;
use sp_core::crypto::SecretStringError;
use sp_runtime::transaction_validity::TransactionValidityError;

Expand Down Expand Up @@ -66,7 +64,7 @@ pub enum GenericError<E> {
Runtime(E),
/// Events decoding error.
#[error("Events decoding error: {0}")]
EventsDecoding(#[from] EventsDecodingError),
EventsDecoding(#[from] DecodeError),
/// Transaction progress error.
#[error("Transaction error: {0}")]
Transaction(#[from] TransactionError),
Expand Down
Loading