-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into contract-error-data-msg
- Loading branch information
Showing
26 changed files
with
485 additions
and
599 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "starknet" | ||
version = "0.6.0" | ||
version = "0.7.0" | ||
authors = ["Jonathan LEI <[email protected]>"] | ||
license = "MIT OR Apache-2.0" | ||
edition = "2021" | ||
|
@@ -35,13 +35,13 @@ all-features = true | |
|
||
[dependencies] | ||
starknet-ff = { version = "0.3.4", path = "./starknet-ff", default-features = false } | ||
starknet-crypto = { version = "0.6.0", path = "./starknet-crypto" } | ||
starknet-core = { version = "0.6.1", path = "./starknet-core", default-features = false } | ||
starknet-providers = { version = "0.6.0", path = "./starknet-providers" } | ||
starknet-contract = { version = "0.5.0", path = "./starknet-contract" } | ||
starknet-signers = { version = "0.4.0", path = "./starknet-signers" } | ||
starknet-accounts = { version = "0.5.0", path = "./starknet-accounts" } | ||
starknet-macros = { version = "0.1.3", path = "./starknet-macros" } | ||
starknet-crypto = { version = "0.6.1", path = "./starknet-crypto" } | ||
starknet-core = { version = "0.7.0", path = "./starknet-core", default-features = false } | ||
starknet-providers = { version = "0.7.0", path = "./starknet-providers" } | ||
starknet-contract = { version = "0.6.0", path = "./starknet-contract" } | ||
starknet-signers = { version = "0.5.0", path = "./starknet-signers" } | ||
starknet-accounts = { version = "0.6.0", path = "./starknet-accounts" } | ||
starknet-macros = { version = "0.1.4", path = "./starknet-macros" } | ||
|
||
[dev-dependencies] | ||
serde_json = "1.0.74" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
use starknet_providers::{ | ||
jsonrpc::{HttpTransport, HttpTransportError, JsonRpcClient, JsonRpcClientError}, | ||
Provider, ProviderError, | ||
}; | ||
use url::Url; | ||
|
||
#[tokio::main] | ||
async fn main() { | ||
let rpc_client = | ||
JsonRpcClient::new(HttpTransport::new(Url::parse("https://fake.url/").unwrap())); | ||
|
||
let error = match rpc_client.block_number().await.unwrap_err() { | ||
ProviderError::Other(inner) => inner, | ||
_ => panic!("unexpected error variant"), | ||
}; | ||
|
||
// The implementation-specific error type is erased to make the `ProviderError` type easier to | ||
// work with. Here, we showcase how to recover the inner type. | ||
let impl_specific_error: &JsonRpcClientError<HttpTransportError> = | ||
match error.as_any().downcast_ref() { | ||
Some(inner) => inner, | ||
None => panic!("unexpected downcast failure"), | ||
}; | ||
|
||
dbg!(impl_specific_error); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "starknet-accounts" | ||
version = "0.5.0" | ||
version = "0.6.0" | ||
authors = ["Jonathan LEI <[email protected]>"] | ||
license = "MIT OR Apache-2.0" | ||
edition = "2021" | ||
|
@@ -14,9 +14,9 @@ keywords = ["ethereum", "starknet", "web3"] | |
exclude = ["test-data/**"] | ||
|
||
[dependencies] | ||
starknet-core = { version = "0.6.1", path = "../starknet-core" } | ||
starknet-providers = { version = "0.6.0", path = "../starknet-providers" } | ||
starknet-signers = { version = "0.4.0", path = "../starknet-signers" } | ||
starknet-core = { version = "0.7.0", path = "../starknet-core" } | ||
starknet-providers = { version = "0.7.0", path = "../starknet-providers" } | ||
starknet-signers = { version = "0.5.0", path = "../starknet-signers" } | ||
async-trait = "0.1.68" | ||
auto_impl = "1.0.1" | ||
thiserror = "1.0.40" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.